From 765b8a5213d54def16266a1744d31ecdaf494987 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Wed, 3 Mar 2021 09:57:44 +0100 Subject: [PATCH 1/8] move maya capture preset to plugin --- .../maya/plugins/publish/extract_playblast.py | 6 +- .../maya/plugins/publish/extract_thumbnail.py | 2 +- .../defaults/project_settings/maya.json | 230 +++---- .../schemas/schema_maya_capture.json | 581 ----------------- .../schemas/template_maya_capture.json | 588 ++++++++++++++++++ 5 files changed, 713 insertions(+), 694 deletions(-) delete mode 100644 pype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json create mode 100644 pype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json diff --git a/pype/hosts/maya/plugins/publish/extract_playblast.py b/pype/hosts/maya/plugins/publish/extract_playblast.py index 770b077e41..da1428400e 100644 --- a/pype/hosts/maya/plugins/publish/extract_playblast.py +++ b/pype/hosts/maya/plugins/publish/extract_playblast.py @@ -23,6 +23,7 @@ class ExtractPlayblast(pype.api.Extractor): hosts = ["maya"] families = ["review"] optional = True + capture_preset = {} def process(self, instance): self.log.info("Extracting capture..") @@ -43,12 +44,9 @@ class ExtractPlayblast(pype.api.Extractor): # get cameras camera = instance.data['review_camera'] - capture_preset = ( - instance.context.data['project_settings']['maya']['capture'] - ) try: - preset = lib.load_capture_preset(data=capture_preset) + preset = lib.load_capture_preset(data=self.capture_preset) except Exception: preset = {} self.log.info('using viewport preset: {}'.format(preset)) diff --git a/pype/hosts/maya/plugins/publish/extract_thumbnail.py b/pype/hosts/maya/plugins/publish/extract_thumbnail.py index 49511f6af6..9f6d16275f 100644 --- a/pype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/pype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -34,7 +34,7 @@ class ExtractThumbnail(pype.api.Extractor): capture_preset = "" capture_preset = ( - instance.context.data["project_settings"]['maya']['capture'] + instance.context.data["project_settings"]['maya']['publish']['ExtractPlayblast'] ) try: diff --git a/pype/settings/defaults/project_settings/maya.json b/pype/settings/defaults/project_settings/maya.json index 03955732d2..c1f43ff81e 100644 --- a/pype/settings/defaults/project_settings/maya.json +++ b/pype/settings/defaults/project_settings/maya.json @@ -1,111 +1,11 @@ { - "capture": { - "Codec": { - "compression": "jpg", - "format": "image", - "quality": 95 - }, - "Display Options": { - "background": [ - 0.7, - 0.7, - 0.7 - ], - "backgroundBottom": [ - 0.7, - 0.7, - 0.7 - ], - "backgroundTop": [ - 0.7, - 0.7, - 0.7 - ], - "override_display": true - }, - "Generic": { - "isolate_view": true, - "off_screen": true - }, - "IO": { - "name": "", - "open_finished": true, - "raw_frame_numbers": true, - "recent_playblasts": [], - "save_file": true - }, - "PanZoom": { - "pan_zoom": true - }, - "Renderer": { - "rendererName": "vp2Renderer" - }, - "Resolution": { - "width": 1080, - "height": 1920, - "percent": 1.0, - "mode": "Custom" - }, - "Time Range": { - "start_frame": 0, - "end_frame": 0, - "frame": "", - "time": "Time Slider" - }, - "Viewport Options": { - "cameras": false, - "clipGhosts": false, - "controlVertices": false, - "deformers": false, - "dimensions": false, - "displayLights": 0, - "dynamicConstraints": false, - "dynamics": false, - "fluids": false, - "follicles": false, - "gpuCacheDisplayFilter": false, - "greasePencils": false, - "grid": false, - "hairSystems": true, - "handles": false, - "high_quality": true, - "hud": false, - "hulls": false, - "ikHandles": false, - "imagePlane": true, - "joints": false, - "lights": false, - "locators": false, - "manipulators": false, - "motionTrails": false, - "nCloths": false, - "nParticles": false, - "nRigids": false, - "nurbsCurves": false, - "nurbsSurfaces": false, - "override_viewport_options": true, - "particleInstancers": false, - "pivots": false, - "planes": false, - "pluginShapes": false, - "polymeshes": true, - "shadows": true, - "strokes": false, - "subdivSurfaces": false, - "textures": false, - "twoSidedLighting": true - }, - "Camera Options": { - "displayGateMask": false, - "displayResolution": false, - "displayFilmGate": false, - "displayFieldChart": false, - "displaySafeAction": false, - "displaySafeTitle": false, - "displayFilmPivot": false, - "displayFilmOrigin": false, - "overscan": 1.0 - } + "ext_mapping": { + "model": "ma", + "mayaAscii": "ma", + "camera": "ma", + "rig": "ma", + "workfile": "ma", + "yetiRig": "ma" }, "create": { "CreateAnimation": { @@ -299,6 +199,10 @@ "enabled": false, "optional": true }, + "ValidateMeshNormalsUnlocked": { + "enabled": false, + "optional": true + }, "ValidateMeshUVSetMap1": { "enabled": false, "optional": true @@ -336,7 +240,7 @@ "optional": true }, "ValidateTransformZero": { - "enabled": true, + "enabled": false, "optional": true }, "ValidateCameraAttributes": { @@ -351,6 +255,116 @@ "enabled": true, "optional": true }, + "ExtractPlayblast": { + "capture_preset": { + "Codec": { + "compression": "jpg", + "format": "image", + "quality": 95 + }, + "Display Options": { + "background": [ + 0.7, + 0.7, + 0.7 + ], + "backgroundBottom": [ + 0.7, + 0.7, + 0.7 + ], + "backgroundTop": [ + 0.7, + 0.7, + 0.7 + ], + "override_display": true + }, + "Generic": { + "isolate_view": true, + "off_screen": true + }, + "IO": { + "name": "", + "open_finished": true, + "raw_frame_numbers": true, + "recent_playblasts": [], + "save_file": true + }, + "PanZoom": { + "pan_zoom": true + }, + "Renderer": { + "rendererName": "vp2Renderer" + }, + "Resolution": { + "width": 1080, + "height": 1920, + "percent": 1.0, + "mode": "Custom" + }, + "Time Range": { + "start_frame": 0, + "end_frame": 0, + "frame": "", + "time": "Time Slider" + }, + "Viewport Options": { + "cameras": false, + "clipGhosts": false, + "controlVertices": false, + "deformers": false, + "dimensions": false, + "displayLights": 0, + "dynamicConstraints": false, + "dynamics": false, + "fluids": false, + "follicles": false, + "gpuCacheDisplayFilter": false, + "greasePencils": false, + "grid": false, + "hairSystems": true, + "handles": false, + "high_quality": true, + "hud": false, + "hulls": false, + "ikHandles": false, + "imagePlane": true, + "joints": false, + "lights": false, + "locators": false, + "manipulators": false, + "motionTrails": false, + "nCloths": false, + "nParticles": false, + "nRigids": false, + "nurbsCurves": false, + "nurbsSurfaces": false, + "override_viewport_options": true, + "particleInstancers": false, + "pivots": false, + "planes": false, + "pluginShapes": false, + "polymeshes": true, + "shadows": true, + "strokes": false, + "subdivSurfaces": false, + "textures": false, + "twoSidedLighting": true + }, + "Camera Options": { + "displayGateMask": false, + "displayResolution": false, + "displayFilmGate": false, + "displayFieldChart": false, + "displaySafeAction": false, + "displaySafeTitle": false, + "displayFilmPivot": false, + "displayFilmOrigin": false, + "overscan": 1.0 + } + } + }, "ExtractCameraAlembic": { "enabled": true, "optional": true, diff --git a/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json deleted file mode 100644 index 4745a19075..0000000000 --- a/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ /dev/null @@ -1,581 +0,0 @@ -{ - "type": "dict", - "collapsible": true, - "key": "capture", - "label": "Maya Playblast settings", - "is_file": true, - "children": [ - { - "type": "dict", - "key": "Codec", - "children": [ - { - "type": "label", - "label": "Codec" - }, - { - "type": "text", - "key": "compression", - "label": "Compression type" - }, - { - "type": "text", - "key": "format", - "label": "Data format" - }, - { - "type": "number", - "key": "quality", - "label": "Quality", - "decimal": 0, - "minimum": 0, - "maximum": 100 - }, - - { - "type": "splitter" - } - ] - }, - { - "type": "dict", - "key": "Display Options", - "children": [ - { - "type": "label", - "label": "Display Options" - }, - { - "type": "list-strict", - "key": "background", - "label": "Background Color: ", - "object_types": [ - { - "label": "Red", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Green", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Blue", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - } - ] - }, - { - "type": "list-strict", - "key": "backgroundBottom", - "label": "Background Bottom: ", - "object_types": [ - { - "label": "Red", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Green", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Blue", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - } - ] - }, - { - "type": "list-strict", - "key": "backgroundTop", - "label": "Background Top: ", - "object_types": [ - { - "label": "Red", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Green", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - }, - { - "label": "Blue", - "type": "number", - "minimum": 0, - "maximum": 1, - "decimal": 3 - } - ] - }, - { - "type": "boolean", - "key": "override_display", - "label": "Override display options" - } - ] - }, - { - "type": "splitter" - }, - { - "type": "dict", - "key": "Generic", - "children": [ - { - "type": "label", - "label": "Generic" - }, - { - "type": "boolean", - "key": "isolate_view", - "label": " Isolate view" - }, - { - "type": "boolean", - "key": "off_screen", - "label": " Off Screen" - } - ] - }, - { - "type": "dict", - "key": "IO", - "children": [ - { - "type": "label", - "label": "IO" - }, - { - "type": "text", - "key": "name", - "label": "Name" - }, - { - "type": "boolean", - "key": "open_finished", - "label": "Open finished" - }, - { - "type": "boolean", - "key": "raw_frame_numbers", - "label": "Raw frame numbers" - }, - { - "type": "list", - "key": "recent_playblasts", - "label": "Recent Playblasts", - "object_type": "text" - }, - { - "type": "boolean", - "key": "save_file", - "label": "Save file" - } - ] - }, - { - "type": "dict", - "key": "PanZoom", - "children": [ - { - "type": "boolean", - "key": "pan_zoom", - "label": " Pan Zoom" - } - ] - }, - { - "type": "splitter" - }, - { - "type": "dict", - "key": "Renderer", - "children": [ - { - "type": "label", - "label": "Renderer" - }, - { - "type": "text", - "key": "rendererName", - "label": " Renderer name" - } - ] - }, - { - "type": "dict", - "key": "Resolution", - "children": [ - { - "type": "splitter" - }, - { - "type": "label", - "label": "Resolution" - }, - { - "type": "number", - "key": "width", - "label": " Width", - "decimal": 0, - "minimum": 0, - "maximum": 99999 - }, - { - "type": "number", - "key": "height", - "label": "Height", - "decimal": 0, - "minimum": 0, - "maximum": 99999 - }, - { - "type": "number", - "key": "percent", - "label": "percent", - "decimal": 1, - "minimum": 0, - "maximum": 200 - }, - { - "type": "text", - "key": "mode", - "label": "Mode" - } - ] - }, - { - "type": "splitter" - }, - { - "type": "dict", - "key": "Time Range", - "children": [ - { - "type": "label", - "label": "Time Range" - }, - { - "type": "number", - "key": "start_frame", - "label": " Start frame", - "decimal": 0, - "minimum": 0, - "maximum": 999999 - }, - { - "type": "number", - "key": "end_frame", - "label": "End frame", - "decimal": 0, - "minimum": 0, - "maximum": 999999 - }, - { - "type": "text", - "key": "frame", - "label": "Frame" - }, - { - "type": "text", - "key": "time", - "label": "Time" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "key": "Viewport Options", - "label": "Viewport Options", - "children": [ - { - "type": "boolean", - "key": "cameras", - "label": "cameras" - }, - { - "type": "boolean", - "key": "clipGhosts", - "label": "clipGhosts" - }, - { - "type": "boolean", - "key": "controlVertices", - "label": "controlVertices" - }, - { - "type": "boolean", - "key": "deformers", - "label": "deformers" - }, - { - "type": "boolean", - "key": "dimensions", - "label": "dimensions" - }, - { - "type": "number", - "key": "displayLights", - "label": "displayLights", - "decimal": 0, - "minimum": 0, - "maximum": 10 - }, - { - "type": "boolean", - "key": "dynamicConstraints", - "label": "dynamicConstraints" - }, - { - "type": "boolean", - "key": "dynamics", - "label": "dynamics" - }, - { - "type": "boolean", - "key": "fluids", - "label": "fluids" - }, - { - "type": "boolean", - "key": "follicles", - "label": "follicles" - }, - { - "type": "boolean", - "key": "gpuCacheDisplayFilter", - "label": "gpuCacheDisplayFilter" - }, - { - "type": "boolean", - "key": "greasePencils", - "label": "greasePencils" - }, - { - "type": "boolean", - "key": "grid", - "label": "grid" - }, - { - "type": "boolean", - "key": "hairSystems", - "label": "hairSystems" - }, - { - "type": "boolean", - "key": "handles", - "label": "handles" - }, - { - "type": "boolean", - "key": "high_quality", - "label": "high_quality" - }, - { - "type": "boolean", - "key": "hud", - "label": "hud" - }, - { - "type": "boolean", - "key": "hulls", - "label": "hulls" - }, - { - "type": "boolean", - "key": "ikHandles", - "label": "ikHandles" - }, - { - "type": "boolean", - "key": "imagePlane", - "label": "imagePlane" - }, - { - "type": "boolean", - "key": "joints", - "label": "joints" - }, - { - "type": "boolean", - "key": "lights", - "label": "lights" - }, - { - "type": "boolean", - "key": "locators", - "label": "locators" - }, - { - "type": "boolean", - "key": "manipulators", - "label": "manipulators" - }, - { - "type": "boolean", - "key": "motionTrails", - "label": "motionTrails" - }, - { - "type": "boolean", - "key": "nCloths", - "label": "nCloths" - }, - { - "type": "boolean", - "key": "nParticles", - "label": "nParticles" - }, - { - "type": "boolean", - "key": "nRigids", - "label": "nRigids" - }, - { - "type": "boolean", - "key": "nurbsCurves", - "label": "nurbsCurves" - }, - { - "type": "boolean", - "key": "nurbsSurfaces", - "label": "nurbsSurfaces" - }, - { - "type": "boolean", - "key": "override_viewport_options", - "label": "override_viewport_options" - }, - { - "type": "boolean", - "key": "particleInstancers", - "label": "particleInstancers" - }, - { - "type": "boolean", - "key": "pivots", - "label": "pivots" - }, - { - "type": "boolean", - "key": "planes", - "label": "planes" - }, - { - "type": "boolean", - "key": "pluginShapes", - "label": "pluginShapes" - }, - { - "type": "boolean", - "key": "polymeshes", - "label": "polymeshes" - }, - { - "type": "boolean", - "key": "shadows", - "label": "shadows" - }, - { - "type": "boolean", - "key": "strokes", - "label": "strokes" - }, - { - "type": "boolean", - "key": "subdivSurfaces", - "label": "subdivSurfaces" - }, - { - "type": "boolean", - "key": "textures", - "label": "textures" - }, - { - "type": "boolean", - "key": "twoSidedLighting", - "label": "twoSidedLighting" - } - ] - }, - { - "type": "dict", - "collapsible": true, - "key": "Camera Options", - "label": "Camera Options", - "children": [ - { - "type": "boolean", - "key": "displayGateMask", - "label": "displayGateMask" - }, - { - "type": "boolean", - "key": "displayResolution", - "label": "displayResolution" - }, - { - "type": "boolean", - "key": "displayFilmGate", - "label": "displayFilmGate" - }, - { - "type": "boolean", - "key": "displayFieldChart", - "label": "displayFieldChart" - }, - { - "type": "boolean", - "key": "displaySafeAction", - "label": "displaySafeAction" - }, - { - "type": "boolean", - "key": "displaySafeTitle", - "label": "displaySafeTitle" - }, - { - "type": "boolean", - "key": "displayFilmPivot", - "label": "displayFilmPivot" - }, - { - "type": "boolean", - "key": "displayFilmOrigin", - "label": "displayFilmOrigin" - }, - { - "type": "number", - "key": "overscan", - "label": "overscan", - "decimal": 1, - "minimum": 0, - "maximum": 10 - } - ] - } - ] -} diff --git a/pype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json b/pype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json new file mode 100644 index 0000000000..f6fcb3b998 --- /dev/null +++ b/pype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json @@ -0,0 +1,588 @@ +[ + { + "type": "dict", + "collapsible": true, + "key": "ExtractPlayblast", + "label": "Extract Playblast settings", + "children": [ + { + "type": "dict", + "key": "capture_preset", + "children": [ + { + "type": "dict", + "key": "Codec", + "children": [ + { + "type": "label", + "label": "Codec" + }, + { + "type": "text", + "key": "compression", + "label": "Compression type" + }, + { + "type": "text", + "key": "format", + "label": "Data format" + }, + { + "type": "number", + "key": "quality", + "label": "Quality", + "decimal": 0, + "minimum": 0, + "maximum": 100 + }, + + { + "type": "splitter" + } + ] + }, + { + "type": "dict", + "key": "Display Options", + "children": [ + { + "type": "label", + "label": "Display Options" + }, + { + "type": "list-strict", + "key": "background", + "label": "Background Color: ", + "object_types": [ + { + "label": "Red", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + }, + { + "label": "Green", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + }, + { + "label": "Blue", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + } + ] + }, + { + "type": "list-strict", + "key": "backgroundBottom", + "label": "Background Bottom: ", + "object_types": [ + { + "label": "Red", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + }, + { + "label": "Green", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + }, + { + "label": "Blue", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + } + ] + }, + { + "type": "list-strict", + "key": "backgroundTop", + "label": "Background Top: ", + "object_types": [ + { + "label": "Red", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + }, + { + "label": "Green", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + }, + { + "label": "Blue", + "type": "number", + "minimum": 0, + "maximum": 1, + "decimal": 3 + } + ] + }, + { + "type": "boolean", + "key": "override_display", + "label": "Override display options" + } + ] + }, + { + "type": "splitter" + }, + { + "type": "dict", + "key": "Generic", + "children": [ + { + "type": "label", + "label": "Generic" + }, + { + "type": "boolean", + "key": "isolate_view", + "label": " Isolate view" + }, + { + "type": "boolean", + "key": "off_screen", + "label": " Off Screen" + } + ] + }, + { + "type": "dict", + "key": "IO", + "children": [ + { + "type": "label", + "label": "IO" + }, + { + "type": "text", + "key": "name", + "label": "Name" + }, + { + "type": "boolean", + "key": "open_finished", + "label": "Open finished" + }, + { + "type": "boolean", + "key": "raw_frame_numbers", + "label": "Raw frame numbers" + }, + { + "type": "list", + "key": "recent_playblasts", + "label": "Recent Playblasts", + "object_type": "text" + }, + { + "type": "boolean", + "key": "save_file", + "label": "Save file" + } + ] + }, + { + "type": "dict", + "key": "PanZoom", + "children": [ + { + "type": "boolean", + "key": "pan_zoom", + "label": " Pan Zoom" + } + ] + }, + { + "type": "splitter" + }, + { + "type": "dict", + "key": "Renderer", + "children": [ + { + "type": "label", + "label": "Renderer" + }, + { + "type": "text", + "key": "rendererName", + "label": " Renderer name" + } + ] + }, + { + "type": "dict", + "key": "Resolution", + "children": [ + { + "type": "splitter" + }, + { + "type": "label", + "label": "Resolution" + }, + { + "type": "number", + "key": "width", + "label": " Width", + "decimal": 0, + "minimum": 0, + "maximum": 99999 + }, + { + "type": "number", + "key": "height", + "label": "Height", + "decimal": 0, + "minimum": 0, + "maximum": 99999 + }, + { + "type": "number", + "key": "percent", + "label": "percent", + "decimal": 1, + "minimum": 0, + "maximum": 200 + }, + { + "type": "text", + "key": "mode", + "label": "Mode" + } + ] + }, + { + "type": "splitter" + }, + { + "type": "dict", + "key": "Time Range", + "children": [ + { + "type": "label", + "label": "Time Range" + }, + { + "type": "number", + "key": "start_frame", + "label": " Start frame", + "decimal": 0, + "minimum": 0, + "maximum": 999999 + }, + { + "type": "number", + "key": "end_frame", + "label": "End frame", + "decimal": 0, + "minimum": 0, + "maximum": 999999 + }, + { + "type": "text", + "key": "frame", + "label": "Frame" + }, + { + "type": "text", + "key": "time", + "label": "Time" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "Viewport Options", + "label": "Viewport Options", + "children": [ + { + "type": "boolean", + "key": "cameras", + "label": "cameras" + }, + { + "type": "boolean", + "key": "clipGhosts", + "label": "clipGhosts" + }, + { + "type": "boolean", + "key": "controlVertices", + "label": "controlVertices" + }, + { + "type": "boolean", + "key": "deformers", + "label": "deformers" + }, + { + "type": "boolean", + "key": "dimensions", + "label": "dimensions" + }, + { + "type": "number", + "key": "displayLights", + "label": "displayLights", + "decimal": 0, + "minimum": 0, + "maximum": 10 + }, + { + "type": "boolean", + "key": "dynamicConstraints", + "label": "dynamicConstraints" + }, + { + "type": "boolean", + "key": "dynamics", + "label": "dynamics" + }, + { + "type": "boolean", + "key": "fluids", + "label": "fluids" + }, + { + "type": "boolean", + "key": "follicles", + "label": "follicles" + }, + { + "type": "boolean", + "key": "gpuCacheDisplayFilter", + "label": "gpuCacheDisplayFilter" + }, + { + "type": "boolean", + "key": "greasePencils", + "label": "greasePencils" + }, + { + "type": "boolean", + "key": "grid", + "label": "grid" + }, + { + "type": "boolean", + "key": "hairSystems", + "label": "hairSystems" + }, + { + "type": "boolean", + "key": "handles", + "label": "handles" + }, + { + "type": "boolean", + "key": "high_quality", + "label": "high_quality" + }, + { + "type": "boolean", + "key": "hud", + "label": "hud" + }, + { + "type": "boolean", + "key": "hulls", + "label": "hulls" + }, + { + "type": "boolean", + "key": "ikHandles", + "label": "ikHandles" + }, + { + "type": "boolean", + "key": "imagePlane", + "label": "imagePlane" + }, + { + "type": "boolean", + "key": "joints", + "label": "joints" + }, + { + "type": "boolean", + "key": "lights", + "label": "lights" + }, + { + "type": "boolean", + "key": "locators", + "label": "locators" + }, + { + "type": "boolean", + "key": "manipulators", + "label": "manipulators" + }, + { + "type": "boolean", + "key": "motionTrails", + "label": "motionTrails" + }, + { + "type": "boolean", + "key": "nCloths", + "label": "nCloths" + }, + { + "type": "boolean", + "key": "nParticles", + "label": "nParticles" + }, + { + "type": "boolean", + "key": "nRigids", + "label": "nRigids" + }, + { + "type": "boolean", + "key": "nurbsCurves", + "label": "nurbsCurves" + }, + { + "type": "boolean", + "key": "nurbsSurfaces", + "label": "nurbsSurfaces" + }, + { + "type": "boolean", + "key": "override_viewport_options", + "label": "override_viewport_options" + }, + { + "type": "boolean", + "key": "particleInstancers", + "label": "particleInstancers" + }, + { + "type": "boolean", + "key": "pivots", + "label": "pivots" + }, + { + "type": "boolean", + "key": "planes", + "label": "planes" + }, + { + "type": "boolean", + "key": "pluginShapes", + "label": "pluginShapes" + }, + { + "type": "boolean", + "key": "polymeshes", + "label": "polymeshes" + }, + { + "type": "boolean", + "key": "shadows", + "label": "shadows" + }, + { + "type": "boolean", + "key": "strokes", + "label": "strokes" + }, + { + "type": "boolean", + "key": "subdivSurfaces", + "label": "subdivSurfaces" + }, + { + "type": "boolean", + "key": "textures", + "label": "textures" + }, + { + "type": "boolean", + "key": "twoSidedLighting", + "label": "twoSidedLighting" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "Camera Options", + "label": "Camera Options", + "children": [ + { + "type": "boolean", + "key": "displayGateMask", + "label": "displayGateMask" + }, + { + "type": "boolean", + "key": "displayResolution", + "label": "displayResolution" + }, + { + "type": "boolean", + "key": "displayFilmGate", + "label": "displayFilmGate" + }, + { + "type": "boolean", + "key": "displayFieldChart", + "label": "displayFieldChart" + }, + { + "type": "boolean", + "key": "displaySafeAction", + "label": "displaySafeAction" + }, + { + "type": "boolean", + "key": "displaySafeTitle", + "label": "displaySafeTitle" + }, + { + "type": "boolean", + "key": "displayFilmPivot", + "label": "displayFilmPivot" + }, + { + "type": "boolean", + "key": "displayFilmOrigin", + "label": "displayFilmOrigin" + }, + { + "type": "number", + "key": "overscan", + "label": "overscan", + "decimal": 1, + "minimum": 0, + "maximum": 10 + } + ] + } + ] + } + ] + } +] From d1aebe70bc611def48a606f785d62348a0390900 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Wed, 3 Mar 2021 09:57:58 +0100 Subject: [PATCH 2/8] return extension mapping to maya settings --- .../schemas/projects_schema/schema_project_maya.json | 9 +++++++-- .../projects_schema/schemas/schema_maya_publish.json | 8 ++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/pype/settings/entities/schemas/projects_schema/schema_project_maya.json b/pype/settings/entities/schemas/projects_schema/schema_project_maya.json index 7a270b0046..0a59cab510 100644 --- a/pype/settings/entities/schemas/projects_schema/schema_project_maya.json +++ b/pype/settings/entities/schemas/projects_schema/schema_project_maya.json @@ -6,8 +6,13 @@ "is_file": true, "children": [ { - "type": "schema", - "name": "schema_maya_capture" + "type": "dict-modifiable", + "key": "ext_mapping", + "label": "Extension Mapping", + "use_label_wrap": true, + "object_type": { + "type": "text" + } }, { "type": "schema", diff --git a/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json b/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json index 58a21c185a..6ecda224ea 100644 --- a/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json +++ b/pype/settings/entities/schemas/projects_schema/schemas/schema_maya_publish.json @@ -170,6 +170,10 @@ "key": "ValidateMeshNonManifold", "label": "ValidateMeshNonManifold" }, + { + "key": "ValidateMeshNormalsUnlocked", + "label": "ValidateMeshNormalsUnlocked" + }, { "key": "ValidateMeshUVSetMap1", "label": "ValidateMeshUVSetMap1", @@ -242,6 +246,10 @@ "type": "label", "label": "Extractors" }, + { + "type": "schema_template", + "name": "template_maya_capture" + }, { "type": "dict", "collapsible": true, From a378bb4bd02c8e9099213cdc9dd543b300b1f3da Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Wed, 3 Mar 2021 09:58:09 +0100 Subject: [PATCH 3/8] maya wrong api import --- pype/hosts/maya/api/action.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pype/hosts/maya/api/action.py b/pype/hosts/maya/api/action.py index 35a57a4445..f623298451 100644 --- a/pype/hosts/maya/api/action.py +++ b/pype/hosts/maya/api/action.py @@ -72,7 +72,7 @@ class GenerateUUIDsOnInvalidAction(pyblish.api.Action): nodes (list): all nodes to regenerate ids on """ - from pype.hosts.maya import lib + from pype.hosts.maya.api import lib import avalon.io as io asset = instance.data['asset'] From 97324bc5e306559e6d4f737ac81edee67f6c1da8 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Wed, 3 Mar 2021 09:58:23 +0100 Subject: [PATCH 4/8] add nuke validator defaults --- .../defaults/project_settings/nuke.json | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/pype/settings/defaults/project_settings/nuke.json b/pype/settings/defaults/project_settings/nuke.json index 517065f79a..392f189bd7 100644 --- a/pype/settings/defaults/project_settings/nuke.json +++ b/pype/settings/defaults/project_settings/nuke.json @@ -11,6 +11,30 @@ "PreCollectNukeInstances": { "sync_workfile_version": true }, + "ValidateKnobs": { + "enabled": false, + "knobs": { + "render": { + "review": true + } + } + }, + "ValidateOutputResolution": { + "enabled": true, + "optional": true + }, + "ValidateGizmo": { + "enabled": true, + "optional": true + }, + "ValidateScript": { + "enabled": true, + "optional": true + }, + "ValidateNukeWriteBoundingBox": { + "enabled": true, + "optional": true + }, "ExtractThumbnail": { "enabled": true, "nodes": { @@ -38,14 +62,6 @@ ] } }, - "ValidateKnobs": { - "enabled": false, - "knobs": { - "render": { - "review": true - } - } - }, "ExtractReviewDataLut": { "enabled": false }, @@ -61,22 +77,6 @@ "deadline_pool": "", "deadline_pool_secondary": "", "deadline_chunk_size": 1 - }, - "ValidateOutputResolution": { - "enabled": true, - "optional": true - }, - "ValidateGizmo": { - "enabled": true, - "optional": true - }, - "ValidateScript": { - "enabled": true, - "optional": true - }, - "ValidateNukeWriteBoundingBox": { - "enabled": true, - "optional": true } }, "workfile_build": { From 4ca92280a78bc5bc98d79d0affbf6d20988566e6 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Wed, 3 Mar 2021 09:58:38 +0100 Subject: [PATCH 5/8] remove standalone publisher thumbnail default --- .../project_settings/standalonepublisher.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pype/settings/defaults/project_settings/standalonepublisher.json b/pype/settings/defaults/project_settings/standalonepublisher.json index ad1b5e82b2..08895bcba9 100644 --- a/pype/settings/defaults/project_settings/standalonepublisher.json +++ b/pype/settings/defaults/project_settings/standalonepublisher.json @@ -1,14 +1,4 @@ { - "publish": { - "ExtractThumbnailSP": { - "ffmpeg_args": { - "input": [ - "gamma 2.2" - ], - "output": [] - } - } - }, "create": { "create_workfile": { "name": "workfile", @@ -121,5 +111,15 @@ "create_image": "Image", "create_matchmove": "Matchmove" } + }, + "publish": { + "ExtractThumbnailSP": { + "ffmpeg_args": { + "input": [ + "gamma 2.2" + ], + "output": [] + } + } } } \ No newline at end of file From f166dee723b9acdef67c3857128239cdd0a07000 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Wed, 3 Mar 2021 15:26:35 +0100 Subject: [PATCH 6/8] fix maya playblast settings --- pype/hosts/maya/api/lib.py | 49 +++-- .../maya/plugins/publish/extract_playblast.py | 10 +- .../defaults/project_settings/maya.json | 29 +-- .../schemas/template_maya_capture.json | 167 +++++++----------- 4 files changed, 94 insertions(+), 161 deletions(-) diff --git a/pype/hosts/maya/api/lib.py b/pype/hosts/maya/api/lib.py index dc802b6a37..56621949b3 100644 --- a/pype/hosts/maya/api/lib.py +++ b/pype/hosts/maya/api/lib.py @@ -2127,15 +2127,9 @@ def bake_to_world_space(nodes, def load_capture_preset(path=None, data=None): - import capture_gui import capture - if data: - preset = data - else: - path = path - preset = capture_gui.lib.load_json(path) - print(preset) + preset = data options = dict() @@ -2177,29 +2171,27 @@ def load_capture_preset(path=None, data=None): temp_options2 = {} id = 'Viewport Options' - light_options = { - 0: "default", - 1: 'all', - 2: 'selected', - 3: 'flat', - 4: 'nolights'} for key in preset[id]: - if key == 'high_quality': - if preset[id][key] == True: - temp_options2['multiSampleEnable'] = True - temp_options2['multiSampleCount'] = 4 - temp_options2['textureMaxResolution'] = 1024 + if key == 'textureMaxResolution': + if preset[id][key] > 0: + temp_options2['textureMaxResolution'] = preset[id][key] temp_options2['enableTextureMaxRes'] = True temp_options2['textureMaxResMode'] = 1 else: - temp_options2['multiSampleEnable'] = False - temp_options2['multiSampleCount'] = 4 - temp_options2['textureMaxResolution'] = 512 - temp_options2['enableTextureMaxRes'] = True + temp_options2['textureMaxResolution'] = preset[id][key] + temp_options2['enableTextureMaxRes'] = False temp_options2['textureMaxResMode'] = 0 + if key == 'multiSample': + if preset[id][key] > 0: + temp_options2['multiSampleEnable'] = True + temp_options2['multiSampleCount'] = preset[id][key] + else: + temp_options2['multiSampleEnable'] = False + temp_options2['multiSampleCount'] = preset[id][key] + if key == 'ssaoEnable': - if preset[id][key] == True: + if preset[id][key] is True: temp_options2['ssaoEnable'] = True else: temp_options2['ssaoEnable'] = False @@ -2211,18 +2203,17 @@ def load_capture_preset(path=None, data=None): if key == 'headsUpDisplay': temp_options['headsUpDisplay'] = True - if key == 'displayLights': - temp_options[str(key)] = light_options[preset[id][key]] else: temp_options[str(key)] = preset[id][key] for key in ['override_viewport_options', 'high_quality', 'alphaCut', - 'gpuCacheDisplayFilter']: - temp_options.pop(key, None) - - for key in ['ssaoEnable']: + 'gpuCacheDisplayFilter', + 'multiSample', + 'ssaoEnable', + 'textureMaxResolution' + ]: temp_options.pop(key, None) options['viewport_options'] = temp_options diff --git a/pype/hosts/maya/plugins/publish/extract_playblast.py b/pype/hosts/maya/plugins/publish/extract_playblast.py index da1428400e..99411e7f53 100644 --- a/pype/hosts/maya/plugins/publish/extract_playblast.py +++ b/pype/hosts/maya/plugins/publish/extract_playblast.py @@ -45,11 +45,8 @@ class ExtractPlayblast(pype.api.Extractor): # get cameras camera = instance.data['review_camera'] - try: - preset = lib.load_capture_preset(data=self.capture_preset) - except Exception: - preset = {} - self.log.info('using viewport preset: {}'.format(preset)) + preset = lib.load_capture_preset(data=self.capture_preset) + preset['camera'] = camera preset['format'] = "image" @@ -99,6 +96,9 @@ class ExtractPlayblast(pype.api.Extractor): # Remove panel key since it's internal value to capture_gui preset.pop("panel", None) + + self.log.info('using viewport preset: {}'.format(preset)) + path = capture.capture(**preset) playblast = self._fix_playblast_output_path(path) diff --git a/pype/settings/defaults/project_settings/maya.json b/pype/settings/defaults/project_settings/maya.json index c1f43ff81e..75aa32fb36 100644 --- a/pype/settings/defaults/project_settings/maya.json +++ b/pype/settings/defaults/project_settings/maya.json @@ -284,13 +284,6 @@ "isolate_view": true, "off_screen": true }, - "IO": { - "name": "", - "open_finished": true, - "raw_frame_numbers": true, - "recent_playblasts": [], - "save_file": true - }, "PanZoom": { "pan_zoom": true }, @@ -303,19 +296,20 @@ "percent": 1.0, "mode": "Custom" }, - "Time Range": { - "start_frame": 0, - "end_frame": 0, - "frame": "", - "time": "Time Slider" - }, "Viewport Options": { + "override_viewport_options": true, + "displayLights": "0", + "textureMaxResolution": 1024, + "multiSample": 4, + "shadows": true, + "textures": true, + "twoSidedLighting": true, + "ssaoEnable": true, "cameras": false, "clipGhosts": false, "controlVertices": false, "deformers": false, "dimensions": false, - "displayLights": 0, "dynamicConstraints": false, "dynamics": false, "fluids": false, @@ -325,7 +319,6 @@ "grid": false, "hairSystems": true, "handles": false, - "high_quality": true, "hud": false, "hulls": false, "ikHandles": false, @@ -340,17 +333,13 @@ "nRigids": false, "nurbsCurves": false, "nurbsSurfaces": false, - "override_viewport_options": true, "particleInstancers": false, "pivots": false, "planes": false, "pluginShapes": false, "polymeshes": true, - "shadows": true, "strokes": false, - "subdivSurfaces": false, - "textures": false, - "twoSidedLighting": true + "subdivSurfaces": false }, "Camera Options": { "displayGateMask": false, diff --git a/pype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json b/pype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json index f6fcb3b998..e4e0b034dd 100644 --- a/pype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json +++ b/pype/settings/entities/schemas/projects_schema/schemas/template_maya_capture.json @@ -163,42 +163,7 @@ } ] }, - { - "type": "dict", - "key": "IO", - "children": [ - { - "type": "label", - "label": "IO" - }, - { - "type": "text", - "key": "name", - "label": "Name" - }, - { - "type": "boolean", - "key": "open_finished", - "label": "Open finished" - }, - { - "type": "boolean", - "key": "raw_frame_numbers", - "label": "Raw frame numbers" - }, - { - "type": "list", - "key": "recent_playblasts", - "label": "Recent Playblasts", - "object_type": "text" - }, - { - "type": "boolean", - "key": "save_file", - "label": "Save file" - } - ] - }, + { "type": "dict", "key": "PanZoom", @@ -222,9 +187,12 @@ "label": "Renderer" }, { - "type": "text", + "type": "enum", "key": "rendererName", - "label": " Renderer name" + "label": "Renderer name", + "enum_items": [ + { "vp2Renderer": "Viewport 2.0" } + ] } ] }, @@ -273,48 +241,66 @@ { "type": "splitter" }, - { - "type": "dict", - "key": "Time Range", - "children": [ - { - "type": "label", - "label": "Time Range" - }, - { - "type": "number", - "key": "start_frame", - "label": " Start frame", - "decimal": 0, - "minimum": 0, - "maximum": 999999 - }, - { - "type": "number", - "key": "end_frame", - "label": "End frame", - "decimal": 0, - "minimum": 0, - "maximum": 999999 - }, - { - "type": "text", - "key": "frame", - "label": "Frame" - }, - { - "type": "text", - "key": "time", - "label": "Time" - } - ] - }, { "type": "dict", "collapsible": true, "key": "Viewport Options", "label": "Viewport Options", "children": [ + { + "type": "boolean", + "key": "override_viewport_options", + "label": "override_viewport_options" + }, + { + "type": "enum", + "key": "displayLights", + "label": "Display Lights", + "enum_items": [ + { "default": "Default Lighting"}, + { "all": "All Lights"}, + { "selected": "Selected Lights"}, + { "flat": "Flat Lighting"}, + { "nolights": "No Lights"} + ] + }, + { + "type": "number", + "key": "textureMaxResolution", + "label": "Texture Clamp Resolution", + "decimal": 0 + }, + { + "type": "number", + "key": "multiSample", + "label": "Anti Aliasing Samples", + "decimal": 0, + "minimum": 0, + "maximum": 32 + }, + { + "type": "boolean", + "key": "shadows", + "label": "Display Shadows" + }, + { + "type": "boolean", + "key": "textures", + "label": "Display Textures" + }, + { + "type": "boolean", + "key": "twoSidedLighting", + "label": "Two Sided Lighting" + }, + { + "type": "boolean", + "key": "ssaoEnable", + "label": "Screen Space Ambient Occlusion" + }, + { + "type": "splitter" + }, { "type": "boolean", "key": "cameras", @@ -340,14 +326,6 @@ "key": "dimensions", "label": "dimensions" }, - { - "type": "number", - "key": "displayLights", - "label": "displayLights", - "decimal": 0, - "minimum": 0, - "maximum": 10 - }, { "type": "boolean", "key": "dynamicConstraints", @@ -393,11 +371,6 @@ "key": "handles", "label": "handles" }, - { - "type": "boolean", - "key": "high_quality", - "label": "high_quality" - }, { "type": "boolean", "key": "hud", @@ -468,11 +441,6 @@ "key": "nurbsSurfaces", "label": "nurbsSurfaces" }, - { - "type": "boolean", - "key": "override_viewport_options", - "label": "override_viewport_options" - }, { "type": "boolean", "key": "particleInstancers", @@ -498,11 +466,6 @@ "key": "polymeshes", "label": "polymeshes" }, - { - "type": "boolean", - "key": "shadows", - "label": "shadows" - }, { "type": "boolean", "key": "strokes", @@ -512,16 +475,6 @@ "type": "boolean", "key": "subdivSurfaces", "label": "subdivSurfaces" - }, - { - "type": "boolean", - "key": "textures", - "label": "textures" - }, - { - "type": "boolean", - "key": "twoSidedLighting", - "label": "twoSidedLighting" } ] }, From 5c930f7f3912cfe694b90b21a3c17ded71089ee1 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Thu, 4 Mar 2021 12:48:06 +0100 Subject: [PATCH 7/8] nuke loaders --- pype/hosts/nuke/plugins/load/load_mov.py | 1 + .../defaults/project_settings/nuke.json | 19 ++++++++++++++ .../projects_schema/schema_project_nuke.json | 5 ++++ .../schemas/schema_nuke_load.json | 26 +++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_load.json diff --git a/pype/hosts/nuke/plugins/load/load_mov.py b/pype/hosts/nuke/plugins/load/load_mov.py index 435f26ad98..830359ccf9 100644 --- a/pype/hosts/nuke/plugins/load/load_mov.py +++ b/pype/hosts/nuke/plugins/load/load_mov.py @@ -95,6 +95,7 @@ class LoadMov(api.Loader): containerise, viewer_update_and_undo_stop ) + version = context['version'] version_data = version.get("data", {}) repr_id = context["representation"]["_id"] diff --git a/pype/settings/defaults/project_settings/nuke.json b/pype/settings/defaults/project_settings/nuke.json index 392f189bd7..5821584932 100644 --- a/pype/settings/defaults/project_settings/nuke.json +++ b/pype/settings/defaults/project_settings/nuke.json @@ -79,6 +79,25 @@ "deadline_chunk_size": 1 } }, + "load": { + "LoadImage": { + "enabled": true, + "representations": [] + }, + "LoadMov": { + "enabled": true, + "representations": [] + }, + "LoadSequence": { + "enabled": true, + "representations": [ + "png", + "jpg", + "exr", + "" + ] + } + }, "workfile_build": { "profiles": [ { diff --git a/pype/settings/entities/schemas/projects_schema/schema_project_nuke.json b/pype/settings/entities/schemas/projects_schema/schema_project_nuke.json index 0548bd3544..220d56a306 100644 --- a/pype/settings/entities/schemas/projects_schema/schema_project_nuke.json +++ b/pype/settings/entities/schemas/projects_schema/schema_project_nuke.json @@ -45,6 +45,11 @@ "type": "schema", "name": "schema_nuke_publish", "template_data": [] + }, + { + "type": "schema", + "name": "schema_nuke_load", + "template_data": [] }, { "type": "schema", diff --git a/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_load.json b/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_load.json new file mode 100644 index 0000000000..9d132e33b4 --- /dev/null +++ b/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_load.json @@ -0,0 +1,26 @@ +{ + "type": "dict", + "collapsible": true, + "key": "load", + "label": "Loader plugins", + "children": [ + { + "type": "schema_template", + "name": "template_loader_plugin", + "template_data": [ + { + "key": "LoadImage", + "label": "Image Loader" + }, + { + "key": "LoadMov", + "label": "Movie Loader" + }, + { + "key": "LoadSequence", + "label": "Image Sequence Loader" + } + ] + } + ] +} From e27e431742419e31d557419cdda4df3286bb4118 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Thu, 4 Mar 2021 12:49:23 +0100 Subject: [PATCH 8/8] remove look assigner folder --- repos/maya-look-assigner | 1 - 1 file changed, 1 deletion(-) delete mode 160000 repos/maya-look-assigner diff --git a/repos/maya-look-assigner b/repos/maya-look-assigner deleted file mode 160000 index 7adabe8f0e..0000000000 --- a/repos/maya-look-assigner +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7adabe8f0e6858bfe5b6bf0b39bd428ed72d0452