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.
This commit is contained in:
Dalai Felinto 2017-06-22 10:25:05 +02:00
parent 1979176088
commit be4b5551c7
Notes: blender-bot 2023-02-14 19:37:43 +01:00
Referenced by issue blender/blender-addons#51863, PYAPI: CompositorNodeSwitchView have the wrong api docs
2 changed files with 1 additions and 8 deletions

View File

@ -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)

View File

@ -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;