mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
refactor maya loaders config to settings
This commit is contained in:
parent
80a614261f
commit
d5473aee74
8 changed files with 26 additions and 26 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from avalon import api
|
||||
import pype.hosts.maya.plugin
|
||||
import os
|
||||
from pype.api import config
|
||||
from pype.api import project_settings
|
||||
import clique
|
||||
|
||||
|
||||
|
|
@ -74,8 +74,8 @@ class AssProxyLoader(pype.hosts.maya.plugin.ReferenceLoader):
|
|||
proxyShape.dso.set(path)
|
||||
proxyShape.aiOverrideShaders.set(0)
|
||||
|
||||
presets = config.get_presets(project=os.environ['AVALON_PROJECT'])
|
||||
colors = presets['plugins']['maya']['load']['colors']
|
||||
settings = project_settings(os.environ['AVALON_PROJECT'])
|
||||
colors = settings['maya']['load']['colors']
|
||||
|
||||
c = colors.get(family)
|
||||
if c is not None:
|
||||
|
|
@ -196,8 +196,8 @@ class AssStandinLoader(api.Loader):
|
|||
label = "{}:{}".format(namespace, name)
|
||||
root = pm.group(name=label, empty=True)
|
||||
|
||||
presets = config.get_presets(project=os.environ['AVALON_PROJECT'])
|
||||
colors = presets['plugins']['maya']['load']['colors']
|
||||
settings = project_settings(os.environ['AVALON_PROJECT'])
|
||||
colors = settings['maya']['load']['colors']
|
||||
|
||||
c = colors.get('ass')
|
||||
if c is not None:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from avalon import api
|
||||
import pype.hosts.maya.plugin
|
||||
import os
|
||||
from pype.api import config
|
||||
from pype.api import project_settings
|
||||
reload(config)
|
||||
|
||||
|
||||
|
|
@ -35,8 +35,8 @@ class GpuCacheLoader(api.Loader):
|
|||
label = "{}:{}".format(namespace, name)
|
||||
root = cmds.group(name=label, empty=True)
|
||||
|
||||
presets = config.get_presets(project=os.environ['AVALON_PROJECT'])
|
||||
colors = presets['plugins']['maya']['load']['colors']
|
||||
settings = project_settings(os.environ['AVALON_PROJECT'])
|
||||
colors = settings['maya']['load']['colors']
|
||||
c = colors.get('model')
|
||||
if c is not None:
|
||||
cmds.setAttr(root + ".useOutlinerColor", 1)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import pype.hosts.maya.plugin
|
|||
from avalon import api, maya
|
||||
from maya import cmds
|
||||
import os
|
||||
from pype.api import config
|
||||
from pype.api import project_settings
|
||||
|
||||
|
||||
class ReferenceLoader(pype.hosts.maya.plugin.ReferenceLoader):
|
||||
|
|
@ -77,8 +77,8 @@ class ReferenceLoader(pype.hosts.maya.plugin.ReferenceLoader):
|
|||
|
||||
cmds.setAttr(groupName + ".displayHandle", 1)
|
||||
|
||||
presets = config.get_presets(project=os.environ['AVALON_PROJECT'])
|
||||
colors = presets['plugins']['maya']['load']['colors']
|
||||
settings = project_settings(os.environ['AVALON_PROJECT'])
|
||||
colors = settings['maya']['load']['colors']
|
||||
c = colors.get(family)
|
||||
if c is not None:
|
||||
groupNode.useOutlinerColor.set(1)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from avalon import api
|
||||
import os
|
||||
from pype.api import config
|
||||
from pype.api import project_settings
|
||||
|
||||
class LoadVDBtoRedShift(api.Loader):
|
||||
"""Load OpenVDB in a Redshift Volume Shape"""
|
||||
|
|
@ -55,8 +55,8 @@ class LoadVDBtoRedShift(api.Loader):
|
|||
label = "{}:{}".format(namespace, name)
|
||||
root = cmds.group(name=label, empty=True)
|
||||
|
||||
presets = config.get_presets(project=os.environ['AVALON_PROJECT'])
|
||||
colors = presets['plugins']['maya']['load']['colors']
|
||||
settings = project_settings(os.environ['AVALON_PROJECT'])
|
||||
colors = settings['maya']['load']['colors']
|
||||
|
||||
c = colors.get(family)
|
||||
if c is not None:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from avalon import api
|
||||
from pype.api import config
|
||||
from pype.api import project_settings
|
||||
import os
|
||||
|
||||
|
||||
|
|
@ -48,8 +48,8 @@ class LoadVDBtoVRay(api.Loader):
|
|||
label = "{}:{}".format(namespace, name)
|
||||
root = cmds.group(name=label, empty=True)
|
||||
|
||||
presets = config.get_presets(project=os.environ['AVALON_PROJECT'])
|
||||
colors = presets['plugins']['maya']['load']['colors']
|
||||
settings = project_settings(os.environ['AVALON_PROJECT'])
|
||||
colors = settings['maya']['load']['colors']
|
||||
|
||||
c = colors.get(family)
|
||||
if c is not None:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from avalon.maya import lib
|
||||
from avalon import api
|
||||
from pype.api import config
|
||||
from pype.api import project_settings
|
||||
import os
|
||||
import maya.cmds as cmds
|
||||
|
||||
|
|
@ -47,8 +47,8 @@ class VRayProxyLoader(api.Loader):
|
|||
return
|
||||
|
||||
# colour the group node
|
||||
presets = config.get_presets(project=os.environ['AVALON_PROJECT'])
|
||||
colors = presets['plugins']['maya']['load']['colors']
|
||||
settings = project_settings(os.environ['AVALON_PROJECT'])
|
||||
colors = settings['maya']['load']['colors']
|
||||
c = colors.get(family)
|
||||
if c is not None:
|
||||
cmds.setAttr("{0}.useOutlinerColor".format(group_node), 1)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ from maya import cmds
|
|||
from avalon import api, io
|
||||
from avalon.maya import lib as avalon_lib, pipeline
|
||||
from pype.hosts.maya import lib
|
||||
from pype.api import config
|
||||
from pype.api import project_settings
|
||||
from pprint import pprint
|
||||
|
||||
|
||||
|
|
@ -59,8 +59,8 @@ class YetiCacheLoader(api.Loader):
|
|||
group_name = "{}:{}".format(namespace, name)
|
||||
group_node = cmds.group(nodes, name=group_name)
|
||||
|
||||
presets = config.get_presets(project=os.environ['AVALON_PROJECT'])
|
||||
colors = presets['plugins']['maya']['load']['colors']
|
||||
settings = project_settings(os.environ['AVALON_PROJECT'])
|
||||
colors = settings['maya']['load']['colors']
|
||||
|
||||
c = colors.get(family)
|
||||
if c is not None:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import os
|
||||
from collections import defaultdict
|
||||
|
||||
from pype.api import config
|
||||
from pype.api import project_settings
|
||||
import pype.hosts.maya.plugin
|
||||
from pype.hosts.maya import lib
|
||||
|
||||
|
|
@ -77,8 +77,8 @@ class YetiRigLoader(pype.hosts.maya.plugin.ReferenceLoader):
|
|||
|
||||
groupName = "{}:{}".format(namespace, name)
|
||||
|
||||
presets = config.get_presets(project=os.environ['AVALON_PROJECT'])
|
||||
colors = presets['plugins']['maya']['load']['colors']
|
||||
settings = project_settings(os.environ['AVALON_PROJECT'])
|
||||
colors = settings['maya']['load']['colors']
|
||||
|
||||
c = colors.get('yetiRig')
|
||||
if c is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue