Asset Pipeline v2 #145

Closed
Nick Alberelli wants to merge 431 commits from (deleted):feature/asset-pipeline-v2 into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
4 changed files with 16 additions and 16 deletions
Showing only changes of commit 5be23e4fcd - Show all commits

View File

@ -4,8 +4,8 @@ import json
from . import constants
TASK_LAYER_TYPES = {}
DEFAULT_OWNERSHIP = {}
DEFAULT_OWNERSHIP_ATTRIBUTES = {}
TASK_LAYER_DEFAULTS = {}
ATTRIBUTE_DEFAULTS = {}
def get_json_file():
@ -22,8 +22,8 @@ def get_task_layer_presets_path():
def verify_json_data(json_file_path=""):
global TASK_LAYER_TYPES
global DEFAULT_OWNERSHIP
global DEFAULT_OWNERSHIP_ATTRIBUTES
global TASK_LAYER_DEFAULTS
global ATTRIBUTE_DEFAULTS
directory = Path(bpy.data.filepath).parent
if json_file_path == "":
json_file_path = directory.joinpath(constants.TASK_LAYER_CONFIG_NAME)
@ -33,8 +33,8 @@ def verify_json_data(json_file_path=""):
json_content = json.load(json_file)
try:
TASK_LAYER_TYPES = json_content["TASK_LAYER_TYPES"]
DEFAULT_OWNERSHIP = json_content["DEFAULT_OWNERSHIP"]
DEFAULT_OWNERSHIP_ATTRIBUTES = json_content["DEFAULT_OWNERSHIP_ATTRIBUTES"]
TASK_LAYER_DEFAULTS = json_content["TASK_LAYER_DEFAULTS"]
ATTRIBUTE_DEFAULTS = json_content["ATTRIBUTE_DEFAULTS"]
return True
except KeyError:
return

View File

@ -6,15 +6,15 @@ from .. import config
def get_default_task_layer_owner(td_type: str, name="") -> [str, bool]:
if td_type == constants.ATTRIBUTE_KEY:
if name in config.DEFAULT_OWNERSHIP_ATTRIBUTES:
if name in config.ATTRIBUTE_DEFAULTS:
return (
config.DEFAULT_OWNERSHIP_ATTRIBUTES[name]['default_owner'],
config.DEFAULT_OWNERSHIP_ATTRIBUTES[name]['auto_surrender'],
config.ATTRIBUTE_DEFAULTS[name]['default_owner'],
config.ATTRIBUTE_DEFAULTS[name]['auto_surrender'],
)
print(config.DEFAULT_OWNERSHIP[td_type]['default_owner'])
print(config.TASK_LAYER_DEFAULTS[td_type]['default_owner'])
return (
config.DEFAULT_OWNERSHIP[td_type]['default_owner'],
config.DEFAULT_OWNERSHIP[td_type]['auto_surrender'],
config.TASK_LAYER_DEFAULTS[td_type]['default_owner'],
config.TASK_LAYER_DEFAULTS[td_type]['auto_surrender'],
)

View File

@ -4,7 +4,7 @@
"Rigging": "RIG",
"Shading": "SHD"
},
"DEFAULT_OWNERSHIP": {
"TASK_LAYER_DEFAULTS": {
"GROUP_VERTEX": {
"default_owner": "Rigging",
"auto_surrender": false
@ -34,7 +34,7 @@
"auto_surrender": false
}
},
"DEFAULT_OWNERSHIP_ATTRIBUTES": {
"ATTRIBUTE_DEFAULTS": {
"sharp_face": {
"default_owner": "Modeling",
"auto_surrender": false

View File

@ -3,7 +3,7 @@
"Modeling": "MOD",
"Shading": "SHD"
},
"DEFAULT_OWNERSHIP": {
"TASK_LAYER_DEFAULTS": {
"GROUP_VERTEX": {
"default_owner": "Modeling",
"auto_surrender": false
@ -33,7 +33,7 @@
"auto_surrender": false
}
},
"DEFAULT_OWNERSHIP_ATTRIBUTES": {
"ATTRIBUTE_DEFAULTS": {
"sharp_face": {
"default_owner": "Modeling",
"auto_surrender": false