Changeset View
Changeset View
Standalone View
Standalone View
uv_texture_atlas.py
| Context not available. | |||||
| bpy.ops.object.select_all(action='DESELECT') | bpy.ops.object.select_all(action='DESELECT') | ||||
| # We do the MergeList beacuse we will duplicate grouped objects | # We do the MergeList because we will duplicate grouped objects | ||||
| mergeList = [] | mergeList = [] | ||||
| for object in bpy.data.groups[self.group_name].objects: | for object in bpy.data.groups[self.group_name].objects: | ||||
| mergeList.append(object) | mergeList.append(object) | ||||
| Context not available. | |||||
| bpy.ops.object.select_all(action='DESELECT') | bpy.ops.object.select_all(action='DESELECT') | ||||
| object.select = True | object.select = True | ||||
| # activate lightmap uv if existant | # activate lightmap uv if existent | ||||
| for uv in object.data.uv_textures: | for uv in object.data.uv_textures: | ||||
| if uv.name == self.group_name: | if uv.name == self.group_name: | ||||
| uv.active = True | uv.active = True | ||||
| Context not available. | |||||
| bpy.ops.object.mode_set(mode='OBJECT', toggle=False) | bpy.ops.object.mode_set(mode='OBJECT', toggle=False) | ||||
| # scene.objects.active.select = False | # scene.objects.active.select = False | ||||
| # find separeted object | # find separated object | ||||
| ob_separeted = None | ob_separeted = None | ||||
| for obj in groupSeparate.objects: | for obj in groupSeparate.objects: | ||||
| if obj != ob_merged: | if obj != ob_merged: | ||||
| Context not available. | |||||
| ob_original.hide_select = isOriginalToSelect | ob_original.hide_select = isOriginalToSelect | ||||
| ob_original.data.update() | ob_original.data.update() | ||||
| # delete separeted object | # delete separated object | ||||
| bpy.ops.object.select_all(action='DESELECT') | bpy.ops.object.select_all(action='DESELECT') | ||||
| ob_separeted.select = True | ob_separeted.select = True | ||||
| bpy.ops.object.delete(use_global=False) | bpy.ops.object.delete(use_global=False) | ||||
| Context not available. | |||||