fix env load

gpv2
Pullusb 2021-06-23 16:46:30 +02:00
parent 253d1501a1
commit 4a4d72b410
1 changed files with 6 additions and 6 deletions

View File

@ -350,10 +350,10 @@ class GPTB_prefs(bpy.types.AddonPreferences):
row.prop(self, 'render_res_x', text='Width') row.prop(self, 'render_res_x', text='Width')
row.prop(self, 'render_res_y', text='Height') row.prop(self, 'render_res_y', text='Height')
## Palette
box.label(text='Project folders:')
subbox = box.box() subbox = box.box()
subbox.label(text='Project folders:')
## Palette
subbox.prop(self, 'use_env_palettes', text='Use Palettes Environnement Path') subbox.prop(self, 'use_env_palettes', text='Use Palettes Environnement Path')
subbox.prop(self, 'palette_path') subbox.prop(self, 'palette_path')
@ -492,13 +492,13 @@ def set_env_properties():
prefs = get_addon_prefs() prefs = get_addon_prefs()
fps = os.getenv('FPS') fps = os.getenv('FPS')
prefs.fps = fps if fps else prefs.fps prefs.fps = int(fps) if fps else prefs.fps
render_height = os.getenv('RENDER_HEIGHT') render_height = os.getenv('RENDER_HEIGHT')
prefs.render_res_x = render_height if render_height else prefs.render_res_x prefs.render_res_x = int(render_height) if render_height else prefs.render_res_x
render_width = os.getenv('RENDER_WIDTH') render_width = os.getenv('RENDER_WIDTH')
prefs.render_res_y = render_width if render_width else prefs.render_res_y prefs.render_res_y = int(render_width) if render_width else prefs.render_res_y
palettes = os.getenv('PALETTES') palettes = os.getenv('PALETTES')
if prefs.use_env_palettes: if prefs.use_env_palettes: