Depsgraph: Support changing scene's render engine
This commit is contained in:
@@ -547,9 +547,11 @@ void update_copy_on_write_scene(const Depsgraph *depsgraph,
|
||||
else {
|
||||
scene_cow->obedit = NULL;
|
||||
}
|
||||
// TODO(sergey): Things which are still missing here:
|
||||
// - Active render engine.
|
||||
// - Something else?
|
||||
/* Synchronize active render engine. */
|
||||
BLI_strncpy_utf8(scene_cow->r.engine,
|
||||
scene_orig->r.engine,
|
||||
sizeof(scene_cow->r.engine));
|
||||
/* TODO(sergey): What else do we need here? */
|
||||
}
|
||||
|
||||
/* Update copy-on-write version of armature object from original scene. */
|
||||
|
||||
@@ -1569,9 +1569,12 @@ static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value)
|
||||
{
|
||||
RenderData *rd = (RenderData *)ptr->data;
|
||||
RenderEngineType *type = BLI_findlink(&R_engines, value);
|
||||
Scene *scene = (Scene *)ptr->id.data;
|
||||
|
||||
if (type)
|
||||
BLI_strncpy_utf8(rd->engine, type->idname, sizeof(rd->engine));
|
||||
|
||||
DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
static EnumPropertyItem *rna_RenderSettings_engine_itemf(
|
||||
|
||||
Reference in New Issue
Block a user