Skip to content

Commit

Permalink
Determine whether the render preset folder even exists
Browse files Browse the repository at this point in the history
  • Loading branch information
p2or authored Oct 9, 2023
1 parent 90d4b8b commit 1521d64
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions loom.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"name": "Loom",
"description": "Image sequence rendering, encoding and playback",
"author": "Christian Brinkmann (p2or)",
"version": (0, 9, 0),
"version": (0, 9, 1),
"blender": (2, 82, 0),
"doc_url": "https://github.com/p2or/blender-loom",
"tracker_url": "https://github.com/p2or/blender-loom/issues",
Expand Down Expand Up @@ -760,11 +760,13 @@ def invoke(self, context, event):

def render_preset_callback(scene, context):
items = [('EMPTY', "Current Render Settings", "")]
for f in os.listdir(context.preferences.addons[__name__].preferences.render_presets_path):
if not f.startswith(".") and f.endswith(".py"):
fn, ext = os.path.splitext(f)
#d = bpy.path.display_name(os.path.join(rndr_presets_path, f))
items.append((f, "'{}' Render Preset".format(fn), ""))
preset_path = context.preferences.addons[__name__].preferences.render_presets_path
if os.path.exists(preset_path):
for f in os.listdir(preset_path):
if not f.startswith(".") and f.endswith(".py"):
fn, ext = os.path.splitext(f)
#d = bpy.path.display_name(os.path.join(rndr_presets_path, f))
items.append((f, "'{}' Render Preset".format(fn), ""))
return items


Expand Down

0 comments on commit 1521d64

Please sign in to comment.