Asset Pipeline v2 #145
@ -3,6 +3,8 @@
|
|||||||
# You could even choose to name your task layers after artists in your team.
|
# You could even choose to name your task layers after artists in your team.
|
||||||
# {Task Layer Key: Collection/UI name}
|
# {Task Layer Key: Collection/UI name}
|
||||||
|
|
||||||
|
ADDON_NAME = "asset_pipeline_2"
|
||||||
|
|
||||||
TASK_LAYER_CONFIG_NAME = "task_layers.json"
|
TASK_LAYER_CONFIG_NAME = "task_layers.json"
|
||||||
TASK_LAYER_CONFIG_DIR_NAME = "task_layer_configs"
|
TASK_LAYER_CONFIG_DIR_NAME = "task_layer_configs"
|
||||||
|
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
import bpy
|
import bpy
|
||||||
|
from . import constants
|
||||||
|
|
||||||
|
|
||||||
|
def get_addon_prefs():
|
||||||
|
return bpy.context.preferences.addons[constants.ADDON_NAME].preferences
|
||||||
|
|
||||||
|
|
||||||
class ASSET_PIPELINE_addon_preferences(bpy.types.AddonPreferences):
|
class ASSET_PIPELINE_addon_preferences(bpy.types.AddonPreferences):
|
||||||
|
@ -3,6 +3,7 @@ from . import constants
|
|||||||
from .merge.task_layer import get_local_task_layers
|
from .merge.task_layer import get_local_task_layers
|
||||||
from .config import get_task_layer_presets_path
|
from .config import get_task_layer_presets_path
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from .prefs import get_addon_prefs
|
||||||
|
|
||||||
""" NOTE Items in these properties groups should be generated by a function that finds the
|
""" NOTE Items in these properties groups should be generated by a function that finds the
|
||||||
avaliable task layers from the task_layer_defaults.json file that needs to be created.
|
avaliable task layers from the task_layer_defaults.json file that needs to be created.
|
||||||
@ -10,7 +11,7 @@ avaliable task layers from the task_layer_defaults.json file that needs to be cr
|
|||||||
|
|
||||||
|
|
||||||
def get_task_layer_presets(self, context):
|
def get_task_layer_presets(self, context):
|
||||||
prefs = context.preferences.addons["asset_pipeline_2"].preferences
|
prefs = get_addon_prefs()
|
||||||
user_tls = Path(prefs.custom_task_layers_dir)
|
user_tls = Path(prefs.custom_task_layers_dir)
|
||||||
|
|
||||||
presets_dir = get_task_layer_presets_path()
|
presets_dir = get_task_layer_presets_path()
|
||||||
|
Loading…
Reference in New Issue
Block a user