Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Enable write color sets on animation publish automatically #3582

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion openpype/hosts/maya/plugins/create/create_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class CreateAnimation(plugin.Creator):
label = "Animation"
family = "animation"
icon = "male"
write_color_sets = False

def __init__(self, *args, **kwargs):
super(CreateAnimation, self).__init__(*args, **kwargs)
Expand All @@ -22,7 +23,7 @@ def __init__(self, *args, **kwargs):
self.data[key] = value

# Write vertex colors with the geometry.
self.data["writeColorSets"] = False
self.data["writeColorSets"] = self.write_color_sets
self.data["writeFaceSets"] = False

# Include only renderable visible shapes.
Expand Down
5 changes: 4 additions & 1 deletion openpype/hosts/maya/plugins/create/create_pointcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ class CreatePointCache(plugin.Creator):
family = "pointcache"
icon = "gears"

write_color_sets = False


def __init__(self, *args, **kwargs):
super(CreatePointCache, self).__init__(*args, **kwargs)

# Add animation data
self.data.update(lib.collect_animation_data())

self.data["writeColorSets"] = False # Vertex colors with the geometry.
self.data["writeColorSets"] = self.write_color_sets # Vertex colors with the geometry.
self.data["writeFaceSets"] = False # Vertex colors with the geometry.
self.data["renderableOnly"] = False # Only renderable visible shapes
self.data["visibleOnly"] = False # only nodes that are visible
Expand Down
3 changes: 3 additions & 0 deletions openpype/settings/defaults/project_settings/maya.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@
},
"CreateAnimation": {
"enabled": true,
"write_color_sets": false,
"defaults": [
"Main"
]

},
"CreateAss": {
"enabled": true,
Expand Down Expand Up @@ -134,6 +136,7 @@
},
"CreatePointCache": {
"enabled": true,
"write_color_sets": false,
"defaults": [
"Main"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,57 @@
}
]
},
{
"type": "dict",
"collapsible": true,
"key": "CreateAnimation",
"label": "Create Animation",
"checkbox_key": "enabled",
"children": [
{
"type": "boolean",
"key": "enabled",
"label": "Enabled"
},
{
"type": "boolean",
"key": "write_color_sets",
"label": "Write Color Sets"
},
{
"type": "list",
"key": "defaults",
"label": "Default Subsets",
"object_type": "text"
}
]
},
{
"type": "dict",
"collapsible": true,
"key": "CreatePointCache",
"label": "Create Cache",
"checkbox_key": "enabled",
"children": [
{
"type": "boolean",
"key": "enabled",
"label": "Enabled"
},
{
"type": "boolean",
"key": "write_color_sets",
"label": "Write Color Sets"
},
{
"type": "list",
"key": "defaults",
"label": "Default Subsets",
"object_type": "text"
}
]
},

{
"type": "schema_template",
"name": "template_create_plugin",
Expand All @@ -159,10 +210,6 @@
"key": "CreateMultiverseUsdOver",
"label": "Create Multiverse USD Override"
},
{
"key": "CreateAnimation",
"label": "Create Animation"
},
{
"key": "CreateAss",
"label": "Create Ass"
Expand All @@ -187,10 +234,6 @@
"key": "CreateModel",
"label": "Create Model"
},
{
"key": "CreatePointCache",
"label": "Create Cache"
},
{
"key": "CreateRenderSetup",
"label": "Create Render Setup"
Expand Down