[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56793] trunk/blender/source/blender/ makesrna/intern/rna_nodetree.c: "Fix" for #35336.
Lukas Toenne
lukas.toenne at googlemail.com
Tue May 14 13:18:46 CEST 2013
Revision: 56793
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56793
Author: lukastoenne
Date: 2013-05-14 11:18:45 +0000 (Tue, 14 May 2013)
Log Message:
-----------
"Fix" for #35336. Added a warning in the doc string for nodetree.nodes.new() to point users at the recent API change from node.type enum identifiers to the generic node.bl_idname strings. Not really nice, but could prevent a few bug reports and make scripters' lifes easier.
Modified Paths:
--------------
trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
Modified: trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2013-05-14 10:56:18 UTC (rev 56792)
+++ trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2013-05-14 11:18:45 UTC (rev 56793)
@@ -6888,7 +6888,10 @@
func = RNA_def_function(srna, "new", "rna_NodeTree_node_new");
RNA_def_function_ui_description(func, "Add a node to this node tree");
RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS);
- parm = RNA_def_string(func, "type", "", MAX_NAME, "Type", "Type of node to add");
+ /* XXX warning note should eventually be removed,
+ * added this here to avoid frequent confusion with API changes from "type" to "bl_idname"
+ */
+ parm = RNA_def_string(func, "type", "", MAX_NAME, "Type", "Type of node to add (Warning: should be same as node.bl_idname, not node.type!)");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return value */
parm = RNA_def_pointer(func, "node", "Node", "", "New node");
More information about the Bf-blender-cvs
mailing list