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.
|
Returns a list of paths for a specific preset.
|
||||||
"""
|
"""
|
||||||
|
dirs = []
|
||||||
return (_os.path.join(_presets, subdir), )
|
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):
|
def smpte_from_seconds(time, fps=None):
|
||||||
|
|||||||
@@ -739,6 +739,9 @@ class Menu(StructRNA, _GenericUI, metaclass=RNAMeta):
|
|||||||
import bpy.utils
|
import bpy.utils
|
||||||
|
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
|
if not searchpaths:
|
||||||
|
layout.label("* Missing Paths *")
|
||||||
|
|
||||||
# collect paths
|
# collect paths
|
||||||
files = []
|
files = []
|
||||||
|
|||||||
Reference in New Issue
Block a user