From 52a3637894e3f54c3ff05c43719a3b28e8716d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20LORRAIN?= Date: Mon, 20 Dec 2021 16:35:03 +0100 Subject: [PATCH] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 0d060a7c13c2ea6f93a162cf7c79bf963a9e72fe Author: Jérôme LORRAIN Date: Mon Dec 20 11:58:49 2021 +0100 Add option to publish from published workfile commit 40ed1de185bfaabb25e9516a21043207a4b9d182 Merge: 373217b0a 512bf2e3f Author: pypebot <82967070+pypebot@users.noreply.github.com> Date: Wed Dec 15 04:41:41 2021 +0100 [Automated] Merged main into develop commit 512bf2e3f66c2523eedd52f2434ea2b84b5772be Author: OpenPype Date: Wed Dec 15 03:41:30 2021 +0000 [Automated] Bump version commit 39bddace2688bd84fcfee304b42fb3a9d582aa9b Merge: ea034447e 373217b0a Author: pypebot <82967070+pypebot@users.noreply.github.com> Date: Wed Dec 15 04:35:02 2021 +0100 [Automated] Merged develop into main commit 373217b0a8021d5885084504ea360815764f8fda Merge: 897fa65ee 00b143066 Author: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Tue Dec 14 18:03:57 2021 +0100 Merge pull request #2404 from pypeclub/feature/OP-1165_Sync-to-avalon-does-not-check-existence-of-entity-type Ftrack: Check existence of object type on recreation commit 897fa65ee9c83fc2d3de20dc273e911d4642865c Merge: d69d8f3ad c4106bf95 Author: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Tue Dec 14 18:03:46 2021 +0100 Merge pull request #2399 from pypeclub/bugfix/placeholder_palette_change_fix Fix: Placeholder Input color set fix commit d69d8f3ad77d3e4a34ab33adff30c5569767a253 Merge: a4be22cff 0b6e2f337 Author: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Tue Dec 14 18:03:37 2021 +0100 Merge pull request #2377 from pypeclub/feature/OP-2092_Blender-30-OP-is-not-integrated Blender 3: Support auto install for new blender version commit a4be22cff62fb87c324422860c963c99964a3cc3 Merge: b8fadc692 68b99391a Author: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Tue Dec 14 17:34:22 2021 +0100 Merge pull request #2382 from pypeclub/feature/OP-2001_Settings-Copypaste-project-settings-to-another-project Enhancement: Settings: Use project settings values from another project commit 68b99391acecec1a208468df98026506db7ac95a Author: iLLiCiTiT Date: Tue Dec 14 15:35:39 2021 +0100 modified message commit b8fadc692d4184d6404982828f41488d5bc631ba Merge: 1b6c55161 2c66a1eab Author: Petr Kalis Date: Tue Dec 14 15:31:58 2021 +0100 Merge pull request #2387 from pypeclub/feature/OP-2053_Add-validator-to-check-correct-version-of-extension-for-PS-and-AE Add validator to check correct version of extension for PS and AE commit 2c66a1eab2527a34029fc639fc475efa2dc77896 Author: Petr Kalis Date: Tue Dec 14 15:31:03 2021 +0100 OP-2053 - fix PS after merge commit 450dbf3fd25225b4d94a6f92f6404ccb5a0c80c3 Author: Petr Kalis Date: Tue Dec 14 15:29:42 2021 +0100 OP-2053 - fix PS after merge commit 0cd95025229f19cc8d1a7d64e8f750ace9ce2890 Merge: 1cbcdba96 b97d79dea Author: Petr Kalis Date: Tue Dec 14 15:27:14 2021 +0100 Merge remote-tracking branch 'origin/feature/OP-2053_Add-validator-to-check-correct-version-of-extension-for-PS-and-AE' into feature/OP-2053_Add-validator-to-check-correct-version-of-extension-for-PS-and-AE commit 1cbcdba969a350dfb33a2b2c30aa18b9ece4b1db Merge: 621118c7b ca7a92b62 Author: Petr Kalis Date: Tue Dec 14 15:26:15 2021 +0100 OP-2053 - merge develop commit 1b6c55161fd66c8db00a35c7324039c4930ad712 Merge: ca7a92b62 a6a7348a7 Author: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Tue Dec 14 15:23:43 2021 +0100 Merge pull request #2403 from pypeclub/bugfix/OP-1780_set_global_environments-fails-with-addons General: Fix access to environments from default settings commit b97d79dea8c785ea512904d1511a1e06948051c1 Merge: 61bf279d4 ca7a92b62 Author: Petr Kalis Date: Tue Dec 14 15:19:53 2021 +0100 Merge branch 'develop' into feature/OP-2053_Add-validator-to-check-correct-version-of-extension-for-PS-and-AE commit ca7a92b628bb102983a726725149bc84d509f521 Merge: ad51cd816 b57a09b43 Author: Petr Kalis Date: Tue Dec 14 15:17:36 2021 +0100 Merge pull request #2270 from pypeclub/feature/OP-2019_Create-test-publish-class-for-AE Create test publish class for After Effects commit b57a09b430a8dd1e09db2fa97cf37685b0ca9aa8 Author: Petr Kalis Date: Tue Dec 14 15:16:48 2021 +0100 OP-2019 - revert unwanted commit commit c0bacd5fc6c2dab68cc49a136be0e0f1894fd815 Merge: 2e753e1ca ad51cd816 Author: Petr Kalis Date: Tue Dec 14 15:13:34 2021 +0100 OP-2019 - merge develop commit ad51cd81629b35d47e3f7875c3e375130bb45098 Merge: feefe115b 931896519 Author: Ondřej Samohel <33513211+antirotor@users.noreply.github.com> Date: Tue Dec 14 13:57:24 2021 +0100 Merge pull request #2356 from Ellipsanime/maya-ImagePlaneLoader-load-blueprint Maya: Add is_static_image_plane and is_in_all_views option in imagePlaneLoader commit feefe115b8e6531f1f6e7f0ba10271b3d3c918ad Merge: d74ba7f49 09bbebae1 Author: Ondřej Samohel <33513211+antirotor@users.noreply.github.com> Date: Tue Dec 14 13:52:07 2021 +0100 Merge pull request #2375 from Ellipsanime/maya-add-render-image-path-to-settings Maya add render image path to settings commit d74ba7f49ecfe0b41fb273f4f36df5fd311707f3 Merge: bfbd8bd94 c78d4d89a Author: Ondřej Samohel <33513211+antirotor@users.noreply.github.com> Date: Tue Dec 14 13:49:57 2021 +0100 Merge pull request #2394 from Ellipsanime/CollectLook-fix-getattr [Fix][MAYA] Handle message type attribute within CollectLook commit bfbd8bd949c24b13909921942fe1a4dd3bec91f4 Merge: 3b9db7d43 ebbd43bd5 Author: Ondřej Samohel <33513211+antirotor@users.noreply.github.com> Date: Tue Dec 14 13:46:50 2021 +0100 Merge pull request #2384 from pypeclub/enhancement/centos7-add-xcb-to-pyside2 Centos 7 dependency compatibility commit ebbd43bd5fd6d587f6e88558df5512d8c9e971d0 Author: Ondřej Samohel <33513211+antirotor@users.noreply.github.com> Date: Tue Dec 14 13:46:34 2021 +0100 Update Dockerfile.centos7 Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> commit 00b143066ea99ffabd32ea7bf32b711d4f07a849 Author: iLLiCiTiT Date: Tue Dec 14 11:48:55 2021 +0100 check existence of entity type on recreation and use Folder if not found commit 0ff12fdaeeb6629e74a26cd56c06fa4d459ddd8d Author: iLLiCiTiT Date: Tue Dec 14 11:48:23 2021 +0100 cache object types commit 61bf279d4bc866b6bb442d8828a5384c1732a358 Merge: 621118c7b 3b9db7d43 Author: Petr Kalis Date: Tue Dec 14 11:28:30 2021 +0100 Merge branch 'develop' into feature/OP-2053_Add-validator-to-check-correct-version-of-extension-for-PS-and-AE commit 621118c7b923718263047c915ace0a1e25bffd01 Merge: b2644d39e 02717fac4 Author: Petr Kalis Date: Tue Dec 14 11:25:16 2021 +0100 Merge remote-tracking branch 'origin/feature/OP-2053_Add-validator-to-check-correct-version-of-extension-for-PS-and-AE' into feature/OP-2053_Add-validator-to-check-correct-version-of-extension-for-PS-and-AE commit b2644d39ed27298c32e916fc38eb49a551857d4f Merge: aa232b432 8739dd9f0 Author: Petr Kalis Date: Tue Dec 14 11:23:44 2021 +0100 Merge remote-tracking branch 'origin/feature/OP-2053_Add-validator-to-check-correct-version-of-extension-for-PS-and-AE' into feature/OP-2053_Add-validator-to-check-correct-version-of-extension-for-PS-and-AE commit aa232b43268cd38a0162eb6af6d50a8d4b1d998c Author: Petr Kalis Date: Tue Dec 14 11:13:02 2021 +0100 OP-2053 - fix counts in db_asserts commit 02717fac4eaaf5dbd17ddcf86e59bc58b136a8ff Author: Petr Kalis Date: Tue Dec 14 11:15:51 2021 +0100 Update error msg format Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> commit 8739dd9f05e7f70dddd388da2de0b7efd4456832 Author: Petr Kalis Date: Tue Dec 14 11:13:02 2021 +0100 OP-2053 - fix counts in db_asserts commit a6a7348a73ac5249cbbcd143b8e0f9678c4b0b6e Author: iLLiCiTiT Date: Tue Dec 14 11:12:06 2021 +0100 fix access to default settings in get_general_environments commit 148bb47b7d2c2ad366b2271a1c6916016651fdb2 Author: Petr Kalis Date: Tue Dec 14 10:54:10 2021 +0100 OP-2053 - allow injection of AVALON_DB env var as a db commit 0b6e2f337aa94e0aa35beb17937a2d7a49fd889b Author: iLLiCiTiT Date: Mon Dec 6 12:24:02 2021 +0100 modified version regex for installation of PySide2 into blender commit c4106bf95a9e604c760c1c449ef456c884b27f40 Author: iLLiCiTiT Date: Mon Dec 13 14:01:28 2021 +0100 set placeholder font color on initialization instead of after show commit c78d4d89a4a36b7987b0ba7d7fc175a282cf0593 Author: Jérôme LORRAIN Date: Mon Dec 13 10:45:30 2021 +0100 Handle message type attribute commit 09bbebae18bca1da746229963bc45cf2f48f8d32 Author: Jérôme LORRAIN Date: Fri Dec 10 15:14:03 2021 +0100 Add settings to repair commit a80ed0deecc0440fcbc779d4c855f5c6713db958 Author: Petr Kalis Date: Thu Dec 9 14:25:24 2021 +0100 OP-2053 - Hound commit 2673b587731576c30b26f6ec045c3cbff91f0fa3 Author: Petr Kalis Date: Thu Dec 9 14:01:28 2021 +0100 OP-2053 - added possibility to check installed extension version commit 2a540cdbded0fb1776ec880708e9577f12b34860 Merge: 5dc2fd058 2e753e1ca Author: Petr Kalis Date: Thu Dec 9 13:34:34 2021 +0100 Merge branch 'feature/OP-2019_Create-test-publish-class-for-AE' into feature/OP-2053_Add-validator-to-check-correct-version-of-extension-for-PS-and-AE commit 5dc2fd05885718cb6c90083f14f60de18cc2c828 Author: Petr Kalis Date: Wed Dec 8 19:00:44 2021 +0100 OP-2053 - bump down order of collector for current file It depends on valid extension commit 97404abf43adc4ebb38afa1e93403e7d16776b97 Author: Petr Kalis Date: Wed Dec 8 19:00:12 2021 +0100 OP-2053 - added check of installed extension for PS commit 6ed4db4da11ae598c8e7ebf3fbf94dc434cfcd47 Author: Ondrej Samohel Date: Wed Dec 8 17:11:45 2021 +0100 installand copy xcb libs to pyside2 inside openpype commit 8e71919145a1ad491511697486238e8ebc82221e Author: iLLiCiTiT Date: Wed Dec 8 13:25:22 2021 +0100 skip action if does not have any projects which can be used as source for values commit 8270f2fc402a7cb119fdc71ead0bd474f0d7c9d6 Author: iLLiCiTiT Date: Wed Dec 8 13:07:57 2021 +0100 catch exceptions happened during applying values from different project commit c08b4673fd5fd935f41b5277c8977e80aaeb595b Author: iLLiCiTiT Date: Wed Dec 8 13:07:38 2021 +0100 use defined constant for default project label commit 2fdac8639a00e58cb5544a6cdf9822d2bfa3d2c9 Author: iLLiCiTiT Date: Wed Dec 8 13:00:07 2021 +0100 initial version of applying settings from different project commit e2f24fb87b3b732740649cf7f70fb32784530dcd Author: iLLiCiTiT Date: Wed Dec 8 12:59:42 2021 +0100 project category widget has ability to retrieve project names commit 74b6da96aca81a54e32f8984d865d6f5674c4061 Author: iLLiCiTiT Date: Wed Dec 8 12:59:21 2021 +0100 added method to return project names from project list commit 347b8da8a7a9a1a6c25d113fa6a2588b55acac04 Author: iLLiCiTiT Date: Wed Dec 8 12:59:01 2021 +0100 use working_state_context for current actions commit b3d2d41267c313a822c186af9b0232f29baad85e Author: iLLiCiTiT Date: Wed Dec 8 12:58:37 2021 +0100 added working state context to category widget commit 7e04079151479548daf15ec81768c454935c71d3 Author: Jérôme LORRAIN Date: Mon Dec 6 14:07:01 2021 +0100 Update error message commit ca1516fa13b03409c160f3c0f97785143d59fd4f Author: Jérôme LORRAIN Date: Mon Dec 6 10:45:22 2021 +0100 Fix syntax commit b3ec2fe524dfd05ab60ef88649f40aa4b29ce3f4 Author: Jérôme LORRAIN Date: Mon Dec 6 10:28:56 2021 +0100 Use the setting in CollectRender commit 89490f4b14815d402c12ab8680e69c3241760da5 Author: Jérôme LORRAIN Date: Fri Dec 3 17:22:27 2021 +0100 add maya default render folder path to settings commit 2e753e1ca2aac3cc0e43e82cbe0bc31a032a1f43 Author: Petr Kalis Date: Fri Dec 3 14:39:49 2021 +0100 OP-2019 - fixes for db_asserts commit 477d177bd9f9939f3c74c63ac47be5b68d52d372 Author: Petr Kalis Date: Fri Dec 3 11:42:22 2021 +0100 OP-2019 - fixes for PS test class commit f9a1445a748f15a6592ad06ec34b748af1fddad0 Author: Petr Kalis Date: Fri Dec 3 10:28:41 2021 +0100 OP-2019 - revert to develop version commit 07fdcc6f4de08087a4f22343bb61a83cc65b0df8 Author: Petr Kalis Date: Thu Dec 2 19:07:46 2021 +0100 OP-2019 - fixed wrong value commit 931896519c05a423f4630001372bdb72d47da847 Author: clement.hector Date: Thu Dec 2 12:34:34 2021 +0100 add fileName in imagePlane cmd commit 3c7b622b6e3bf56deb28b12138f980b73a4ef6d6 Author: clement.hector Date: Thu Dec 2 11:53:32 2021 +0100 fix rotation after detach commit 3d6bf6e8c5eb5e8774a231fa6ff77e1422cf26af Author: clement.hector Date: Wed Dec 1 18:56:38 2021 +0100 change option by options commit 64c4e5f2bbae767e6f2e126c884853a1fab39eaf Author: clement.hector Date: Wed Dec 1 16:42:18 2021 +0100 Add static and allView option in imagePlaneLoader --- CHANGELOG.md | 1 - .../publish/validate_scene_set_workspace.py | 37 +++++++++++++++++-- .../defaults/project_settings/global.json | 3 ++ .../schemas/schema_global_publish.json | 14 +++++++ 4 files changed, 51 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc14b5f507c..652f54d8459 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1685,4 +1685,3 @@ A large cleanup release. Most of the change are under the hood. - diff --git a/openpype/hosts/maya/plugins/publish/validate_scene_set_workspace.py b/openpype/hosts/maya/plugins/publish/validate_scene_set_workspace.py index 174bc44a6fd..fad11b92aed 100644 --- a/openpype/hosts/maya/plugins/publish/validate_scene_set_workspace.py +++ b/openpype/hosts/maya/plugins/publish/validate_scene_set_workspace.py @@ -4,6 +4,7 @@ import pyblish.api import openpype.api +from openpype.lib.profiles_filtering import filter_profiles def is_subdir(path, root_dir): @@ -25,7 +26,7 @@ def is_subdir(path, root_dir): return True -class ValidateSceneSetWorkspace(pyblish.api.ContextPlugin): +class ValidateSceneSetWorkspace(pyblish.api.InstancePlugin): """Validate the scene is inside the currently set Maya workspace""" order = openpype.api.ValidatePipelineOrder @@ -34,8 +35,11 @@ class ValidateSceneSetWorkspace(pyblish.api.ContextPlugin): version = (0, 1, 0) label = 'Maya Workspace Set' - def process(self, context): + publish_from_published_workfiles = True + def process(self, instance): + + context = instance.context scene_name = cmds.file(query=True, sceneName=True) if not scene_name: raise RuntimeError("Scene hasn't been saved. Workspace can't be " @@ -44,4 +48,31 @@ def process(self, context): root_dir = cmds.workspace(query=True, rootDirectory=True) if not is_subdir(scene_name, root_dir): - raise RuntimeError("Maya workspace is not set correctly.") + + if not self.publish_from_published_workfiles: + raise RuntimeError("Maya workspace is not set correctly.") + else: + settings = context.data.get('project_settings') + template_name_profiles = settings.get('global') \ + .get('publish') \ + .get('IntegrateAssetNew') \ + .get('template_name_profiles') + task_name = context.data["anatomyData"]["task"]["name"] + task_type = context.data["anatomyData"]["task"]["type"] + key_values = { + "families": "workfile", + "tasks": task_name, + "hosts": context.data["hostName"], + "task_types": task_type + } + profile = filter_profiles( + template_name_profiles, + key_values, + logger=self.log + ) + anatomy = context.data.get('anatomy') + anatomy_filled = anatomy.format(instance.data.get('anatomyData')) + pub_workfile_path = anatomy_filled[profile["template_name"]]["folder"] + + if not is_subdir(scene_name, pub_workfile_path): + raise RuntimeError("Maya workspace is not set correctly.") diff --git a/openpype/settings/defaults/project_settings/global.json b/openpype/settings/defaults/project_settings/global.json index cff1259c98f..dd8412ba28b 100644 --- a/openpype/settings/defaults/project_settings/global.json +++ b/openpype/settings/defaults/project_settings/global.json @@ -12,6 +12,9 @@ "optional": false, "active": true }, + "ValidateSceneSetWorkspace": { + "publish_from_published_workfiles": false + }, "ValidateIntent": { "enabled": false, "profiles": [] diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_global_publish.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_global_publish.json index d146f3cf15f..8a4ee2417cb 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_global_publish.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_global_publish.json @@ -48,6 +48,20 @@ } ] }, + { + "type": "dict", + "collapsible": true, + "key": "ValidateSceneSetWorkspace", + "label": "Validate Workspace", + "is_group": true, + "children": [ + { + "type": "boolean", + "key": "publish_from_published_workfiles", + "label": "Allow publishing form published workfiles" + } + ] + }, { "type": "dict", "label": "Validate Intent",