partial autobuild

1.1.0

- added: `autobuild` button (partial auto-buildfor now)
- added: make sent object selected
This commit is contained in:
pullusb
2023-01-05 18:05:24 +01:00
parent e086eb4050
commit 10c279c315
6 changed files with 102 additions and 69 deletions
+5 -3
View File
@@ -75,17 +75,19 @@ class GPEXP_OT_render_auto_build(bpy.types.Operator):
if (render_wkspace := bpy.data.workspaces.get('GP Render')):
context.window.workspace = render_wkspace
else:
render_wkspace_filepath = Path(bpy.utils.user_resource('SCRIPTS'), 'startup', 'GP', 'startup.blend')
render_wkspace_filepath = Path(bpy.utils.user_resource('SCRIPTS'), 'startup', 'bl_app_templates_user', 'GP', 'startup.blend')
print('render workspace', render_wkspace_filepath.exists())
ret = bpy.ops.workspace.append_activate(idname='GP Render', filepath=str(render_wkspace_filepath))
print('ret: ', ret)
if ret != {'FINISHED'}:
# Fallback to workspace template shipped with addon (TODO : add template blend file in addon)
render_wkspace_filepath = Path(__file__).parent / 'workspaces' / 'startup.blend'
ret = bpy.ops.workspace.append_activate(idname='GP Render', filepath=str(render_wkspace_filepath))
if ret != {'FINISHED'}:
print('No GP render workspace available')
## Group all adjacent layer type
## Renumber File outputs