mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
✨ settings for camera content validator
This commit is contained in:
parent
8d0bb493e8
commit
082fb1d29d
3 changed files with 32 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ class ValidateCameraContents(pyblish.api.InstancePlugin):
|
|||
hosts = ['maya']
|
||||
label = 'Camera Contents'
|
||||
actions = [openpype.hosts.maya.api.action.SelectInvalidAction]
|
||||
validate_shapes = True
|
||||
|
||||
@classmethod
|
||||
def get_invalid(cls, instance):
|
||||
|
|
@ -49,6 +50,8 @@ class ValidateCameraContents(pyblish.api.InstancePlugin):
|
|||
|
||||
raise RuntimeError("No cameras found in empty instance.")
|
||||
|
||||
if not cls.validate_shapes:
|
||||
return
|
||||
# non-camera shapes
|
||||
valid_shapes = cmds.ls(shapes, type=('camera', 'locator'), long=True)
|
||||
shapes = set(shapes) - set(valid_shapes)
|
||||
|
|
|
|||
|
|
@ -413,6 +413,11 @@
|
|||
"optional": true,
|
||||
"active": true
|
||||
},
|
||||
"ValidateCameraContents": {
|
||||
"enabled": true,
|
||||
"optional": true,
|
||||
"validate_shapes": true
|
||||
},
|
||||
"ExtractPlayblast": {
|
||||
"capture_preset": {
|
||||
"Codec": {
|
||||
|
|
|
|||
|
|
@ -570,6 +570,30 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "dict",
|
||||
"collapsible": true,
|
||||
"key": "ValidateCameraContents",
|
||||
"label": "Validate Camera Content",
|
||||
"checkbox_key": "enabled",
|
||||
"children": [
|
||||
{
|
||||
"type": "boolean",
|
||||
"key": "enabled",
|
||||
"label": "Enabled"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"key": "optional",
|
||||
"label": "Optional"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"key": "validate_shapes",
|
||||
"label": "Validate presence of shapes"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "splitter"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue