Fix #105942: Wrong text in MeshSequenceCache and Transform Cache
The Alembic procedural was refrenced here even if USD was loaded. Now check the CacheFile type and let the user know Render Procedurals are only supported for Alembic atm. Pull Request: https://projects.blender.org/blender/blender/pulls/108701
This commit is contained in:
committed by
Philipp Oeser
parent
d61d2e5f59
commit
da052ab9f6
@@ -40,6 +40,7 @@
|
||||
|
||||
#include "BKE_action.h"
|
||||
#include "BKE_blendfile.h"
|
||||
#include "BKE_cachefile.h"
|
||||
#include "BKE_colorband.h"
|
||||
#include "BKE_colortools.h"
|
||||
#include "BKE_constraint.h"
|
||||
@@ -65,6 +66,7 @@
|
||||
|
||||
#include "DEG_depsgraph.h"
|
||||
#include "DEG_depsgraph_build.h"
|
||||
#include "DEG_depsgraph_query.h"
|
||||
|
||||
#include "ED_fileselect.h"
|
||||
#include "ED_object.h"
|
||||
@@ -6804,8 +6806,16 @@ void uiTemplateCacheFileProcedural(uiLayout *layout, const bContext *C, PointerR
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
const bool engine_supports_procedural = RE_engine_supports_alembic_procedural(engine_type,
|
||||
scene);
|
||||
CacheFile *cache_file = static_cast<CacheFile *>(fileptr->data);
|
||||
CacheFile *cache_file_eval = reinterpret_cast<CacheFile *>(
|
||||
DEG_get_evaluated_id(CTX_data_depsgraph_pointer(C), &cache_file->id));
|
||||
bool is_alembic = cache_file_eval->type == CACHEFILE_TYPE_ALEMBIC;
|
||||
|
||||
if (!engine_supports_procedural) {
|
||||
if (!is_alembic) {
|
||||
row = uiLayoutRow(layout, false);
|
||||
uiItemL(row, TIP_("Only Alembic Procedurals supported"), ICON_INFO);
|
||||
}
|
||||
else if (!engine_supports_procedural) {
|
||||
row = uiLayoutRow(layout, false);
|
||||
/* For Cycles, verify that experimental features are enabled. */
|
||||
if (BKE_scene_uses_cycles(scene) && !BKE_scene_uses_cycles_experimental_features(scene)) {
|
||||
@@ -6822,7 +6832,7 @@ void uiTemplateCacheFileProcedural(uiLayout *layout, const bContext *C, PointerR
|
||||
}
|
||||
|
||||
row = uiLayoutRow(layout, false);
|
||||
uiLayoutSetActive(row, engine_supports_procedural);
|
||||
uiLayoutSetActive(row, is_alembic && engine_supports_procedural);
|
||||
uiItemR(row, fileptr, "use_render_procedural", 0, nullptr, ICON_NONE);
|
||||
|
||||
const bool use_render_procedural = RNA_boolean_get(fileptr, "use_render_procedural");
|
||||
|
||||
Reference in New Issue
Block a user