Improve to objects to groups. Only set the selected objects

This commit is contained in:
Eugenio Pignataro 2017-08-25 12:31:36 -03:00
parent 5e4e29c468
commit 9ab377b234
1 changed files with 5 additions and 4 deletions

View File

@ -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):