Commit: a78f6531dc814e46e59ad41afd32874a7dc0b009
Author: Jeroen Bakker
Date: Mon Feb 15 16:31:30 2021 +0100
Branches: compositor-cryptomatte-workflow
https://developer.blender.org/rBa78f6531dc814e46e59ad41afd32874a7dc0b009
Added poll function to only select multilayer OpenEXRs.
===================================================================
M source/blender/makesrna/intern/rna_nodetree.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_nodetree.c
b/source/blender/makesrna/intern/rna_nodetree.c
index afb2954356b..bb5cafc2db7 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -3777,6 +3777,12 @@ static void rna_NodeCryptomatte_image_set(PointerRNA
*ptr,
}
}
+static bool rna_NodeCryptomatte_image_poll(PointerRNA *UNUSED(ptr), PointerRNA
value)
+{
+ Image *image = (Image *)value.owner_id;
+ return image->type == IMA_TYPE_MULTILAYER;
+}
+
static void rna_NodeCryptomatte_matte_get(PointerRNA *ptr, char *value)
{
bNode *node = (bNode *)ptr->data;
@@ -8448,8 +8454,11 @@ static void def_cmp_cryptomatte(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_funcs(
- prop, "rna_NodeCryptomatte_image_get", "rna_NodeCryptomatte_image_set",
NULL, NULL);
+ RNA_def_property_pointer_funcs(prop,
+ "rna_NodeCryptomatte_image_get",
+ "rna_NodeCryptomatte_image_set",
+ NULL,
+ "rna_NodeCryptomatte_image_poll");
RNA_def_property_struct_type(prop, "Image");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Image", "");
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs