convert maya color to new color widget

This commit is contained in:
Milan Kolar 2021-05-31 23:34:22 +02:00
parent 73fd71b338
commit 3585390e09
13 changed files with 168 additions and 115 deletions

View file

@ -81,7 +81,10 @@ class AssProxyLoader(openpype.hosts.maya.api.plugin.ReferenceLoader):
if c is not None:
cmds.setAttr(groupName + ".useOutlinerColor", 1)
cmds.setAttr(groupName + ".outlinerColor",
c[0], c[1], c[2])
(float(c[0])/256),
(float(c[1])/256),
(float(c[2])/256)
)
self[:] = nodes

View file

@ -38,7 +38,10 @@ class GpuCacheLoader(api.Loader):
if c is not None:
cmds.setAttr(root + ".useOutlinerColor", 1)
cmds.setAttr(root + ".outlinerColor",
c[0], c[1], c[2])
(float(c[0])/256),
(float(c[1])/256),
(float(c[2])/256)
)
# Create transform with shape
transform_name = label + "_GPU"

View file

@ -85,7 +85,11 @@ class ReferenceLoader(openpype.hosts.maya.api.plugin.ReferenceLoader):
c = colors.get(family)
if c is not None:
groupNode.useOutlinerColor.set(1)
groupNode.outlinerColor.set(c[0], c[1], c[2])
groupNode.outlinerColor.set(
(float(c[0])/256),
(float(c[1])/256),
(float(c[2])/256)
)
self[:] = newNodes

View file

@ -62,7 +62,10 @@ class LoadVDBtoRedShift(api.Loader):
if c is not None:
cmds.setAttr(root + ".useOutlinerColor", 1)
cmds.setAttr(root + ".outlinerColor",
c[0], c[1], c[2])
(float(c[0])/256),
(float(c[1])/256),
(float(c[2])/256)
)
# Create VR
volume_node = cmds.createNode("RedshiftVolumeShape",

View file

@ -55,7 +55,10 @@ class LoadVDBtoVRay(api.Loader):
if c is not None:
cmds.setAttr(root + ".useOutlinerColor", 1)
cmds.setAttr(root + ".outlinerColor",
c[0], c[1], c[2])
(float(c[0])/256),
(float(c[1])/256),
(float(c[2])/256)
)
# Create VR
grid_node = cmds.createNode("VRayVolumeGrid",

View file

@ -74,7 +74,10 @@ class VRayProxyLoader(api.Loader):
if c is not None:
cmds.setAttr("{0}.useOutlinerColor".format(group_node), 1)
cmds.setAttr("{0}.outlinerColor".format(group_node),
c[0], c[1], c[2])
(float(c[0])/256),
(float(c[1])/256),
(float(c[2])/256)
)
return containerise(
name=name,

View file

@ -53,7 +53,10 @@ class VRaySceneLoader(api.Loader):
if c is not None:
cmds.setAttr("{0}.useOutlinerColor".format(group_node), 1)
cmds.setAttr("{0}.outlinerColor".format(group_node),
c[0], c[1], c[2])
(float(c[0])/256),
(float(c[1])/256),
(float(c[2])/256)
)
return containerise(
name=name,

View file

@ -66,7 +66,10 @@ class YetiCacheLoader(api.Loader):
if c is not None:
cmds.setAttr(group_name + ".useOutlinerColor", 1)
cmds.setAttr(group_name + ".outlinerColor",
c[0], c[1], c[2])
(float(c[0])/256),
(float(c[1])/256),
(float(c[2])/256)
)
nodes.append(group_node)

View file

@ -84,7 +84,10 @@ class YetiRigLoader(openpype.hosts.maya.api.plugin.ReferenceLoader):
if c is not None:
cmds.setAttr(groupName + ".useOutlinerColor", 1)
cmds.setAttr(groupName + ".outlinerColor",
c[0], c[1], c[2])
(float(c[0])/256),
(float(c[1])/256),
(float(c[2])/256)
)
self[:] = nodes
return nodes

View file

@ -4,8 +4,12 @@
"enabled": true,
"optional": true,
"active": true,
"skip_resolution_check": [".*"],
"skip_timelines_check": [".*"]
"skip_resolution_check": [
".*"
],
"skip_timelines_check": [
".*"
]
},
"AfterEffectsSubmitDeadline": {
"use_published": true,

View file

@ -273,8 +273,7 @@
"active_site": "studio",
"remote_site": "studio"
},
"sites": {
}
"sites": {}
},
"project_plugins": {
"windows": [],

View file

@ -393,74 +393,88 @@
"load": {
"colors": {
"model": [
0.821,
0.518,
0.117
209,
132,
30,
255
],
"rig": [
0.144,
0.443,
0.463
59,
226,
235,
255
],
"pointcache": [
0.368,
0.821,
0.117
94,
209,
30,
255
],
"animation": [
0.368,
0.821,
0.117
94,
209,
30,
255
],
"ass": [
1.0,
0.332,
0.312
249,
135,
53,
255
],
"camera": [
0.447,
0.312,
1.0
136,
114,
244,
255
],
"fbx": [
1.0,
0.931,
0.312
215,
166,
255,
255
],
"mayaAscii": [
0.312,
1.0,
0.747
67,
174,
255,
255
],
"setdress": [
0.312,
1.0,
0.747
255,
250,
90,
255
],
"layout": [
0.312,
1.0,
0.747
255,
250,
90,
255
],
"vdbcache": [
0.312,
1.0,
0.428
249,
54,
0,
255
],
"vrayproxy": [
0.258,
0.95,
0.541
255,
150,
12,
255
],
"yeticache": [
0.2,
0.8,
0.3
99,
206,
220,
255
],
"yetiRig": [
0.0,
0.8,
0.5
0,
205,
125,
255
]
}
},

View file

@ -11,66 +11,74 @@
"label": "Loaded Subsets Outliner Colors",
"children": [
{
"type": "schema_template",
"name": "template_color",
"template_data": [
{
"label": "Model:",
"name": "model"
},
{
"label": "Rig:",
"name": "rig"
},
{
"label": "Pointcache:",
"name": "pointcache"
},
{
"label": "Animation:",
"name": "animation"
},
{
"label": "Arnold Standin:",
"name": "ass"
},
{
"label": "Camera:",
"name": "camera"
},
{
"label": "FBX:",
"name": "fbx"
},
{
"label": "Maya Scene:",
"name": "mayaAscii"
},
{
"label": "Set Dress:",
"name": "setdress"
},
{
"label": "Layout:",
"name": "layout"
},
{
"label": "VDB Cache:",
"name": "vdbcache"
},
{
"label": "Vray Proxy:",
"name": "vrayproxy"
},
{
"label": "Yeti Cache:",
"name": "yeticache"
},
{
"label": "Yeti Rig:",
"name": "yetiRig"
}
]
"type": "color",
"label": "Model:",
"key": "model"
},
{
"type": "color",
"label": "Rig:",
"key": "rig"
},
{
"type": "color",
"label": "Pointcache:",
"key": "pointcache"
},
{
"type": "color",
"label": "Animation:",
"key": "animation"
},
{
"type": "color",
"label": "Arnold Standin:",
"key": "ass"
},
{
"type": "color",
"label": "Camera:",
"key": "camera"
},
{
"type": "color",
"label": "FBX:",
"key": "fbx"
},
{
"type": "color",
"label": "Maya Scene:",
"key": "mayaAscii"
},
{
"type": "color",
"label": "Set Dress:",
"key": "setdress"
},
{
"type": "color",
"label": "Layout:",
"key": "layout"
},
{
"type": "color",
"label": "VDB Cache:",
"key": "vdbcache"
},
{
"type": "color",
"label": "Vray Proxy:",
"key": "vrayproxy"
},
{
"type": "color",
"label": "Yeti Cache:",
"key": "yeticache"
},
{
"type": "color",
"label": "Yeti Rig:",
"key": "yetiRig"
}
]
}