How can I correctly group multiple objects and have them behave as a unit. I tried the following
sceptre = bpy.data.objects['sceptre'] ring = bpy.data.objects['ring'] Group(sceptre,'wizards') Group(ring,'wizards')
def Group(obj0,groupName): if not groupName in bpy.data.groups: bpy.ops.group.create(name=groupName) bpy.context.scene.objects.active = obj0 bpy.ops.object.group_link(group=groupName)
def Group(obj0,groupName): if not groupName in bpy.data.groups: group = bpy.data.groups.new(groupName) else: group = bpy.data.groups[groupName] if not obj0.name in group.objects: group.objects.link(obj0)
The object property pane shows the new group name for each object under the
Add to Group tab with the last object outlined in green after running the script but the objects do not move as a unit when I select and drag either of them like it does when manually grouped with Ctrl + G.