[Bf-extensions-cvs] [9ab377b2] master: Improve to objects to groups. Only set the selected objects
Eugenio Pignataro
noreply at git.blender.org
Fri Aug 25 17:31:44 CEST 2017
Commit: 9ab377b2345812ad908e21061624e9d6380b7149
Author: Eugenio Pignataro
Date: Fri Aug 25 12:31:36 2017 -0300
Branches: master
https://developer.blender.org/rBA9ab377b2345812ad908e21061624e9d6380b7149
Improve to objects to groups. Only set the selected objects
===================================================================
M oscurart_tools/oscurart_objects.py
===================================================================
diff --git a/oscurart_tools/oscurart_objects.py b/oscurart_tools/oscurart_objects.py
index 47b01378..d4fab225 100644
--- a/oscurart_tools/oscurart_objects.py
+++ b/oscurart_tools/oscurart_objects.py
@@ -530,10 +530,11 @@ def DefObjectToGroups():
"%s_MSH" %
(os.path.basename(bpy.data.filepath).replace(".blend", "")))
for ob in bpy.data.objects:
- if ob.type == "MESH":
- gr = bpy.data.groups.new(ob.name)
- gr.objects.link(ob)
- scgr.objects.link(ob)
+ if ob.select:
+ if ob.type == "MESH":
+ gr = bpy.data.groups.new(ob.name)
+ gr.objects.link(ob)
+ scgr.objects.link(ob)
class ObjectsToGroups (Operator):
More information about the Bf-extensions-cvs
mailing list