From e0a1c3da46ada31058471a0c40bcc8fd56929846 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Mon, 31 May 2021 14:32:39 +0200 Subject: Fix T88666: Cryptomatte: EXR sequence does not update when scrubbing the timeline. Cause is that initializing the cryptomatte session would reset the current frame of an image sequence. The solution is to always use the scene current frame so it resets to the correct frame. This was a todo that wasn't solved after it landed in master. Needs to be backported to 2.93. --- source/blender/makesrna/intern/rna_nodetree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index b3ba111dc61..0ca275eb58b 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -3973,7 +3973,7 @@ static void rna_NodeCryptomatte_layer_name_set(PointerRNA *ptr, int new_value) } } -static const EnumPropertyItem *rna_NodeCryptomatte_layer_name_itemf(bContext *UNUSED(C), +static const EnumPropertyItem *rna_NodeCryptomatte_layer_name_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) @@ -3984,7 +3984,7 @@ static const EnumPropertyItem *rna_NodeCryptomatte_layer_name_itemf(bContext *UN EnumPropertyItem template = {0, "", 0, "", ""}; int totitem = 0; - ntreeCompositCryptomatteUpdateLayerNames(node); + ntreeCompositCryptomatteUpdateLayerNames(CTX_data_scene(C), node); int layer_index; LISTBASE_FOREACH_INDEX (CryptomatteLayer *, layer, &storage->runtime.layers, layer_index) { template.value = layer_index; @@ -4076,7 +4076,7 @@ static void rna_NodeCryptomatte_matte_set(PointerRNA *ptr, const char *value) static void rna_NodeCryptomatte_update_add(Main *bmain, Scene *scene, PointerRNA *ptr) { - ntreeCompositCryptomatteSyncFromAdd(ptr->data); + ntreeCompositCryptomatteSyncFromAdd(scene, ptr->data); rna_Node_update(bmain, scene, ptr); } -- cgit v1.2.3