Oh thanks, nice catch, fixed in r56610.
On Thu, May 9, 2013 at 4:04 AM, Campbell Barton <[email protected]>wrote: > bpy.data.node_groups['%s']" % group.name > ... should probably be > bpy.data.node_groups[%r]" % group.name > - to ensure chars are escaped properly. > > > On Thu, May 9, 2013 at 1:41 AM, Lukas Toenne > <[email protected]> wrote: > > Revision: 56595 > > > http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56595 > > Author: lukastoenne > > Date: 2013-05-08 15:41:07 +0000 (Wed, 08 May 2013) > > Log Message: > > ----------- > > Added filter to the node group items callback to remove recursive node > groups right from the start. These tree pointers would be polled out > internally as well, but this way they don't show up in the menus in the > first place. > > > > Modified Paths: > > -------------- > > trunk/blender/release/scripts/startup/nodeitems_builtins.py > > > > Modified: trunk/blender/release/scripts/startup/nodeitems_builtins.py > > =================================================================== > > --- trunk/blender/release/scripts/startup/nodeitems_builtins.py > 2013-05-08 15:41:05 UTC (rev 56594) > > +++ trunk/blender/release/scripts/startup/nodeitems_builtins.py > 2013-05-08 15:41:07 UTC (rev 56595) > > @@ -61,11 +61,26 @@ > > if not ntree: > > return > > > > + def contains_group(nodetree, group): > > + if nodetree == group: > > + return True > > + else: > > + for node in nodetree.nodes: > > + if node.bl_idname in node_tree_group_type.values() and > node.node_tree is not None: > > + if contains_group(node.node_tree, group): > > + return True > > + return False > > + > > for group in context.blend_data.node_groups: > > - if group.bl_idname == ntree.bl_idname: > > - yield NodeItem(node_tree_group_type[group.bl_idname], > group.name, { "node_tree" : "bpy.data.node_groups['%s']" % group.name }) > > + if group.bl_idname != ntree.bl_idname: > > + continue > > + # filter out recursive groups > > + if contains_group(ntree, group): > > + continue > > > > + yield NodeItem(node_tree_group_type[group.bl_idname], > group.name, { "node_tree" : "bpy.data.node_groups['%s']" % group.name }) > > > _______________________________________________ > Bf-committers mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-committers > _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
