fix redner scene creation error
0.6.1: - fix: in generated bat use %Username% variable (still limited to studio path model) - fix: error when creating render scenemain
parent
1a992a1092
commit
50c0b0b1a9
|
@ -14,6 +14,11 @@ Activate / deactivate layer opaticty according to prefix
|
||||||
Activate / deactivate all masks using MA layers
|
Activate / deactivate all masks using MA layers
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
0.6.1:
|
||||||
|
|
||||||
|
- fix: in generated bat use %Username% variable (still limited to studio path model)
|
||||||
|
- fix: error when creating render scene
|
||||||
|
|
||||||
0.6.0:
|
0.6.0:
|
||||||
|
|
||||||
- feat: button to generate a background rendering script to batch multi-scene
|
- feat: button to generate a background rendering script to batch multi-scene
|
||||||
|
|
|
@ -178,6 +178,17 @@ class GPEXP_OT_bg_render_script_selected_scene(bpy.types.Operator):
|
||||||
|
|
||||||
print('batch_file: ', batch_file)
|
print('batch_file: ', batch_file)
|
||||||
for scn_name in scn_to_render:
|
for scn_name in scn_to_render:
|
||||||
|
if platform.startswith('win'):
|
||||||
|
import re
|
||||||
|
pattern = r'users[\/\\](.*?)[\/\\]softs' # or point to user dit with %UserProfile%
|
||||||
|
re_user = re.search(pattern, bpy.app.binary_path)
|
||||||
|
if not re_user:
|
||||||
|
cmd = f'"{bpy.app.binary_path}" -b "{bpy.data.filepath}" -S "{scn_name}" -a'
|
||||||
|
else:
|
||||||
|
bin_path = bpy.app.binary_path.replace(re_user.group(1), '%USERNAME%')
|
||||||
|
cmd = f'"{bin_path}" -b "{bpy.data.filepath}" -S "{scn_name}" -a'
|
||||||
|
|
||||||
|
else: # Unix : point same for each user
|
||||||
cmd = f'"{bpy.app.binary_path}" -b "{bpy.data.filepath}" -S "{scn_name}" -a'
|
cmd = f'"{bpy.app.binary_path}" -b "{bpy.data.filepath}" -S "{scn_name}" -a'
|
||||||
script_text.append(cmd)
|
script_text.append(cmd)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ bl_info = {
|
||||||
"name": "GP Render",
|
"name": "GP Render",
|
||||||
"description": "Organise export of gp layers through compositor output",
|
"description": "Organise export of gp layers through compositor output",
|
||||||
"author": "Samuel Bernou",
|
"author": "Samuel Bernou",
|
||||||
"version": (0, 6, 0),
|
"version": (0, 6, 1),
|
||||||
"blender": (2, 93, 0),
|
"blender": (2, 93, 0),
|
||||||
"location": "View3D",
|
"location": "View3D",
|
||||||
"warning": "",
|
"warning": "",
|
||||||
|
|
6
fn.py
6
fn.py
|
@ -178,7 +178,7 @@ def new_scene_from(name, src_scn=None, regen=True, crop=True, link_cam=True, lin
|
||||||
if link_light and ob.type == 'LIGHT':
|
if link_light and ob.type == 'LIGHT':
|
||||||
scn.collection.objects.link(ob)
|
scn.collection.objects.link(ob)
|
||||||
|
|
||||||
# set adapted render settings (no AA)
|
# set adapted render settings
|
||||||
set_settings(scn)
|
set_settings(scn)
|
||||||
|
|
||||||
if crop:
|
if crop:
|
||||||
|
@ -210,8 +210,8 @@ def get_render_scene():
|
||||||
|
|
||||||
# TODO Clear node tree (initial view layer stuff)
|
# TODO Clear node tree (initial view layer stuff)
|
||||||
|
|
||||||
set_settings(render_scn, with_aa=False) # set adapted render settings (no AA by default)
|
set_settings(render_scn)
|
||||||
render_scn.use_aa = True
|
render_scn['use_aa'] = True
|
||||||
return render_scn
|
return render_scn
|
||||||
|
|
||||||
def get_view_layer(name, scene=None):
|
def get_view_layer(name, scene=None):
|
||||||
|
|
Loading…
Reference in New Issue