diff options
author | Eugenio Pignataro <info@oscurart.com.ar> | 2017-08-25 18:31:36 +0300 |
---|---|---|
committer | Eugenio Pignataro <info@oscurart.com.ar> | 2017-08-25 18:31:36 +0300 |
commit | 9ab377b2345812ad908e21061624e9d6380b7149 (patch) | |
tree | 3528b6f9b7bb5c5727a577de7f72a6bba9bd5487 /oscurart_tools | |
parent | 5e4e29c4681331a35248b9b95ded94eb86dffb9d (diff) |
Improve to objects to groups. Only set the selected objects
Diffstat (limited to 'oscurart_tools')
-rw-r--r-- | oscurart_tools/oscurart_objects.py | 9 |
1 files changed, 5 insertions, 4 deletions
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): |