Merge branch 'develop' into enhancement/AY-1226_Use-AYON-entities

This commit is contained in:
Jakub Trllo 2024-03-08 17:00:23 +01:00
commit 82011d18ab
18 changed files with 565 additions and 62 deletions

View file

@ -1,6 +1,6 @@
name: Bug Report
description: File a bug report
title: 'Bug: '
title: 'Your issue title here'
labels:
- 'type: bug'
body:

View file

@ -1,6 +1,6 @@
name: Enhancement Request
description: Create a report to help us enhance a particular feature
title: "Enhancement: "
title: "Your issue title here"
labels:
- "type: enhancement"
body:
@ -49,4 +49,4 @@ body:
label: "Additional context:"
description: Add any other context or screenshots about the enhancement request here.
validations:
required: false
required: false

View file

@ -67,7 +67,7 @@ class CollectVrayROPRenderProducts(pyblish.api.InstancePlugin):
beauty_product = self.get_render_product_name(default_prefix)
render_products.append(beauty_product)
files_by_aov = {
"RGB Color": self.generate_expected_files(instance,
"": self.generate_expected_files(instance,
beauty_product)}
if instance.data.get("RenderElement", True):
@ -75,7 +75,9 @@ class CollectVrayROPRenderProducts(pyblish.api.InstancePlugin):
if render_element:
for aov, renderpass in render_element.items():
render_products.append(renderpass)
files_by_aov[aov] = self.generate_expected_files(instance, renderpass) # noqa
files_by_aov[aov] = self.generate_expected_files(
instance, renderpass)
for product in render_products:
self.log.debug("Found render product: %s" % product)

View file

@ -108,21 +108,6 @@ class CreateWorkfile(plugin.MaxCreatorBase, AutoCreator):
created_inst.data_to_store()
)
def remove_instances(self, instances):
"""Remove specified instance from the scene.
This is only removing `id` parameter so instance is no longer
instance, because it might contain valuable data for artist.
"""
for instance in instances:
instance_node = rt.GetNodeByName(
instance.data.get("instance_node"))
if instance_node:
rt.Delete(instance_node)
self._remove_instance_from_context(instance)
def create_node(self, product_name):
if rt.getNodeByName(product_name):
node = rt.getNodeByName(product_name)

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<error id="main">
<title>Invalid Model Name</title>
<description>## Nodes found with Invalid Model Name
Nodes were detected in your scene which have invalid model name which does not
match the regex you preset in AYON setting.
### How to repair?
Make sure the model name aligns with validation regex in your AYON setting.
</description>
<detail>
### Invalid nodes
{nodes}
### How could this happen?
This often happens if you have mesh with the model naming does not match
with regex in the setting.
</detail>
</error>
</root>

View file

@ -0,0 +1,84 @@
# -*- coding: utf-8 -*-
"""Validate if instance context is the same as current context."""
import pyblish.api
from ayon_core.pipeline.publish import (
RepairAction,
ValidateContentsOrder,
PublishValidationError,
OptionalPyblishPluginMixin
)
from ayon_core.hosts.max.api.action import SelectInvalidAction
from pymxs import runtime as rt
class ValidateInstanceInContext(pyblish.api.InstancePlugin,
OptionalPyblishPluginMixin):
"""Validator to check if instance context match current context.
When working in per-shot style you always publish data in context of
current context (shot). This validator checks if this is so. It is optional
so it can be disabled when needed.
Action on this validator will select invalid instances.
"""
order = ValidateContentsOrder
label = "Instance in same Context"
optional = True
hosts = ["max"]
actions = [SelectInvalidAction, RepairAction]
def process(self, instance):
if not self.is_active(instance.data):
return
folderPath = instance.data.get("folderPath")
task = instance.data.get("task")
context = self.get_context(instance)
if (folderPath, task) != context:
context_label = "{} > {}".format(*context)
instance_label = "{} > {}".format(folderPath, task)
message = (
"Instance '{}' publishes to different context than current "
"context: {}. Current context: {}".format(
instance.name, instance_label, context_label
)
)
raise PublishValidationError(
message=message,
description=(
"## Publishing to a different context data\n"
"There are publish instances present which are publishing "
"into a different folder path or task than your current context.\n\n"
"Usually this is not what you want but there can be cases "
"where you might want to publish into another context or "
"shot. If that's the case you can disable the validation "
"on the instance to ignore it."
)
)
@classmethod
def get_invalid(cls, instance):
invalid = []
folderPath = instance.data.get("folderPath")
task = instance.data.get("task")
context = cls.get_context(instance)
if (folderPath, task) != context:
invalid.append(rt.getNodeByName(instance.name))
return invalid
@classmethod
def repair(cls, instance):
context_asset = instance.context.data["folderPath"]
context_task = instance.context.data["task"]
instance_node = rt.getNodeByName(instance.data.get(
"instance_node", ""))
if not instance_node:
return
rt.SetUserProp(instance_node, "folderPath", context_asset)
rt.SetUserProp(instance_node, "task", context_task)
@staticmethod
def get_context(instance):
"""Return asset, task from publishing context data"""
context = instance.context
return context.data["folderPath"], context.data["task"]

View file

@ -0,0 +1,58 @@
import pyblish.api
from ayon_core.hosts.max.api.action import SelectInvalidAction
from ayon_core.pipeline.publish import (
ValidateMeshOrder,
OptionalPyblishPluginMixin,
PublishValidationError
)
from pymxs import runtime as rt
class ValidateMeshHasUVs(pyblish.api.InstancePlugin,
OptionalPyblishPluginMixin):
"""Validate the current mesh has UVs.
This validator only checks if the mesh has UVs but not
whether all the individual faces of the mesh have UVs.
It validates whether the current mesh has texture vertices.
If the mesh does not have texture vertices, it does not
have UVs in Max.
"""
order = ValidateMeshOrder
hosts = ['max']
families = ['model']
label = 'Validate Mesh Has UVs'
actions = [SelectInvalidAction]
optional = True
@classmethod
def get_invalid(cls, instance):
meshes = [member for member in instance.data["members"]
if rt.isProperty(member, "mesh")]
invalid = [member for member in meshes
if member.mesh.numTVerts == 0]
return invalid
def process(self, instance):
invalid = self.get_invalid(instance)
if invalid:
bullet_point_invalid_statement = "\n".join(
"- {}".format(invalid.name) for invalid
in invalid
)
report = (
"Model meshes are required to have UVs.\n\n"
"Meshes detected with invalid or missing UVs:\n"
f"{bullet_point_invalid_statement}\n"
)
raise PublishValidationError(
report,
description=(
"Model meshes are required to have UVs.\n\n"
"Meshes detected with no texture vertice or missing UVs"),
title="Non-mesh objects found or mesh has missing UVs")

View file

@ -0,0 +1,120 @@
# -*- coding: utf-8 -*-
"""Validate model nodes names."""
import re
import pyblish.api
from ayon_core.hosts.max.api.action import SelectInvalidAction
from ayon_core.pipeline.publish import (
OptionalPyblishPluginMixin,
PublishXmlValidationError,
ValidateContentsOrder
)
class ValidateModelName(pyblish.api.InstancePlugin,
OptionalPyblishPluginMixin):
"""Validate Model Name.
Validation regex is `(.*)_(?P<subset>.*)_(GEO)` by default.
The setting supports the following regex group name:
- project
- asset
- subset
Examples:
`{SOME_RANDOM_NAME}_{YOUR_SUBSET_NAME}_GEO` should be your
default model name.
The regex of `(?P<subset>.*)` can be replaced by `(?P<asset>.*)`
and `(?P<project>.*)`.
`(.*)_(?P<asset>.*)_(GEO)` check if your model name is
`{SOME_RANDOM_NAME}_{CURRENT_ASSET_NAME}_GEO`
`(.*)_(?P<project>.*)_(GEO)` check if your model name is
`{SOME_RANDOM_NAME}_{CURRENT_PROJECT_NAME}_GEO`
"""
optional = True
order = ValidateContentsOrder
hosts = ["max"]
families = ["model"]
label = "Validate Model Name"
actions = [SelectInvalidAction]
# defined by settings
regex = r"(.*)_(?P<subset>.*)_(GEO)"
# cache
regex_compiled = None
def process(self, instance):
if not self.is_active(instance.data):
return
invalid = self.get_invalid(instance)
if invalid:
names = "\n".join(
"- {}".format(node.name) for node in invalid
)
raise PublishXmlValidationError(
plugin=self,
message="Nodes found with invalid model names: {}".format(invalid),
formatting_data={"nodes": names}
)
@classmethod
def get_invalid(cls, instance):
if not cls.regex:
cls.log.warning("No regex pattern set. Nothing to validate.")
return
members = instance.data.get("members")
if not members:
cls.log.error("No members found in the instance.")
return
cls.regex_compiled = re.compile(cls.regex)
invalid = []
for obj in members:
if cls.invalid_name(instance, obj):
invalid.append(obj)
return invalid
@classmethod
def invalid_name(cls, instance, obj):
"""Function to check the object has invalid name
regarding to the validation regex in the AYON setttings
Args:
instance (pyblish.api.instance): Instance
obj (str): object name
Returns:
str: invalid object
"""
regex = cls.regex_compiled
name = obj.name
match = regex.match(name)
if match is None:
cls.log.error("Invalid model name on: %s", name)
cls.log.error("Name doesn't match regex {}".format(regex.pattern))
return obj
# Validate regex groups
invalid = False
compare = {
"project": instance.context.data["projectName"],
"asset": instance.context.data["folderPath"],
"subset": instance.context.data["subset"],
}
for key, required_value in compare.items():
if key in regex.groupindex:
if match.group(key) != required_value:
cls.log.error(
"Invalid %s name for the model %s, "
"required name is %s",
key, name, required_value
)
invalid = True
if invalid:
return obj

View file

@ -0,0 +1,67 @@
# -*- coding: utf-8 -*-
import pyblish.api
from pymxs import runtime as rt
from ayon_core.pipeline import (
PublishValidationError,
OptionalPyblishPluginMixin
)
from ayon_core.hosts.max.api.action import SelectInvalidAction
def get_invalid_keys(obj):
"""function to check on whether there is keyframe in
Args:
obj (str): object needed to check if there is a keyframe
Returns:
bool: whether invalid object(s) exist
"""
for transform in ["Position", "Rotation", "Scale"]:
num_of_key = rt.NumKeys(rt.getPropertyController(
obj.controller, transform))
if num_of_key > 0:
return True
return False
class ValidateNoAnimation(pyblish.api.InstancePlugin,
OptionalPyblishPluginMixin):
"""Validates No Animation
Ensure no keyframes on nodes in the Instance
"""
order = pyblish.api.ValidatorOrder
families = ["model"]
hosts = ["max"]
optional = True
label = "Validate No Animation"
actions = [SelectInvalidAction]
def process(self, instance):
if not self.is_active(instance.data):
return
invalid = self.get_invalid(instance)
if invalid:
raise PublishValidationError(
"Keyframes found on:\n\n{0}".format(invalid)
,
title="Keyframes on model"
)
@staticmethod
def get_invalid(instance):
"""Get invalid object(s) which have keyframe(s)
Args:
instance (pyblish.api.instance): Instance
Returns:
list: list of invalid objects
"""
invalid = [invalid for invalid in instance.data["members"]
if invalid.isAnimated or get_invalid_keys(invalid)]
return invalid

View file

@ -411,6 +411,11 @@ class ClipLoader:
source_out = int(_clip_property("End"))
source_duration = int(_clip_property("Frames"))
# Trim clip start if slate is present
if "slate" in self.data["versionData"]["families"]:
source_in += 1
source_duration = source_out - source_in + 1
if not self.with_handles:
# Load file without the handles of the source media
# We remove the handles from the source in and source out
@ -434,7 +439,7 @@ class ClipLoader:
handle_start = version_attributes.get("handleStart", 0)
handle_end = version_attributes.get("handleEnd", 0)
frame_start_handle = frame_start - handle_start
frame_end_handle = frame_start + handle_end
frame_end_handle = frame_end + handle_end
database_frame_duration = int(
frame_end_handle - frame_start_handle + 1
)

View file

@ -35,7 +35,10 @@ class CollectAudio(pyblish.api.ContextPlugin):
"webpublisher",
"aftereffects",
"flame",
"unreal"
"unreal",
"blender",
"houdini",
"max",
]
audio_product_name = "audioMain"

View file

@ -478,7 +478,15 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
# Set video input attributes
max_int = str(2147483647)
video_data = get_ffprobe_data(video_file_path, logger=self.log)
duration = float(video_data["format"]["duration"])
# Use duration of the individual streams since it is returned with
# higher decimal precision than 'format.duration'. We need this
# more precise value for calculating the correct amount of frames
# for higher FPS ranges or decimal ranges, e.g. 29.97 FPS
duration = max(
float(stream.get("duration", 0))
for stream in video_data["streams"]
if stream.get("codec_type") == "video"
)
cmd_args = [
"-y",

View file

@ -1,55 +1,149 @@
{
"tool_groups": [
{
"environment": "{\n \"MTOA\": \"{STUDIO_SOFTWARE}/arnold/mtoa_{MAYA_VERSION}_{MTOA_VERSION}\",\n \"MAYA_RENDER_DESC_PATH\": \"{MTOA}\",\n \"MAYA_MODULE_PATH\": \"{MTOA}\",\n \"ARNOLD_PLUGIN_PATH\": \"{MTOA}/shaders\",\n \"MTOA_EXTENSIONS_PATH\": {\n \"darwin\": \"{MTOA}/extensions\",\n \"linux\": \"{MTOA}/extensions\",\n \"windows\": \"{MTOA}/extensions\"\n },\n \"MTOA_EXTENSIONS\": {\n \"darwin\": \"{MTOA}/extensions\",\n \"linux\": \"{MTOA}/extensions\",\n \"windows\": \"{MTOA}/extensions\"\n },\n \"DYLD_LIBRARY_PATH\": {\n \"darwin\": \"{MTOA}/bin\"\n },\n \"PATH\": {\n \"windows\": \"{PATH};{MTOA}/bin\"\n }\n}",
"name": "mtoa",
"label": "Autodesk Arnold",
"name": "htoa",
"label": "Arnold for Houdini (example)",
"variants": [
{
"name": "5-4-2-7",
"label": "",
"host_names": [
"houdini"
],
"environment": "{\n \"HTOA_VERSION\": \"5.4.2.7\"\n}",
"app_variants": []
}
],
"environment": "{\n \"_comment_\": \"{STUDIO_SW} points to software repository. Can be defined in Core addon globally\",\n\n \"HOUDINI_PATH\": [\n \"{STUDIO_SW}/APP/HTOA/{HTOA_VERSION}/HOUDINI{HOUDINI_VERSION}/WINDOWS/htoa-6.1.3.3_rdb15014_houdini-{HTOA_VERSION}\",\n \"{HOUDINI_PATH}\"\n ],\n \"PATH\": {\n \"windows\": [\n \"{STUDIO_SW}/APP/HTOA/{HTOA_VERSION}/HOUDINI{HOUDINI_VERSION}/WINDOWS/htoa-6.1.3.3_rdb15014_houdini-{HTOA_VERSION}/scripts/bin\",\n \"{PATH}\"\n ]\n }\n}"
},
{
"name": "mtoa",
"label": "Arnold for Maya (example)",
"variants": [
{
"name": "5-3-1-0",
"label": "",
"host_names": [],
"app_variants": [],
"environment": "{\n \"MTOA_VERSION\": \"3.2\"\n}",
"name": "3-2",
"label": "3.2"
"environment": "{\n \"MTOA_VERSION\": \"5.3.1.0\"\n}",
"app_variants": []
},
{
"name": "5-3-4-1",
"label": "",
"host_names": [],
"app_variants": [],
"environment": "{\n \"MTOA_VERSION\": \"3.1\"\n}",
"name": "3-1",
"label": "3.1"
"environment": "{\n \"MTOA_VERSION\": \"5.3.4.1\"\n}",
"app_variants": []
}
]
],
"environment": "{\n \"_comment_\": \"{STUDIO_SW} points to software repository. Can be defined in Core addon globally\",\n\n \"MTOA\": {\n \"darwin\": \"{STUDIO_SW}/APP/MTOA/{MTOA_VERSION}/MAYA{MAYA_VERSION}/MAC\",\n \"linux\": \"{STUDIO_SW}/APP/MTOA/{MTOA_VERSION}/MAYA{MAYA_VERSION}/LINUX\",\n \"windows\": \"{STUDIO_SW}/APP/MTOA/{MTOA_VERSION}/MAYA{MAYA_VERSION}/WINDOWS\"\n },\n \"MAYA_MODULE_PATH\": [\n \"{STUDIO_SW}/APP/MTOA\",\n \"{MAYA_MODULE_PATH}\"\n ],\n \"DYLD_LIBRARY_PATH\": {\n \"darwin\": \"{MTOA}/bin\"\n },\n \"PATH\": {\n \"windows\": [\n \"{MTOA}/bin\",\n \"{PATH}\"\n ]\n },\n \"XBMLANGPATH\": [\n \"{MTOA}/icons\",\n \"{XBMLANGPATH}\"\n ],\n \"MAYA_RENDER_DESC_PATH\": [\n \"{MTOA}\",\n \"{MAYA_RENDER_DESC_PATH}\"\n ],\n \"MTOA_STARTUP_LOG_VERBOSITY\": \"3\"\n}"
},
{
"environment": "{}",
"name": "vray",
"label": "Chaos Group Vray",
"variants": []
},
{
"environment": "{}",
"name": "yeti",
"label": "Peregrine Labs Yeti",
"variants": []
},
{
"environment": "{}",
"name": "renderman",
"label": "Pixar Renderman",
"name": "redshiftMaya",
"label": "Redshift for Maya (example)",
"variants": [
{
"name": "3-5-23",
"label": "",
"host_names": [],
"environment": "{\n \"REDSHIFT_VERSION\": \"3.5.23\"\n}",
"app_variants": []
}
],
"environment": "{\n \"_comment_\": \"{STUDIO_SW} points to software repository. Can be defined in Core addon globally\",\n\n \"REDSHIFT_COREDATAPATH\": {\n \"darwin\": \"{STUDIO_SW}/APP/REDSHIFT/{REDSHIFT_VERSION}/MAC\",\n \"linux\": \"{STUDIO_SW}/APP/REDSHIFT/{REDSHIFT_VERSION}/LINUX\",\n \"windows\": \"{STUDIO_SW}/APP/REDSHIFT/{REDSHIFT_VERSION}/WINDOWS\"\n },\n \"REDSHIFT_ABORTONLICENSEFAIL\": \"0\",\n \"MAYA_MODULE_PATH\": [\n \"{STUDIO_SW}/APP/REDSHIFT\",\n \"{MAYA_MODULE_PATH}\"\n ],\n \"MAYA_PLUG_IN_PATH\": {\n \"windows\": [\n \"{REDSHIFT_COREDATAPATH}/Plugins/Maya/{MAYA_VERSION}/nt-x86-64\",\n \"{MAYA_PLUG_IN_PATH}\"\n ],\n \"linux\": [\n \"{REDSHIFT_COREDATAPATH}/redshift4maya/{MAYA_VERSION}\",\n \"{MAYA_PLUG_IN_PATH}\"\n ],\n \"darwin\": [\n \"{REDSHIFT_COREDATAPATH}/redshift4maya/{MAYA_VERSION}\",\n \"{MAYA_PLUG_IN_PATH}\"\n ]\n },\n \"MAYA_SCRIPT_PATH\": {\n \"windows\": [\n \"{REDSHIFT_COREDATAPATH}/Plugins/Maya/Common/scripts\",\n \"{MAYA_SCRIPT_PATH}\"\n ],\n \"linux\": [\n \"{REDSHIFT_COREDATAPATH}/redshift4maya/common/scripts\",\n \"{MAYA_SCRIPT_PATH}\"\n ],\n \"darwin\": [\n \"{REDSHIFT_COREDATAPATH}/redshift4maya/common/scripts\",\n \"{MAYA_SCRIPT_PATH}\"\n ]\n },\n \"REDSHIFT_PROCEDURALSPATH\": {\n \"windows\": [\n \"{REDSHIFT_COREDATAPATH}/Procedurals\",\n \"{REDSHIFT_PROCEDURALSPATH}\"\n ],\n \"linux\": [\n \"{REDSHIFT_COREDATAPATH}/procedurals\",\n \"{REDSHIFT_PROCEDURALSPATH}\"\n ],\n \"darwin\": [\n \"{REDSHIFT_COREDATAPATH}/procedurals\",\n \"{REDSHIFT_PROCEDURALSPATH}\"\n ]\n },\n \"REDSHIFT_MAYAEXTENSIONSPATH\": {\n \"windows\": [\n \"{REDSHIFT_COREDATAPATH}/Plugins/Maya/{MAYA_VERSION}/nt-x86-64/extensions\",\n \"{REDSHIFT_MAYAEXTENSIONSPATH}\"\n ],\n \"linux\": [\n \"{REDSHIFT_COREDATAPATH}/redshift4maya/{MAYA_VERSION}/extensions\",\n \"{REDSHIFT_MAYAEXTENSIONSPATH}\"\n ],\n \"darwin\": [\n \"{REDSHIFT_COREDATAPATH}/redshift4maya/{MAYA_VERSION}/extensions\",\n \"{REDSHIFT_MAYAEXTENSIONSPATH}\"\n ]\n },\n \"XBMLANGPATH\": {\n \"windows\": [\n \"{REDSHIFT_COREDATAPATH}/Plugins/Maya/Common/icons\",\n \"{XBMLANGPATH}\"\n ],\n \"linux\": [\n \"{REDSHIFT_COREDATAPATH}/redshift4maya/common/icons\",\n \"{XBMLANGPATH}\"\n ],\n \"darwin\": [\n \"{REDSHIFT_COREDATAPATH}/redshift4maya/common/icons\",\n \"{XBMLANGPATH}\"\n ]\n },\n \"MAYA_RENDER_DESC_PATH\": {\n \"windows\": [\n \"{REDSHIFT_COREDATAPATH}/Plugins/Maya/Common/rendererDesc\",\n \"{MAYA_RENDER_DESC_PATH}\"\n ],\n \"linux\": [\n \"{REDSHIFT_COREDATAPATH}/redshift4maya/common/rendererDesc\",\n \"{MAYA_RENDER_DESC_PATH}\"\n ],\n \"darwin\": [\n \"{REDSHIFT_COREDATAPATH}/redshift4maya/common/rendererDesc\",\n \"{MAYA_RENDER_DESC_PATH}\"\n ]\n },\n \"MAYA_CUSTOM_TEMPLATE_PATH\": {\n \"windows\": [\n \"{REDSHIFT_COREDATAPATH}/Plugins/Maya/Common/scripts/NETemplates\",\n \"{MAYA_CUSTOM_TEMPLATE_PATH}\"\n ],\n \"linux\": [\n \"{REDSHIFT_COREDATAPATH}/redshift4maya/common/scripts/NETemplates\",\n \"{MAYA_CUSTOM_TEMPLATE_PATH}\"\n ],\n \"darwin\": [\n \"{REDSHIFT_COREDATAPATH}/redshift4maya/common/scripts/NETemplates\",\n \"{MAYA_CUSTOM_TEMPLATE_PATH}\"\n ]\n },\n \"PATH\": {\n \"windows\": [\n \"{REDSHIFT_COREDATAPATH}/bin\",\n \"{PATH}\"\n ]\n }\n}"
},
{
"name": "redshift3dsmax",
"label": "Redshift for 3dsmax (example)",
"variants": [
{
"name": "3-5-19",
"label": "",
"host_names": [
"max"
],
"environment": "{\n \"REDSHIFT_VERSION\": \"3.5.19\"\n}",
"app_variants": []
}
],
"environment": "{\n \"_comment_\": \"{STUDIO_SW} points to software repository. Can be defined in Core addon globally\",\n\n \"REDSHIFT_COREDATAPATH\": {\n \"darwin\": \"{STUDIO_SW}/APP/REDSHIFT/{REDSHIFT_VERSION}/MAC\",\n \"linux\": \"{STUDIO_SW}/APP/REDSHIFT/{REDSHIFT_VERSION}/LINUX\",\n \"windows\": \"{STUDIO_SW}/APP/REDSHIFT/{REDSHIFT_VERSION}/WINDOWS\"\n },\n \"REDSHIFT_ABORTONLICENSEFAIL\": \"0\",\n \"REDSHIFT_PROCEDURALSPATH\": {\n \"windows\": [\n \"{REDSHIFT_COREDATAPATH}/Procedurals\",\n \"{REDSHIFT_PROCEDURALSPATH}\"\n ],\n \"linux\": [\n \"{REDSHIFT_COREDATAPATH}/procedurals\",\n \"{REDSHIFT_PROCEDURALSPATH}\"\n ],\n \"darwin\": [\n \"{REDSHIFT_COREDATAPATH}/procedurals\",\n \"{REDSHIFT_PROCEDURALSPATH}\"\n ]\n },\n \"PATH\": {\n \"windows\": [\n \"{REDSHIFT_COREDATAPATH}/bin\",\n \"{PATH}\"\n ]\n }\n}"
},
{
"name": "rendermanMaya",
"label": "Renderman for Maya (example)",
"variants": [
{
"name": "24-3-maya",
"label": "24.3 RFM",
"host_names": [
"maya"
],
"environment": "{\n \"RFMTREE\": {\n \"windows\": \"C:\\\\Program Files\\\\Pixar\\\\RenderManForMaya-24.3\",\n \"darwin\": \"/Applications/Pixar/RenderManForMaya-24.3\",\n \"linux\": \"/opt/pixar/RenderManForMaya-24.3\"\n },\n \"RMANTREE\": {\n \"windows\": \"C:\\\\Program Files\\\\Pixar\\\\RenderManProServer-24.3\",\n \"darwin\": \"/Applications/Pixar/RenderManProServer-24.3\",\n \"linux\": \"/opt/pixar/RenderManProServer-24.3\"\n }\n}",
"app_variants": [
"maya/2022"
],
"environment": "{\n \"RFMTREE\": {\n \"windows\": \"C:\\\\Program Files\\\\Pixar\\\\RenderManForMaya-24.3\",\n \"darwin\": \"/Applications/Pixar/RenderManForMaya-24.3\",\n \"linux\": \"/opt/pixar/RenderManForMaya-24.3\"\n },\n \"RMANTREE\": {\n \"windows\": \"C:\\\\Program Files\\\\Pixar\\\\RenderManProServer-24.3\",\n \"darwin\": \"/Applications/Pixar/RenderManProServer-24.3\",\n \"linux\": \"/opt/pixar/RenderManProServer-24.3\"\n }\n}",
"name": "24-3-maya",
"label": "24.3 RFM"
]
}
]
],
"environment": "{\n \"_comment_\": \"{STUDIO_SW} points to software repository. Can be defined in Core addon globally\",\n\n \"RFMTREE\": {\n \"darwin\": \"{STUDIO_SW}/APP/RENDERMAN/{RM_VERSION}/MAC/MAYA\",\n \"linux\": \"{STUDIO_SW}/APP/RENDERMAN/{RM_VERSION}/LINUX/MAYA\",\n \"windows\": \"{STUDIO_SW}/APP/RENDERMAN/{RM_VERSION}/WINDOWS/MAYA\"\n },\n \"RMANTREE\": {\n \"darwin\": \"{STUDIO_SW}/APP/RENDERMAN/{RM_VERSION}/MAC/RenderManProServer-{RM_VERSION}\",\n \"linux\": \"{STUDIO_SW}/APP/RENDERMAN/{RM_VERSION}/LINUX/RenderManProServer-{RM_VERSION}\",\n \"windows\": \"{STUDIO_SW}/APP/RENDERMAN/{RM_VERSION}/WINDOWS/RenderManProServer-{RM_VERSION}\"\n },\n \"MAYA_MODULE_PATH\": [\n \"{STUDIO_SW}/APP/RENDERMAN\",\n \"{MAYA_MODULE_PATH}\"\n ],\n \"PIXAR_LICENSE_FILE\": \"{STUDIO_SW}/APP/RENDERMAN/pixar.license\",\n \"RFM_DO_NOT_CREATE_MODULE_FILE\": \"1\"\n}"
},
{
"name": "mGear",
"label": "mGear for Maya (example)",
"variants": [
{
"name": "4-0-7",
"label": "",
"host_names": [],
"environment": "{\n \"MGEAR_VERSION\": \"4.0.7\"\n}",
"app_variants": []
}
],
"environment": "{\n \"_comment_\": \"{STUDIO_SW} points to software repository. Can be defined in Core addon globally\",\n\n \"MGEAR_ROOT\": \"{STUDIO_SW}/APP/MGEAR/{MGEAR_VERSION}/MAYA{MAYA_VERSION}/windows/x64\",\n \"MAYA_MODULE_PATH\": [\n \"{STUDIO_SW}/APP/MGEAR/{MGEAR_VERSION}/release\",\n \"{MAYA_MODULE_PATH}\"\n ]\n}"
},
{
"name": "yetiMaya",
"label": "Yeti for Maya (example)",
"variants": [
{
"name": "4.2.11",
"label": "",
"host_names": [],
"environment": "{\n \"YETI_VERSION\": \"4.2.11\"\n}",
"app_variants": []
}
],
"environment": "{\n \"_comment_\": \"{STUDIO_SW} points to software repository. Can be defined in Core addon globally\",\n\n \"YETI_HOME\": {\n \"darwin\": \"{STUDIO_SW}/APP/YETI/{YETI_VERSION}/MAYA{MAYA_VERSION}/MAC\",\n \"linux\": \"{STUDIO_SW}/APP/YETI/{YETI_VERSION}/MAYA{MAYA_VERSION}/LINUX\",\n \"windows\": \"{STUDIO_SW}/APP/YETI/{YETI_VERSION}/MAYA{MAYA_VERSION}/WINDOWS\"\n },\n \"YETI_TMP\": {\n \"windows\": \"C:/temp\",\n \"darwin\": \"/tmp\",\n \"linux\": \"/tmp\"\n },\n \"peregrinel_LICENSE\": \"4202@35.158.197.250\",\n \"MAYA_MODULE_PATH\": [\n \"{STUDIO_SW}/APP/YETI\",\n \"{MAYA_MODULE_PATH}\"\n ]\n}"
},
{
"name": "vrayMaya",
"label": "Vray for Maya (example)",
"variants": [
{
"name": "6.10.01",
"label": "",
"host_names": [
""
],
"environment": "{\n \"VRAY_VERSION\": \"6.10.01\"\n}",
"app_variants": []
}
],
"environment": "{\n \"_comment_\": \"{STUDIO_SW} points to software repository. Can be defined in Core addon globally\",\n\n \"MAYA_MODULE_PATH\": {\n \"windows\": [\n \"{STUDIO_SW}/APP/VRAY/{VRAY_VERSION}/MAYA{MAYA_VERSION}/WINDOWS/maya_root/modules\",\n \"{MAYA_MODULE_PATH}\"\n ],\n \"linux\": [\n \"{STUDIO_SW}/APP/VRAY/{VRAY_VERSION}/MAYA{MAYA_VERSION}/LINUX/maya_root/modules\",\n \"{MAYA_MODULE_PATH}\"\n ],\n \"darwin\": [\n \"{STUDIO_SW}/APP/VRAY/{VRAY_VERSION}/MAYA{MAYA_VERSION}/MAC/maya_root/modules\",\n \"{MAYA_MODULE_PATH}\"\n ]\n },\n \"VRAY_AUTH_CLIENT_FILE_PATH\": \"{STUDIO_SW}/APP/VRAY\"\n}"
},
{
"name": "vraynuke",
"label": "Vray for Nuke (example)",
"variants": [
{
"name": "5-20-00",
"label": "",
"host_names": [
"nuke"
],
"environment": "{\n \"VRAYNUKE_VERSION\": \"5.20.00\"\n}",
"app_variants": []
}
],
"environment": "{\n \"_comment_\": \"{STUDIO_SW} points to software repository. Can be defined in Core addon globally\",\n\n \"VRAY_FOR_NUKE_13_0_PLUGINS\": {\n \"windows\": \"{STUDIO_SW}/APP/VRAYNUKE/{VRAYNUKE_VERSION}/NUKE{NUKE_VRAY_VERSION}/WINDOWS/nuke_vray/plugins/vray\"\n },\n \"NUKE_PATH\": {\n \"windows\": [\n \"{STUDIO_SW}/APP/VRAYNUKE/{VRAYNUKE_VERSION}/NUKE{NUKE_VRAY_VERSION}/WINDOWS/nuke_root\",\n \"{NUKE_PATH}\"\n ]\n },\n \"PATH\": {\n \"windows\": [\n \"{STUDIO_SW}/APP/VRAYNUKE/{VRAYNUKE_VERSION}/NUKE{NUKE_VRAY_VERSION}/WINDOWS/nuke_vray\",\n \"{PATH}\"\n ]\n },\n \"VRAY_AUTH_CLIENT_FILE_PATH\": \"{STUDIO_SW}/APP/VRAY\"\n}"
}
]
}
}

View file

@ -1 +1 @@
__version__ = "0.1.6"
__version__ = "0.1.7"

View file

@ -49,6 +49,20 @@ class FamilyMappingItemModel(BaseSettingsModel):
)
class ValidateModelNameModel(BaseSettingsModel):
enabled: bool = SettingsField(title="Enabled")
optional: bool = SettingsField(title="Optional")
active: bool = SettingsField(title="Active")
regex: str = SettingsField(
"(.*)_(?P<subset>.*)_(GEO)",
title="Validation regex",
description=(
"Regex for validating model name. You can use named "
" capturing groups:(?P<asset>.*) for Asset name"
)
)
class ValidateLoadedPluginModel(BaseSettingsModel):
enabled: bool = SettingsField(title="Enabled")
optional: bool = SettingsField(title="Optional")
@ -65,10 +79,14 @@ class BasicValidateModel(BaseSettingsModel):
class PublishersModel(BaseSettingsModel):
ValidateInstanceInContext: BasicValidateModel = SettingsField(
default_factory=BasicValidateModel,
title="Validate Instance In Context",
section="Validators"
)
ValidateFrameRange: BasicValidateModel = SettingsField(
default_factory=BasicValidateModel,
title="Validate Frame Range",
section="Validators"
title="Validate Frame Range"
)
ValidateAttributes: ValidateAttributesModel = SettingsField(
default_factory=ValidateAttributesModel,
@ -82,10 +100,22 @@ class PublishersModel(BaseSettingsModel):
"the system automatically skips checking it"
)
)
ValidateNoAnimation: BasicValidateModel = SettingsField(
default_factory=BasicValidateModel,
title="Validate No Animation"
)
ValidateLoadedPlugin: ValidateLoadedPluginModel = SettingsField(
default_factory=ValidateLoadedPluginModel,
title="Validate Loaded Plugin"
)
ValidateMeshHasUVs: BasicValidateModel = SettingsField(
default_factory=BasicValidateModel,
title="Validate Mesh Has UVs"
)
ValidateModelName: ValidateModelNameModel = SettingsField(
default_factory=ValidateModelNameModel,
title="Validate Model Name"
)
ExtractModelObj: BasicValidateModel = SettingsField(
default_factory=BasicValidateModel,
title="Extract OBJ",
@ -110,6 +140,11 @@ class PublishersModel(BaseSettingsModel):
DEFAULT_PUBLISH_SETTINGS = {
"ValidateInstanceInContext": {
"enabled": True,
"optional": True,
"active": True
},
"ValidateFrameRange": {
"enabled": True,
"optional": True,
@ -129,11 +164,27 @@ DEFAULT_PUBLISH_SETTINGS = {
"nearclip": 1.0,
"farclip": 1000.0
},
"ValidateModelName": {
"enabled": True,
"optional": True,
"active": False,
"regex": "(.*)_(?P<subset>.*)_(GEO)"
},
"ValidateLoadedPlugin": {
"enabled": False,
"optional": True,
"family_plugins_mapping": []
},
"ValidateMeshHasUVs": {
"enabled": True,
"optional": True,
"active": False
},
"ValidateNoAnimation": {
"enabled": True,
"optional": True,
"active": False,
},
"ExtractModelObj": {
"enabled": True,
"optional": True,

View file

@ -1 +1 @@
__version__ = "0.1.5"
__version__ = "0.1.7"

View file

@ -56,7 +56,7 @@ class CollectInstanceDataModel(BaseSettingsModel):
sync_workfile_version_on_product_types: list[str] = SettingsField(
default_factory=list,
enum_resolver=nuke_product_types_enum,
title="Sync workfile versions for familes"
title="Product types"
)

View file

@ -1 +1 @@
__version__ = "0.1.9"
__version__ = "0.1.10"