[Bf-blender-cvs] [be4b5551c7a] master: Fix T51863: CompositorNodeSwitchView have the wrong rna API

Dalai Felinto noreply at git.blender.org
Thu Jun 22 10:28:25 CEST 2017


Commit: be4b5551c7a4f0f5be1d6fc55c87c890ee0ddb27
Author: Dalai Felinto
Date:   Thu Jun 22 10:25:05 2017 +0200
Branches: master
https://developer.blender.org/rBbe4b5551c7a4f0f5be1d6fc55c87c890ee0ddb27

Fix T51863: CompositorNodeSwitchView have the wrong rna API

Although the original report was about the docs, the real issue was in
the API.

My original commit started from a copy-paste from the Switch
Node. However I don't use custom1 for thew Switch View node.

The docs is slightly incomplete since it would be nice to mention the
views here. Or maybe even expose them via Python. But honestly they are
generated depending on the scene multi-view settings.

===================================================================

M	source/blender/makesrna/intern/rna_nodetree.c
M	source/blender/nodes/composite/nodes/node_composite_switchview.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 22d07d739cd..10422c85579 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -6320,14 +6320,8 @@ static void def_cmp_switch(StructRNA *srna)
 	RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
 }
 
-static void def_cmp_switch_view(StructRNA *srna)
+static void def_cmp_switch_view(StructRNA *UNUSED(srna))
 {
-	PropertyRNA *prop;
-
-	prop = RNA_def_property(srna, "check", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "custom1", 0);
-	RNA_def_property_ui_text(prop, "Switch", "Off: first socket, On: second socket");
-	RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
 }
 
 static void def_cmp_colorcorrection(StructRNA *srna)
diff --git a/source/blender/nodes/composite/nodes/node_composite_switchview.c b/source/blender/nodes/composite/nodes/node_composite_switchview.c
index d805cf4d87f..e0d9fa33f13 100644
--- a/source/blender/nodes/composite/nodes/node_composite_switchview.c
+++ b/source/blender/nodes/composite/nodes/node_composite_switchview.c
@@ -137,7 +137,6 @@ static void init_switch_view(const bContext *C, PointerRNA *ptr)
 	cmp_node_switch_view_sanitycheck(ntree, node);
 }
 
-/* custom1 = mix type */
 void register_node_type_cmp_switch_view(void)
 {
 	static bNodeType ntype;




More information about the Bf-blender-cvs mailing list