bugfix [#23833] Console Errors (Keymaps)
dont allow non-existing preset paths to be passed to the preset menu.
This commit is contained in:
@@ -271,8 +271,12 @@ def preset_paths(subdir):
|
||||
"""
|
||||
Returns a list of paths for a specific preset.
|
||||
"""
|
||||
|
||||
return (_os.path.join(_presets, subdir), )
|
||||
dirs = []
|
||||
for path in script_paths("presets"):
|
||||
directory = _os.path.join(path, subdir)
|
||||
if _os.path.isdir(directory):
|
||||
dirs.append(directory)
|
||||
return dirs
|
||||
|
||||
|
||||
def smpte_from_seconds(time, fps=None):
|
||||
|
@@ -739,6 +739,9 @@ class Menu(StructRNA, _GenericUI, metaclass=RNAMeta):
|
||||
import bpy.utils
|
||||
|
||||
layout = self.layout
|
||||
|
||||
if not searchpaths:
|
||||
layout.label("* Missing Paths *")
|
||||
|
||||
# collect paths
|
||||
files = []
|
||||
|
Reference in New Issue
Block a user