Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-06-06 00:10:15 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-06-06 00:10:15 +0400
commit71758cb5d7fee4f3affa9822050525f79f14a9fb (patch)
tree124371653f9d79ecedd5121e6e1de0bf50721b8b /source
parentbbb025214deddc73749b3fa5e3136c19a7871fd1 (diff)
Fix for frame node property display: Extended frame node properties such as the "shrink" option were not shown in the node editor sidebar. This was because the RNA type for the node was not using
NodeInternal as a base, which is a wrapper to expose the C callbacks as methods in bpy. Now these basic node types are also based on NodeInternal to ensure the full interface is available to py scripts. In the process removed the unused NodeGroup register function, this doesn't work nicely anyway because it requires multiple inheritance which RNA doesn't support (so py node groups should be done entirely in python in the future).
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index e16f2a5f8ba..5d8cc915dda 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -1364,22 +1364,6 @@ static StructRNA *rna_Node_register(Main *bmain, ReportList *reports,
return nt->ext.srna;
}
-static StructRNA *rna_NodeGroup_register(Main *bmain, ReportList *reports,
- void *data, const char *identifier,
- StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
-{
- bNodeType *nt = rna_Node_register_base(bmain, reports, &RNA_NodeGroup, data, identifier, validate, call, free);
- if (!nt)
- return NULL;
-
- nodeRegisterType(nt);
-
- /* update while blender is running */
- WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
-
- return nt->ext.srna;
-}
-
static StructRNA *rna_ShaderNode_register(Main *bmain, ReportList *reports,
void *data, const char *identifier,
StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
@@ -2862,8 +2846,6 @@ static void def_group(StructRNA *srna)
{
PropertyRNA *prop;
- RNA_def_struct_register_funcs(srna, "rna_NodeGroup_register", "rna_Node_unregister", NULL);
-
prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "id");
RNA_def_property_struct_type(prop, "NodeTree");
@@ -7233,6 +7215,10 @@ static void define_specific_node(BlenderRNA *brna, const char *struct_name, cons
FunctionRNA *func;
PropertyRNA *parm;
+ /* XXX hack, want to avoid "NodeInternal" prefix, so use "Node" in NOD_static_types.h and replace here */
+ if (STREQ(base_name, "Node"))
+ base_name = "NodeInternal";
+
srna = RNA_def_struct(brna, struct_name, base_name);
RNA_def_struct_ui_text(srna, ui_name, ui_desc);
RNA_def_struct_sdna(srna, "bNode");