mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Alembic Loader as Arnold Standin
This commit is contained in:
parent
ff565317d0
commit
8eb704aeb2
1 changed files with 8 additions and 7 deletions
|
|
@ -28,11 +28,10 @@ class AlembicStandinLoader(load.LoaderPlugin):
|
||||||
|
|
||||||
version = context["version"]
|
version = context["version"]
|
||||||
version_data = version.get("data", {})
|
version_data = version.get("data", {})
|
||||||
|
family = version["data"]["families"]
|
||||||
self.log.info("version_data: {}\n".format(version_data))
|
self.log.info("version_data: {}\n".format(version_data))
|
||||||
|
self.log.info("family: {}\n".format(family))
|
||||||
frameStart = version_data.get("frameStart", None)
|
frameStart = version_data.get("frameStart", None)
|
||||||
frameEnd = version_data.get("frameEnd", None)
|
|
||||||
|
|
||||||
asset = context["asset"]["name"]
|
asset = context["asset"]["name"]
|
||||||
namespace = namespace or unique_namespace(
|
namespace = namespace or unique_namespace(
|
||||||
|
|
@ -48,12 +47,14 @@ class AlembicStandinLoader(load.LoaderPlugin):
|
||||||
settings = get_project_settings(os.environ['AVALON_PROJECT'])
|
settings = get_project_settings(os.environ['AVALON_PROJECT'])
|
||||||
colors = settings["maya"]["load"]["colors"]
|
colors = settings["maya"]["load"]["colors"]
|
||||||
fps = legacy_io.Session["AVALON_FPS"]
|
fps = legacy_io.Session["AVALON_FPS"]
|
||||||
|
c = colors.get(family[0])
|
||||||
c = colors.get('ass')
|
|
||||||
if c is not None:
|
if c is not None:
|
||||||
cmds.setAttr(root + ".useOutlinerColor", 1)
|
cmds.setAttr(root + ".useOutlinerColor", 1)
|
||||||
cmds.setAttr(root + ".outlinerColor",
|
cmds.setAttr(root + ".outlinerColor",
|
||||||
c[0], c[1], c[2])
|
(float(c[0])/255),
|
||||||
|
(float(c[1])/255),
|
||||||
|
(float(c[2])/255)
|
||||||
|
)
|
||||||
|
|
||||||
transform_name = label + "_ABC"
|
transform_name = label + "_ABC"
|
||||||
|
|
||||||
|
|
@ -72,7 +73,7 @@ class AlembicStandinLoader(load.LoaderPlugin):
|
||||||
if frameStart is None:
|
if frameStart is None:
|
||||||
cmds.setAttr(standinShape + ".useFrameExtension", 0)
|
cmds.setAttr(standinShape + ".useFrameExtension", 0)
|
||||||
|
|
||||||
elif frameStart == 1 and frameEnd == 1:
|
elif "model" in family:
|
||||||
cmds.setAttr(standinShape + ".useFrameExtension", 0)
|
cmds.setAttr(standinShape + ".useFrameExtension", 0)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue