Skip to content

Commit

Permalink
Various bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
leukbaars committed Feb 3, 2018
1 parent 1a65c2e commit 8a7ccc9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions BRM_BakeUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,8 @@ def execute(self, context):
self.report({'WARNING'}, "Select a valid hipoly object or group!")
return {'FINISHED'}



#setup
if len(bpy.context.selected_objects) == 0:
bpy.ops.object.mode_set(mode='OBJECT')


if bpy.context.object.mode == 'EDIT':
bpy.ops.object.mode_set(mode='OBJECT')

Expand All @@ -340,6 +336,7 @@ def execute(self, context):
for o in bpy.data.groups[context.scene.lowpoly].objects:
o.hide = False
o.select = True
bpy.context.scene.objects.active = o
o.hide_render = True
#duplicate selected and combine into new object
bpy.ops.object.duplicate()
Expand Down Expand Up @@ -501,6 +498,7 @@ def execute(self, context):
if bpy.data.objects.get(context.scene.lowpoly) is None:
for o in bpy.data.groups[context.scene.lowpoly].objects:
o.hide = False
bpy.context.scene.objects.active = o
else:
bpy.data.objects[context.scene.lowpoly].hide = False
else:
Expand All @@ -514,6 +512,7 @@ def execute(self, context):
if bpy.data.objects.get(context.scene.hipoly) is None:
for o in bpy.data.groups[context.scene.hipoly].objects:
o.hide = False
bpy.context.scene.objects.active = o
else:
bpy.data.objects[context.scene.hipoly].hide = False
else:
Expand Down

0 comments on commit 8a7ccc9

Please sign in to comment.