mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
added km and miles, updated context access
This commit is contained in:
parent
36ba36f52c
commit
bc355b2279
3 changed files with 25 additions and 9 deletions
|
|
@ -30,8 +30,8 @@ class ValidateMayaUnits(pyblish.api.ContextPlugin):
|
|||
def process(self, context):
|
||||
|
||||
# Collected units
|
||||
linearunits = context.data('linearUnits')
|
||||
angularunits = context.data('angularUnits')
|
||||
linearunits = context.data.get('linearUnits')
|
||||
angularunits = context.data.get('angularUnits')
|
||||
# TODO(antirotor): This is hack as for framerates having multiple
|
||||
# decimal places. FTrack is ceiling decimal values on
|
||||
# fps to two decimal places but Maya 2019+ is reporting those fps
|
||||
|
|
@ -39,7 +39,7 @@ class ValidateMayaUnits(pyblish.api.ContextPlugin):
|
|||
# rounding, we have to round those numbers coming from Maya.
|
||||
# NOTE: this must be revisited yet again as it seems that Ftrack is
|
||||
# now flooring the value?
|
||||
fps = float_round(context.data['fps'], 2, ceil)
|
||||
fps = float_round(context.data.get('fps'), 2, ceil)
|
||||
|
||||
asset_fps = lib.get_asset()["data"]["fps"]
|
||||
|
||||
|
|
|
|||
|
|
@ -188,6 +188,20 @@
|
|||
"whitelist_native_plugins": false,
|
||||
"authorized_plugins": []
|
||||
},
|
||||
"ValidateMayaUnits": {
|
||||
"enabled": true,
|
||||
"optional": false,
|
||||
"validate_linear_units": true,
|
||||
"linear_units": "cm",
|
||||
"validate_angular_units": true,
|
||||
"angular_units": "deg",
|
||||
"validate_fps": true
|
||||
},
|
||||
"ValidateUnrealStaticMeshName": {
|
||||
"enabled": true,
|
||||
"validate_mesh": false,
|
||||
"validate_collision": true
|
||||
},
|
||||
"ValidateCycleError": {
|
||||
"enabled": true,
|
||||
"optional": false,
|
||||
|
|
@ -195,11 +209,6 @@
|
|||
"rig"
|
||||
]
|
||||
},
|
||||
"ValidateUnrealStaticMeshName": {
|
||||
"enabled": true,
|
||||
"validate_mesh": false,
|
||||
"validate_collision": true
|
||||
},
|
||||
"ValidateRenderSettings": {
|
||||
"arnold_render_attributes": [],
|
||||
"vray_render_attributes": [],
|
||||
|
|
|
|||
|
|
@ -140,6 +140,11 @@
|
|||
"type": "boolean",
|
||||
"key": "enabled",
|
||||
"label": "Enabled"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"key": "optional",
|
||||
"label": "Optional"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
|
|
@ -156,9 +161,11 @@
|
|||
{"mm": "millimeter"},
|
||||
{"cm": "centimeter"},
|
||||
{"m": "meter"},
|
||||
{"km": "kilometer"},
|
||||
{"in": "inch"},
|
||||
{"ft": "foot"},
|
||||
{"yd": "yard"}
|
||||
{"yd": "yard"},
|
||||
{"mi": "mile"}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue