From cd4adfefd27e51cd26422273b78d4f52e75d3f4d Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 5 Sep 2023 14:34:48 +0200 Subject: [PATCH 001/183] Remove Publish GUI Filter settings from Maya since new publisher doesn't support it --- .../defaults/project_settings/maya.json | 9 ----- .../projects_schema/schema_project_maya.json | 4 -- server_addon/maya/server/settings/main.py | 37 +------------------ 3 files changed, 1 insertion(+), 49 deletions(-) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 38f14ec022..d6c1a886f8 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -1564,14 +1564,5 @@ }, "templated_workfile_build": { "profiles": [] - }, - "filters": { - "preset 1": { - "ValidateNoAnimation": false, - "ValidateShapeDefaultNames": false - }, - "preset 2": { - "ValidateNoAnimation": false - } } } diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json index dca955dab4..a6fd742b40 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_maya.json @@ -258,10 +258,6 @@ { "type": "schema", "name": "schema_templated_workfile_build" - }, - { - "type": "schema", - "name": "schema_publish_gui_filter" } ] } diff --git a/server_addon/maya/server/settings/main.py b/server_addon/maya/server/settings/main.py index c8021614be..f204401061 100644 --- a/server_addon/maya/server/settings/main.py +++ b/server_addon/maya/server/settings/main.py @@ -23,23 +23,6 @@ class ExtMappingItemModel(BaseSettingsModel): value: str = Field(title="Extension") -class PublishGUIFilterItemModel(BaseSettingsModel): - _layout = "compact" - name: str = Field(title="Name") - value: bool = Field(True, title="Active") - - -class PublishGUIFiltersModel(BaseSettingsModel): - _layout = "compact" - name: str = Field(title="Name") - value: list[PublishGUIFilterItemModel] = Field(default_factory=list) - - @validator("value") - def validate_unique_outputs(cls, value): - ensure_unique_names(value) - return value - - class MayaSettings(BaseSettingsModel): """Maya Project Settings.""" @@ -76,9 +59,6 @@ class MayaSettings(BaseSettingsModel): templated_workfile_build: TemplatedProfilesModel = Field( default_factory=TemplatedProfilesModel, title="Templated Workfile Build Settings") - filters: list[PublishGUIFiltersModel] = Field( - default_factory=list, - title="Publish GUI Filters") @validator("filters", "ext_mapping") def validate_unique_outputs(cls, value): @@ -122,20 +102,5 @@ DEFAULT_MAYA_SETTING = { "publish": DEFAULT_PUBLISH_SETTINGS, "load": DEFAULT_LOADERS_SETTING, "workfile_build": DEFAULT_WORKFILE_SETTING, - "templated_workfile_build": DEFAULT_TEMPLATED_WORKFILE_SETTINGS, - "filters": [ - { - "name": "preset 1", - "value": [ - {"name": "ValidateNoAnimation", "value": False}, - {"name": "ValidateShapeDefaultNames", "value": False}, - ] - }, - { - "name": "preset 2", - "value": [ - {"name": "ValidateNoAnimation", "value": False}, - ] - }, - ] + "templated_workfile_build": DEFAULT_TEMPLATED_WORKFILE_SETTINGS } From 15631e7ba85c6aeef7defddae103805bc780ccb3 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 5 Sep 2023 14:35:25 +0200 Subject: [PATCH 002/183] Bump Ayon Maya server addon version due to new settings definition --- server_addon/maya/server/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server_addon/maya/server/version.py b/server_addon/maya/server/version.py index e57ad00718..de699158fd 100644 --- a/server_addon/maya/server/version.py +++ b/server_addon/maya/server/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring addon version.""" -__version__ = "0.1.3" +__version__ = "0.1.4" From 412b6b480d45434dc6895dae9b7efec2df421a85 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 5 Sep 2023 14:35:58 +0200 Subject: [PATCH 003/183] Remove Publish GUI Filter settings from Nuke since new publisher doesn't support it --- .../defaults/project_settings/nuke.json | 3 +-- .../projects_schema/schema_project_nuke.json | 4 ---- server_addon/nuke/server/settings/filters.py | 19 ------------------- server_addon/nuke/server/settings/main.py | 8 +------- 4 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 server_addon/nuke/server/settings/filters.py diff --git a/openpype/settings/defaults/project_settings/nuke.json b/openpype/settings/defaults/project_settings/nuke.json index b736c462ff..8b77251956 100644 --- a/openpype/settings/defaults/project_settings/nuke.json +++ b/openpype/settings/defaults/project_settings/nuke.json @@ -552,6 +552,5 @@ }, "templated_workfile_build": { "profiles": [] - }, - "filters": {} + } } diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_nuke.json b/openpype/settings/entities/schemas/projects_schema/schema_project_nuke.json index 6b516ddf4a..0b24c8231c 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_nuke.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_nuke.json @@ -291,10 +291,6 @@ { "type": "schema", "name": "schema_templated_workfile_build" - }, - { - "type": "schema", - "name": "schema_publish_gui_filter" } ] } diff --git a/server_addon/nuke/server/settings/filters.py b/server_addon/nuke/server/settings/filters.py deleted file mode 100644 index 7e2702b3b7..0000000000 --- a/server_addon/nuke/server/settings/filters.py +++ /dev/null @@ -1,19 +0,0 @@ -from pydantic import Field, validator -from ayon_server.settings import BaseSettingsModel, ensure_unique_names - - -class PublishGUIFilterItemModel(BaseSettingsModel): - _layout = "compact" - name: str = Field(title="Name") - value: bool = Field(True, title="Active") - - -class PublishGUIFiltersModel(BaseSettingsModel): - _layout = "compact" - name: str = Field(title="Name") - value: list[PublishGUIFilterItemModel] = Field(default_factory=list) - - @validator("value") - def validate_unique_outputs(cls, value): - ensure_unique_names(value) - return value diff --git a/server_addon/nuke/server/settings/main.py b/server_addon/nuke/server/settings/main.py index 4687d48ac9..f7ce2d044d 100644 --- a/server_addon/nuke/server/settings/main.py +++ b/server_addon/nuke/server/settings/main.py @@ -44,7 +44,6 @@ from .workfile_builder import ( from .templated_workfile_build import ( TemplatedWorkfileBuildModel ) -from .filters import PublishGUIFilterItemModel class NukeSettings(BaseSettingsModel): @@ -100,10 +99,6 @@ class NukeSettings(BaseSettingsModel): default_factory=TemplatedWorkfileBuildModel ) - filters: list[PublishGUIFilterItemModel] = Field( - default_factory=list - ) - @validator("filters") def ensure_unique_names(cls, value): """Ensure name fields within the lists have unique names.""" @@ -123,6 +118,5 @@ DEFAULT_VALUES = { "workfile_builder": DEFAULT_WORKFILE_BUILDER_SETTINGS, "templated_workfile_build": { "profiles": [] - }, - "filters": [] + } } From 7850fd01b037a49e4c00ddbc4c734da7e3ac6a9d Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 5 Sep 2023 14:36:20 +0200 Subject: [PATCH 004/183] Bump Ayon Nuke server addon version due to new settings definition --- server_addon/nuke/server/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server_addon/nuke/server/version.py b/server_addon/nuke/server/version.py index b3f4756216..ae7362549b 100644 --- a/server_addon/nuke/server/version.py +++ b/server_addon/nuke/server/version.py @@ -1 +1 @@ -__version__ = "0.1.2" +__version__ = "0.1.3" From 978816fda5f167fbf46f7b68fb19dbff4ea17be9 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Sat, 7 Oct 2023 20:09:40 +0200 Subject: [PATCH 005/183] Update old Pype icon to AYON icon --- openpype/resources/icons/folder-favorite3.png | Bin 7957 -> 10232 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/openpype/resources/icons/folder-favorite3.png b/openpype/resources/icons/folder-favorite3.png index ce1e6d717181f164f2f459cc1d151c57b282990f..ab0656ad14a5c1351c0090ba280584a786357872 100644 GIT binary patch delta 8662 zcma)i2{@Er|F`msB1yIoQr5AIeGOrdQ5X%0Y$3{$Eo8fu>>0vXl5M7`QTA=h+M+Ot z@UyRxErzlT!!YkX`aS>a`M>Y;Ue`0%eXi?1=X}pOpYL|=@A;lV>uj5+svl$V zQbSHb)WB=sEPRFYMYmz7sT z(i_z^RTQP=71MhT^Z&>8{liM>c8vU@H=S>(-Exsvl~qx8RgiUaRd$xuP*hNobyi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vAkZzw0AkPeosJqdxOXr{LXSxbM5~ zs=?X2Q8NbXt+v8BXLZ@1&dG>-F=SgEIeTOdpCzj#b)B$0l{lgRjfELMj&$hPSb}o$ zfn~wFub>mY-32G^gojH(Pr;U`dWJvaczpOUJc@ABWc99CQ%8bIMcJ-(aT<;uKp%l5 zkz!kR4@5T}!I9LsS(lhl9rY8T^cBnfrdvS9+VbV_zkn{}HkfH6hxH>WmLUgWpY5kJ zhU)6@jKWtxXU~iu?55T!4%C_P`ZzXZG8v_<^)cEAsiC#)imv6q#;Bj6EsISK{mHA6 z+(&0(Pv0H6!04v;vWgg`(@PTE(tyKR zFJ>8~N5U1kRcAg~KEkoK8EBKI;PzHjC38vMSaLK)Lv4_}q$+Vt|_yWUt3ilau( z?n|xt5}?lI^AF3fFQjf~=xf}f)zbDu@-J57Y`mPC1XfKcx)gB(#cCD2T0e4P%XR1v zvY3~Kji6-mS^77ga_Dv?g#Fi;4ZE$S+!)aq@&o6M!t+9^WbI?qhLCMyOBV|Gnx*n= zZl4)`eOfJ8Vs^(n(^%54l zx02n(S<*^za@cXMLVM3b!mtlR`IP845i;_Q9kb?C$o)&Lr`uHx68ZZM*C={qHmDPx zF6X|c7JIFn!Qf>T12FV|?`pskJ% From b0af8b1f3d04354eee9f24c6a97adb24c2899aa9 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Sat, 7 Oct 2023 20:10:11 +0200 Subject: [PATCH 006/183] Remove unused folder-favorite icons --- openpype/resources/icons/folder-favorite.png | Bin 7008 -> 0 bytes openpype/resources/icons/folder-favorite2.png | Bin 22430 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 openpype/resources/icons/folder-favorite.png delete mode 100644 openpype/resources/icons/folder-favorite2.png diff --git a/openpype/resources/icons/folder-favorite.png b/openpype/resources/icons/folder-favorite.png deleted file mode 100644 index 198b289e9ed39e6f8e13b6debf5aee857039a032..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7008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Z= z*8b;I-5+J9A(f?iD%1N^tHa?z#((iw-%T*%2Y>igTz%*YNt&n*3n5QsmF#C)ELR~K zo;}22>m3~OFU;+o29I{fX0<)^DTa6Zr`HF17CyP>G3XTr{9Aq5iVNFFe(1lugMan2 zcd~nKS5;UDiOMPpiExE%x7M@pMzH5#u~rOJO>WdG8HxLbv+Q_*IL_nfU0r{ih$y5+2#JbV3IT|A zm}U7N#3ngch(*lDq=v79hbwVY^2z(z4zkf)|tX-QI`yc@(k7^XL_j zQKEvp6CorjVpVW3O9-`qH4i)_$wy-rzhG%{pIP|hczlbypEonSSl?_T9FwZ8?k9(uu^Ecyc736?;~;)a^@W6L()8n5JIA|?w*TBe~=`-Nbvh1zd__I z@EnTls{Ir2?Nl!wfF#gAUt&%tUfHeND`}M?(mR);m|7u(L}lGEGnxlCaL=yQ>f8_h z&JcFK7_jfd;%jg_GthDHK=d7paTmO^R=+I_Z9&O;ypXD=B5yL8lXuYf_a`3frwj6s{r(XFVKiBx!XP$0a z5`yRMCXYl2F{?dN5o`{5*1|mpc*e8*-O>H$qlI@w>~2DmlLjDr!u;@4Z~npWdiX7G z`T9d3Vq|E}LqE zfY@qK?4Bxw5E2zJSYj~3KG@ySTbFa1_ZZ=2iSrc14|(I_#g~2gP4P`{d@<2dKK#*# zX*HW@GeaSSL`C$`o|jK-hcwAA<>U{9kX{LH`ys?D@tLdnw}0C!_# Date: Sat, 7 Oct 2023 20:11:12 +0200 Subject: [PATCH 007/183] Rename remaining folder-favorite icon to avoid number 3 behind it --- openpype/hosts/nuke/api/utils.py | 2 +- .../{folder-favorite3.png => folder-favorite.png} | Bin 2 files changed, 1 insertion(+), 1 deletion(-) rename openpype/resources/icons/{folder-favorite3.png => folder-favorite.png} (100%) diff --git a/openpype/hosts/nuke/api/utils.py b/openpype/hosts/nuke/api/utils.py index 7b02585892..a7df1dee71 100644 --- a/openpype/hosts/nuke/api/utils.py +++ b/openpype/hosts/nuke/api/utils.py @@ -12,7 +12,7 @@ def set_context_favorites(favorites=None): favorites (dict): couples of {name:path} """ favorites = favorites or {} - icon_path = resources.get_resource("icons", "folder-favorite3.png") + icon_path = resources.get_resource("icons", "folder-favorite.png") for name, path in favorites.items(): nuke.addFavoriteDir( name, diff --git a/openpype/resources/icons/folder-favorite3.png b/openpype/resources/icons/folder-favorite.png similarity index 100% rename from openpype/resources/icons/folder-favorite3.png rename to openpype/resources/icons/folder-favorite.png From c2ef4bd97d6ec554f83c65c95e90d715e3be5ece Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Sat, 7 Oct 2023 20:16:41 +0200 Subject: [PATCH 008/183] Match border color to exact icon color --- openpype/resources/icons/folder-favorite.png | Bin 10232 -> 10072 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/openpype/resources/icons/folder-favorite.png b/openpype/resources/icons/folder-favorite.png index ab0656ad14a5c1351c0090ba280584a786357872..65f04d8c8695b6fdf309758cff3d0320a1fae1bf 100644 GIT binary patch delta 8037 zcma)hcT`hr(=W;qjs-l31f_~fF%XJ$5D;k+M8FezQwT_J(%V)M1wvB{NS7u-gwR1+ z1nIpfNC^l?i8LXhgamSTc;CC$y=#4ce5~x1%*^x5{HE-^XCC$qe%vqXIeAJ-PDx53 zY4D`Te}7R=8eW%?lasQ0NV}W%_L50njL_=} zb`CN~MWhrADeoW+Q&f~e!W58_b}$7;JEViGB2rO7*0Hjg@#D$=oyu4yp8ujKVJZf8 zT>mCBF!2A<)l^3WPOjsbfAAVV+n>u3dI@c^x4Rf|2@MsG>8gLP$2M$i#^GCVbm9hu zQ)`+7Z9F`5)%Y&MjR*N~&*x8{7vJG}!S(C~*Oh;+oWA~eki0bWk7SEPZC_v0UO%zX zfKRl$PjPtHm0aNE!n3LH_Q#xr?cE`ztbB1wj6UIOjF@k&aa%7=qrAvBl+K&g;+Il<8lM2S z0{S4)axorpj+Vdlh;CJduCUvk+JfQ_8S}z&iy%8a`#IRJPvcQ=i@Mxw^EOdJos)CY zsg)>9+bP%EG9&ZW&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4P$VJHvTYLb4osfS1} z$4F^ML}!Iv8ofXHa7-F*Os->OsN3|c^lf?w43aGnXOodN7a8i>dVUST!;~SN(;hGL zj}%EQF>i`3sJe&CKswWGoJi*wSl8Nn$IdD_gE#4&MWf1DCBdhok358oM(VmtHVdJ4 z6))Y(-OJnMvz_5B;(1BQ8D!j>rdAXu5N%~RNp`k1j#+}o9as0TUyQ<`CTu~kl8F4i zQ=L@OV%F%rg7*x~ZdTq0`yv{WHvUfTCAcO_NPvwBEp2gTk?i3W7BFE)3#>CBd(x}3D8D&=X@0~gsz@M>!DYQb*@$vrx4s`X< From 823250f427a21895e4a09c36a333b8921cbd3d29 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Sat, 7 Oct 2023 20:31:51 +0200 Subject: [PATCH 009/183] Remove publish gui filter setting from TV Paint --- .../schema_project_tvpaint.json | 4 --- server_addon/tvpaint/server/settings/main.py | 27 +------------------ 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json b/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json index e9255f426e..5b2647bc6d 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_tvpaint.json @@ -436,10 +436,6 @@ "workfile_builder/builder_on_start", "workfile_builder/profiles" ] - }, - { - "type": "schema", - "name": "schema_publish_gui_filter" } ] } diff --git a/server_addon/tvpaint/server/settings/main.py b/server_addon/tvpaint/server/settings/main.py index 4cd6ac4b1a..102acfaf3d 100644 --- a/server_addon/tvpaint/server/settings/main.py +++ b/server_addon/tvpaint/server/settings/main.py @@ -1,4 +1,4 @@ -from pydantic import Field, validator +from pydantic import Field from ayon_server.settings import ( BaseSettingsModel, ensure_unique_names, @@ -14,23 +14,6 @@ from .publish_plugins import ( ) -class PublishGUIFilterItemModel(BaseSettingsModel): - _layout = "compact" - name: str = Field(title="Name") - value: bool = Field(True, title="Active") - - -class PublishGUIFiltersModel(BaseSettingsModel): - _layout = "compact" - name: str = Field(title="Name") - value: list[PublishGUIFilterItemModel] = Field(default_factory=list) - - @validator("value") - def validate_unique_outputs(cls, value): - ensure_unique_names(value) - return value - - class TvpaintSettings(BaseSettingsModel): imageio: TVPaintImageIOModel = Field( default_factory=TVPaintImageIOModel, @@ -52,14 +35,6 @@ class TvpaintSettings(BaseSettingsModel): default_factory=WorkfileBuilderPlugin, title="Workfile Builder" ) - filters: list[PublishGUIFiltersModel] = Field( - default_factory=list, - title="Publish GUI Filters") - - @validator("filters") - def validate_unique_outputs(cls, value): - ensure_unique_names(value) - return value DEFAULT_VALUES = { From e4535c32504c5e44a92ca8140386e97816e7344c Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Sat, 7 Oct 2023 20:32:28 +0200 Subject: [PATCH 010/183] Remove remaining traces of `filters` in Maya and Nuke server addons --- server_addon/maya/server/settings/main.py | 2 +- server_addon/nuke/server/settings/main.py | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/server_addon/maya/server/settings/main.py b/server_addon/maya/server/settings/main.py index f204401061..be123e5c38 100644 --- a/server_addon/maya/server/settings/main.py +++ b/server_addon/maya/server/settings/main.py @@ -60,7 +60,7 @@ class MayaSettings(BaseSettingsModel): default_factory=TemplatedProfilesModel, title="Templated Workfile Build Settings") - @validator("filters", "ext_mapping") + @validator("ext_mapping") def validate_unique_outputs(cls, value): ensure_unique_names(value) return value diff --git a/server_addon/nuke/server/settings/main.py b/server_addon/nuke/server/settings/main.py index f1e9b6774e..b6729e7c2f 100644 --- a/server_addon/nuke/server/settings/main.py +++ b/server_addon/nuke/server/settings/main.py @@ -97,12 +97,6 @@ class NukeSettings(BaseSettingsModel): default_factory=TemplatedWorkfileBuildModel ) - @validator("filters") - def ensure_unique_names(cls, value): - """Ensure name fields within the lists have unique names.""" - ensure_unique_names(value) - return value - DEFAULT_VALUES = { "general": DEFAULT_GENERAL_SETTINGS, From 1baec5503af8d814718dc785232e5308fbdb8ead Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Sat, 7 Oct 2023 20:33:43 +0200 Subject: [PATCH 011/183] Remove remaining traces of `filters` in Nuke AYON settings conversion --- openpype/settings/ayon_settings.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/openpype/settings/ayon_settings.py b/openpype/settings/ayon_settings.py index d54d71e851..7e4ebcbcc0 100644 --- a/openpype/settings/ayon_settings.py +++ b/openpype/settings/ayon_settings.py @@ -694,16 +694,6 @@ def _convert_nuke_project_settings(ayon_settings, output): dirmap["paths"][dst_key] = dirmap["paths"].pop(src_key) ayon_nuke["nuke-dirmap"] = dirmap - # --- Filters --- - new_gui_filters = {} - for item in ayon_nuke.pop("filters"): - subvalue = {} - key = item["name"] - for subitem in item["value"]: - subvalue[subitem["name"]] = subitem["value"] - new_gui_filters[key] = subvalue - ayon_nuke["filters"] = new_gui_filters - # --- Load --- ayon_load = ayon_nuke["load"] ayon_load["LoadClip"]["_representations"] = ( From f3f3a4aadc5663ef457f88a897f65dfa906f1e99 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Sat, 7 Oct 2023 20:34:01 +0200 Subject: [PATCH 012/183] Remove filters from tvpaint.json --- openpype/settings/defaults/project_settings/tvpaint.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openpype/settings/defaults/project_settings/tvpaint.json b/openpype/settings/defaults/project_settings/tvpaint.json index fdbd6d5d0f..d03b8b7227 100644 --- a/openpype/settings/defaults/project_settings/tvpaint.json +++ b/openpype/settings/defaults/project_settings/tvpaint.json @@ -107,6 +107,5 @@ "workfile_builder": { "create_first_version": false, "custom_templates": [] - }, - "filters": {} + } } From 864f043f071f14f6101c920688bf9e2c7e6a9e54 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Sat, 7 Oct 2023 20:35:08 +0200 Subject: [PATCH 013/183] Bump TVPaint Server Addon patch version --- server_addon/tvpaint/server/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server_addon/tvpaint/server/version.py b/server_addon/tvpaint/server/version.py index 3dc1f76bc6..485f44ac21 100644 --- a/server_addon/tvpaint/server/version.py +++ b/server_addon/tvpaint/server/version.py @@ -1 +1 @@ -__version__ = "0.1.0" +__version__ = "0.1.1" From 38958b2e2d8e4b78f2e774c31bc8f6b9e1602651 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Sat, 7 Oct 2023 20:40:28 +0200 Subject: [PATCH 014/183] Bump Nuke Server Addon patch version --- server_addon/nuke/server/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server_addon/nuke/server/version.py b/server_addon/nuke/server/version.py index ae7362549b..bbab0242f6 100644 --- a/server_addon/nuke/server/version.py +++ b/server_addon/nuke/server/version.py @@ -1 +1 @@ -__version__ = "0.1.3" +__version__ = "0.1.4" From 6074876adf2ff180108cc24ec94c0a59bb5ea248 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 22 Nov 2023 17:29:12 +0800 Subject: [PATCH 015/183] regenerate UV Tile Preview and reload textures during playblasting --- openpype/hosts/maya/api/lib.py | 9 +++++++++ openpype/hosts/maya/plugins/publish/extract_playblast.py | 6 ++++-- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 2 ++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 2ecaf87fce..27c61d0af3 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -174,6 +174,15 @@ def maintained_selection(): cmds.select(clear=True) +def regenerate_uv_tile_preview(): + texture_files = cmds.ls(type="file") + if not texture_files: + return + for texture_file in texture_files: + cmds.ogs(regenerateUVTilePreview=texture_file) + cmds.ogs(reloadTextures=True) + + def get_namespace(node): """Return namespace of given node""" node_name = node.rsplit("|", 1)[-1] diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index cfab239da3..8835f288ea 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -43,7 +43,6 @@ class ExtractPlayblast(publish.Extractor): json.dumps(preset, indent=4, sort_keys=True) ) ) - path = capture.capture(log=self.log, **preset) self.log.debug("playblast path {}".format(path)) @@ -125,6 +124,7 @@ class ExtractPlayblast(publish.Extractor): preset["overwrite"] = True cmds.refresh(force=True) + lib.regenerate_uv_tile_preview() refreshFrameInt = int(cmds.playbackOptions(q=True, minTime=True)) cmds.currentTime(refreshFrameInt - 1, edit=True) @@ -164,7 +164,8 @@ class ExtractPlayblast(publish.Extractor): "wireframeOnShaded", "xray", "jointXray", - "backfaceCulling" + "backfaceCulling", + "textures" ] viewport_defaults = {} for key in keys: @@ -180,6 +181,7 @@ class ExtractPlayblast(publish.Extractor): capture_preset["Viewport Options"]["override_viewport_options"] ) + self.log.debug("{}".format(instance.data["panel"])) # Force viewer to False in call to capture because we have our own # viewer opening call to allow a signal to trigger between # playblast and viewer diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index c0be3d77db..550243f274 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -101,6 +101,8 @@ class ExtractThumbnail(publish.Extractor): preset["overwrite"] = True cmds.refresh(force=True) + lib.regenerate_uv_tile_preview() + refreshFrameInt = int(cmds.playbackOptions(q=True, minTime=True)) cmds.currentTime(refreshFrameInt - 1, edit=True) From 15923ddf9c70a296366241c9cefdae0921e59ee9 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 22 Nov 2023 19:02:38 +0800 Subject: [PATCH 016/183] move the regenerate uv_tile_preview code right before the capture --- openpype/hosts/maya/api/lib.py | 6 +++++- openpype/hosts/maya/plugins/publish/extract_playblast.py | 3 ++- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 9 ++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 27c61d0af3..a2a014caef 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -175,11 +175,15 @@ def maintained_selection(): def regenerate_uv_tile_preview(): + """Regenerate UV Tile Preview during playblast + """ + original_texture_loading = cmds.ogs(query=True, reloadTextures=True) texture_files = cmds.ls(type="file") if not texture_files: return for texture_file in texture_files: - cmds.ogs(regenerateUVTilePreview=texture_file) + if cmds.getAttr("{}.uvTilingMode".format(texture_file)) > 0: + cmds.ogs(regenerateUVTilePreview=texture_file) cmds.ogs(reloadTextures=True) diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 8835f288ea..5b98fb5fc9 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -43,6 +43,8 @@ class ExtractPlayblast(publish.Extractor): json.dumps(preset, indent=4, sort_keys=True) ) ) + if "textures" in preset["viewport_options"]: + lib.regenerate_uv_tile_preview() path = capture.capture(log=self.log, **preset) self.log.debug("playblast path {}".format(path)) @@ -124,7 +126,6 @@ class ExtractPlayblast(publish.Extractor): preset["overwrite"] = True cmds.refresh(force=True) - lib.regenerate_uv_tile_preview() refreshFrameInt = int(cmds.playbackOptions(q=True, minTime=True)) cmds.currentTime(refreshFrameInt - 1, edit=True) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 550243f274..e2dd89836f 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -101,8 +101,6 @@ class ExtractThumbnail(publish.Extractor): preset["overwrite"] = True cmds.refresh(force=True) - lib.regenerate_uv_tile_preview() - refreshFrameInt = int(cmds.playbackOptions(q=True, minTime=True)) cmds.currentTime(refreshFrameInt - 1, edit=True) @@ -154,9 +152,10 @@ class ExtractThumbnail(publish.Extractor): json.dumps(preset, indent=4, sort_keys=True) ) ) - - path = capture.capture(**preset) - playblast = self._fix_playblast_output_path(path) + if "textures" in preset["viewport_options"]: + lib.regenerate_uv_tile_preview() + path = capture.capture(**preset) + playblast = self._fix_playblast_output_path(path) _, thumbnail = os.path.split(playblast) From 2b98ac1ef2445280e8d0cc0d4131119f9afc8fb9 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 22 Nov 2023 19:04:20 +0800 Subject: [PATCH 017/183] rename regenerateUVTilePreview as reload_textures --- openpype/hosts/maya/api/lib.py | 4 ++-- openpype/hosts/maya/plugins/publish/extract_playblast.py | 2 +- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index a2a014caef..271b90d878 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -174,8 +174,8 @@ def maintained_selection(): cmds.select(clear=True) -def regenerate_uv_tile_preview(): - """Regenerate UV Tile Preview during playblast +def reload_textures(): + """Reload textures during playblast """ original_texture_loading = cmds.ogs(query=True, reloadTextures=True) texture_files = cmds.ls(type="file") diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 5b98fb5fc9..66ebe2ba0d 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -44,7 +44,7 @@ class ExtractPlayblast(publish.Extractor): ) ) if "textures" in preset["viewport_options"]: - lib.regenerate_uv_tile_preview() + lib.reload_textures() path = capture.capture(log=self.log, **preset) self.log.debug("playblast path {}".format(path)) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index e2dd89836f..2b5360efe6 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -153,7 +153,7 @@ class ExtractThumbnail(publish.Extractor): ) ) if "textures" in preset["viewport_options"]: - lib.regenerate_uv_tile_preview() + lib.reload_textures() path = capture.capture(**preset) playblast = self._fix_playblast_output_path(path) From ba83d4cc2f828c8f6c1600f90627d5e86a9c4ec7 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 22 Nov 2023 19:05:36 +0800 Subject: [PATCH 018/183] remove unused variables --- openpype/hosts/maya/api/lib.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 271b90d878..293889ddcc 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -177,7 +177,6 @@ def maintained_selection(): def reload_textures(): """Reload textures during playblast """ - original_texture_loading = cmds.ogs(query=True, reloadTextures=True) texture_files = cmds.ls(type="file") if not texture_files: return From 51f4d8f06f1ff97a86ea20bdcccad16b57210e8f Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 23 Nov 2023 17:28:08 +0800 Subject: [PATCH 019/183] make the reload texture being optional and only enabled when the reloadTextures being enabled --- openpype/hosts/maya/api/lib.py | 6 +++++- .../hosts/maya/plugins/publish/extract_playblast.py | 3 +-- .../hosts/maya/plugins/publish/extract_thumbnail.py | 8 ++++---- openpype/settings/defaults/project_settings/maya.json | 1 + .../projects_schema/schemas/schema_maya_capture.json | 11 +++++++++++ .../maya/server/settings/publish_playblast.py | 2 ++ server_addon/maya/server/version.py | 2 +- 7 files changed, 25 insertions(+), 8 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 293889ddcc..4066ee640b 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -174,9 +174,13 @@ def maintained_selection(): cmds.select(clear=True) -def reload_textures(): +def reload_textures(preset): """Reload textures during playblast """ + if not preset["viewport_options"]["reloadTextures"]: + self.log.debug("Reload Textures during playblasting is disabled.") + return + texture_files = cmds.ls(type="file") if not texture_files: return diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 66ebe2ba0d..872702e66e 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -44,7 +44,7 @@ class ExtractPlayblast(publish.Extractor): ) ) if "textures" in preset["viewport_options"]: - lib.reload_textures() + lib.reload_textures(preset) path = capture.capture(log=self.log, **preset) self.log.debug("playblast path {}".format(path)) @@ -182,7 +182,6 @@ class ExtractPlayblast(publish.Extractor): capture_preset["Viewport Options"]["override_viewport_options"] ) - self.log.debug("{}".format(instance.data["panel"])) # Force viewer to False in call to capture because we have our own # viewer opening call to allow a signal to trigger between # playblast and viewer diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 2b5360efe6..27f008652b 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -152,10 +152,10 @@ class ExtractThumbnail(publish.Extractor): json.dumps(preset, indent=4, sort_keys=True) ) ) - if "textures" in preset["viewport_options"]: - lib.reload_textures() - path = capture.capture(**preset) - playblast = self._fix_playblast_output_path(path) + if "textures" in preset["viewport_options"]: + lib.reload_textures(preset) + path = capture.capture(**preset) + playblast = self._fix_playblast_output_path(path) _, thumbnail = os.path.split(playblast) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 7719a5e255..fa2f694747 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -1289,6 +1289,7 @@ "twoSidedLighting": true, "lineAAEnable": true, "multiSample": 8, + "reloadTextures": false, "useDefaultMaterial": false, "wireframeOnShaded": false, "xray": false, diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index d90527ac8c..1aa5b3d2e4 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -236,6 +236,11 @@ { "type": "splitter" }, + { + "type": "boolean", + "key": "reloadTextures", + "label": "Reload Textures" + }, { "type": "boolean", "key": "useDefaultMaterial", @@ -908,6 +913,12 @@ { "type": "splitter" }, + { + "type": "boolean", + "key": "reloadTextures", + "label": "Reload Textures", + "default": false + }, { "type": "boolean", "key": "useDefaultMaterial", diff --git a/server_addon/maya/server/settings/publish_playblast.py b/server_addon/maya/server/settings/publish_playblast.py index acfcaf5988..205f0eb847 100644 --- a/server_addon/maya/server/settings/publish_playblast.py +++ b/server_addon/maya/server/settings/publish_playblast.py @@ -108,6 +108,7 @@ class ViewportOptionsSetting(BaseSettingsModel): True, title="Enable Anti-Aliasing", section="Anti-Aliasing" ) multiSample: int = Field(8, title="Anti Aliasing Samples") + reloadTextures: bool = Field(False, title="Reload Textures") useDefaultMaterial: bool = Field(False, title="Use Default Material") wireframeOnShaded: bool = Field(False, title="Wireframe On Shaded") xray: bool = Field(False, title="X-Ray") @@ -302,6 +303,7 @@ DEFAULT_PLAYBLAST_SETTING = { "twoSidedLighting": True, "lineAAEnable": True, "multiSample": 8, + "reloadTextures": False, "useDefaultMaterial": False, "wireframeOnShaded": False, "xray": False, diff --git a/server_addon/maya/server/version.py b/server_addon/maya/server/version.py index 805897cda3..b87834cc35 100644 --- a/server_addon/maya/server/version.py +++ b/server_addon/maya/server/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring addon version.""" -__version__ = "0.1.6" +__version__ = "0.1.7" From 55dab6dc0c01cddf7b920e363e554e0439f78875 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 23 Nov 2023 19:29:39 +0800 Subject: [PATCH 020/183] add loader for redshift proxy family(contributed by big Roy) --- .../plugins/load/load_redshift_proxy.py | 131 ++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 openpype/hosts/houdini/plugins/load/load_redshift_proxy.py diff --git a/openpype/hosts/houdini/plugins/load/load_redshift_proxy.py b/openpype/hosts/houdini/plugins/load/load_redshift_proxy.py new file mode 100644 index 0000000000..914154be06 --- /dev/null +++ b/openpype/hosts/houdini/plugins/load/load_redshift_proxy.py @@ -0,0 +1,131 @@ +import os +from openpype.pipeline import ( + load, + get_representation_path, +) +from openpype.hosts.houdini.api import pipeline + +import clique +import hou + + +class RedshiftProxyLoader(load.LoaderPlugin): + """Load Redshift Proxy""" + + families = ["redshiftproxy"] + label = "Load Redshift Proxy" + representations = ["rs"] + order = -10 + icon = "code-fork" + color = "orange" + + def load(self, context, name=None, namespace=None, data=None): + + # Get the root node + obj = hou.node("/obj") + + # Define node name + namespace = namespace if namespace else context["asset"]["name"] + node_name = "{}_{}".format(namespace, name) if namespace else name + + # Create a new geo node + container = obj.createNode("geo", node_name=node_name) + + # Check whether the Redshift parameters exist - if not, then likely + # redshift is not set up or initialized correctly + if not container.parm("RS_objprop_proxy_enable"): + container.destroy() + raise RuntimeError("Unable to initialize geo node with Redshift " + "attributes. Make sure you have the Redshift " + "plug-in set up correctly for Houdini.") + + # Enable by default + container.setParms({ + "RS_objprop_proxy_enable": True, + "RS_objprop_proxy_file": self.format_path(self.fname) + }) + + # Remove the file node, it only loads static meshes + # Houdini 17 has removed the file node from the geo node + file_node = container.node("file1") + if file_node: + file_node.destroy() + + # Add this stub node inside so it previews ok + proxy_sop = container.createNode("redshift_proxySOP", + node_name=node_name) + proxy_sop.setDisplayFlag(True) + + nodes = [container, proxy_sop] + + self[:] = nodes + + return pipeline.containerise( + node_name, + namespace, + nodes, + context, + self.__class__.__name__, + suffix="", + ) + + def update(self, container, representation): + + # Update the file path + file_path = get_representation_path(representation) + + node = container["node"] + node.setParms({ + "RS_objprop_proxy_file": self.format_path(file_path) + }) + + # Update attribute + node.setParms({"representation": str(representation["_id"])}) + + def remove(self, container): + + node = container["node"] + node.destroy() + + def format_path(self, path): + """Format using $F{padding} token if sequence, otherwise just path.""" + + # Find all frames in the folder + ext = ".rs" + folder = os.path.dirname(path) + frames = [f for f in os.listdir(folder) if f.endswith(ext)] + + # Get the collection of frames to detect frame padding + patterns = [clique.PATTERNS["frames"]] + collections, remainder = clique.assemble(frames, + minimum_items=1, + patterns=patterns) + self.log.debug("Detected collections: {}".format(collections)) + self.log.debug("Detected remainder: {}".format(remainder)) + + if not collections and remainder: + if len(remainder) != 1: + raise ValueError("Frames not correctly detected " + "in: {}".format(remainder)) + + # A single frame without frame range detected + return os.path.normpath(path).replace("\\", "/") + + # Frames detected with a valid "frame" number pattern + # Then we don't want to have any remainder files found + assert len(collections) == 1 and not remainder + collection = collections[0] + + num_frames = len(collection.indexes) + if num_frames == 1: + # Return the input path without dynamic $F variable + result = path + else: + # More than a single frame detected - use $F{padding} + fname = "{}$F{}{}".format(collection.head, + collection.padding, + collection.tail) + result = os.path.join(folder, fname) + + # Format file name, Houdini only wants forward slashes + return os.path.normpath(result).replace("\\", "/") From 2d85b5f106d04e2147e73dfb2bb8c4425ba31ba5 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Fri, 24 Nov 2023 12:32:15 +0800 Subject: [PATCH 021/183] code tweaks on capturing playblast and reloadtexture function --- openpype/hosts/maya/api/lib.py | 15 +++++---------- .../maya/plugins/publish/extract_playblast.py | 7 +++++-- .../maya/plugins/publish/extract_thumbnail.py | 7 +++++-- openpype/settings/lib.py | 2 +- openpype/vendor/python/common/capture.py | 2 ++ 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 4066ee640b..078ed5192b 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -174,19 +174,14 @@ def maintained_selection(): cmds.select(clear=True) -def reload_textures(preset): +def reload_textures(): """Reload textures during playblast """ - if not preset["viewport_options"]["reloadTextures"]: - self.log.debug("Reload Textures during playblasting is disabled.") - return - texture_files = cmds.ls(type="file") - if not texture_files: - return - for texture_file in texture_files: - if cmds.getAttr("{}.uvTilingMode".format(texture_file)) > 0: - cmds.ogs(regenerateUVTilePreview=texture_file) + if texture_files: + for texture_file in texture_files: + if cmds.getAttr("{}.uvTilingMode".format(texture_file)) > 0: + cmds.ogs(regenerateUVTilePreview=texture_file) cmds.ogs(reloadTextures=True) diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 872702e66e..a3a2f8a5a5 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -43,8 +43,11 @@ class ExtractPlayblast(publish.Extractor): json.dumps(preset, indent=4, sort_keys=True) ) ) - if "textures" in preset["viewport_options"]: - lib.reload_textures(preset) + if ( + preset["viewport_options"].get("reloadTextures") + and "textures" in preset["viewport_options"] + ): + lib.reload_textures() path = capture.capture(log=self.log, **preset) self.log.debug("playblast path {}".format(path)) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 27f008652b..ef843c9df8 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -152,8 +152,11 @@ class ExtractThumbnail(publish.Extractor): json.dumps(preset, indent=4, sort_keys=True) ) ) - if "textures" in preset["viewport_options"]: - lib.reload_textures(preset) + if ( + preset["viewport_options"].get("reloadTextures") + and "textures" in preset["viewport_options"] + ): + lib.reload_textures() path = capture.capture(**preset) playblast = self._fix_playblast_output_path(path) diff --git a/openpype/settings/lib.py b/openpype/settings/lib.py index ce62dde43f..d62e50d3c7 100644 --- a/openpype/settings/lib.py +++ b/openpype/settings/lib.py @@ -172,7 +172,7 @@ def save_studio_settings(data): clear_metadata_from_settings(new_data) changes = calculate_changes(old_data, new_data) - modules_manager = ModulesManager(_system_settings=new_data) + modules_manager = ModulesManager(new_data) warnings = [] for module in modules_manager.get_enabled_modules(): diff --git a/openpype/vendor/python/common/capture.py b/openpype/vendor/python/common/capture.py index 224699f916..b6d15ae47a 100644 --- a/openpype/vendor/python/common/capture.py +++ b/openpype/vendor/python/common/capture.py @@ -760,6 +760,8 @@ def _applied_viewport_options(options, panel): # Try to set as much as possible of the state by setting them one by # one. This way we can also report the failing key values explicitly. for key, value in options.items(): + if key == "reloadTextures": + continue try: cmds.modelEditor(panel, edit=True, **{key: value}) except TypeError: From 323d2409d349cbb5339457661d0ba4211f256722 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Fri, 24 Nov 2023 17:14:49 +0800 Subject: [PATCH 022/183] unified the code style of the loader with other loaders such as ass and bgeo loader --- .../plugins/load/load_redshift_proxy.py | 64 +++++++------------ 1 file changed, 22 insertions(+), 42 deletions(-) diff --git a/openpype/hosts/houdini/plugins/load/load_redshift_proxy.py b/openpype/hosts/houdini/plugins/load/load_redshift_proxy.py index 914154be06..8a3cc04eab 100644 --- a/openpype/hosts/houdini/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/houdini/plugins/load/load_redshift_proxy.py @@ -5,7 +5,6 @@ from openpype.pipeline import ( ) from openpype.hosts.houdini.api import pipeline -import clique import hou @@ -42,7 +41,8 @@ class RedshiftProxyLoader(load.LoaderPlugin): # Enable by default container.setParms({ "RS_objprop_proxy_enable": True, - "RS_objprop_proxy_file": self.format_path(self.fname) + "RS_objprop_proxy_file": self.format_path( + self.fname, context["representation"]) }) # Remove the file node, it only loads static meshes @@ -76,7 +76,8 @@ class RedshiftProxyLoader(load.LoaderPlugin): node = container["node"] node.setParms({ - "RS_objprop_proxy_file": self.format_path(file_path) + "RS_objprop_proxy_file": self.format_path( + file_path, representation) }) # Update attribute @@ -87,45 +88,24 @@ class RedshiftProxyLoader(load.LoaderPlugin): node = container["node"] node.destroy() - def format_path(self, path): - """Format using $F{padding} token if sequence, otherwise just path.""" + @staticmethod + def format_path(path, representation): + """Format file path correctly for single redshift proxy + or redshift proxy sequence.""" + import re + if not os.path.exists(path): + raise RuntimeError("Path does not exist: %s" % path) - # Find all frames in the folder - ext = ".rs" - folder = os.path.dirname(path) - frames = [f for f in os.listdir(folder) if f.endswith(ext)] - - # Get the collection of frames to detect frame padding - patterns = [clique.PATTERNS["frames"]] - collections, remainder = clique.assemble(frames, - minimum_items=1, - patterns=patterns) - self.log.debug("Detected collections: {}".format(collections)) - self.log.debug("Detected remainder: {}".format(remainder)) - - if not collections and remainder: - if len(remainder) != 1: - raise ValueError("Frames not correctly detected " - "in: {}".format(remainder)) - - # A single frame without frame range detected - return os.path.normpath(path).replace("\\", "/") - - # Frames detected with a valid "frame" number pattern - # Then we don't want to have any remainder files found - assert len(collections) == 1 and not remainder - collection = collections[0] - - num_frames = len(collection.indexes) - if num_frames == 1: - # Return the input path without dynamic $F variable - result = path + is_sequence = bool(representation["context"].get("frame")) + # The path is either a single file or sequence in a folder. + if not is_sequence: + filename = path else: - # More than a single frame detected - use $F{padding} - fname = "{}$F{}{}".format(collection.head, - collection.padding, - collection.tail) - result = os.path.join(folder, fname) + filename = re.sub(r"(.*)\.(\d+)\.(rs.*)", "\\1.$F4.\\3", path) - # Format file name, Houdini only wants forward slashes - return os.path.normpath(result).replace("\\", "/") + filename = os.path.join(path, filename) + + filename = os.path.normpath(filename) + filename = filename.replace("\\", "/") + + return filename From 950581fcd865c43482995bed876ce10977648f70 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Fri, 24 Nov 2023 18:14:01 +0800 Subject: [PATCH 023/183] code tweaks on getting texture from the viewport_options dict --- openpype/hosts/maya/plugins/publish/extract_playblast.py | 2 +- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index a3a2f8a5a5..26b2ac7086 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -45,7 +45,7 @@ class ExtractPlayblast(publish.Extractor): ) if ( preset["viewport_options"].get("reloadTextures") - and "textures" in preset["viewport_options"] + and preset["viewport_options"].get("textures") ): lib.reload_textures() path = capture.capture(log=self.log, **preset) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index ef843c9df8..a64d31f6d9 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -154,7 +154,7 @@ class ExtractThumbnail(publish.Extractor): ) if ( preset["viewport_options"].get("reloadTextures") - and "textures" in preset["viewport_options"] + and preset["viewport_options"].get("textures") ): lib.reload_textures() path = capture.capture(**preset) From 9ae1e7950915adab798840520455618c32f18cf0 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Fri, 24 Nov 2023 18:35:07 +0800 Subject: [PATCH 024/183] replace deprecated self.fname by self.filepath_from_context --- .../plugins/load/load_redshift_proxy.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/openpype/hosts/houdini/plugins/load/load_redshift_proxy.py b/openpype/hosts/houdini/plugins/load/load_redshift_proxy.py index 8a3cc04eab..efd7c6d0ca 100644 --- a/openpype/hosts/houdini/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/houdini/plugins/load/load_redshift_proxy.py @@ -1,9 +1,11 @@ import os +import re from openpype.pipeline import ( load, get_representation_path, ) from openpype.hosts.houdini.api import pipeline +from openpype.pipeline.load import LoadError import hou @@ -34,15 +36,16 @@ class RedshiftProxyLoader(load.LoaderPlugin): # redshift is not set up or initialized correctly if not container.parm("RS_objprop_proxy_enable"): container.destroy() - raise RuntimeError("Unable to initialize geo node with Redshift " - "attributes. Make sure you have the Redshift " - "plug-in set up correctly for Houdini.") + raise LoadError("Unable to initialize geo node with Redshift " + "attributes. Make sure you have the Redshift " + "plug-in set up correctly for Houdini.") # Enable by default container.setParms({ "RS_objprop_proxy_enable": True, "RS_objprop_proxy_file": self.format_path( - self.fname, context["representation"]) + self.filepath_from_context(context), + context["representation"]) }) # Remove the file node, it only loads static meshes @@ -92,18 +95,16 @@ class RedshiftProxyLoader(load.LoaderPlugin): def format_path(path, representation): """Format file path correctly for single redshift proxy or redshift proxy sequence.""" - import re if not os.path.exists(path): raise RuntimeError("Path does not exist: %s" % path) is_sequence = bool(representation["context"].get("frame")) # The path is either a single file or sequence in a folder. - if not is_sequence: - filename = path - else: + if is_sequence: filename = re.sub(r"(.*)\.(\d+)\.(rs.*)", "\\1.$F4.\\3", path) - filename = os.path.join(path, filename) + else: + filename = path filename = os.path.normpath(filename) filename = filename.replace("\\", "/") From 39faa7001e53f5f3dd76064b9ae9d6ddb3daf3be Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 27 Nov 2023 18:09:06 +0800 Subject: [PATCH 025/183] pop the value of reloadTextures before capture --- openpype/hosts/maya/plugins/publish/extract_playblast.py | 2 ++ openpype/vendor/python/common/capture.py | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 26b2ac7086..e59309c0fd 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -48,6 +48,8 @@ class ExtractPlayblast(publish.Extractor): and preset["viewport_options"].get("textures") ): lib.reload_textures() + + preset.pop("reloadTextures") # not supported by `capture` path = capture.capture(log=self.log, **preset) self.log.debug("playblast path {}".format(path)) diff --git a/openpype/vendor/python/common/capture.py b/openpype/vendor/python/common/capture.py index b6d15ae47a..224699f916 100644 --- a/openpype/vendor/python/common/capture.py +++ b/openpype/vendor/python/common/capture.py @@ -760,8 +760,6 @@ def _applied_viewport_options(options, panel): # Try to set as much as possible of the state by setting them one by # one. This way we can also report the failing key values explicitly. for key, value in options.items(): - if key == "reloadTextures": - continue try: cmds.modelEditor(panel, edit=True, **{key: value}) except TypeError: From 84f58241a6f1347d12fb9b7e1868765a0eeef428 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 27 Nov 2023 18:49:12 +0800 Subject: [PATCH 026/183] pop the reloadvalues from the preset in thumbnail extractor --- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index a64d31f6d9..380810d8c0 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -157,6 +157,7 @@ class ExtractThumbnail(publish.Extractor): and preset["viewport_options"].get("textures") ): lib.reload_textures() + preset.pop("reloadTextures") # not supported by `capture` path = capture.capture(**preset) playblast = self._fix_playblast_output_path(path) From 69c45c517f3dd594c379f1172ce739ceeba9cb39 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 27 Nov 2023 23:32:47 +0800 Subject: [PATCH 027/183] make sure reloadtextures is popped when it exists in the preset dict --- openpype/hosts/maya/plugins/publish/extract_playblast.py | 3 +-- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index e59309c0fd..56113d6a53 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -48,8 +48,7 @@ class ExtractPlayblast(publish.Extractor): and preset["viewport_options"].get("textures") ): lib.reload_textures() - - preset.pop("reloadTextures") # not supported by `capture` + preset.pop("reloadTextures") # not supported by `capture` path = capture.capture(log=self.log, **preset) self.log.debug("playblast path {}".format(path)) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 380810d8c0..aa0a68e4f5 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -157,7 +157,7 @@ class ExtractThumbnail(publish.Extractor): and preset["viewport_options"].get("textures") ): lib.reload_textures() - preset.pop("reloadTextures") # not supported by `capture` + preset.pop("reloadTextures") # not supported by `capture` path = capture.capture(**preset) playblast = self._fix_playblast_output_path(path) From 899bf8604661efee620a7dd65a44c41e9bd191ab Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 28 Nov 2023 12:13:32 +0800 Subject: [PATCH 028/183] tweak on the preset.pop --- openpype/hosts/max/plugins/publish/extract_thumbnail.py | 7 +++++-- openpype/hosts/maya/plugins/publish/extract_playblast.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/max/plugins/publish/extract_thumbnail.py b/openpype/hosts/max/plugins/publish/extract_thumbnail.py index 02fa75e032..114575cd0e 100644 --- a/openpype/hosts/max/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/max/plugins/publish/extract_thumbnail.py @@ -1,10 +1,10 @@ import os import pyblish.api -from openpype.pipeline import publish +from openpype.pipeline import publish, OptionalPyblishPluginMixin from openpype.hosts.max.api.preview_animation import render_preview_animation -class ExtractThumbnail(publish.Extractor): +class ExtractThumbnail(publish.Extractor, OptionalPyblishPluginMixin): """Extract Thumbnail for Review """ @@ -12,8 +12,11 @@ class ExtractThumbnail(publish.Extractor): label = "Extract Thumbnail" hosts = ["max"] families = ["review"] + optional = True def process(self, instance): + if not self.is_active(instance.data): + return ext = instance.data.get("imageFormat") frame = int(instance.data["frameStart"]) staging_dir = self.staging_dir(instance) diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 56113d6a53..0e001497bd 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -48,7 +48,7 @@ class ExtractPlayblast(publish.Extractor): and preset["viewport_options"].get("textures") ): lib.reload_textures() - preset.pop("reloadTextures") # not supported by `capture` + preset.pop("reloadTextures", None) # not supported by `capture` path = capture.capture(log=self.log, **preset) self.log.debug("playblast path {}".format(path)) From cafd02a8512b6cd24137febcc393443240949f69 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 28 Nov 2023 12:15:26 +0800 Subject: [PATCH 029/183] preset.pop tweaks in thumbnail extractor --- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index aa0a68e4f5..67455f60f0 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -157,7 +157,7 @@ class ExtractThumbnail(publish.Extractor): and preset["viewport_options"].get("textures") ): lib.reload_textures() - preset.pop("reloadTextures") # not supported by `capture` + preset.pop("reloadTextures", None) # not supported by `capture` path = capture.capture(**preset) playblast = self._fix_playblast_output_path(path) From b502019d2b7c9bbaab06fde78c41d951c7c39a71 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 4 Dec 2023 15:23:56 +0800 Subject: [PATCH 030/183] bug fix on collector for not being able to collect textures from texture nodes in yeti graph --- openpype/hosts/maya/plugins/publish/collect_yeti_rig.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py b/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py index df761cde13..b05bbc7961 100644 --- a/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py +++ b/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py @@ -128,7 +128,12 @@ class CollectYetiRig(pyblish.api.InstancePlugin): image_search_paths = self._replace_tokens(image_search_paths) # List all related textures - texture_filenames = cmds.pgYetiCommand(node, listTextures=True) + texture_nodes = cmds.pgYetiGraph(node, listNodes=True, type="texture") + texture_filenames = [cmds.pgYetiGraph(node, + node=texture_node, + param="file_name", + getParamValue=True) + for texture_node in texture_nodes] self.log.debug("Found %i texture(s)" % len(texture_filenames)) # Get all reference nodes From caf8a2a2dfdcb259ee80e20c223078e12b1d2342 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 4 Dec 2023 17:41:28 +0800 Subject: [PATCH 031/183] hound --- openpype/hosts/maya/plugins/publish/collect_yeti_rig.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py b/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py index b05bbc7961..7a2121742c 100644 --- a/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py +++ b/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py @@ -128,12 +128,13 @@ class CollectYetiRig(pyblish.api.InstancePlugin): image_search_paths = self._replace_tokens(image_search_paths) # List all related textures - texture_nodes = cmds.pgYetiGraph(node, listNodes=True, type="texture") + texture_nodes = cmds.pgYetiGraph( + node, listNodes=True, type="texture") texture_filenames = [cmds.pgYetiGraph(node, node=texture_node, param="file_name", getParamValue=True) - for texture_node in texture_nodes] + for texture_node in texture_nodes] self.log.debug("Found %i texture(s)" % len(texture_filenames)) # Get all reference nodes From 8c615a0db8e1ba251ad09d4d9dbabbdeceeb29cc Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 4 Dec 2023 17:42:33 +0800 Subject: [PATCH 032/183] hound --- openpype/hosts/maya/plugins/publish/collect_yeti_rig.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py b/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py index 7a2121742c..b2c124d2fd 100644 --- a/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py +++ b/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py @@ -134,7 +134,8 @@ class CollectYetiRig(pyblish.api.InstancePlugin): node=texture_node, param="file_name", getParamValue=True) - for texture_node in texture_nodes] + for texture_node + in texture_nodes] self.log.debug("Found %i texture(s)" % len(texture_filenames)) # Get all reference nodes From 3fe3b217415ad7cb89641ea74eba00fa78885c07 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 4 Dec 2023 17:44:22 +0800 Subject: [PATCH 033/183] hound --- .../hosts/maya/plugins/publish/collect_yeti_rig.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py b/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py index b2c124d2fd..5f40d009c2 100644 --- a/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py +++ b/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py @@ -130,12 +130,12 @@ class CollectYetiRig(pyblish.api.InstancePlugin): # List all related textures texture_nodes = cmds.pgYetiGraph( node, listNodes=True, type="texture") - texture_filenames = [cmds.pgYetiGraph(node, - node=texture_node, - param="file_name", - getParamValue=True) - for texture_node - in texture_nodes] + texture_filenames = [ + cmds.pgYetiGraph( + node, node=texture_node, + param="file_name", getParamValue=True) + for texture_node in texture_nodes + ] self.log.debug("Found %i texture(s)" % len(texture_filenames)) # Get all reference nodes From 889f86457d9a8c9b94042863fa8ed484d21f920f Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 4 Dec 2023 17:46:06 +0800 Subject: [PATCH 034/183] hound --- openpype/hosts/maya/plugins/publish/collect_yeti_rig.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py b/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py index 5f40d009c2..835934e1bf 100644 --- a/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py +++ b/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py @@ -132,8 +132,8 @@ class CollectYetiRig(pyblish.api.InstancePlugin): node, listNodes=True, type="texture") texture_filenames = [ cmds.pgYetiGraph( - node, node=texture_node, - param="file_name", getParamValue=True) + node, node=texture_node, + param="file_name", getParamValue=True) for texture_node in texture_nodes ] self.log.debug("Found %i texture(s)" % len(texture_filenames)) From 187b4087ec8486eaa4c4d4ab6d180dec26ef70e4 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Mon, 4 Dec 2023 15:39:19 +0000 Subject: [PATCH 035/183] Optional preserve references. --- openpype/hosts/maya/plugins/create/create_mayascene.py | 10 ++++++++++ .../maya/plugins/publish/extract_maya_scene_raw.py | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/create/create_mayascene.py b/openpype/hosts/maya/plugins/create/create_mayascene.py index b61c97aebf..c6bf1662a1 100644 --- a/openpype/hosts/maya/plugins/create/create_mayascene.py +++ b/openpype/hosts/maya/plugins/create/create_mayascene.py @@ -1,4 +1,5 @@ from openpype.hosts.maya.api import plugin +from openpype.lib import BoolDef class CreateMayaScene(plugin.MayaCreator): @@ -9,3 +10,12 @@ class CreateMayaScene(plugin.MayaCreator): label = "Maya Scene" family = "mayaScene" icon = "file-archive-o" + + def get_instance_attr_defs(self): + return [ + BoolDef( + "preserve_references", + label="Preserve References", + default=True + ) + ] diff --git a/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py b/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py index ab170fe48c..bfce0607e1 100644 --- a/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py +++ b/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py @@ -70,7 +70,9 @@ class ExtractMayaSceneRaw(publish.Extractor): force=True, typ="mayaAscii" if self.scene_type == "ma" else "mayaBinary", # noqa: E501 exportSelected=True, - preserveReferences=True, + preserveReferences=instance.data.get( + "creator_attributes", {} + ).get("preserve_references", True), constructionHistory=True, shader=True, constraints=True, From 8bd8dc1af7213b925864c0e3f4ce04f52bc124a5 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Wed, 6 Dec 2023 08:05:39 +0000 Subject: [PATCH 036/183] Move to attribute defs --- .../maya/plugins/create/create_mayascene.py | 10 --------- .../plugins/publish/extract_maya_scene_raw.py | 21 ++++++++++++++++--- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/openpype/hosts/maya/plugins/create/create_mayascene.py b/openpype/hosts/maya/plugins/create/create_mayascene.py index c6bf1662a1..b61c97aebf 100644 --- a/openpype/hosts/maya/plugins/create/create_mayascene.py +++ b/openpype/hosts/maya/plugins/create/create_mayascene.py @@ -1,5 +1,4 @@ from openpype.hosts.maya.api import plugin -from openpype.lib import BoolDef class CreateMayaScene(plugin.MayaCreator): @@ -10,12 +9,3 @@ class CreateMayaScene(plugin.MayaCreator): label = "Maya Scene" family = "mayaScene" icon = "file-archive-o" - - def get_instance_attr_defs(self): - return [ - BoolDef( - "preserve_references", - label="Preserve References", - default=True - ) - ] diff --git a/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py b/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py index bfce0607e1..94b4d6dc5f 100644 --- a/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py +++ b/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py @@ -6,6 +6,8 @@ from maya import cmds from openpype.hosts.maya.api.lib import maintained_selection from openpype.pipeline import AVALON_CONTAINER_ID, publish +from openpype.pipeline.publish import OpenPypePyblishPluginMixin +from openpype.lib import BoolDef class ExtractMayaSceneRaw(publish.Extractor): @@ -23,6 +25,16 @@ class ExtractMayaSceneRaw(publish.Extractor): "camerarig"] scene_type = "ma" + @classmethod + def get_attribute_defs(cls): + return [ + BoolDef( + "preserve_references", + label="Preserve References", + default=True + ) + ] + def process(self, instance): """Plugin entry point.""" ext_mapping = ( @@ -64,15 +76,18 @@ class ExtractMayaSceneRaw(publish.Extractor): # Perform extraction self.log.debug("Performing extraction ...") + attribute_values = self.get_attr_values_from_data( + instance.data + ) with maintained_selection(): cmds.select(selection, noExpand=True) cmds.file(path, force=True, typ="mayaAscii" if self.scene_type == "ma" else "mayaBinary", # noqa: E501 exportSelected=True, - preserveReferences=instance.data.get( - "creator_attributes", {} - ).get("preserve_references", True), + preserveReferences=attribute_values[ + "preserve_references" + ], constructionHistory=True, shader=True, constraints=True, From a8d0c4f822d93ba0ebe69636a34198eb0ba8baad Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Wed, 6 Dec 2023 08:06:35 +0000 Subject: [PATCH 037/183] Mixin class --- openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py b/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py index 94b4d6dc5f..183dcd1fb3 100644 --- a/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py +++ b/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py @@ -10,7 +10,7 @@ from openpype.pipeline.publish import OpenPypePyblishPluginMixin from openpype.lib import BoolDef -class ExtractMayaSceneRaw(publish.Extractor): +class ExtractMayaSceneRaw(publish.Extractor, OpenPypePyblishPluginMixin): """Extract as Maya Scene (raw). This will preserve all references, construction history, etc. From 07c7b258f5452181c8d10af3bea1b61c6615d685 Mon Sep 17 00:00:00 2001 From: Toke Jepsen Date: Wed, 6 Dec 2023 10:01:20 +0000 Subject: [PATCH 038/183] Update openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py Co-authored-by: Roy Nieterau --- .../hosts/maya/plugins/publish/extract_maya_scene_raw.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py b/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py index 183dcd1fb3..a4f313bdf9 100644 --- a/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py +++ b/openpype/hosts/maya/plugins/publish/extract_maya_scene_raw.py @@ -31,6 +31,12 @@ class ExtractMayaSceneRaw(publish.Extractor, OpenPypePyblishPluginMixin): BoolDef( "preserve_references", label="Preserve References", + tooltip=( + "When enabled references will still be references " + "in the published file.\nWhen disabled the references " + "are imported into the published file generating a " + "file without references." + ), default=True ) ] From cbc4c679223a6a3230105b8fe9cae356a4cf3a59 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 7 Dec 2023 21:45:29 +0800 Subject: [PATCH 039/183] make sure the texture can be reloaded --- .../hosts/max/plugins/publish/extract_thumbnail.py | 6 ++---- .../hosts/maya/plugins/publish/extract_playblast.py | 11 ++++++----- .../hosts/maya/plugins/publish/extract_thumbnail.py | 13 +++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/openpype/hosts/max/plugins/publish/extract_thumbnail.py b/openpype/hosts/max/plugins/publish/extract_thumbnail.py index 114575cd0e..1b912ac0ec 100644 --- a/openpype/hosts/max/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/max/plugins/publish/extract_thumbnail.py @@ -1,10 +1,10 @@ import os import pyblish.api -from openpype.pipeline import publish, OptionalPyblishPluginMixin +from openpype.pipeline import publish from openpype.hosts.max.api.preview_animation import render_preview_animation -class ExtractThumbnail(publish.Extractor, OptionalPyblishPluginMixin): +class ExtractThumbnail(publish.Extractor): """Extract Thumbnail for Review """ @@ -15,8 +15,6 @@ class ExtractThumbnail(publish.Extractor, OptionalPyblishPluginMixin): optional = True def process(self, instance): - if not self.is_active(instance.data): - return ext = instance.data.get("imageFormat") frame = int(instance.data["frameStart"]) staging_dir = self.staging_dir(instance) diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 0e001497bd..b885308613 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -43,11 +43,12 @@ class ExtractPlayblast(publish.Extractor): json.dumps(preset, indent=4, sort_keys=True) ) ) - if ( - preset["viewport_options"].get("reloadTextures") - and preset["viewport_options"].get("textures") - ): - lib.reload_textures() + if "textures" in preset["viewport_options"]: + if "reloadTextures" in preset["viewport_options"]: + lib.reload_textures() + else: + self.log.debug( + "Reload Textures during playblasting is disabled.") preset.pop("reloadTextures", None) # not supported by `capture` path = capture.capture(log=self.log, **preset) self.log.debug("playblast path {}".format(path)) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 67455f60f0..77a538b95d 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -152,12 +152,13 @@ class ExtractThumbnail(publish.Extractor): json.dumps(preset, indent=4, sort_keys=True) ) ) - if ( - preset["viewport_options"].get("reloadTextures") - and preset["viewport_options"].get("textures") - ): - lib.reload_textures() - preset.pop("reloadTextures", None) # not supported by `capture` + if "textures" in preset["viewport_options"]: + if "reloadTextures" in preset["viewport_options"]: + lib.reload_textures() + else: + self.log.debug( + "Reload Textures during playblasting is disabled.") + preset.pop("reloadTextures", None) path = capture.capture(**preset) playblast = self._fix_playblast_output_path(path) From 7061eabdb52f06abcb12bccc1ff5ef79bced75bb Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 7 Dec 2023 21:47:03 +0800 Subject: [PATCH 040/183] restore unnecessary tweaks --- openpype/hosts/max/plugins/publish/extract_thumbnail.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openpype/hosts/max/plugins/publish/extract_thumbnail.py b/openpype/hosts/max/plugins/publish/extract_thumbnail.py index 1b912ac0ec..02fa75e032 100644 --- a/openpype/hosts/max/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/max/plugins/publish/extract_thumbnail.py @@ -12,7 +12,6 @@ class ExtractThumbnail(publish.Extractor): label = "Extract Thumbnail" hosts = ["max"] families = ["review"] - optional = True def process(self, instance): ext = instance.data.get("imageFormat") From 4866f20f866607cccd8a01b024bb9ed59742b376 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 8 Dec 2023 12:59:50 +0100 Subject: [PATCH 041/183] Refactor colorspace handling in CollectColorspace plugin - Refactored the code to use more descriptive variable names - Added a helper method `_colorspace_name_by_type` to retrieve the colorspace name based on its type - Updated logging statements for better clarity and readability Fix validation error in ValidateColorspace plugin - Added a check to ensure that the OCIO config contains at least one colorspace - If no colorspaces are found, an error is raised with appropriate messages and descriptions - Updated logging statement to include a pretty-printed representation of the config's colorspaces --- .../publish/collect_explicit_colorspace.py | 31 ++++++++++++++++--- .../plugins/publish/validate_colorspace.py | 14 ++++++++- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py b/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py index 5db2b0cbad..3b62ed7e55 100644 --- a/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py +++ b/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py @@ -26,20 +26,43 @@ class CollectColorspace(pyblish.api.InstancePlugin, def process(self, instance): values = self.get_attr_values_from_data(instance.data) - colorspace = values.get("colorspace", None) - if colorspace is None: + colorspace_value = values.get("colorspace", None) + if colorspace_value is None: return - self.log.debug("Explicit colorspace set to: {}".format(colorspace)) + color_data = colorspace.convert_colorspace_enumerator_item( + colorspace_value, self.config_items) + + colorspace_name = self._colorspace_name_by_type(color_data) + self.log.debug("Explicit colorspace name: {}".format(colorspace_name)) context = instance.context + context.data["colorspaceConfigItems"] = self.config_items for repre in instance.data.get("representations", {}): self.set_representation_colorspace( representation=repre, context=context, - colorspace=colorspace + colorspace=colorspace_name ) + def _colorspace_name_by_type(self, colorspace_data): + """ + Returns colorspace name by type + + Arguments: + colorspace_data (dict): colorspace data + + Returns: + str: colorspace name + """ + if colorspace_data["type"] == "colorspaces": + return colorspace_data["name"] + elif colorspace_data["type"] == "roles": + return colorspace_data["colorspace"] + else: + raise KeyError("Unknown colorspace type: {}".format( + colorspace_data["type"])) + @classmethod def apply_settings(cls, project_settings): host = registered_host() diff --git a/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py b/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py index 03f9f299b2..c2eee7c515 100644 --- a/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py +++ b/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py @@ -1,3 +1,4 @@ +from pprint import pformat import pyblish.api from openpype.pipeline import ( @@ -33,13 +34,24 @@ class ValidateColorspace(pyblish.api.InstancePlugin, config_path = colorspace_data["config"]["path"] if config_path not in config_colorspaces: colorspaces = get_ocio_config_colorspaces(config_path) - config_colorspaces[config_path] = set(colorspaces) + if not colorspaces.get("colorspaces"): + raise PublishValidationError( + title="Colorspace validation", + message=f"OCIO config '{config_path}' does not contain " + f"any colorspaces. This is error in config. " + "Contact your pipeline TD.", + description=f"OCIO config '{config_path}' does not " + f"contain any colorspaces. This is error " + "in config. Contact your pipeline TD." + ) + config_colorspaces[config_path] = set(colorspaces["colorspaces"]) colorspace = colorspace_data["colorspace"] self.log.debug( f"Validating representation '{repre['name']}' " f"colorspace '{colorspace}'" ) + self.log.debug(pformat(config_colorspaces[config_path])) if colorspace not in config_colorspaces[config_path]: message = ( f"Representation '{repre['name']}' colorspace " From 764775bf006304939ffe59104f0e503e1b8297db Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 8 Dec 2023 13:06:19 +0100 Subject: [PATCH 042/183] hound --- .../traypublisher/plugins/publish/validate_colorspace.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py b/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py index c2eee7c515..74d8956986 100644 --- a/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py +++ b/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py @@ -37,14 +37,15 @@ class ValidateColorspace(pyblish.api.InstancePlugin, if not colorspaces.get("colorspaces"): raise PublishValidationError( title="Colorspace validation", - message=f"OCIO config '{config_path}' does not contain " + message=f"OCIO config '{config_path}' does not contain " # noqa f"any colorspaces. This is error in config. " "Contact your pipeline TD.", description=f"OCIO config '{config_path}' does not " f"contain any colorspaces. This is error " "in config. Contact your pipeline TD." ) - config_colorspaces[config_path] = set(colorspaces["colorspaces"]) + config_colorspaces[config_path] = set( + colorspaces["colorspaces"]) colorspace = colorspace_data["colorspace"] self.log.debug( From bcdeec3461db61d535721c18d00c0e5c1264956d Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Fri, 8 Dec 2023 23:01:41 +0200 Subject: [PATCH 043/183] refactor get_output_parameter --- openpype/hosts/houdini/api/lib.py | 114 ++++++++++-------------------- 1 file changed, 36 insertions(+), 78 deletions(-) diff --git a/openpype/hosts/houdini/api/lib.py b/openpype/hosts/houdini/api/lib.py index 614052431f..e1a0c4310b 100644 --- a/openpype/hosts/houdini/api/lib.py +++ b/openpype/hosts/houdini/api/lib.py @@ -121,62 +121,6 @@ def get_id_required_nodes(): return list(nodes) -def get_export_parameter(node): - """Return the export output parameter of the given node - - Example: - root = hou.node("/obj") - my_alembic_node = root.createNode("alembic") - get_output_parameter(my_alembic_node) - # Result: "output" - - Args: - node(hou.Node): node instance - - Returns: - hou.Parm - - """ - node_type = node.type().description() - - # Ensures the proper Take is selected for each ROP to retrieve the correct - # ifd - try: - rop_take = hou.takes.findTake(node.parm("take").eval()) - if rop_take is not None: - hou.takes.setCurrentTake(rop_take) - except AttributeError: - # hou object doesn't always have the 'takes' attribute - pass - - if node_type == "Mantra" and node.parm("soho_outputmode").eval(): - return node.parm("soho_diskfile") - elif node_type == "Alfred": - return node.parm("alf_diskfile") - elif (node_type == "RenderMan" or node_type == "RenderMan RIS"): - pre_ris22 = node.parm("rib_outputmode") and \ - node.parm("rib_outputmode").eval() - ris22 = node.parm("diskfile") and node.parm("diskfile").eval() - if pre_ris22 or ris22: - return node.parm("soho_diskfile") - elif node_type == "Redshift" and node.parm("RS_archive_enable").eval(): - return node.parm("RS_archive_file") - elif node_type == "Wedge" and node.parm("driver").eval(): - return get_export_parameter(node.node(node.parm("driver").eval())) - elif node_type == "Arnold": - return node.parm("ar_ass_file") - elif node_type == "Alembic" and node.parm("use_sop_path").eval(): - return node.parm("sop_path") - elif node_type == "Shotgun Mantra" and node.parm("soho_outputmode").eval(): - return node.parm("sgtk_soho_diskfile") - elif node_type == "Shotgun Alembic" and node.parm("use_sop_path").eval(): - return node.parm("sop_path") - elif node.type().nameWithCategory() == "Driver/vray_renderer": - return node.parm("render_export_filepath") - - raise TypeError("Node type '%s' not supported" % node_type) - - def get_output_parameter(node): """Return the render output parameter of the given node @@ -184,7 +128,7 @@ def get_output_parameter(node): root = hou.node("/obj") my_alembic_node = root.createNode("alembic") get_output_parameter(my_alembic_node) - # Result: "output" + # Result: "filename" Args: node(hou.Node): node instance @@ -192,33 +136,47 @@ def get_output_parameter(node): Returns: hou.Parm + Note 1: + I'm using node.type().name() to get on par with the creators, + Because the return value of `node.type().name()` is the same string value used in creators + e.g. instance_data.update({"node_type": "alembic"}) + + Note 2: + Rop nodes in different network categories have the same output parameter. + So, I took that into consideration as a hint for future development. + """ - node_type = node.type().description() - category = node.type().category().name() + + node_type = node.type().name() # Figure out which type of node is being rendered - if node_type == "Geometry" or node_type == "Filmbox FBX" or \ - (node_type == "ROP Output Driver" and category == "Sop"): - return node.parm("sopoutput") - elif node_type == "Composite": - return node.parm("copoutput") - elif node_type == "opengl": - return node.parm("picture") - elif node_type == "arnold": - if node.evalParm("ar_ass_export_enable"): + if node_type == "alembic" or node_type == "rop_alembic": + return node.parm("filename") + elif node_type == "arnold": + if node_type.evalParm("ar_ass_export_enable"): return node.parm("ar_ass_file") - elif node_type == "Redshift_Proxy_Output": - return node.parm("RS_archive_file") - elif node_type == "ifd": + else: + return node.parm("ar_picture") + elif node_type == "geometry" or node_type == "rop_geometry" or node_type == "filmboxfbx" or node_type == "rop_fbx" : + return node.parm("sopoutput") + elif node_type == "comp": + return node.parm("copoutput") + elif node_type == "karma" or node_type == "opengl": + return node.parm("picture") + elif node_type == "ifd": # Matnra if node.evalParm("soho_outputmode"): return node.parm("soho_diskfile") - elif node_type == "Octane": - return node.parm("HO_img_fileName") - elif node_type == "Fetch": - inner_node = node.node(node.parm("source").eval()) - if inner_node: - return get_output_parameter(inner_node) - elif node.type().nameWithCategory() == "Driver/vray_renderer": + else: + return node.parm("vm_picture") + elif node_type == "Redshift_Proxy_Output": + return node.parm("RS_archive_file") + elif node_type == "Redshift_ROP": + return node.parm("RS_outputFileNamePrefix") + elif node_type == "usd" or node_type == "usd_rop" or node_type == "usdexport": + return node.parm("lopoutput") + elif node_type == "usdrender" or node_type == "usdrender_rop": + return node.parm("outputimage") + elif node_type == "vray_renderer": return node.parm("SettingsOutput_img_file_path") raise TypeError("Node type '%s' not supported" % node_type) From 91e80a1831d81bda0bd5f6de8df94678b08593d7 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Mon, 11 Dec 2023 13:05:00 +0200 Subject: [PATCH 044/183] resolve hound - fix lint problems --- openpype/hosts/houdini/api/lib.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/openpype/hosts/houdini/api/lib.py b/openpype/hosts/houdini/api/lib.py index e1a0c4310b..634535604d 100644 --- a/openpype/hosts/houdini/api/lib.py +++ b/openpype/hosts/houdini/api/lib.py @@ -138,11 +138,13 @@ def get_output_parameter(node): Note 1: I'm using node.type().name() to get on par with the creators, - Because the return value of `node.type().name()` is the same string value used in creators + Because the return value of `node.type().name()` is the same string + value used in creators e.g. instance_data.update({"node_type": "alembic"}) Note 2: - Rop nodes in different network categories have the same output parameter. + Rop nodes in different network categories have + the same output parameter. So, I took that into consideration as a hint for future development. """ @@ -152,12 +154,17 @@ def get_output_parameter(node): # Figure out which type of node is being rendered if node_type == "alembic" or node_type == "rop_alembic": return node.parm("filename") - elif node_type == "arnold": + elif node_type == "arnold": if node_type.evalParm("ar_ass_export_enable"): return node.parm("ar_ass_file") else: return node.parm("ar_picture") - elif node_type == "geometry" or node_type == "rop_geometry" or node_type == "filmboxfbx" or node_type == "rop_fbx" : + elif ( + node_type == "geometry" or + node_type == "rop_geometry" or + node_type == "filmboxfbx" or + node_type == "rop_fbx" + ): return node.parm("sopoutput") elif node_type == "comp": return node.parm("copoutput") @@ -172,7 +179,11 @@ def get_output_parameter(node): return node.parm("RS_archive_file") elif node_type == "Redshift_ROP": return node.parm("RS_outputFileNamePrefix") - elif node_type == "usd" or node_type == "usd_rop" or node_type == "usdexport": + elif ( + node_type == "usd" or + node_type == "usd_rop" or + node_type == "usdexport" + ): return node.parm("lopoutput") elif node_type == "usdrender" or node_type == "usdrender_rop": return node.parm("outputimage") From b73146a538a13c8e5f94a5cb1d3ca5e0c3d4eefe Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Mon, 11 Dec 2023 23:47:10 +0800 Subject: [PATCH 045/183] preset pop value should be correct --- openpype/hosts/maya/plugins/publish/extract_playblast.py | 3 ++- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index b885308613..4ce7e19ee2 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -49,7 +49,8 @@ class ExtractPlayblast(publish.Extractor): else: self.log.debug( "Reload Textures during playblasting is disabled.") - preset.pop("reloadTextures", None) # not supported by `capture` + # not supported by `capture` + preset["viewport_options"].pop("reloadTextures", None) path = capture.capture(log=self.log, **preset) self.log.debug("playblast path {}".format(path)) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 77a538b95d..bc5f9bc4ed 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -158,7 +158,8 @@ class ExtractThumbnail(publish.Extractor): else: self.log.debug( "Reload Textures during playblasting is disabled.") - preset.pop("reloadTextures", None) + # not supported by `capture` + preset["viewport_options"].pop("reloadTextures", None) path = capture.capture(**preset) playblast = self._fix_playblast_output_path(path) From 28a62bff59fc12c857c38090b923280a0c2d9ffc Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 12 Dec 2023 00:15:25 +0800 Subject: [PATCH 046/183] make sure the material loading mode is parallel --- openpype/hosts/maya/api/lib.py | 12 +++++++++++- .../maya/plugins/publish/extract_playblast.py | 18 ++++++++++-------- .../maya/plugins/publish/extract_thumbnail.py | 8 ++++++-- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 2a9defbf2d..817688258b 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -180,7 +180,17 @@ def reload_textures(): for texture_file in texture_files: if cmds.getAttr("{}.uvTilingMode".format(texture_file)) > 0: cmds.ogs(regenerateUVTilePreview=texture_file) - cmds.ogs(reloadTextures=True) + + +@contextlib.contextmanager +def material_loading_mode(mode="immediate"): + """Set material loading mode during context""" + original = cmds.displayPref(query=True, materialLoadingMode=True) + cmds.displayPref(materialLoadingMode=mode) + try: + yield + finally: + cmds.displayPref(materialLoadingMode=original) def get_namespace(node): diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 4ce7e19ee2..b540a2c56d 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -43,15 +43,17 @@ class ExtractPlayblast(publish.Extractor): json.dumps(preset, indent=4, sort_keys=True) ) ) - if "textures" in preset["viewport_options"]: - if "reloadTextures" in preset["viewport_options"]: + if "textures" in preset["viewport_options"] and ( + "reloadTextures" in preset["viewport_options"] + ): + with lib.material_loading_mode(): lib.reload_textures() - else: - self.log.debug( - "Reload Textures during playblasting is disabled.") - # not supported by `capture` - preset["viewport_options"].pop("reloadTextures", None) - path = capture.capture(log=self.log, **preset) + # not supported by `capture` + preset["viewport_options"].pop("reloadTextures", None) + path = capture.capture(log=self.log, **preset) + else: + preset["viewport_options"].pop("reloadTextures", None) + path = capture.capture(log=self.log, **preset) self.log.debug("playblast path {}".format(path)) def process(self, instance): diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index bc5f9bc4ed..10082436d6 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -154,12 +154,16 @@ class ExtractThumbnail(publish.Extractor): ) if "textures" in preset["viewport_options"]: if "reloadTextures" in preset["viewport_options"]: - lib.reload_textures() + with lib.material_loading_mode(): + lib.reload_textures() + preset["viewport_options"].pop("reloadTextures", None) + path = capture.capture(**preset) else: self.log.debug( "Reload Textures during playblasting is disabled.") + preset["viewport_options"].pop("reloadTextures", None) + path = capture.capture(**preset) # not supported by `capture` - preset["viewport_options"].pop("reloadTextures", None) path = capture.capture(**preset) playblast = self._fix_playblast_output_path(path) From 760adc87bae8de1f99d217d9d9e9d5e98562ab19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Je=C5=BEek?= Date: Tue, 12 Dec 2023 16:55:03 +0100 Subject: [PATCH 047/183] Update openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py Co-authored-by: Roy Nieterau --- .../hosts/traypublisher/plugins/publish/validate_colorspace.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py b/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py index 74d8956986..6ee39584be 100644 --- a/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py +++ b/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py @@ -52,7 +52,6 @@ class ValidateColorspace(pyblish.api.InstancePlugin, f"Validating representation '{repre['name']}' " f"colorspace '{colorspace}'" ) - self.log.debug(pformat(config_colorspaces[config_path])) if colorspace not in config_colorspaces[config_path]: message = ( f"Representation '{repre['name']}' colorspace " From ed3a2556e2dcff2cc5f08aafe7799146aab85333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Je=C5=BEek?= Date: Tue, 12 Dec 2023 16:55:40 +0100 Subject: [PATCH 048/183] Update openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py Co-authored-by: Roy Nieterau --- .../plugins/publish/validate_colorspace.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py b/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py index 6ee39584be..9b870617fb 100644 --- a/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py +++ b/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py @@ -35,14 +35,15 @@ class ValidateColorspace(pyblish.api.InstancePlugin, if config_path not in config_colorspaces: colorspaces = get_ocio_config_colorspaces(config_path) if not colorspaces.get("colorspaces"): + message = ( + f"OCIO config '{config_path}' does not contain any " + "colorspaces. This is an error in the OCIO config. " + "Contact your pipeline TD.", + ) raise PublishValidationError( title="Colorspace validation", - message=f"OCIO config '{config_path}' does not contain " # noqa - f"any colorspaces. This is error in config. " - "Contact your pipeline TD.", - description=f"OCIO config '{config_path}' does not " - f"contain any colorspaces. This is error " - "in config. Contact your pipeline TD." + message=message, + description=message ) config_colorspaces[config_path] = set( colorspaces["colorspaces"]) From d5866bf7810733e2e4c21384f25619e7b236881c Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 12 Dec 2023 17:06:29 +0100 Subject: [PATCH 049/183] hound --- .../hosts/traypublisher/plugins/publish/validate_colorspace.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py b/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py index 9b870617fb..58c40938d2 100644 --- a/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py +++ b/openpype/hosts/traypublisher/plugins/publish/validate_colorspace.py @@ -1,4 +1,3 @@ -from pprint import pformat import pyblish.api from openpype.pipeline import ( From 4da0bcd5cd80406e98d67d4d3889d4a8a0c6422c Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 12 Dec 2023 17:07:01 +0100 Subject: [PATCH 050/183] improving error comunication --- .../plugins/publish/collect_explicit_colorspace.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py b/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py index 3b62ed7e55..5dcc252f03 100644 --- a/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py +++ b/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py @@ -5,6 +5,7 @@ from openpype.pipeline import ( ) from openpype.lib import EnumDef from openpype.pipeline import colorspace +from openpype.pipeline.publish import KnownPublishError class CollectColorspace(pyblish.api.InstancePlugin, @@ -37,7 +38,6 @@ class CollectColorspace(pyblish.api.InstancePlugin, self.log.debug("Explicit colorspace name: {}".format(colorspace_name)) context = instance.context - context.data["colorspaceConfigItems"] = self.config_items for repre in instance.data.get("representations", {}): self.set_representation_colorspace( representation=repre, @@ -60,8 +60,11 @@ class CollectColorspace(pyblish.api.InstancePlugin, elif colorspace_data["type"] == "roles": return colorspace_data["colorspace"] else: - raise KeyError("Unknown colorspace type: {}".format( - colorspace_data["type"])) + raise KnownPublishError( + "Collecting of colorspace failed. used config is missing " + "colorspace type: '{}' .".format(colorspace_data["type"]) + "Please contact your pipeline TD." + ) @classmethod def apply_settings(cls, project_settings): From cb5fa7faa291b2d237a9ed5c10c0ddf496a05b2d Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Wed, 13 Dec 2023 19:02:15 +0200 Subject: [PATCH 051/183] Kuba's comments - Better code and doc string --- openpype/hosts/houdini/api/lib.py | 55 ++++++++++++++----------------- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/openpype/hosts/houdini/api/lib.py b/openpype/hosts/houdini/api/lib.py index 634535604d..39a7006ef4 100644 --- a/openpype/hosts/houdini/api/lib.py +++ b/openpype/hosts/houdini/api/lib.py @@ -128,64 +128,57 @@ def get_output_parameter(node): root = hou.node("/obj") my_alembic_node = root.createNode("alembic") get_output_parameter(my_alembic_node) - # Result: "filename" + >>> "filename" + + Notes: + I'm using node.type().name() to get on par with the creators, + Because the return value of `node.type().name()` is the + same string value used in creators + e.g. instance_data.update({"node_type": "alembic"}) + + Rop nodes in different network categories have + the same output parameter. + So, I took that into consideration as a hint for + future development. Args: node(hou.Node): node instance Returns: hou.Parm - - Note 1: - I'm using node.type().name() to get on par with the creators, - Because the return value of `node.type().name()` is the same string - value used in creators - e.g. instance_data.update({"node_type": "alembic"}) - - Note 2: - Rop nodes in different network categories have - the same output parameter. - So, I took that into consideration as a hint for future development. - """ node_type = node.type().name() # Figure out which type of node is being rendered - if node_type == "alembic" or node_type == "rop_alembic": + if node_type in {"alembic", "rop_alembic"}: return node.parm("filename") elif node_type == "arnold": if node_type.evalParm("ar_ass_export_enable"): return node.parm("ar_ass_file") - else: - return node.parm("ar_picture") - elif ( - node_type == "geometry" or - node_type == "rop_geometry" or - node_type == "filmboxfbx" or - node_type == "rop_fbx" - ): + return node.parm("ar_picture") + elif node_type in { + "geometry", + "rop_geometry", + "filmboxfbx", + "rop_fbx" + }: return node.parm("sopoutput") elif node_type == "comp": return node.parm("copoutput") - elif node_type == "karma" or node_type == "opengl": + elif node_type in {"karma", "opengl"}: return node.parm("picture") elif node_type == "ifd": # Matnra if node.evalParm("soho_outputmode"): return node.parm("soho_diskfile") - else: - return node.parm("vm_picture") + return node.parm("vm_picture") elif node_type == "Redshift_Proxy_Output": return node.parm("RS_archive_file") elif node_type == "Redshift_ROP": return node.parm("RS_outputFileNamePrefix") - elif ( - node_type == "usd" or - node_type == "usd_rop" or - node_type == "usdexport" - ): + elif node_type in {"usd", "usd_rop", "usdexport"}: return node.parm("lopoutput") - elif node_type == "usdrender" or node_type == "usdrender_rop": + elif node_type in {"usdrender", "usdrender_rop"}: return node.parm("outputimage") elif node_type == "vray_renderer": return node.parm("SettingsOutput_img_file_path") From 58dee9e05e84231d5f2651371f03e036c6ceca05 Mon Sep 17 00:00:00 2001 From: Mustafa Taher Date: Wed, 13 Dec 2023 23:34:48 +0200 Subject: [PATCH 052/183] BigRoy comment - Fix Typo Co-authored-by: Roy Nieterau --- openpype/hosts/houdini/api/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/houdini/api/lib.py b/openpype/hosts/houdini/api/lib.py index 39a7006ef4..edd50f10c1 100644 --- a/openpype/hosts/houdini/api/lib.py +++ b/openpype/hosts/houdini/api/lib.py @@ -168,7 +168,7 @@ def get_output_parameter(node): return node.parm("copoutput") elif node_type in {"karma", "opengl"}: return node.parm("picture") - elif node_type == "ifd": # Matnra + elif node_type == "ifd": # Mantra if node.evalParm("soho_outputmode"): return node.parm("soho_diskfile") return node.parm("vm_picture") From 74daec7f97ba2036ccdcae67fb97103779c406d8 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Thu, 14 Dec 2023 00:07:15 +0200 Subject: [PATCH 053/183] fix a bug with render split --- openpype/modules/deadline/abstract_submit_deadline.py | 2 +- .../deadline/plugins/publish/submit_houdini_render_deadline.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/modules/deadline/abstract_submit_deadline.py b/openpype/modules/deadline/abstract_submit_deadline.py index 187feb9b1a..e261800656 100644 --- a/openpype/modules/deadline/abstract_submit_deadline.py +++ b/openpype/modules/deadline/abstract_submit_deadline.py @@ -464,7 +464,7 @@ class AbstractSubmitDeadline(pyblish.api.InstancePlugin, self.log.info("Submitted job to Deadline: {}.".format(job_id)) # TODO: Find a way that's more generic and not render type specific - if "exportJob" in instance.data: + if instance.data.get("exportJob"): self.log.info("Splitting export and render in two jobs") self.log.info("Export job id: %s", job_id) render_job_info = self.get_job_info(dependency_job_ids=[job_id]) diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index 0c75f632cb..6ab8e4b666 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -124,7 +124,7 @@ class HoudiniSubmitDeadline( # Whether Deadline render submission is being split in two # (extract + render) - split_render_job = instance.data["exportJob"] + split_render_job = instance.data.get("exportJob") # If there's some dependency job ids we can assume this is a render job # and not an export job From 9b33073791de81f1f3faf16282c9834f9e98d133 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Thu, 14 Dec 2023 00:49:47 +0200 Subject: [PATCH 054/183] rename `exportJob` flag to `split_render` --- .../hosts/houdini/plugins/publish/collect_arnold_rop.py | 6 +++--- .../hosts/houdini/plugins/publish/collect_mantra_rop.py | 6 +++--- openpype/hosts/houdini/plugins/publish/collect_vray_rop.py | 6 +++--- openpype/modules/deadline/abstract_submit_deadline.py | 2 +- .../plugins/publish/submit_houdini_render_deadline.py | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/openpype/hosts/houdini/plugins/publish/collect_arnold_rop.py b/openpype/hosts/houdini/plugins/publish/collect_arnold_rop.py index c7da8397dc..45d950106e 100644 --- a/openpype/hosts/houdini/plugins/publish/collect_arnold_rop.py +++ b/openpype/hosts/houdini/plugins/publish/collect_arnold_rop.py @@ -41,11 +41,11 @@ class CollectArnoldROPRenderProducts(pyblish.api.InstancePlugin): render_products = [] # Store whether we are splitting the render job (export + render) - export_job = bool(rop.parm("ar_ass_export_enable").eval()) - instance.data["exportJob"] = export_job + split_render = bool(rop.parm("ar_ass_export_enable").eval()) + instance.data["split_render"] = split_render export_prefix = None export_products = [] - if export_job: + if split_render: export_prefix = evalParmNoFrame( rop, "ar_ass_file", pad_character="0" ) diff --git a/openpype/hosts/houdini/plugins/publish/collect_mantra_rop.py b/openpype/hosts/houdini/plugins/publish/collect_mantra_rop.py index bc71576174..a28b425057 100644 --- a/openpype/hosts/houdini/plugins/publish/collect_mantra_rop.py +++ b/openpype/hosts/houdini/plugins/publish/collect_mantra_rop.py @@ -45,11 +45,11 @@ class CollectMantraROPRenderProducts(pyblish.api.InstancePlugin): render_products = [] # Store whether we are splitting the render job (export + render) - export_job = bool(rop.parm("soho_outputmode").eval()) - instance.data["exportJob"] = export_job + split_render = bool(rop.parm("soho_outputmode").eval()) + instance.data["split_render"] = split_render export_prefix = None export_products = [] - if export_job: + if split_render: export_prefix = evalParmNoFrame( rop, "soho_diskfile", pad_character="0" ) diff --git a/openpype/hosts/houdini/plugins/publish/collect_vray_rop.py b/openpype/hosts/houdini/plugins/publish/collect_vray_rop.py index a1f4554726..6e8fe1cc79 100644 --- a/openpype/hosts/houdini/plugins/publish/collect_vray_rop.py +++ b/openpype/hosts/houdini/plugins/publish/collect_vray_rop.py @@ -46,11 +46,11 @@ class CollectVrayROPRenderProducts(pyblish.api.InstancePlugin): # TODO: add render elements if render element # Store whether we are splitting the render job in an export + render - export_job = rop.parm("render_export_mode").eval() == "2" - instance.data["exportJob"] = export_job + split_render = rop.parm("render_export_mode").eval() == "2" + instance.data["split_render"] = split_render export_prefix = None export_products = [] - if export_job: + if split_render: export_prefix = evalParmNoFrame( rop, "render_export_filepath", pad_character="0" ) diff --git a/openpype/modules/deadline/abstract_submit_deadline.py b/openpype/modules/deadline/abstract_submit_deadline.py index e261800656..45aba560ba 100644 --- a/openpype/modules/deadline/abstract_submit_deadline.py +++ b/openpype/modules/deadline/abstract_submit_deadline.py @@ -464,7 +464,7 @@ class AbstractSubmitDeadline(pyblish.api.InstancePlugin, self.log.info("Submitted job to Deadline: {}.".format(job_id)) # TODO: Find a way that's more generic and not render type specific - if instance.data.get("exportJob"): + if instance.data.get("split_render"): self.log.info("Splitting export and render in two jobs") self.log.info("Export job id: %s", job_id) render_job_info = self.get_job_info(dependency_job_ids=[job_id]) diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index 6ab8e4b666..1fb1143e52 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -124,7 +124,7 @@ class HoudiniSubmitDeadline( # Whether Deadline render submission is being split in two # (extract + render) - split_render_job = instance.data.get("exportJob") + split_render_job = instance.data.get("split_render") # If there's some dependency job ids we can assume this is a render job # and not an export job From ed24690f39a1ccdb7c2cd523eb421b626f714e9a Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Thu, 14 Dec 2023 11:27:12 +0200 Subject: [PATCH 055/183] BigRoy's comment - add tags to houdini deadline render jobs --- .../plugins/publish/submit_houdini_render_deadline.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index 1fb1143e52..b3e29c7e2d 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -132,18 +132,21 @@ class HoudiniSubmitDeadline( if dependency_job_ids: is_export_job = False + job_type = "[RENDER]" if split_render_job and not is_export_job: # Convert from family to Deadline plugin name # i.e., arnold_rop -> Arnold plugin = instance.data["family"].replace("_rop", "").capitalize() else: plugin = "Houdini" + if split_render_job: + job_type = "[EXPORT IFD]" job_info = DeadlineJobInfo(Plugin=plugin) filepath = context.data["currentFile"] filename = os.path.basename(filepath) - job_info.Name = "{} - {}".format(filename, instance.name) + job_info.Name = "{} - {} {}".format(filename, instance.name, job_type) job_info.BatchName = filename job_info.UserName = context.data.get( From 7e883fc1674e6ca46bad5cca1fa64d4d9484289c Mon Sep 17 00:00:00 2001 From: Jack P Date: Fri, 15 Dec 2023 10:25:24 +0000 Subject: [PATCH 056/183] feat: added new saver output ext validator --- .../validate_saver_output_extension.py | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py diff --git a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py new file mode 100644 index 0000000000..8ece175344 --- /dev/null +++ b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py @@ -0,0 +1,59 @@ +import os + +import pyblish.api +from openpype.pipeline import PublishValidationError +from openpype.pipeline.publish import RepairAction +from openpype.hosts.fusion.api.action import SelectInvalidAction + + +class ValidateSaverOutputExtension(pyblish.api.InstancePlugin): + """ + Temp docstring + """ + + order = pyblish.api.ValidatorOrder + label = "Validate Saver Output Extension" + families = ["render"] + hosts = ["fusion"] + actions = [SelectInvalidAction, RepairAction] + + @classmethod + def get_invalid(cls, instance): + saver = instance.data["tool"] + output_path = saver.Clip[1] + current_ext = get_file_extension(output_path) + ext = instance.data["image_format"] + if not current_ext == ext: + return (saver, current_ext, ext) + + def process(self, instance): + saver = instance.data["tool"] + current_ext = get_file_extension(saver.Clip[1]) + expected_ext = instance.data["image_format"] + + if not current_ext == expected_ext: + raise PublishValidationError( + f"Instance {saver.Name} output image format does not match the current publish selection.\n\n" + f"Current: {current_ext}\n\n" + f"Expected: {expected_ext}\n\n" + "You can use the repair action to update this instance.", + title=self.label, + ) + + @classmethod + def repair(cls, instance): + saver = instance.data["tool"] + output_path = saver.Clip[1] + ext = get_file_extension(output_path) + output_path = output_path.replace( + f".{ext}", f".{instance.data['image_format']}" + ) + saver.SetData( + "openpype.creator_attributes.image_format", + instance.data["image_format"], + ) + saver.Clip[1] = output_path + + +def get_file_extension(full_path): + return os.path.splitext(full_path)[1].replace(".", "") From 19fe8e0c1b5d2803cd7644253cd3ebedc2ddae55 Mon Sep 17 00:00:00 2001 From: JackP Date: Fri, 15 Dec 2023 10:50:17 +0000 Subject: [PATCH 057/183] chore: removed redunant function + small refactor --- .../publish/validate_saver_output_extension.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py index 8ece175344..7c668d4467 100644 --- a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py +++ b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py @@ -17,21 +17,12 @@ class ValidateSaverOutputExtension(pyblish.api.InstancePlugin): hosts = ["fusion"] actions = [SelectInvalidAction, RepairAction] - @classmethod - def get_invalid(cls, instance): - saver = instance.data["tool"] - output_path = saver.Clip[1] - current_ext = get_file_extension(output_path) - ext = instance.data["image_format"] - if not current_ext == ext: - return (saver, current_ext, ext) - def process(self, instance): saver = instance.data["tool"] - current_ext = get_file_extension(saver.Clip[1]) - expected_ext = instance.data["image_format"] + current_extension = get_file_extension(saver.Clip[1]) + expected_extension = instance.data["image_format"] - if not current_ext == expected_ext: + if current_ext != expected_ext: raise PublishValidationError( f"Instance {saver.Name} output image format does not match the current publish selection.\n\n" f"Current: {current_ext}\n\n" From 1cc824c099119234031b7770b653b5bf89185df5 Mon Sep 17 00:00:00 2001 From: JackP Date: Fri, 15 Dec 2023 10:50:28 +0000 Subject: [PATCH 058/183] chore: updated docstring --- .../plugins/publish/validate_saver_output_extension.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py index 7c668d4467..b96a136a9d 100644 --- a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py +++ b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py @@ -8,7 +8,10 @@ from openpype.hosts.fusion.api.action import SelectInvalidAction class ValidateSaverOutputExtension(pyblish.api.InstancePlugin): """ - Temp docstring + Validate Saver Output Extension matches Publish menu + + This ensures that if the user tweaks the 'Output File Extension' in the publish menu, + it is respected during the publish. """ order = pyblish.api.ValidatorOrder From f7a1a029c768e167e2fe001e4b9030f4f6396433 Mon Sep 17 00:00:00 2001 From: JackP Date: Fri, 15 Dec 2023 10:50:55 +0000 Subject: [PATCH 059/183] refactor: get_file_ext to use lstrip instead of replace --- .../fusion/plugins/publish/validate_saver_output_extension.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py index b96a136a9d..ce2e671d4b 100644 --- a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py +++ b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py @@ -46,8 +46,7 @@ class ValidateSaverOutputExtension(pyblish.api.InstancePlugin): "openpype.creator_attributes.image_format", instance.data["image_format"], ) - saver.Clip[1] = output_path def get_file_extension(full_path): - return os.path.splitext(full_path)[1].replace(".", "") + return os.path.splitext(full_path)[1].lstrip(".") From fb90d78160703aab838c16ce88026e0372c7abcf Mon Sep 17 00:00:00 2001 From: JackP Date: Fri, 15 Dec 2023 10:51:28 +0000 Subject: [PATCH 060/183] refactor: improved repair function --- .../publish/validate_saver_output_extension.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py index ce2e671d4b..2b6d4f2f19 100644 --- a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py +++ b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py @@ -1,5 +1,4 @@ import os - import pyblish.api from openpype.pipeline import PublishValidationError from openpype.pipeline.publish import RepairAction @@ -38,10 +37,13 @@ class ValidateSaverOutputExtension(pyblish.api.InstancePlugin): def repair(cls, instance): saver = instance.data["tool"] output_path = saver.Clip[1] - ext = get_file_extension(output_path) - output_path = output_path.replace( - f".{ext}", f".{instance.data['image_format']}" - ) + + root, old_extension = os.path.splitext(output_path) + new_extension = instance.data["image_format"] + + new_output_path = f"{root}.{new_extension}" + saver.Clip[1] = new_output_path + saver.SetData( "openpype.creator_attributes.image_format", instance.data["image_format"], From 9e69e5d48e75d8b47bb0317fc78bb848f04ac9c0 Mon Sep 17 00:00:00 2001 From: JackP Date: Fri, 15 Dec 2023 11:23:03 +0000 Subject: [PATCH 061/183] fix: typo --- .../fusion/plugins/publish/validate_saver_output_extension.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py index 2b6d4f2f19..c19c297f97 100644 --- a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py +++ b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py @@ -24,7 +24,7 @@ class ValidateSaverOutputExtension(pyblish.api.InstancePlugin): current_extension = get_file_extension(saver.Clip[1]) expected_extension = instance.data["image_format"] - if current_ext != expected_ext: + if current_extension != expected_extension: raise PublishValidationError( f"Instance {saver.Name} output image format does not match the current publish selection.\n\n" f"Current: {current_ext}\n\n" From e4b24189d1d84be4af09652a9f2533b336d51af4 Mon Sep 17 00:00:00 2001 From: JackP Date: Fri, 15 Dec 2023 11:25:12 +0000 Subject: [PATCH 062/183] fix: more typos.. love when my lsp isn't working --- .../fusion/plugins/publish/validate_saver_output_extension.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py index c19c297f97..f10f1d68ba 100644 --- a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py +++ b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py @@ -27,8 +27,8 @@ class ValidateSaverOutputExtension(pyblish.api.InstancePlugin): if current_extension != expected_extension: raise PublishValidationError( f"Instance {saver.Name} output image format does not match the current publish selection.\n\n" - f"Current: {current_ext}\n\n" - f"Expected: {expected_ext}\n\n" + f"Current: {current_extension}\n\n" + f"Expected: {expected_extension}\n\n" "You can use the repair action to update this instance.", title=self.label, ) From b5b1be262e760ba01406468a9d4d643f1bfb9919 Mon Sep 17 00:00:00 2001 From: JackP Date: Fri, 15 Dec 2023 11:28:54 +0000 Subject: [PATCH 063/183] chore: added optional tag for testing --- .../fusion/plugins/publish/validate_saver_output_extension.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py index f10f1d68ba..0862e0ac61 100644 --- a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py +++ b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py @@ -17,6 +17,7 @@ class ValidateSaverOutputExtension(pyblish.api.InstancePlugin): label = "Validate Saver Output Extension" families = ["render"] hosts = ["fusion"] + optional = True actions = [SelectInvalidAction, RepairAction] def process(self, instance): From 437246c090af27eacd65af52e0d8e28bb7d6ec30 Mon Sep 17 00:00:00 2001 From: JackP Date: Fri, 15 Dec 2023 11:36:15 +0000 Subject: [PATCH 064/183] chore: added optional class inherit for testing --- .../plugins/publish/validate_saver_output_extension.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py index 0862e0ac61..ea55832288 100644 --- a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py +++ b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py @@ -1,11 +1,16 @@ import os import pyblish.api -from openpype.pipeline import PublishValidationError +from openpype.pipeline import ( + PublishValidationError, + OptionalPyblishPluginMixin, +) from openpype.pipeline.publish import RepairAction from openpype.hosts.fusion.api.action import SelectInvalidAction -class ValidateSaverOutputExtension(pyblish.api.InstancePlugin): +class ValidateSaverOutputExtension( + pyblish.api.InstancePlugin, OptionalPyblishPluginMixin +): """ Validate Saver Output Extension matches Publish menu From 289eb1f4c8e6d11f34fc66157ed38b3d86ede9ac Mon Sep 17 00:00:00 2001 From: JackP Date: Fri, 15 Dec 2023 11:46:18 +0000 Subject: [PATCH 065/183] fix: added check for optional behaviour --- .../fusion/plugins/publish/validate_saver_output_extension.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py index ea55832288..746bb5eb6f 100644 --- a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py +++ b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py @@ -26,6 +26,9 @@ class ValidateSaverOutputExtension( actions = [SelectInvalidAction, RepairAction] def process(self, instance): + if not self.is_active(instance.data): + return + saver = instance.data["tool"] current_extension = get_file_extension(saver.Clip[1]) expected_extension = instance.data["image_format"] From 839e8153e384055b5f990975491ab01301b5857d Mon Sep 17 00:00:00 2001 From: JackP Date: Fri, 15 Dec 2023 14:30:32 +0000 Subject: [PATCH 066/183] feat: create_saver now respects changes to creator_attributes --- openpype/hosts/fusion/plugins/create/create_saver.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/openpype/hosts/fusion/plugins/create/create_saver.py b/openpype/hosts/fusion/plugins/create/create_saver.py index 6e71b41541..c75a780a2a 100644 --- a/openpype/hosts/fusion/plugins/create/create_saver.py +++ b/openpype/hosts/fusion/plugins/create/create_saver.py @@ -119,10 +119,9 @@ class CreateSaver(NewCreator): if "subset" not in data: return - original_subset = tool.GetData("openpype.subset") - subset = data["subset"] - if original_subset != subset: - self._configure_saver_tool(data, tool, subset) + original_data = tool.GetData("openpype") + if original_data != data["creator_attributes"]: + self._configure_saver_tool(data, tool, data["subset"]) def _configure_saver_tool(self, data, tool, subset): formatting_data = deepcopy(data) From 23d0c166dfc55ba6e276993d1c967715a70484c3 Mon Sep 17 00:00:00 2001 From: JackP Date: Fri, 15 Dec 2023 14:33:38 +0000 Subject: [PATCH 067/183] chore: removed redundant validator this is no longer needed since the creator now respects changes to attributes --- .../validate_saver_output_extension.py | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py diff --git a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py b/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py deleted file mode 100644 index 746bb5eb6f..0000000000 --- a/openpype/hosts/fusion/plugins/publish/validate_saver_output_extension.py +++ /dev/null @@ -1,63 +0,0 @@ -import os -import pyblish.api -from openpype.pipeline import ( - PublishValidationError, - OptionalPyblishPluginMixin, -) -from openpype.pipeline.publish import RepairAction -from openpype.hosts.fusion.api.action import SelectInvalidAction - - -class ValidateSaverOutputExtension( - pyblish.api.InstancePlugin, OptionalPyblishPluginMixin -): - """ - Validate Saver Output Extension matches Publish menu - - This ensures that if the user tweaks the 'Output File Extension' in the publish menu, - it is respected during the publish. - """ - - order = pyblish.api.ValidatorOrder - label = "Validate Saver Output Extension" - families = ["render"] - hosts = ["fusion"] - optional = True - actions = [SelectInvalidAction, RepairAction] - - def process(self, instance): - if not self.is_active(instance.data): - return - - saver = instance.data["tool"] - current_extension = get_file_extension(saver.Clip[1]) - expected_extension = instance.data["image_format"] - - if current_extension != expected_extension: - raise PublishValidationError( - f"Instance {saver.Name} output image format does not match the current publish selection.\n\n" - f"Current: {current_extension}\n\n" - f"Expected: {expected_extension}\n\n" - "You can use the repair action to update this instance.", - title=self.label, - ) - - @classmethod - def repair(cls, instance): - saver = instance.data["tool"] - output_path = saver.Clip[1] - - root, old_extension = os.path.splitext(output_path) - new_extension = instance.data["image_format"] - - new_output_path = f"{root}.{new_extension}" - saver.Clip[1] = new_output_path - - saver.SetData( - "openpype.creator_attributes.image_format", - instance.data["image_format"], - ) - - -def get_file_extension(full_path): - return os.path.splitext(full_path)[1].lstrip(".") From 3c272e4a7db54366c7c171b530de5688b947a5a9 Mon Sep 17 00:00:00 2001 From: JackP Date: Fri, 15 Dec 2023 14:48:36 +0000 Subject: [PATCH 068/183] fix: typo in comparison of data --- openpype/hosts/fusion/plugins/create/create_saver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/fusion/plugins/create/create_saver.py b/openpype/hosts/fusion/plugins/create/create_saver.py index c75a780a2a..b2235bd2b6 100644 --- a/openpype/hosts/fusion/plugins/create/create_saver.py +++ b/openpype/hosts/fusion/plugins/create/create_saver.py @@ -119,7 +119,7 @@ class CreateSaver(NewCreator): if "subset" not in data: return - original_data = tool.GetData("openpype") + original_data = tool.GetData("openpype.creator_attributes") if original_data != data["creator_attributes"]: self._configure_saver_tool(data, tool, data["subset"]) From 464889529132d2a6921dfb8fe80abe7db2f02d38 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Fri, 15 Dec 2023 23:09:11 +0800 Subject: [PATCH 069/183] make sure the contextlib.nested used before material loading while it is compatible for both python2 and 3 --- openpype/hosts/maya/api/lib.py | 5 ++- .../maya/plugins/publish/extract_playblast.py | 42 ++++++++++++------- .../maya/plugins/publish/extract_thumbnail.py | 21 +++++----- 3 files changed, 39 insertions(+), 29 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 817688258b..41290b805e 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -172,8 +172,9 @@ def maintained_selection(): cmds.select(clear=True) -def reload_textures(): - """Reload textures during playblast +def reload_all_udim_tile_previews(): + """Regenerate all UDIM tile preview in texture file + nodes during context """ texture_files = cmds.ls(type="file") if texture_files: diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index b540a2c56d..7bcddf97f1 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -43,17 +43,13 @@ class ExtractPlayblast(publish.Extractor): json.dumps(preset, indent=4, sort_keys=True) ) ) - if "textures" in preset["viewport_options"] and ( - "reloadTextures" in preset["viewport_options"] - ): - with lib.material_loading_mode(): - lib.reload_textures() - # not supported by `capture` - preset["viewport_options"].pop("reloadTextures", None) - path = capture.capture(log=self.log, **preset) - else: - preset["viewport_options"].pop("reloadTextures", None) - path = capture.capture(log=self.log, **preset) + + if preset["viewport_options"].get("reloadTextures"): + # Regenerate all UDIM tiles previews + lib.reload_all_udim_tile_previews() + # not supported by `capture` + preset["viewport_options"].pop("reloadTextures", None) + path = capture.capture(log=self.log, **preset) self.log.debug("playblast path {}".format(path)) def process(self, instance): @@ -206,11 +202,23 @@ class ExtractPlayblast(publish.Extractor): # TODO: Remove once dropping Python 2. if getattr(contextlib, "nested", None): # Python 3 compatibility. - with contextlib.nested( - lib.maintained_time(), - panel_camera(instance.data["panel"], preset["camera"]) - ): - self._capture(preset) + if preset["viewport_options"].get("textures"): + # If capture includes textures then ensure material + # load mode is set to `immediate` to ensure all + # textures have loaded when playblast starts + with contextlib.nested( + lib.maintained_time(), + panel_camera(instance.data["panel"], preset["camera"]), + lib.material_loading_mode() + ): + self._capture(preset) + + else: + with contextlib.nested( + lib.maintained_time(), + panel_camera(instance.data["panel"], preset["camera"]) + ): + self._capture(preset) else: # Python 2 compatibility. with contextlib.ExitStack() as stack: @@ -218,6 +226,8 @@ class ExtractPlayblast(publish.Extractor): stack.enter_context( panel_camera(instance.data["panel"], preset["camera"]) ) + if preset["viewport_options"].get("textures"): + stack.enter_context(lib.material_loading_mode()) self._capture(preset) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 10082436d6..b24cda8f07 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -152,19 +152,18 @@ class ExtractThumbnail(publish.Extractor): json.dumps(preset, indent=4, sort_keys=True) ) ) + + if "reloadTextures" in preset["viewport_options"]: + lib.reload_all_udim_tile_previews() + + preset["viewport_options"].pop("reloadTextures", None) if "textures" in preset["viewport_options"]: - if "reloadTextures" in preset["viewport_options"]: - with lib.material_loading_mode(): - lib.reload_textures() - preset["viewport_options"].pop("reloadTextures", None) - path = capture.capture(**preset) - else: - self.log.debug( - "Reload Textures during playblasting is disabled.") - preset["viewport_options"].pop("reloadTextures", None) + with lib.material_loading_mode(): path = capture.capture(**preset) - # not supported by `capture` - path = capture.capture(**preset) + else: + self.log.debug("Reload Textures during playblasting is disabled.") + path = capture.capture(**preset) + playblast = self._fix_playblast_output_path(path) _, thumbnail = os.path.split(playblast) From c62862a773ebc819d1385771a10287c8ae04f9df Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Fri, 15 Dec 2023 23:10:21 +0800 Subject: [PATCH 070/183] hound --- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index b24cda8f07..3f25a9b17b 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -161,7 +161,8 @@ class ExtractThumbnail(publish.Extractor): with lib.material_loading_mode(): path = capture.capture(**preset) else: - self.log.debug("Reload Textures during playblasting is disabled.") + self.log.debug( + "Reload Textures during playblasting is disabled.") path = capture.capture(**preset) playblast = self._fix_playblast_output_path(path) From 9f1ab7519fac8f7715ea42c21578fff3ef4225e2 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Fri, 15 Dec 2023 23:48:05 +0800 Subject: [PATCH 071/183] add exitstack.py into maya api folder & code tweaks --- openpype/hosts/maya/api/exitstack.py | 120 ++++++++++++++++++ .../maya/plugins/publish/extract_playblast.py | 37 ++---- .../maya/plugins/publish/extract_thumbnail.py | 4 +- 3 files changed, 130 insertions(+), 31 deletions(-) create mode 100644 openpype/hosts/maya/api/exitstack.py diff --git a/openpype/hosts/maya/api/exitstack.py b/openpype/hosts/maya/api/exitstack.py new file mode 100644 index 0000000000..dcf7131bd3 --- /dev/null +++ b/openpype/hosts/maya/api/exitstack.py @@ -0,0 +1,120 @@ +import contextlib + # TODO: Remove the entire script once dropping Python 2. +if getattr(contextlib, "nested", None): + from contextlib import ExitStack # noqa +else: + import sys + from collections import deque + + + class ExitStack(object): + """Context manager for dynamic management of a stack of exit callbacks + + For example: + + with ExitStack() as stack: + files = [stack.enter_context(open(fname)) for fname in filenames] + # All opened files will automatically be closed at the end of + # the with statement, even if attempts to open files later + # in the list raise an exception + + """ + def __init__(self): + self._exit_callbacks = deque() + + def pop_all(self): + """Preserve the context stack by transferring it to a new instance""" + new_stack = type(self)() + new_stack._exit_callbacks = self._exit_callbacks + self._exit_callbacks = deque() + return new_stack + + def _push_cm_exit(self, cm, cm_exit): + """Helper to correctly register callbacks to __exit__ methods""" + def _exit_wrapper(*exc_details): + return cm_exit(cm, *exc_details) + _exit_wrapper.__self__ = cm + self.push(_exit_wrapper) + + def push(self, exit): + """Registers a callback with the standard __exit__ method signature + + Can suppress exceptions the same way __exit__ methods can. + + Also accepts any object with an __exit__ method (registering a call + to the method instead of the object itself) + """ + # We use an unbound method rather than a bound method to follow + # the standard lookup behaviour for special methods + _cb_type = type(exit) + try: + exit_method = _cb_type.__exit__ + except AttributeError: + # Not a context manager, so assume its a callable + self._exit_callbacks.append(exit) + else: + self._push_cm_exit(exit, exit_method) + return exit # Allow use as a decorator + + def callback(self, callback, *args, **kwds): + """Registers an arbitrary callback and arguments. + + Cannot suppress exceptions. + """ + def _exit_wrapper(exc_type, exc, tb): + callback(*args, **kwds) + # We changed the signature, so using @wraps is not appropriate, but + # setting __wrapped__ may still help with introspection + _exit_wrapper.__wrapped__ = callback + self.push(_exit_wrapper) + return callback # Allow use as a decorator + + def enter_context(self, cm): + """Enters the supplied context manager + + If successful, also pushes its __exit__ method as a callback and + returns the result of the __enter__ method. + """ + # We look up the special methods on the type to match the with statement + _cm_type = type(cm) + _exit = _cm_type.__exit__ + result = _cm_type.__enter__(cm) + self._push_cm_exit(cm, _exit) + return result + + def close(self): + """Immediately unwind the context stack""" + self.__exit__(None, None, None) + + def __enter__(self): + return self + + def __exit__(self, *exc_details): + # We manipulate the exception state so it behaves as though + # we were actually nesting multiple with statements + frame_exc = sys.exc_info()[1] + def _fix_exception_context(new_exc, old_exc): + while 1: + exc_context = new_exc.__context__ + if exc_context in (None, frame_exc): + break + new_exc = exc_context + new_exc.__context__ = old_exc + + # Callbacks are invoked in LIFO order to match the behaviour of + # nested context managers + suppressed_exc = False + while self._exit_callbacks: + cb = self._exit_callbacks.pop() + try: + if cb(*exc_details): + suppressed_exc = True + exc_details = (None, None, None) + except: + new_exc_details = sys.exc_info() + # simulate the stack of exceptions by setting the context + _fix_exception_context(new_exc_details[1], exc_details[1]) + if not self._exit_callbacks: + raise + exc_details = new_exc_details + return suppressed_exc diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 7bcddf97f1..2e11a5f26e 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -7,6 +7,7 @@ import capture from openpype.pipeline import publish from openpype.hosts.maya.api import lib +from openpype.hosts.maya.api.exitstack import ExitStack from maya import cmds @@ -199,37 +200,15 @@ class ExtractPlayblast(publish.Extractor): preset.update(panel_preset) # Need to ensure Python 2 compatibility. - # TODO: Remove once dropping Python 2. - if getattr(contextlib, "nested", None): - # Python 3 compatibility. + with ExitStack() as stack: + stack.enter_context(lib.maintained_time()) + stack.enter_context( + panel_camera(instance.data["panel"], preset["camera"]) + ) if preset["viewport_options"].get("textures"): - # If capture includes textures then ensure material - # load mode is set to `immediate` to ensure all - # textures have loaded when playblast starts - with contextlib.nested( - lib.maintained_time(), - panel_camera(instance.data["panel"], preset["camera"]), - lib.material_loading_mode() - ): - self._capture(preset) + stack.enter_context(lib.material_loading_mode()) - else: - with contextlib.nested( - lib.maintained_time(), - panel_camera(instance.data["panel"], preset["camera"]) - ): - self._capture(preset) - else: - # Python 2 compatibility. - with contextlib.ExitStack() as stack: - stack.enter_context(lib.maintained_time()) - stack.enter_context( - panel_camera(instance.data["panel"], preset["camera"]) - ) - if preset["viewport_options"].get("textures"): - stack.enter_context(lib.material_loading_mode()) - - self._capture(preset) + self._capture(preset) # Restoring viewport options. if viewport_defaults: diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 3f25a9b17b..b8e7b19bc6 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -153,11 +153,11 @@ class ExtractThumbnail(publish.Extractor): ) ) - if "reloadTextures" in preset["viewport_options"]: + if preset["viewport_options"].get("reloadTextures"): lib.reload_all_udim_tile_previews() preset["viewport_options"].pop("reloadTextures", None) - if "textures" in preset["viewport_options"]: + if preset["viewport_options"].get("textures"): with lib.material_loading_mode(): path = capture.capture(**preset) else: From 940103feeeb233d933d71d552d0e3e0ab8744480 Mon Sep 17 00:00:00 2001 From: JackP Date: Fri, 15 Dec 2023 15:50:11 +0000 Subject: [PATCH 072/183] refactor: more accurately specified the conditions of '_configure_saver_tool' calls --- .../hosts/fusion/plugins/create/create_saver.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/fusion/plugins/create/create_saver.py b/openpype/hosts/fusion/plugins/create/create_saver.py index b2235bd2b6..5870828b41 100644 --- a/openpype/hosts/fusion/plugins/create/create_saver.py +++ b/openpype/hosts/fusion/plugins/create/create_saver.py @@ -119,9 +119,17 @@ class CreateSaver(NewCreator): if "subset" not in data: return - original_data = tool.GetData("openpype.creator_attributes") - if original_data != data["creator_attributes"]: - self._configure_saver_tool(data, tool, data["subset"]) + original_subset = tool.GetData("openpype.subset") + original_format = tool.GetData( + "openpype.creator_attributes.image_format" + ) + + subset = data["subset"] + if ( + original_subset != subset + or original_format != data["creator_attributes"]["image_format"] + ): + self._configure_saver_tool(data, tool, subset) def _configure_saver_tool(self, data, tool, subset): formatting_data = deepcopy(data) From b7da5708786130ebbfddaaa75d3ff40aea6453c9 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Fri, 15 Dec 2023 23:53:40 +0800 Subject: [PATCH 073/183] hound --- openpype/hosts/maya/api/exitstack.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/openpype/hosts/maya/api/exitstack.py b/openpype/hosts/maya/api/exitstack.py index dcf7131bd3..ee32fad56b 100644 --- a/openpype/hosts/maya/api/exitstack.py +++ b/openpype/hosts/maya/api/exitstack.py @@ -1,19 +1,19 @@ import contextlib - # TODO: Remove the entire script once dropping Python 2. +# TODO: Remove the entire script once dropping Python 2. if getattr(contextlib, "nested", None): from contextlib import ExitStack # noqa else: import sys from collections import deque - class ExitStack(object): """Context manager for dynamic management of a stack of exit callbacks For example: with ExitStack() as stack: - files = [stack.enter_context(open(fname)) for fname in filenames] + files = [stack.enter_context(open(fname)) + for fname in filenames] # All opened files will automatically be closed at the end of # the with statement, even if attempts to open files later # in the list raise an exception @@ -30,7 +30,8 @@ else: return new_stack def _push_cm_exit(self, cm, cm_exit): - """Helper to correctly register callbacks to __exit__ methods""" + """Helper to correctly register callbacks + to __exit__ methods""" def _exit_wrapper(*exc_details): return cm_exit(cm, *exc_details) _exit_wrapper.__self__ = cm @@ -54,7 +55,7 @@ else: self._exit_callbacks.append(exit) else: self._push_cm_exit(exit, exit_method) - return exit # Allow use as a decorator + return exit # Allow use as a decorator def callback(self, callback, *args, **kwds): """Registers an arbitrary callback and arguments. @@ -67,7 +68,7 @@ else: # setting __wrapped__ may still help with introspection _exit_wrapper.__wrapped__ = callback self.push(_exit_wrapper) - return callback # Allow use as a decorator + return callback # Allow use as a decorator def enter_context(self, cm): """Enters the supplied context manager @@ -75,7 +76,8 @@ else: If successful, also pushes its __exit__ method as a callback and returns the result of the __enter__ method. """ - # We look up the special methods on the type to match the with statement + # We look up the special methods on the type to + # match the with statement _cm_type = type(cm) _exit = _cm_type.__exit__ result = _cm_type.__enter__(cm) @@ -93,6 +95,7 @@ else: # We manipulate the exception state so it behaves as though # we were actually nesting multiple with statements frame_exc = sys.exc_info()[1] + def _fix_exception_context(new_exc, old_exc): while 1: exc_context = new_exc.__context__ @@ -110,7 +113,7 @@ else: if cb(*exc_details): suppressed_exc = True exc_details = (None, None, None) - except: + except Exception: new_exc_details = sys.exc_info() # simulate the stack of exceptions by setting the context _fix_exception_context(new_exc_details[1], exc_details[1]) From 4e005bfd5780c17ea128ac25c480f339b048f96a Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Fri, 15 Dec 2023 23:55:46 +0800 Subject: [PATCH 074/183] hound --- openpype/hosts/maya/api/exitstack.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openpype/hosts/maya/api/exitstack.py b/openpype/hosts/maya/api/exitstack.py index ee32fad56b..9b049f1914 100644 --- a/openpype/hosts/maya/api/exitstack.py +++ b/openpype/hosts/maya/api/exitstack.py @@ -5,8 +5,7 @@ if getattr(contextlib, "nested", None): else: import sys from collections import deque - - class ExitStack(object): + class ExitStack(object) """Context manager for dynamic management of a stack of exit callbacks For example: From 7dc19ec7594ce20669b2d4727cf0a2267f119e58 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Fri, 15 Dec 2023 23:56:55 +0800 Subject: [PATCH 075/183] hound --- openpype/hosts/maya/api/exitstack.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/api/exitstack.py b/openpype/hosts/maya/api/exitstack.py index 9b049f1914..cacaa396f0 100644 --- a/openpype/hosts/maya/api/exitstack.py +++ b/openpype/hosts/maya/api/exitstack.py @@ -5,7 +5,9 @@ if getattr(contextlib, "nested", None): else: import sys from collections import deque - class ExitStack(object) + + class ExitStack(object): + """Context manager for dynamic management of a stack of exit callbacks For example: @@ -22,7 +24,8 @@ else: self._exit_callbacks = deque() def pop_all(self): - """Preserve the context stack by transferring it to a new instance""" + """Preserve the context stack by transferring + it to a new instance""" new_stack = type(self)() new_stack._exit_callbacks = self._exit_callbacks self._exit_callbacks = deque() From 0252c9e137e77d0395afc1b0bfe01d1042dcb944 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Mon, 18 Dec 2023 16:02:39 +0100 Subject: [PATCH 076/183] OP-7606 - fix creation of .mov (#6064) --- openpype/hosts/photoshop/plugins/publish/extract_review.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openpype/hosts/photoshop/plugins/publish/extract_review.py b/openpype/hosts/photoshop/plugins/publish/extract_review.py index c2773b2a20..09c5d63aa5 100644 --- a/openpype/hosts/photoshop/plugins/publish/extract_review.py +++ b/openpype/hosts/photoshop/plugins/publish/extract_review.py @@ -170,8 +170,7 @@ class ExtractReview(publish.Extractor): # Generate mov. mov_path = os.path.join(staging_dir, "review.mov") self.log.info(f"Generate mov review: {mov_path}") - args = [ - ffmpeg_path, + args = ffmpeg_path + [ "-y", "-i", source_files_pattern, "-vf", "pad=ceil(iw/2)*2:ceil(ih/2)*2", From 263f1a0adbf8b73f62ea7824d6aea50e89fb1308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Mon, 18 Dec 2023 16:09:28 +0100 Subject: [PATCH 077/183] :bug: fix wrong nuke version constant name --- openpype/hosts/nuke/api/pipeline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/nuke/api/pipeline.py b/openpype/hosts/nuke/api/pipeline.py index 7bc17ff504..12562a6b6f 100644 --- a/openpype/hosts/nuke/api/pipeline.py +++ b/openpype/hosts/nuke/api/pipeline.py @@ -260,7 +260,7 @@ def _install_menu(): "Create...", lambda: host_tools.show_publisher( parent=( - main_window if nuke.NUKE_VERSION_RELEASE >= 14 else None + main_window if nuke.NUKE_VERSION_MAJOR >= 14 else None ), tab="create" ) @@ -271,7 +271,7 @@ def _install_menu(): "Publish...", lambda: host_tools.show_publisher( parent=( - main_window if nuke.NUKE_VERSION_RELEASE >= 14 else None + main_window if nuke.NUKE_VERSION_MAJOR >= 14 else None ), tab="publish" ) From 1aca2d3befbb4e969f37347d1ada03e305c54678 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Mon, 18 Dec 2023 16:19:14 +0100 Subject: [PATCH 078/183] expect 'ayon' group as one of option to get custom attributes --- openpype/modules/ftrack/lib/custom_attributes.py | 2 +- .../ftrack/plugins/publish/integrate_hierarchy_ftrack.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/modules/ftrack/lib/custom_attributes.py b/openpype/modules/ftrack/lib/custom_attributes.py index 3e40bb02f2..76c7bcd403 100644 --- a/openpype/modules/ftrack/lib/custom_attributes.py +++ b/openpype/modules/ftrack/lib/custom_attributes.py @@ -66,7 +66,7 @@ def get_openpype_attr(session, split_hierarchical=True, query_keys=None): "select {}" " from CustomAttributeConfiguration" # Kept `pype` for Backwards Compatibility - " where group.name in (\"pype\", \"{}\")" + " where group.name in (\"pype\", \"ayon\", \"{}\")" ).format(", ".join(query_keys), CUST_ATTR_GROUP) all_avalon_attr = session.query(cust_attrs_query).all() for cust_attr in all_avalon_attr: diff --git a/openpype/modules/ftrack/plugins/publish/integrate_hierarchy_ftrack.py b/openpype/modules/ftrack/plugins/publish/integrate_hierarchy_ftrack.py index a1aa7c0daa..68a31035f6 100644 --- a/openpype/modules/ftrack/plugins/publish/integrate_hierarchy_ftrack.py +++ b/openpype/modules/ftrack/plugins/publish/integrate_hierarchy_ftrack.py @@ -21,7 +21,7 @@ def get_pype_attr(session, split_hierarchical=True): "select id, entity_type, object_type_id, is_hierarchical, default" " from CustomAttributeConfiguration" # Kept `pype` for Backwards Compatibility - " where group.name in (\"pype\", \"{}\")" + " where group.name in (\"pype\", \"ayon\", \"{}\")" ).format(CUST_ATTR_GROUP) all_avalon_attr = session.query(cust_attrs_query).all() for cust_attr in all_avalon_attr: From 8c387c30432d29d576bd702637382571bbc6f8b9 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Mon, 18 Dec 2023 16:39:29 +0100 Subject: [PATCH 079/183] Photoshop: fix Collect Color Coded settings (#6065) * OP-7609 - fix Photoshop publish plugin model Was causing issues when saving settings for `Collect Color Coded Instances` * OP-7609 - bump up version for Photoshop addon Caused by change of Settings model. --- server_addon/photoshop/server/settings/publish_plugins.py | 2 +- server_addon/photoshop/server/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server_addon/photoshop/server/settings/publish_plugins.py b/server_addon/photoshop/server/settings/publish_plugins.py index 2863979ca9..21e7d670f0 100644 --- a/server_addon/photoshop/server/settings/publish_plugins.py +++ b/server_addon/photoshop/server/settings/publish_plugins.py @@ -29,7 +29,7 @@ class ColorCodeMappings(BaseSettingsModel): ) layer_name_regex: list[str] = Field( - "", + default_factory=list, title="Layer name regex" ) diff --git a/server_addon/photoshop/server/version.py b/server_addon/photoshop/server/version.py index d4b9e2d7f3..a242f0e757 100644 --- a/server_addon/photoshop/server/version.py +++ b/server_addon/photoshop/server/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring addon version.""" -__version__ = "0.1.0" +__version__ = "0.1.1" From cd2e907dc2bc8302af37c668546e05d7ffedca28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Mon, 18 Dec 2023 17:06:40 +0100 Subject: [PATCH 080/183] :bug: fix AYON settings for Maya workspace --- server_addon/maya/server/settings/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server_addon/maya/server/settings/main.py b/server_addon/maya/server/settings/main.py index 62fd12ec8a..a5b573a75e 100644 --- a/server_addon/maya/server/settings/main.py +++ b/server_addon/maya/server/settings/main.py @@ -97,7 +97,7 @@ DEFAULT_MEL_WORKSPACE_SETTINGS = "\n".join(( 'workspace -fr "renderData" "renderData";', 'workspace -fr "sourceImages" "sourceimages";', 'workspace -fr "fileCache" "cache/nCache";', - 'workspace -fr "autoSave" "autosave"', + 'workspace -fr "autoSave" "autosave";', '', )) From c964f1411af3fe7c34c9ed067a143f9502bdf605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Mon, 18 Dec 2023 17:07:13 +0100 Subject: [PATCH 081/183] :recycle: sync defaults with AYON --- openpype/settings/defaults/project_settings/maya.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 7719a5e255..34452eb8ce 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -436,7 +436,7 @@ "viewTransform": "sRGB gamma" } }, - "mel_workspace": "workspace -fr \"shaders\" \"renderData/shaders\";\nworkspace -fr \"images\" \"renders/maya\";\nworkspace -fr \"particles\" \"particles\";\nworkspace -fr \"mayaAscii\" \"\";\nworkspace -fr \"mayaBinary\" \"\";\nworkspace -fr \"scene\" \"\";\nworkspace -fr \"alembicCache\" \"cache/alembic\";\nworkspace -fr \"renderData\" \"renderData\";\nworkspace -fr \"sourceImages\" \"sourceimages\";\nworkspace -fr \"fileCache\" \"cache/nCache\";\n", + "mel_workspace": "workspace -fr \"shaders\" \"renderData/shaders\";\nworkspace -fr \"images\" \"renders/maya\";\nworkspace -fr \"particles\" \"particles\";\nworkspace -fr \"mayaAscii\" \"\";\nworkspace -fr \"mayaBinary\" \"\";\nworkspace -fr \"scene\" \"\";\nworkspace -fr \"alembicCache\" \"cache/alembic\";\nworkspace -fr \"renderData\" \"renderData\";\nworkspace -fr \"sourceImages\" \"sourceimages\";\nworkspace -fr \"fileCache\" \"cache/nCache\";\nworkspace -fr \"autoSave\" \"autosave\";", "ext_mapping": { "model": "ma", "mayaAscii": "ma", From 4db853ec03342da8d4a1e8ecaef32080cc804b6d Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Tue, 19 Dec 2023 11:24:55 +0100 Subject: [PATCH 082/183] do not use thumbnailSource for integration (#6063) --- openpype/plugins/publish/integrate_thumbnail_ayon.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/openpype/plugins/publish/integrate_thumbnail_ayon.py b/openpype/plugins/publish/integrate_thumbnail_ayon.py index fc77a803fc..e56c567667 100644 --- a/openpype/plugins/publish/integrate_thumbnail_ayon.py +++ b/openpype/plugins/publish/integrate_thumbnail_ayon.py @@ -106,11 +106,8 @@ class IntegrateThumbnailsAYON(pyblish.api.ContextPlugin): continue # Find thumbnail path on instance - thumbnail_source = instance.data.get("thumbnailSource") - thumbnail_path = instance.data.get("thumbnailPath") thumbnail_path = ( - thumbnail_source - or thumbnail_path + instance.data.get("thumbnailPath") or self._get_instance_thumbnail_path(published_repres) ) if thumbnail_path: From 3ef475fcd3641dc2faf0fd1d76f7f44b4cdbeccd Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 19 Dec 2023 14:05:47 +0100 Subject: [PATCH 083/183] hound catch --- .../plugins/publish/collect_explicit_colorspace.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py b/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py index 5dcc252f03..75c26ac958 100644 --- a/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py +++ b/openpype/hosts/traypublisher/plugins/publish/collect_explicit_colorspace.py @@ -61,9 +61,10 @@ class CollectColorspace(pyblish.api.InstancePlugin, return colorspace_data["colorspace"] else: raise KnownPublishError( - "Collecting of colorspace failed. used config is missing " - "colorspace type: '{}' .".format(colorspace_data["type"]) - "Please contact your pipeline TD." + ( + "Collecting of colorspace failed. used config is missing " + "colorspace type: '{}' . Please contact your pipeline TD." + ).format(colorspace_data['type']) ) @classmethod From 008f78e6a095f9c3c4af3b3f9fac7150705f1670 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 19 Dec 2023 22:04:30 +0800 Subject: [PATCH 084/183] implement the exitstack inside the capture --- .../maya/plugins/publish/extract_playblast.py | 24 +++++++++++-------- .../maya/plugins/publish/extract_thumbnail.py | 8 +++---- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 2e11a5f26e..78d771c250 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -45,13 +45,20 @@ class ExtractPlayblast(publish.Extractor): ) ) - if preset["viewport_options"].get("reloadTextures"): - # Regenerate all UDIM tiles previews - lib.reload_all_udim_tile_previews() - # not supported by `capture` - preset["viewport_options"].pop("reloadTextures", None) - path = capture.capture(log=self.log, **preset) - self.log.debug("playblast path {}".format(path)) + if preset["viewport_options"].get("textures"): + with ExitStack() as stack: + stack.enter_context(lib.material_loading_mode()) + if preset["viewport_options"].get("reloadTextures"): + # Regenerate all UDIM tiles previews + lib.reload_all_udim_tile_previews() + # not supported by `capture` + preset["viewport_options"].pop("reloadTextures", None) + path = capture.capture(log=self.log, **preset) + self.log.debug("playblast path {}".format(path)) + else: + preset["viewport_options"].pop("reloadTextures", None) + path = capture.capture(log=self.log, **preset) + self.log.debug("playblast path {}".format(path)) def process(self, instance): self.log.debug("Extracting capture..") @@ -205,9 +212,6 @@ class ExtractPlayblast(publish.Extractor): stack.enter_context( panel_camera(instance.data["panel"], preset["camera"]) ) - if preset["viewport_options"].get("textures"): - stack.enter_context(lib.material_loading_mode()) - self._capture(preset) # Restoring viewport options. diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index b8e7b19bc6..96c7226db3 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -153,16 +153,16 @@ class ExtractThumbnail(publish.Extractor): ) ) - if preset["viewport_options"].get("reloadTextures"): - lib.reload_all_udim_tile_previews() - - preset["viewport_options"].pop("reloadTextures", None) if preset["viewport_options"].get("textures"): with lib.material_loading_mode(): + if preset["viewport_options"].get("reloadTextures"): + lib.reload_all_udim_tile_previews() + preset["viewport_options"].pop("reloadTextures", None) path = capture.capture(**preset) else: self.log.debug( "Reload Textures during playblasting is disabled.") + preset["viewport_options"].pop("reloadTextures", None) path = capture.capture(**preset) playblast = self._fix_playblast_output_path(path) From f9603bb0a5514e5fb28c60d56a50c26a1409e8ec Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 19 Dec 2023 22:44:18 +0800 Subject: [PATCH 085/183] refactor the capture function and move it to lib --- openpype/hosts/maya/api/lib.py | 28 +++++++++++++++++++ .../maya/plugins/publish/extract_playblast.py | 27 ++---------------- .../maya/plugins/publish/extract_thumbnail.py | 22 +-------------- 3 files changed, 31 insertions(+), 46 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 41290b805e..d2a2ab253b 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -9,6 +9,8 @@ import re import json import logging import contextlib +import capture +from .exitstack import ExitStack from collections import OrderedDict, defaultdict from math import ceil from six import string_types @@ -183,6 +185,32 @@ def reload_all_udim_tile_previews(): cmds.ogs(regenerateUVTilePreview=texture_file) +def capture_with_preset(preset): + if os.environ.get("OPENPYPE_DEBUG") == "1": + log.debug( + "Using preset: {}".format( + json.dumps(preset, indent=4, sort_keys=True) + ) + ) + + if preset["viewport_options"].get("textures"): + with ExitStack() as stack: + stack.enter_context(material_loading_mode()) + if preset["viewport_options"].get("reloadTextures"): + # Regenerate all UDIM tiles previews + reload_all_udim_tile_previews() + # not supported by `capture` + preset["viewport_options"].pop("reloadTextures", None) + path = capture.capture(log=self.log, **preset) + self.log.debug("playblast path {}".format(path)) + else: + preset["viewport_options"].pop("reloadTextures", None) + path = capture.capture(log=self.log, **preset) + self.log.debug("playblast path {}".format(path)) + + return path + + @contextlib.contextmanager def material_loading_mode(mode="immediate"): """Set material loading mode during context""" diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 78d771c250..0f1423d63d 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -1,5 +1,4 @@ import os -import json import contextlib import clique @@ -9,6 +8,7 @@ from openpype.pipeline import publish from openpype.hosts.maya.api import lib from openpype.hosts.maya.api.exitstack import ExitStack + from maya import cmds @@ -37,29 +37,6 @@ class ExtractPlayblast(publish.Extractor): capture_preset = {} profiles = None - def _capture(self, preset): - if os.environ.get("OPENPYPE_DEBUG") == "1": - self.log.debug( - "Using preset: {}".format( - json.dumps(preset, indent=4, sort_keys=True) - ) - ) - - if preset["viewport_options"].get("textures"): - with ExitStack() as stack: - stack.enter_context(lib.material_loading_mode()) - if preset["viewport_options"].get("reloadTextures"): - # Regenerate all UDIM tiles previews - lib.reload_all_udim_tile_previews() - # not supported by `capture` - preset["viewport_options"].pop("reloadTextures", None) - path = capture.capture(log=self.log, **preset) - self.log.debug("playblast path {}".format(path)) - else: - preset["viewport_options"].pop("reloadTextures", None) - path = capture.capture(log=self.log, **preset) - self.log.debug("playblast path {}".format(path)) - def process(self, instance): self.log.debug("Extracting capture..") @@ -212,7 +189,7 @@ class ExtractPlayblast(publish.Extractor): stack.enter_context( panel_camera(instance.data["panel"], preset["camera"]) ) - self._capture(preset) + path = lib.capture_with_preset(preset) # Restoring viewport options. if viewport_defaults: diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 96c7226db3..897383d0cb 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -1,9 +1,6 @@ import os import glob import tempfile -import json - -import capture from openpype.pipeline import publish from openpype.hosts.maya.api import lib @@ -146,24 +143,7 @@ class ExtractThumbnail(publish.Extractor): preset.update(panel_preset) cmds.setFocus(panel) - if os.environ.get("OPENPYPE_DEBUG") == "1": - self.log.debug( - "Using preset: {}".format( - json.dumps(preset, indent=4, sort_keys=True) - ) - ) - - if preset["viewport_options"].get("textures"): - with lib.material_loading_mode(): - if preset["viewport_options"].get("reloadTextures"): - lib.reload_all_udim_tile_previews() - preset["viewport_options"].pop("reloadTextures", None) - path = capture.capture(**preset) - else: - self.log.debug( - "Reload Textures during playblasting is disabled.") - preset["viewport_options"].pop("reloadTextures", None) - path = capture.capture(**preset) + path = lib.capture_with_preset(preset) playblast = self._fix_playblast_output_path(path) From 8b6561ef91816e2cb4d2a834344007a5cbe01176 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Tue, 19 Dec 2023 18:30:22 +0100 Subject: [PATCH 086/183] removed dependencies related to already separated addons --- server_addon/openpype/client/pyproject.toml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/server_addon/openpype/client/pyproject.toml b/server_addon/openpype/client/pyproject.toml index 40da8f6716..367d4488a9 100644 --- a/server_addon/openpype/client/pyproject.toml +++ b/server_addon/openpype/client/pyproject.toml @@ -8,17 +8,12 @@ aiohttp_json_rpc = "*" # TVPaint server aiohttp-middlewares = "^2.0.0" wsrpc_aiohttp = "^3.1.1" # websocket server clique = "1.6.*" -gazu = "^0.9.3" -google-api-python-client = "^1.12.8" # sync server google support (should be separate?) jsonschema = "^2.6.0" pymongo = "^3.11.2" log4mongo = "^1.7" pathlib2= "^2.3.5" # deadline submit publish job only (single place, maybe not needed?) pyblish-base = "^1.8.11" -pynput = "^1.7.2" # Timers manager - TODO replace +pynput = "^1.7.2" # Timers manager - TODO remove "Qt.py" = "^1.3.3" qtawesome = "0.7.3" speedcopy = "^2.1" -slack-sdk = "^3.6.0" -pysftp = "^0.2.9" -dropbox = "^11.20.0" From e945b372505cf4bdaae9f08a0577cfc91bcc98e4 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Tue, 19 Dec 2023 18:46:15 +0100 Subject: [PATCH 087/183] use 'pathlib' instead of 'pathlib2' --- openpype/scripts/ocio_wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/scripts/ocio_wrapper.py b/openpype/scripts/ocio_wrapper.py index fa231cd047..0a78e33c1f 100644 --- a/openpype/scripts/ocio_wrapper.py +++ b/openpype/scripts/ocio_wrapper.py @@ -21,7 +21,7 @@ Providing functionality: import click import json -from pathlib2 import Path +from pathlib import Path import PyOpenColorIO as ocio From 97022a519837374a769a917cd5a030ab212602bb Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Tue, 19 Dec 2023 18:46:57 +0100 Subject: [PATCH 088/183] removed 'pathlib2' from openpype addon requirements --- server_addon/openpype/client/pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/server_addon/openpype/client/pyproject.toml b/server_addon/openpype/client/pyproject.toml index 40da8f6716..c5d2d0e317 100644 --- a/server_addon/openpype/client/pyproject.toml +++ b/server_addon/openpype/client/pyproject.toml @@ -13,7 +13,6 @@ google-api-python-client = "^1.12.8" # sync server google support (should be sep jsonschema = "^2.6.0" pymongo = "^3.11.2" log4mongo = "^1.7" -pathlib2= "^2.3.5" # deadline submit publish job only (single place, maybe not needed?) pyblish-base = "^1.8.11" pynput = "^1.7.2" # Timers manager - TODO replace "Qt.py" = "^1.3.3" From 900564b5bf9bc4c7d56a908a1d718917eb743d49 Mon Sep 17 00:00:00 2001 From: Ynbot Date: Wed, 20 Dec 2023 03:24:22 +0000 Subject: [PATCH 089/183] [Automated] Bump version --- openpype/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/version.py b/openpype/version.py index e053a8364e..c4ff4dde95 100644 --- a/openpype/version.py +++ b/openpype/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring Pype version.""" -__version__ = "3.18.2-nightly.1" +__version__ = "3.18.2-nightly.2" From ee8a8caf48e7de25dc1dcf2d88a2ac7337ba4a89 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 20 Dec 2023 03:25:01 +0000 Subject: [PATCH 090/183] chore(): update bug report / version --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index be0a6e1299..fd3455ac76 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,6 +35,7 @@ body: label: Version description: What version are you running? Look to OpenPype Tray options: + - 3.18.2-nightly.2 - 3.18.2-nightly.1 - 3.18.1 - 3.18.1-nightly.1 @@ -134,7 +135,6 @@ body: - 3.15.4 - 3.15.4-nightly.3 - 3.15.4-nightly.2 - - 3.15.4-nightly.1 validations: required: true - type: dropdown From 2f03b61c11a6d39dd2e1e3082830d9893ffb6e75 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 20 Dec 2023 17:28:58 +0800 Subject: [PATCH 091/183] refactor the capture and playblast functions and put them into lib.py --- openpype/hosts/maya/api/lib.py | 189 +++++++++++++++++- .../maya/plugins/publish/extract_playblast.py | 158 +-------------- .../maya/plugins/publish/extract_thumbnail.py | 108 +--------- 3 files changed, 194 insertions(+), 261 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index d2a2ab253b..0dd18bb978 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -185,16 +185,46 @@ def reload_all_udim_tile_previews(): cmds.ogs(regenerateUVTilePreview=texture_file) -def capture_with_preset(preset): +@contextlib.contextmanager +def panel_camera(panel, camera): + original_camera = cmds.modelPanel(panel, query=True, camera=True) + try: + cmds.modelPanel(panel, edit=True, camera=camera) + yield + finally: + cmds.modelPanel(panel, edit=True, camera=original_camera) + + +@contextlib.contextmanager +def panel_camera(panel, camera): + original_camera = cmds.modelPanel(panel, query=True, camera=True) + try: + cmds.modelPanel(panel, edit=True, camera=camera) + yield + finally: + cmds.modelPanel(panel, edit=True, camera=original_camera) + + +def capture_with_preset(preset, instance): + """Function for playblast capturing with the preset options + + Args: + preset (dict): preset options + instance (str): instance + + Returns: + _type_: _description_ + """ if os.environ.get("OPENPYPE_DEBUG") == "1": log.debug( "Using preset: {}".format( json.dumps(preset, indent=4, sort_keys=True) ) ) - - if preset["viewport_options"].get("textures"): - with ExitStack() as stack: + with ExitStack() as stack: + stack.enter_context(maintained_time()) + stack.enter_context(panel_camera(instance.data["panel"], preset["camera"])) + if preset["viewport_options"].get("textures"): stack.enter_context(material_loading_mode()) if preset["viewport_options"].get("reloadTextures"): # Regenerate all UDIM tiles previews @@ -203,13 +233,156 @@ def capture_with_preset(preset): preset["viewport_options"].pop("reloadTextures", None) path = capture.capture(log=self.log, **preset) self.log.debug("playblast path {}".format(path)) - else: - preset["viewport_options"].pop("reloadTextures", None) - path = capture.capture(log=self.log, **preset) - self.log.debug("playblast path {}".format(path)) + else: + preset["viewport_options"].pop("reloadTextures", None) + path = capture.capture(log=self.log, **preset) + self.log.debug("playblast path {}".format(path)) return path +def get_presets(instance, camera, path, start, end, capture_preset): + """Function for getting all the data of preset options for + playblast capturing + + Args: + instance (str): instance + camera (str): review camera + path (str): filepath + start (int): frameStart + end (int): frameEnd + capture_preset (dict): capture preset + + Returns: + _type_: _description_ + """ + preset = load_capture_preset(data=capture_preset) + + # "isolate_view" will already have been applied at creation, so we'll + # ignore it here. + preset.pop("isolate_view") + + # Set resolution variables from capture presets + width_preset = capture_preset["Resolution"]["width"] + height_preset = capture_preset["Resolution"]["height"] + + # Set resolution variables from asset values + asset_data = instance.data["assetEntity"]["data"] + asset_width = asset_data.get("resolutionWidth") + asset_height = asset_data.get("resolutionHeight") + review_instance_width = instance.data.get("review_width") + review_instance_height = instance.data.get("review_height") + preset["camera"] = camera + + # Tests if project resolution is set, + # if it is a value other than zero, that value is + # used, if not then the asset resolution is + # used + if review_instance_width and review_instance_height: + preset["width"] = review_instance_width + preset["height"] = review_instance_height + elif width_preset and height_preset: + preset["width"] = width_preset + preset["height"] = height_preset + elif asset_width and asset_height: + preset["width"] = asset_width + preset["height"] = asset_height + preset["start_frame"] = start + preset["end_frame"] = end + + # Enforce persisting camera depth of field + camera_options = preset.setdefault("camera_options", {}) + camera_options["depthOfField"] = cmds.getAttr( + "{0}.depthOfField".format(camera)) + + preset["filename"] = path + preset["overwrite"] = True + + cmds.refresh(force=True) + + refreshFrameInt = int(cmds.playbackOptions(q=True, minTime=True)) + cmds.currentTime(refreshFrameInt - 1, edit=True) + cmds.currentTime(refreshFrameInt, edit=True) + + # Use displayLights setting from instance + key = "displayLights" + preset["viewport_options"][key] = instance.data[key] + + # Override transparency if requested. + transparency = instance.data.get("transparency", 0) + if transparency != 0: + preset["viewport2_options"]["transparencyAlgorithm"] = transparency + + # Isolate view is requested by having objects in the set besides a + # camera. If there is only 1 member it'll be the camera because we + # validate to have 1 camera only. + if instance.data["isolate"] and len(instance.data["setMembers"]) > 1: + preset["isolate"] = instance.data["setMembers"] + + # Show/Hide image planes on request. + image_plane = instance.data.get("imagePlane", True) + if "viewport_options" in preset: + preset["viewport_options"]["imagePlane"] = image_plane + else: + preset["viewport_options"] = {"imagePlane": image_plane} + + # Disable Pan/Zoom. + pan_zoom = cmds.getAttr("{}.panZoomEnabled".format(preset["camera"])) + preset.pop("pan_zoom", None) + preset["camera_options"]["panZoomEnabled"] = instance.data["panZoom"] + + # Need to explicitly enable some viewport changes so the viewport is + # refreshed ahead of playblasting. + keys = [ + "useDefaultMaterial", + "wireframeOnShaded", + "xray", + "jointXray", + "backfaceCulling", + "textures" + ] + viewport_defaults = {} + for key in keys: + viewport_defaults[key] = cmds.modelEditor( + instance.data["panel"], query=True, **{key: True} + ) + if preset["viewport_options"][key]: + cmds.modelEditor( + instance.data["panel"], edit=True, **{key: True} + ) + + override_viewport_options = ( + capture_preset["Viewport Options"]["override_viewport_options"] + ) + + # Force viewer to False in call to capture because we have our own + # viewer opening call to allow a signal to trigger between + # playblast and viewer + preset["viewer"] = False + + # Update preset with current panel setting + # if override_viewport_options is turned off + if not override_viewport_options: + panel_preset = capture.parse_view(instance.data["panel"]) + panel_preset.pop("camera") + preset.update(panel_preset) + + path = capture_with_preset( + preset, instance) + + # Restoring viewport options. + if viewport_defaults: + cmds.modelEditor( + instance.data["panel"], edit=True, **viewport_defaults + ) + + try: + cmds.setAttr( + "{}.panZoomEnabled".format(preset["camera"]), pan_zoom) + except RuntimeError: + self.log.warning("Cannot restore Pan/Zoom settings.") + + return preset + @contextlib.contextmanager def material_loading_mode(mode="immediate"): diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 0f1423d63d..192eb2639d 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -1,27 +1,13 @@ import os -import contextlib import clique -import capture from openpype.pipeline import publish from openpype.hosts.maya.api import lib -from openpype.hosts.maya.api.exitstack import ExitStack - from maya import cmds -@contextlib.contextmanager -def panel_camera(panel, camera): - original_camera = cmds.modelPanel(panel, query=True, camera=True) - try: - cmds.modelPanel(panel, edit=True, camera=camera) - yield - finally: - cmds.modelPanel(panel, edit=True, camera=original_camera) - - class ExtractPlayblast(publish.Extractor): """Extract viewport playblast. @@ -53,10 +39,6 @@ class ExtractPlayblast(publish.Extractor): end = cmds.playbackOptions(query=True, animationEndTime=True) self.log.debug("start: {}, end: {}".format(start, end)) - - # get cameras - camera = instance.data["review_camera"] - task_data = instance.data["anatomyData"].get("task", {}) capture_preset = lib.get_capture_preset( task_data.get("name"), @@ -65,143 +47,17 @@ class ExtractPlayblast(publish.Extractor): instance.context.data["project_settings"], self.log ) - - preset = lib.load_capture_preset(data=capture_preset) - - # "isolate_view" will already have been applied at creation, so we'll - # ignore it here. - preset.pop("isolate_view") - - # Set resolution variables from capture presets - width_preset = capture_preset["Resolution"]["width"] - height_preset = capture_preset["Resolution"]["height"] - - # Set resolution variables from asset values - asset_data = instance.data["assetEntity"]["data"] - asset_width = asset_data.get("resolutionWidth") - asset_height = asset_data.get("resolutionHeight") - review_instance_width = instance.data.get("review_width") - review_instance_height = instance.data.get("review_height") - preset["camera"] = camera - - # Tests if project resolution is set, - # if it is a value other than zero, that value is - # used, if not then the asset resolution is - # used - if review_instance_width and review_instance_height: - preset["width"] = review_instance_width - preset["height"] = review_instance_height - elif width_preset and height_preset: - preset["width"] = width_preset - preset["height"] = height_preset - elif asset_width and asset_height: - preset["width"] = asset_width - preset["height"] = asset_height - preset["start_frame"] = start - preset["end_frame"] = end - - # Enforce persisting camera depth of field - camera_options = preset.setdefault("camera_options", {}) - camera_options["depthOfField"] = cmds.getAttr( - "{0}.depthOfField".format(camera)) - stagingdir = self.staging_dir(instance) filename = "{0}".format(instance.name) path = os.path.join(stagingdir, filename) - self.log.debug("Outputting images to %s" % path) - - preset["filename"] = path - preset["overwrite"] = True - - cmds.refresh(force=True) - - refreshFrameInt = int(cmds.playbackOptions(q=True, minTime=True)) - cmds.currentTime(refreshFrameInt - 1, edit=True) - cmds.currentTime(refreshFrameInt, edit=True) - - # Use displayLights setting from instance - key = "displayLights" - preset["viewport_options"][key] = instance.data[key] - - # Override transparency if requested. - transparency = instance.data.get("transparency", 0) - if transparency != 0: - preset["viewport2_options"]["transparencyAlgorithm"] = transparency - - # Isolate view is requested by having objects in the set besides a - # camera. If there is only 1 member it'll be the camera because we - # validate to have 1 camera only. - if instance.data["isolate"] and len(instance.data["setMembers"]) > 1: - preset["isolate"] = instance.data["setMembers"] - - # Show/Hide image planes on request. - image_plane = instance.data.get("imagePlane", True) - if "viewport_options" in preset: - preset["viewport_options"]["imagePlane"] = image_plane - else: - preset["viewport_options"] = {"imagePlane": image_plane} - - # Disable Pan/Zoom. - pan_zoom = cmds.getAttr("{}.panZoomEnabled".format(preset["camera"])) - preset.pop("pan_zoom", None) - preset["camera_options"]["panZoomEnabled"] = instance.data["panZoom"] - - # Need to explicitly enable some viewport changes so the viewport is - # refreshed ahead of playblasting. - keys = [ - "useDefaultMaterial", - "wireframeOnShaded", - "xray", - "jointXray", - "backfaceCulling", - "textures" - ] - viewport_defaults = {} - for key in keys: - viewport_defaults[key] = cmds.modelEditor( - instance.data["panel"], query=True, **{key: True} - ) - if preset["viewport_options"][key]: - cmds.modelEditor( - instance.data["panel"], edit=True, **{key: True} - ) - - override_viewport_options = ( - capture_preset["Viewport Options"]["override_viewport_options"] - ) - - # Force viewer to False in call to capture because we have our own - # viewer opening call to allow a signal to trigger between - # playblast and viewer - preset["viewer"] = False - - # Update preset with current panel setting - # if override_viewport_options is turned off - if not override_viewport_options: - panel_preset = capture.parse_view(instance.data["panel"]) - panel_preset.pop("camera") - preset.update(panel_preset) - - # Need to ensure Python 2 compatibility. - with ExitStack() as stack: - stack.enter_context(lib.maintained_time()) - stack.enter_context( - panel_camera(instance.data["panel"], preset["camera"]) - ) - path = lib.capture_with_preset(preset) - - # Restoring viewport options. - if viewport_defaults: - cmds.modelEditor( - instance.data["panel"], edit=True, **viewport_defaults - ) - - try: - cmds.setAttr( - "{}.panZoomEnabled".format(preset["camera"]), pan_zoom) - except RuntimeError: - self.log.warning("Cannot restore Pan/Zoom settings.") + # get cameras + camera = instance.data["review_camera"] + preset = lib.get_presets( + instance, camera, path, + start=start, end=end, + capture_preset=capture_preset) + path = lib.capture_with_preset(preset, instance) collected_files = os.listdir(stagingdir) patterns = [clique.PATTERNS["frames"]] diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 897383d0cb..09665a1a58 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -5,8 +5,6 @@ import tempfile from openpype.pipeline import publish from openpype.hosts.maya.api import lib -from maya import cmds - class ExtractThumbnail(publish.Extractor): """Extract viewport thumbnail. @@ -34,54 +32,6 @@ class ExtractThumbnail(publish.Extractor): self.log ) - preset = lib.load_capture_preset(data=capture_preset) - - # "isolate_view" will already have been applied at creation, so we'll - # ignore it here. - preset.pop("isolate_view") - - override_viewport_options = ( - capture_preset["Viewport Options"]["override_viewport_options"] - ) - - preset["camera"] = camera - preset["start_frame"] = instance.data["frameStart"] - preset["end_frame"] = instance.data["frameStart"] - preset["camera_options"] = { - "displayGateMask": False, - "displayResolution": False, - "displayFilmGate": False, - "displayFieldChart": False, - "displaySafeAction": False, - "displaySafeTitle": False, - "displayFilmPivot": False, - "displayFilmOrigin": False, - "overscan": 1.0, - "depthOfField": cmds.getAttr("{0}.depthOfField".format(camera)), - } - # Set resolution variables from capture presets - width_preset = capture_preset["Resolution"]["width"] - height_preset = capture_preset["Resolution"]["height"] - # Set resolution variables from asset values - asset_data = instance.data["assetEntity"]["data"] - asset_width = asset_data.get("resolutionWidth") - asset_height = asset_data.get("resolutionHeight") - review_instance_width = instance.data.get("review_width") - review_instance_height = instance.data.get("review_height") - # Tests if project resolution is set, - # if it is a value other than zero, that value is - # used, if not then the asset resolution is - # used - if review_instance_width and review_instance_height: - preset["width"] = review_instance_width - preset["height"] = review_instance_height - elif width_preset and height_preset: - preset["width"] = width_preset - preset["height"] = height_preset - elif asset_width and asset_height: - preset["width"] = asset_width - preset["height"] = asset_height - # Create temp directory for thumbnail # - this is to avoid "override" of source file dst_staging = tempfile.mkdtemp(prefix="pyblish_tmp_") @@ -93,59 +43,13 @@ class ExtractThumbnail(publish.Extractor): path = os.path.join(dst_staging, filename) self.log.debug("Outputting images to %s" % path) + preset = lib.get_presets( + instance, camera, path, + start=1, end=1, + capture_preset=capture_preset) + path = lib.capture_with_preset(preset, instance) - preset["filename"] = path - preset["overwrite"] = True - - cmds.refresh(force=True) - - refreshFrameInt = int(cmds.playbackOptions(q=True, minTime=True)) - cmds.currentTime(refreshFrameInt - 1, edit=True) - cmds.currentTime(refreshFrameInt, edit=True) - - # Use displayLights setting from instance - key = "displayLights" - preset["viewport_options"][key] = instance.data[key] - - # Override transparency if requested. - transparency = instance.data.get("transparency", 0) - if transparency != 0: - preset["viewport2_options"]["transparencyAlgorithm"] = transparency - - # Isolate view is requested by having objects in the set besides a - # camera. If there is only 1 member it'll be the camera because we - # validate to have 1 camera only. - if instance.data["isolate"] and len(instance.data["setMembers"]) > 1: - preset["isolate"] = instance.data["setMembers"] - - # Show or Hide Image Plane - image_plane = instance.data.get("imagePlane", True) - if "viewport_options" in preset: - preset["viewport_options"]["imagePlane"] = image_plane - else: - preset["viewport_options"] = {"imagePlane": image_plane} - - # Disable Pan/Zoom. - preset.pop("pan_zoom", None) - preset["camera_options"]["panZoomEnabled"] = instance.data["panZoom"] - - with lib.maintained_time(): - # Force viewer to False in call to capture because we have our own - # viewer opening call to allow a signal to trigger between - # playblast and viewer - preset["viewer"] = False - - # Update preset with current panel setting - # if override_viewport_options is turned off - panel = cmds.getPanel(withFocus=True) or "" - if not override_viewport_options and "modelPanel" in panel: - panel_preset = capture.parse_active_view() - preset.update(panel_preset) - cmds.setFocus(panel) - - path = lib.capture_with_preset(preset) - - playblast = self._fix_playblast_output_path(path) + playblast = self._fix_playblast_output_path(path) _, thumbnail = os.path.split(playblast) From 25e216b0c419c05067a3eec1cbf8473c9d8d2297 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 20 Dec 2023 17:31:31 +0800 Subject: [PATCH 092/183] hound --- openpype/hosts/maya/api/lib.py | 220 +++++++++++++++++---------------- 1 file changed, 111 insertions(+), 109 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 0dd18bb978..6d30a58506 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -223,7 +223,8 @@ def capture_with_preset(preset, instance): ) with ExitStack() as stack: stack.enter_context(maintained_time()) - stack.enter_context(panel_camera(instance.data["panel"], preset["camera"])) + stack.enter_context(panel_camera( + instance.data["panel"], preset["camera"])) if preset["viewport_options"].get("textures"): stack.enter_context(material_loading_mode()) if preset["viewport_options"].get("reloadTextures"): @@ -240,6 +241,7 @@ def capture_with_preset(preset, instance): return path + def get_presets(instance, camera, path, start, end, capture_preset): """Function for getting all the data of preset options for playblast capturing @@ -255,133 +257,133 @@ def get_presets(instance, camera, path, start, end, capture_preset): Returns: _type_: _description_ """ - preset = load_capture_preset(data=capture_preset) + preset = load_capture_preset(data=capture_preset) - # "isolate_view" will already have been applied at creation, so we'll - # ignore it here. - preset.pop("isolate_view") + # "isolate_view" will already have been applied at creation, so we'll + # ignore it here. + preset.pop("isolate_view") - # Set resolution variables from capture presets - width_preset = capture_preset["Resolution"]["width"] - height_preset = capture_preset["Resolution"]["height"] + # Set resolution variables from capture presets + width_preset = capture_preset["Resolution"]["width"] + height_preset = capture_preset["Resolution"]["height"] - # Set resolution variables from asset values - asset_data = instance.data["assetEntity"]["data"] - asset_width = asset_data.get("resolutionWidth") - asset_height = asset_data.get("resolutionHeight") - review_instance_width = instance.data.get("review_width") - review_instance_height = instance.data.get("review_height") - preset["camera"] = camera + # Set resolution variables from asset values + asset_data = instance.data["assetEntity"]["data"] + asset_width = asset_data.get("resolutionWidth") + asset_height = asset_data.get("resolutionHeight") + review_instance_width = instance.data.get("review_width") + review_instance_height = instance.data.get("review_height") + preset["camera"] = camera - # Tests if project resolution is set, - # if it is a value other than zero, that value is - # used, if not then the asset resolution is - # used - if review_instance_width and review_instance_height: - preset["width"] = review_instance_width - preset["height"] = review_instance_height - elif width_preset and height_preset: - preset["width"] = width_preset - preset["height"] = height_preset - elif asset_width and asset_height: - preset["width"] = asset_width - preset["height"] = asset_height - preset["start_frame"] = start - preset["end_frame"] = end + # Tests if project resolution is set, + # if it is a value other than zero, that value is + # used, if not then the asset resolution is + # used + if review_instance_width and review_instance_height: + preset["width"] = review_instance_width + preset["height"] = review_instance_height + elif width_preset and height_preset: + preset["width"] = width_preset + preset["height"] = height_preset + elif asset_width and asset_height: + preset["width"] = asset_width + preset["height"] = asset_height + preset["start_frame"] = start + preset["end_frame"] = end - # Enforce persisting camera depth of field - camera_options = preset.setdefault("camera_options", {}) - camera_options["depthOfField"] = cmds.getAttr( - "{0}.depthOfField".format(camera)) + # Enforce persisting camera depth of field + camera_options = preset.setdefault("camera_options", {}) + camera_options["depthOfField"] = cmds.getAttr( + "{0}.depthOfField".format(camera)) - preset["filename"] = path - preset["overwrite"] = True + preset["filename"] = path + preset["overwrite"] = True - cmds.refresh(force=True) + cmds.refresh(force=True) - refreshFrameInt = int(cmds.playbackOptions(q=True, minTime=True)) - cmds.currentTime(refreshFrameInt - 1, edit=True) - cmds.currentTime(refreshFrameInt, edit=True) + refreshFrameInt = int(cmds.playbackOptions(q=True, minTime=True)) + cmds.currentTime(refreshFrameInt - 1, edit=True) + cmds.currentTime(refreshFrameInt, edit=True) - # Use displayLights setting from instance - key = "displayLights" - preset["viewport_options"][key] = instance.data[key] + # Use displayLights setting from instance + key = "displayLights" + preset["viewport_options"][key] = instance.data[key] - # Override transparency if requested. - transparency = instance.data.get("transparency", 0) - if transparency != 0: - preset["viewport2_options"]["transparencyAlgorithm"] = transparency + # Override transparency if requested. + transparency = instance.data.get("transparency", 0) + if transparency != 0: + preset["viewport2_options"]["transparencyAlgorithm"] = transparency - # Isolate view is requested by having objects in the set besides a - # camera. If there is only 1 member it'll be the camera because we - # validate to have 1 camera only. - if instance.data["isolate"] and len(instance.data["setMembers"]) > 1: - preset["isolate"] = instance.data["setMembers"] + # Isolate view is requested by having objects in the set besides a + # camera. If there is only 1 member it'll be the camera because we + # validate to have 1 camera only. + if instance.data["isolate"] and len(instance.data["setMembers"]) > 1: + preset["isolate"] = instance.data["setMembers"] - # Show/Hide image planes on request. - image_plane = instance.data.get("imagePlane", True) - if "viewport_options" in preset: - preset["viewport_options"]["imagePlane"] = image_plane - else: - preset["viewport_options"] = {"imagePlane": image_plane} + # Show/Hide image planes on request. + image_plane = instance.data.get("imagePlane", True) + if "viewport_options" in preset: + preset["viewport_options"]["imagePlane"] = image_plane + else: + preset["viewport_options"] = {"imagePlane": image_plane} - # Disable Pan/Zoom. - pan_zoom = cmds.getAttr("{}.panZoomEnabled".format(preset["camera"])) - preset.pop("pan_zoom", None) - preset["camera_options"]["panZoomEnabled"] = instance.data["panZoom"] + # Disable Pan/Zoom. + pan_zoom = cmds.getAttr("{}.panZoomEnabled".format(preset["camera"])) + preset.pop("pan_zoom", None) + preset["camera_options"]["panZoomEnabled"] = instance.data["panZoom"] - # Need to explicitly enable some viewport changes so the viewport is - # refreshed ahead of playblasting. - keys = [ - "useDefaultMaterial", - "wireframeOnShaded", - "xray", - "jointXray", - "backfaceCulling", - "textures" - ] - viewport_defaults = {} - for key in keys: - viewport_defaults[key] = cmds.modelEditor( - instance.data["panel"], query=True, **{key: True} + # Need to explicitly enable some viewport changes so the viewport is + # refreshed ahead of playblasting. + keys = [ + "useDefaultMaterial", + "wireframeOnShaded", + "xray", + "jointXray", + "backfaceCulling", + "textures" + ] + viewport_defaults = {} + for key in keys: + viewport_defaults[key] = cmds.modelEditor( + instance.data["panel"], query=True, **{key: True} + ) + if preset["viewport_options"][key]: + cmds.modelEditor( + instance.data["panel"], edit=True, **{key: True} ) - if preset["viewport_options"][key]: - cmds.modelEditor( - instance.data["panel"], edit=True, **{key: True} - ) - override_viewport_options = ( - capture_preset["Viewport Options"]["override_viewport_options"] + override_viewport_options = ( + capture_preset["Viewport Options"]["override_viewport_options"] + ) + + # Force viewer to False in call to capture because we have our own + # viewer opening call to allow a signal to trigger between + # playblast and viewer + preset["viewer"] = False + + # Update preset with current panel setting + # if override_viewport_options is turned off + if not override_viewport_options: + panel_preset = capture.parse_view(instance.data["panel"]) + panel_preset.pop("camera") + preset.update(panel_preset) + + path = capture_with_preset( + preset, instance) + + # Restoring viewport options. + if viewport_defaults: + cmds.modelEditor( + instance.data["panel"], edit=True, **viewport_defaults ) - # Force viewer to False in call to capture because we have our own - # viewer opening call to allow a signal to trigger between - # playblast and viewer - preset["viewer"] = False + try: + cmds.setAttr( + "{}.panZoomEnabled".format(preset["camera"]), pan_zoom) + except RuntimeError: + self.log.warning("Cannot restore Pan/Zoom settings.") - # Update preset with current panel setting - # if override_viewport_options is turned off - if not override_viewport_options: - panel_preset = capture.parse_view(instance.data["panel"]) - panel_preset.pop("camera") - preset.update(panel_preset) - - path = capture_with_preset( - preset, instance) - - # Restoring viewport options. - if viewport_defaults: - cmds.modelEditor( - instance.data["panel"], edit=True, **viewport_defaults - ) - - try: - cmds.setAttr( - "{}.panZoomEnabled".format(preset["camera"]), pan_zoom) - except RuntimeError: - self.log.warning("Cannot restore Pan/Zoom settings.") - - return preset + return preset @contextlib.contextmanager From 29876a496edce570cccf8e0a5e7c4d36cf210de5 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 20 Dec 2023 17:32:27 +0800 Subject: [PATCH 093/183] hound --- openpype/hosts/maya/api/lib.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 6d30a58506..8749ac0d6a 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -195,16 +195,6 @@ def panel_camera(panel, camera): cmds.modelPanel(panel, edit=True, camera=original_camera) -@contextlib.contextmanager -def panel_camera(panel, camera): - original_camera = cmds.modelPanel(panel, query=True, camera=True) - try: - cmds.modelPanel(panel, edit=True, camera=camera) - yield - finally: - cmds.modelPanel(panel, edit=True, camera=original_camera) - - def capture_with_preset(preset, instance): """Function for playblast capturing with the preset options From 09a7ecdcc611c9db87fbcdbfbc1d274057e999b5 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 20 Dec 2023 11:18:25 +0100 Subject: [PATCH 094/183] Fix representation count (#6072) --- .../hosts/aftereffects/test_publish_in_aftereffects_legacy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/hosts/aftereffects/test_publish_in_aftereffects_legacy.py b/tests/integration/hosts/aftereffects/test_publish_in_aftereffects_legacy.py index b99db24e75..0d97da6b8b 100644 --- a/tests/integration/hosts/aftereffects/test_publish_in_aftereffects_legacy.py +++ b/tests/integration/hosts/aftereffects/test_publish_in_aftereffects_legacy.py @@ -60,7 +60,7 @@ class TestPublishInAfterEffects(AELocalPublishTestClass): name="renderTest_taskMain")) failures.append( - DBAssert.count_of_types(dbcon, "representation", 2)) + DBAssert.count_of_types(dbcon, "representation", 3)) additional_args = {"context.subset": "workfileTest_task", "context.ext": "aep"} From af87fdf657adb7ca5dd6f34bdd41335dc2b9efa7 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 20 Dec 2023 21:31:19 +0800 Subject: [PATCH 095/183] the resourceDir for texture also supports without image search path --- .../maya/plugins/publish/collect_yeti_rig.py | 29 ++++++++----------- .../maya/plugins/publish/extract_yeti_rig.py | 16 ++++++---- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py b/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py index 835934e1bf..d67c51b895 100644 --- a/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py +++ b/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py @@ -124,19 +124,19 @@ class CollectYetiRig(pyblish.api.InstancePlugin): image_search_paths = [p for p in image_search_paths.split(os.path.pathsep) if p] - # find all ${TOKEN} tokens and replace them with $TOKEN env. variable - image_search_paths = self._replace_tokens(image_search_paths) + # find all ${TOKEN} tokens and replace them with $TOKEN env. variable + image_search_paths = self._replace_tokens(image_search_paths) - # List all related textures - texture_nodes = cmds.pgYetiGraph( - node, listNodes=True, type="texture") - texture_filenames = [ - cmds.pgYetiGraph( - node, node=texture_node, - param="file_name", getParamValue=True) - for texture_node in texture_nodes - ] - self.log.debug("Found %i texture(s)" % len(texture_filenames)) + # List all related textures + texture_nodes = cmds.pgYetiGraph( + node, listNodes=True, type="texture") + texture_filenames = [ + cmds.pgYetiGraph( + node, node=texture_node, + param="file_name", getParamValue=True) + for texture_node in texture_nodes + ] + self.log.debug("Found %i texture(s)" % len(texture_filenames)) # Get all reference nodes reference_nodes = cmds.pgYetiGraph(node, @@ -144,11 +144,6 @@ class CollectYetiRig(pyblish.api.InstancePlugin): type="reference") self.log.debug("Found %i reference node(s)" % len(reference_nodes)) - if texture_filenames and not image_search_paths: - raise ValueError("pgYetiMaya node '%s' is missing the path to the " - "files in the 'imageSearchPath " - "atttribute'" % node) - # Collect all texture files # find all ${TOKEN} tokens and replace them with $TOKEN env. variable texture_filenames = self._replace_tokens(texture_filenames) diff --git a/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py b/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py index da67cb911f..a76d15d43e 100644 --- a/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py +++ b/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py @@ -142,12 +142,18 @@ class ExtractYetiRig(publish.Extractor): instance.data['transfers'] = [] for resource in instance.data.get('resources', []): - for file in resource['files']: - src = file - dst = os.path.join(image_search_path, os.path.basename(file)) - instance.data['transfers'].append([src, dst]) + if resource["files"]: + for file in resource['files']: + src = file + dst = os.path.join(image_search_path, os.path.basename(file)) + instance.data['transfers'].append([src, dst]) + else: + for file in resource['source']: + src = file if os.path.isabs(file) else os.path.abspath(file) + dst = os.path.join(image_search_path, os.path.basename(file)) + instance.data['transfers'].append([src, dst]) - self.log.debug("adding transfer {} -> {}". format(src, dst)) + self.log.debug("adding transfer {} -> {}". format(src, dst)) # Ensure the imageSearchPath is being remapped to the publish folder attr_value = {"%s.imageSearchPath" % n: str(image_search_path) for From da93e19ca9f2832eb30774b7db6b82aff7f0dfc7 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 20 Dec 2023 21:32:56 +0800 Subject: [PATCH 096/183] hound --- .../hosts/maya/plugins/publish/extract_yeti_rig.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py b/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py index a76d15d43e..c0c286dcc0 100644 --- a/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py +++ b/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py @@ -145,12 +145,16 @@ class ExtractYetiRig(publish.Extractor): if resource["files"]: for file in resource['files']: src = file - dst = os.path.join(image_search_path, os.path.basename(file)) + dst = os.path.join( + image_search_path, os.path.basename(file)) instance.data['transfers'].append([src, dst]) else: for file in resource['source']: - src = file if os.path.isabs(file) else os.path.abspath(file) - dst = os.path.join(image_search_path, os.path.basename(file)) + src = ( + file if os.path.isabs(file) else os.path.abspath(file) + ) + dst = os.path.join( + image_search_path, os.path.basename(file)) instance.data['transfers'].append([src, dst]) self.log.debug("adding transfer {} -> {}". format(src, dst)) From 19666f7df32f58490e88cea2ea6f4b8978ebf82d Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 20 Dec 2023 15:48:47 +0100 Subject: [PATCH 097/183] Refactor integrate_ftrack_instances.py to update asset names for multiple reviewable items - Add a condition to also check if multiple_reviewable is True before updating the asset name. --- .../modules/ftrack/plugins/publish/integrate_ftrack_instances.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openpype/modules/ftrack/plugins/publish/integrate_ftrack_instances.py b/openpype/modules/ftrack/plugins/publish/integrate_ftrack_instances.py index a3e6bc25c5..04186425f9 100644 --- a/openpype/modules/ftrack/plugins/publish/integrate_ftrack_instances.py +++ b/openpype/modules/ftrack/plugins/publish/integrate_ftrack_instances.py @@ -354,6 +354,7 @@ class IntegrateFtrackInstance(pyblish.api.InstancePlugin): if ( not self.keep_first_subset_name_for_review and extended_asset_name + and multiple_reviewable ): other_item["asset_data"]["name"] = extended_asset_name From a09fc5814850673faf173acf73ce39d75dff538e Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 20 Dec 2023 15:56:21 +0100 Subject: [PATCH 098/183] flipping order of condition arguments --- .../ftrack/plugins/publish/integrate_ftrack_instances.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/modules/ftrack/plugins/publish/integrate_ftrack_instances.py b/openpype/modules/ftrack/plugins/publish/integrate_ftrack_instances.py index 04186425f9..4b1307f9f0 100644 --- a/openpype/modules/ftrack/plugins/publish/integrate_ftrack_instances.py +++ b/openpype/modules/ftrack/plugins/publish/integrate_ftrack_instances.py @@ -352,9 +352,9 @@ class IntegrateFtrackInstance(pyblish.api.InstancePlugin): # add extended name if any if ( - not self.keep_first_subset_name_for_review + multiple_reviewable + and not self.keep_first_subset_name_for_review and extended_asset_name - and multiple_reviewable ): other_item["asset_data"]["name"] = extended_asset_name From 0ae3ef03d22fbf13ae1dd7f4eee8d5c7cedac11f Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 20 Dec 2023 23:41:39 +0800 Subject: [PATCH 099/183] refactor the capture and capture preset function --- openpype/hosts/maya/api/lib.py | 108 +++++++++--------- .../maya/plugins/publish/extract_playblast.py | 4 +- .../maya/plugins/publish/extract_thumbnail.py | 20 +++- 3 files changed, 73 insertions(+), 59 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 8749ac0d6a..c1d1a43d1e 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -195,7 +195,7 @@ def panel_camera(panel, camera): cmds.modelPanel(panel, edit=True, camera=original_camera) -def capture_with_preset(preset, instance): +def playblast_capture(preset, instance): """Function for playblast capturing with the preset options Args: @@ -215,24 +215,22 @@ def capture_with_preset(preset, instance): stack.enter_context(maintained_time()) stack.enter_context(panel_camera( instance.data["panel"], preset["camera"])) + stack.enter_context(viewport_default_options(preset, instance)) if preset["viewport_options"].get("textures"): - stack.enter_context(material_loading_mode()) + material_loading_mode() if preset["viewport_options"].get("reloadTextures"): # Regenerate all UDIM tiles previews reload_all_udim_tile_previews() - # not supported by `capture` - preset["viewport_options"].pop("reloadTextures", None) - path = capture.capture(log=self.log, **preset) - self.log.debug("playblast path {}".format(path)) - else: - preset["viewport_options"].pop("reloadTextures", None) - path = capture.capture(log=self.log, **preset) - self.log.debug("playblast path {}".format(path)) + # not supported by `capture` + preset["viewport_options"].pop("reloadTextures", None) + path = capture.capture(log=self.log, **preset) + self.log.debug("playblast path {}".format(path)) return path -def get_presets(instance, camera, path, start, end, capture_preset): +def generate_capture_preset(instance, camera, path, + start=None, end=None, capture_preset={}): """Function for getting all the data of preset options for playblast capturing @@ -317,35 +315,6 @@ def get_presets(instance, camera, path, start, end, capture_preset): else: preset["viewport_options"] = {"imagePlane": image_plane} - # Disable Pan/Zoom. - pan_zoom = cmds.getAttr("{}.panZoomEnabled".format(preset["camera"])) - preset.pop("pan_zoom", None) - preset["camera_options"]["panZoomEnabled"] = instance.data["panZoom"] - - # Need to explicitly enable some viewport changes so the viewport is - # refreshed ahead of playblasting. - keys = [ - "useDefaultMaterial", - "wireframeOnShaded", - "xray", - "jointXray", - "backfaceCulling", - "textures" - ] - viewport_defaults = {} - for key in keys: - viewport_defaults[key] = cmds.modelEditor( - instance.data["panel"], query=True, **{key: True} - ) - if preset["viewport_options"][key]: - cmds.modelEditor( - instance.data["panel"], edit=True, **{key: True} - ) - - override_viewport_options = ( - capture_preset["Viewport Options"]["override_viewport_options"] - ) - # Force viewer to False in call to capture because we have our own # viewer opening call to allow a signal to trigger between # playblast and viewer @@ -353,29 +322,58 @@ def get_presets(instance, camera, path, start, end, capture_preset): # Update preset with current panel setting # if override_viewport_options is turned off + override_viewport_options = ( + capture_preset["Viewport Options"]["override_viewport_options"] + ) if not override_viewport_options: panel_preset = capture.parse_view(instance.data["panel"]) panel_preset.pop("camera") preset.update(panel_preset) - path = capture_with_preset( - preset, instance) - - # Restoring viewport options. - if viewport_defaults: - cmds.modelEditor( - instance.data["panel"], edit=True, **viewport_defaults - ) - - try: - cmds.setAttr( - "{}.panZoomEnabled".format(preset["camera"]), pan_zoom) - except RuntimeError: - self.log.warning("Cannot restore Pan/Zoom settings.") - return preset +@contextlib.contextmanager +def viewport_default_options(preset, instance): + # Disable Pan/Zoom. + pan_zoom = cmds.getAttr("{}.panZoomEnabled".format(preset["camera"])) + preset.pop("pan_zoom", None) + preset["camera_options"]["panZoomEnabled"] = instance.data["panZoom"] + + viewport_defaults = {} + # Need to explicitly enable some viewport changes so the viewport is + # refreshed ahead of playblasting. + try: + keys = [ + "useDefaultMaterial", + "wireframeOnShaded", + "xray", + "jointXray", + "backfaceCulling", + "textures" + ] + for key in keys: + viewport_defaults[key] = cmds.modelEditor( + instance.data["panel"], query=True, **{key: True} + ) + if preset["viewport_options"][key]: + cmds.modelEditor( + instance.data["panel"], edit=True, **{key: True} + ) + yield + finally: + # Restoring viewport options. + if viewport_defaults: + cmds.modelEditor( + instance.data["panel"], edit=True, **viewport_defaults + ) + try: + cmds.setAttr( + "{}.panZoomEnabled".format(preset["camera"]), pan_zoom) + except RuntimeError: + self.log.warning("Cannot restore Pan/Zoom settings.") + + @contextlib.contextmanager def material_loading_mode(mode="immediate"): """Set material loading mode during context""" diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 192eb2639d..5a2beaca12 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -53,11 +53,11 @@ class ExtractPlayblast(publish.Extractor): self.log.debug("Outputting images to %s" % path) # get cameras camera = instance.data["review_camera"] - preset = lib.get_presets( + preset = lib.generate_capture_preset( instance, camera, path, start=start, end=end, capture_preset=capture_preset) - path = lib.capture_with_preset(preset, instance) + path = lib.playblast_capture(preset, instance) collected_files = os.listdir(stagingdir) patterns = [clique.PATTERNS["frames"]] diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 09665a1a58..b4931b637f 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -4,6 +4,7 @@ import tempfile from openpype.pipeline import publish from openpype.hosts.maya.api import lib +from maya.cmds import cmds class ExtractThumbnail(publish.Extractor): @@ -43,11 +44,26 @@ class ExtractThumbnail(publish.Extractor): path = os.path.join(dst_staging, filename) self.log.debug("Outputting images to %s" % path) - preset = lib.get_presets( + + preset = lib.generate_capture_preset( instance, camera, path, start=1, end=1, capture_preset=capture_preset) - path = lib.capture_with_preset(preset, instance) + + preset["camera_options"].update({ + "displayGateMask": False, + "displayResolution": False, + "displayFilmGate": False, + "displayFieldChart": False, + "displaySafeAction": False, + "displaySafeTitle": False, + "displayFilmPivot": False, + "displayFilmOrigin": False, + "overscan": 1.0, + "depthOfField": cmds.getAttr("{0}.depthOfField".format(camera)), + } + ) + path = lib.playblast_capture(preset, instance) playblast = self._fix_playblast_output_path(path) From 04f9d4caaa40410995c84ef89821d9a7b525a70f Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 20 Dec 2023 23:44:40 +0800 Subject: [PATCH 100/183] hound --- openpype/hosts/maya/api/lib.py | 2 +- .../maya/plugins/publish/extract_thumbnail.py | 21 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index c1d1a43d1e..bc66ec350f 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -230,7 +230,7 @@ def playblast_capture(preset, instance): def generate_capture_preset(instance, camera, path, - start=None, end=None, capture_preset={}): + start=None, end=None, capture_preset=None): """Function for getting all the data of preset options for playblast capturing diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index b4931b637f..05fad0025d 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -51,16 +51,17 @@ class ExtractThumbnail(publish.Extractor): capture_preset=capture_preset) preset["camera_options"].update({ - "displayGateMask": False, - "displayResolution": False, - "displayFilmGate": False, - "displayFieldChart": False, - "displaySafeAction": False, - "displaySafeTitle": False, - "displayFilmPivot": False, - "displayFilmOrigin": False, - "overscan": 1.0, - "depthOfField": cmds.getAttr("{0}.depthOfField".format(camera)), + "displayGateMask": False, + "displayResolution": False, + "displayFilmGate": False, + "displayFieldChart": False, + "displaySafeAction": False, + "displaySafeTitle": False, + "displayFilmPivot": False, + "displayFilmOrigin": False, + "overscan": 1.0, + "depthOfField": cmds.getAttr( + "{0}.depthOfField".format(camera)) } ) path = lib.playblast_capture(preset, instance) From 746e34aa559126b7eea2901839366fe6fea06b3d Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 20 Dec 2023 23:46:10 +0800 Subject: [PATCH 101/183] hound --- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 05fad0025d..6f61515019 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -60,8 +60,7 @@ class ExtractThumbnail(publish.Extractor): "displayFilmPivot": False, "displayFilmOrigin": False, "overscan": 1.0, - "depthOfField": cmds.getAttr( - "{0}.depthOfField".format(camera)) + "depthOfField": cmds.getAttr("{0}.depthOfField".format(camera)), # noqa } ) path = lib.playblast_capture(preset, instance) From 8ce8d72c0341d1003b6632395fe760fe7098a72e Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 20 Dec 2023 23:56:40 +0800 Subject: [PATCH 102/183] add reloadTextures argument back to cmds.ogs --- openpype/hosts/maya/api/lib.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index bc66ec350f..4db7269d9b 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -183,6 +183,7 @@ def reload_all_udim_tile_previews(): for texture_file in texture_files: if cmds.getAttr("{}.uvTilingMode".format(texture_file)) > 0: cmds.ogs(regenerateUVTilePreview=texture_file) + cmds.ogs(reloadTextures=True) @contextlib.contextmanager From 4b6e5e29dcb2a3ec21ed5437690e5b11a3bfcb31 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 20 Dec 2023 23:59:00 +0800 Subject: [PATCH 103/183] add material_loading_mode into enter_context --- openpype/hosts/maya/api/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 4db7269d9b..9892fd0255 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -218,7 +218,7 @@ def playblast_capture(preset, instance): instance.data["panel"], preset["camera"])) stack.enter_context(viewport_default_options(preset, instance)) if preset["viewport_options"].get("textures"): - material_loading_mode() + stack.enter_context(material_loading_mode()) if preset["viewport_options"].get("reloadTextures"): # Regenerate all UDIM tiles previews reload_all_udim_tile_previews() From 64d39613fa4bbd2459cc0d66c73e7d1fb8329831 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Wed, 20 Dec 2023 18:34:37 +0100 Subject: [PATCH 104/183] Python console widget: Save registry fix (#6076) * it is possible to call 'save_registry' only when window is showed up * used more clever way how to determine if should be saved --- .../python_console_interpreter/window/widgets.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/openpype/modules/python_console_interpreter/window/widgets.py b/openpype/modules/python_console_interpreter/window/widgets.py index 28950f8369..d046c0de50 100644 --- a/openpype/modules/python_console_interpreter/window/widgets.py +++ b/openpype/modules/python_console_interpreter/window/widgets.py @@ -354,7 +354,7 @@ class PythonInterpreterWidget(QtWidgets.QWidget): default_width = 1000 default_height = 600 - def __init__(self, parent=None): + def __init__(self, allow_save_registry=True, parent=None): super(PythonInterpreterWidget, self).__init__(parent) self.setWindowTitle("{} Console".format( @@ -414,6 +414,8 @@ class PythonInterpreterWidget(QtWidgets.QWidget): self._first_show = True self._splitter_size_ratio = None + self._allow_save_registry = allow_save_registry + self._registry_saved = True self._init_from_registry() @@ -457,6 +459,11 @@ class PythonInterpreterWidget(QtWidgets.QWidget): pass def save_registry(self): + # Window was not showed + if not self._allow_save_registry or self._registry_saved: + return + + self._registry_saved = True setting_registry = PythonInterpreterRegistry() setting_registry.set_item("width", self.width()) @@ -650,6 +657,7 @@ class PythonInterpreterWidget(QtWidgets.QWidget): def showEvent(self, event): self._line_check_timer.start() + self._registry_saved = False super(PythonInterpreterWidget, self).showEvent(event) # First show setup if self._first_show: From bf0ad7225ff778dec1eed822f513f04b674756bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Wed, 20 Dec 2023 18:38:59 +0100 Subject: [PATCH 105/183] :recycle: remove muster related code --- .../plugins/publish/submit_publish_job.py | 46 ++++++------------- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/submit_publish_job.py b/openpype/modules/deadline/plugins/publish/submit_publish_job.py index c9019b496b..228aa3ec81 100644 --- a/openpype/modules/deadline/plugins/publish/submit_publish_job.py +++ b/openpype/modules/deadline/plugins/publish/submit_publish_job.py @@ -89,7 +89,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin, """ - label = "Submit image sequence jobs to Deadline or Muster" + label = "Submit Image Publishing job to Deadline" order = pyblish.api.IntegratorOrder + 0.2 icon = "tractor" @@ -582,16 +582,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin, ''' - render_job = None - submission_type = "" - if instance.data.get("toBeRenderedOn") == "deadline": - render_job = instance.data.pop("deadlineSubmissionJob", None) - submission_type = "deadline" - - if instance.data.get("toBeRenderedOn") == "muster": - render_job = instance.data.pop("musterSubmissionJob", None) - submission_type = "muster" - + render_job = instance.data.pop("deadlineSubmissionJob", None) if not render_job and instance.data.get("tileRendering") is False: raise AssertionError(("Cannot continue without valid Deadline " "or Muster submission.")) @@ -624,21 +615,19 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin, "FTRACK_SERVER": os.environ.get("FTRACK_SERVER"), } - deadline_publish_job_id = None - if submission_type == "deadline": - # get default deadline webservice url from deadline module - self.deadline_url = instance.context.data["defaultDeadline"] - # if custom one is set in instance, use that - if instance.data.get("deadlineUrl"): - self.deadline_url = instance.data.get("deadlineUrl") - assert self.deadline_url, "Requires Deadline Webservice URL" + # get default deadline webservice url from deadline module + self.deadline_url = instance.context.data["defaultDeadline"] + # if custom one is set in instance, use that + if instance.data.get("deadlineUrl"): + self.deadline_url = instance.data.get("deadlineUrl") + assert self.deadline_url, "Requires Deadline Webservice URL" - deadline_publish_job_id = \ - self._submit_deadline_post_job(instance, render_job, instances) + deadline_publish_job_id = \ + self._submit_deadline_post_job(instance, render_job, instances) - # Inject deadline url to instances. - for inst in instances: - inst["deadlineUrl"] = self.deadline_url + # Inject deadline url to instances. + for inst in instances: + inst["deadlineUrl"] = self.deadline_url # publish job file publish_job = { @@ -664,15 +653,6 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin, if audio_file and os.path.isfile(audio_file): publish_job.update({"audio": audio_file}) - # pass Ftrack credentials in case of Muster - if submission_type == "muster": - ftrack = { - "FTRACK_API_USER": os.environ.get("FTRACK_API_USER"), - "FTRACK_API_KEY": os.environ.get("FTRACK_API_KEY"), - "FTRACK_SERVER": os.environ.get("FTRACK_SERVER"), - } - publish_job.update({"ftrack": ftrack}) - metadata_path, rootless_metadata_path = \ create_metadata_path(instance, anatomy) From 47af46c29f17303f540530dd1869460fca0445a1 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Wed, 20 Dec 2023 22:08:09 +0200 Subject: [PATCH 106/183] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20=20Kuba's=20commen?= =?UTF-8?q?t=20-=20follow=20pyblish=20key=20naming=20convention?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openpype/hosts/houdini/plugins/publish/collect_arnold_rop.py | 2 +- openpype/hosts/houdini/plugins/publish/collect_mantra_rop.py | 2 +- openpype/hosts/houdini/plugins/publish/collect_vray_rop.py | 2 +- openpype/modules/deadline/abstract_submit_deadline.py | 2 +- .../deadline/plugins/publish/submit_houdini_render_deadline.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openpype/hosts/houdini/plugins/publish/collect_arnold_rop.py b/openpype/hosts/houdini/plugins/publish/collect_arnold_rop.py index 45d950106e..ffc2a526a3 100644 --- a/openpype/hosts/houdini/plugins/publish/collect_arnold_rop.py +++ b/openpype/hosts/houdini/plugins/publish/collect_arnold_rop.py @@ -42,7 +42,7 @@ class CollectArnoldROPRenderProducts(pyblish.api.InstancePlugin): # Store whether we are splitting the render job (export + render) split_render = bool(rop.parm("ar_ass_export_enable").eval()) - instance.data["split_render"] = split_render + instance.data["splitRender"] = split_render export_prefix = None export_products = [] if split_render: diff --git a/openpype/hosts/houdini/plugins/publish/collect_mantra_rop.py b/openpype/hosts/houdini/plugins/publish/collect_mantra_rop.py index a28b425057..64ef20f4e7 100644 --- a/openpype/hosts/houdini/plugins/publish/collect_mantra_rop.py +++ b/openpype/hosts/houdini/plugins/publish/collect_mantra_rop.py @@ -46,7 +46,7 @@ class CollectMantraROPRenderProducts(pyblish.api.InstancePlugin): # Store whether we are splitting the render job (export + render) split_render = bool(rop.parm("soho_outputmode").eval()) - instance.data["split_render"] = split_render + instance.data["splitRender"] = split_render export_prefix = None export_products = [] if split_render: diff --git a/openpype/hosts/houdini/plugins/publish/collect_vray_rop.py b/openpype/hosts/houdini/plugins/publish/collect_vray_rop.py index 6e8fe1cc79..ad4fdb0da5 100644 --- a/openpype/hosts/houdini/plugins/publish/collect_vray_rop.py +++ b/openpype/hosts/houdini/plugins/publish/collect_vray_rop.py @@ -47,7 +47,7 @@ class CollectVrayROPRenderProducts(pyblish.api.InstancePlugin): # Store whether we are splitting the render job in an export + render split_render = rop.parm("render_export_mode").eval() == "2" - instance.data["split_render"] = split_render + instance.data["splitRender"] = split_render export_prefix = None export_products = [] if split_render: diff --git a/openpype/modules/deadline/abstract_submit_deadline.py b/openpype/modules/deadline/abstract_submit_deadline.py index 45aba560ba..002dfa5992 100644 --- a/openpype/modules/deadline/abstract_submit_deadline.py +++ b/openpype/modules/deadline/abstract_submit_deadline.py @@ -464,7 +464,7 @@ class AbstractSubmitDeadline(pyblish.api.InstancePlugin, self.log.info("Submitted job to Deadline: {}.".format(job_id)) # TODO: Find a way that's more generic and not render type specific - if instance.data.get("split_render"): + if instance.data.get("splitRender"): self.log.info("Splitting export and render in two jobs") self.log.info("Export job id: %s", job_id) render_job_info = self.get_job_info(dependency_job_ids=[job_id]) diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index b3e29c7e2d..c8960185b2 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -124,7 +124,7 @@ class HoudiniSubmitDeadline( # Whether Deadline render submission is being split in two # (extract + render) - split_render_job = instance.data.get("split_render") + split_render_job = instance.data.get("splitRender") # If there's some dependency job ids we can assume this is a render job # and not an export job From 0dd4d7b5059d8e1103a6d9a5edda8c04a578e5bb Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 20 Dec 2023 21:46:23 +0100 Subject: [PATCH 107/183] Code cleanup --- openpype/hosts/maya/api/lib.py | 145 +++++++++++++++++---------------- 1 file changed, 76 insertions(+), 69 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 9892fd0255..5c15bfba26 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -175,9 +175,7 @@ def maintained_selection(): def reload_all_udim_tile_previews(): - """Regenerate all UDIM tile preview in texture file - nodes during context - """ + """Regenerate all UDIM tile preview in texture file""" texture_files = cmds.ls(type="file") if texture_files: for texture_file in texture_files: @@ -188,6 +186,13 @@ def reload_all_udim_tile_previews(): @contextlib.contextmanager def panel_camera(panel, camera): + """Set modelPanel's camera during the context. + + Arguments: + panel (str): modelPanel name. + camera (str): camera name. + + """ original_camera = cmds.modelPanel(panel, query=True, camera=True) try: cmds.modelPanel(panel, edit=True, camera=camera) @@ -196,36 +201,48 @@ def panel_camera(panel, camera): cmds.modelPanel(panel, edit=True, camera=original_camera) -def playblast_capture(preset, instance): - """Function for playblast capturing with the preset options +def render_capture_preset(preset): + """Capture playblast with a preset. + + To generate the preset use `generate_capture_preset`. Args: preset (dict): preset options - instance (str): instance Returns: - _type_: _description_ + str: Output path of `capture.capture` """ + + # Force a refresh at the start of the timeline + # TODO (Question): Why do we need to do this? What bug does it solve? + # Is this for simulations? + cmds.refresh(force=True) + refresh_frame_int = int(cmds.playbackOptions(query=True, minTime=True)) + cmds.currentTime(refresh_frame_int - 1, edit=True) + cmds.currentTime(refresh_frame_int, edit=True) + if os.environ.get("OPENPYPE_DEBUG") == "1": log.debug( "Using preset: {}".format( json.dumps(preset, indent=4, sort_keys=True) ) ) + + # not supported by `capture` so we pop it off of the preset + reload_textures = preset["viewport_options"].pop("reloadTextures", True) + with ExitStack() as stack: stack.enter_context(maintained_time()) - stack.enter_context(panel_camera( - instance.data["panel"], preset["camera"])) - stack.enter_context(viewport_default_options(preset, instance)) + stack.enter_context(panel_camera(preset["panel"], preset["camera"])) + stack.enter_context(viewport_default_options(preset)) if preset["viewport_options"].get("textures"): - stack.enter_context(material_loading_mode()) - if preset["viewport_options"].get("reloadTextures"): + # Force immediate texture loading when to ensure + # all textures have loaded before the playblast starts + stack.enter_context(material_loading_mode("immediate")) + if reload_textures: # Regenerate all UDIM tiles previews reload_all_udim_tile_previews() - # not supported by `capture` - preset["viewport_options"].pop("reloadTextures", None) path = capture.capture(log=self.log, **preset) - self.log.debug("playblast path {}".format(path)) return path @@ -236,7 +253,7 @@ def generate_capture_preset(instance, camera, path, playblast capturing Args: - instance (str): instance + instance (pyblish.api.Instance): instance camera (str): review camera path (str): filepath start (int): frameStart @@ -244,10 +261,21 @@ def generate_capture_preset(instance, camera, path, capture_preset (dict): capture preset Returns: - _type_: _description_ + dict: Resulting preset """ preset = load_capture_preset(data=capture_preset) + preset["camera"] = camera + preset["start_frame"] = start + preset["end_frame"] = end + preset["filename"] = path + preset["overwrite"] = True + preset["panel"] = instance.data["panel"] + + # Disable viewer since we use the rendering logic for publishing + # We don't want to open the generated playblast in a viewer directly. + preset["viewer"] = False + # "isolate_view" will already have been applied at creation, so we'll # ignore it here. preset.pop("isolate_view") @@ -262,7 +290,6 @@ def generate_capture_preset(instance, camera, path, asset_height = asset_data.get("resolutionHeight") review_instance_width = instance.data.get("review_width") review_instance_height = instance.data.get("review_height") - preset["camera"] = camera # Tests if project resolution is set, # if it is a value other than zero, that value is @@ -277,31 +304,6 @@ def generate_capture_preset(instance, camera, path, elif asset_width and asset_height: preset["width"] = asset_width preset["height"] = asset_height - preset["start_frame"] = start - preset["end_frame"] = end - - # Enforce persisting camera depth of field - camera_options = preset.setdefault("camera_options", {}) - camera_options["depthOfField"] = cmds.getAttr( - "{0}.depthOfField".format(camera)) - - preset["filename"] = path - preset["overwrite"] = True - - cmds.refresh(force=True) - - refreshFrameInt = int(cmds.playbackOptions(q=True, minTime=True)) - cmds.currentTime(refreshFrameInt - 1, edit=True) - cmds.currentTime(refreshFrameInt, edit=True) - - # Use displayLights setting from instance - key = "displayLights" - preset["viewport_options"][key] = instance.data[key] - - # Override transparency if requested. - transparency = instance.data.get("transparency", 0) - if transparency != 0: - preset["viewport2_options"]["transparencyAlgorithm"] = transparency # Isolate view is requested by having objects in the set besides a # camera. If there is only 1 member it'll be the camera because we @@ -309,17 +311,26 @@ def generate_capture_preset(instance, camera, path, if instance.data["isolate"] and len(instance.data["setMembers"]) > 1: preset["isolate"] = instance.data["setMembers"] - # Show/Hide image planes on request. - image_plane = instance.data.get("imagePlane", True) - if "viewport_options" in preset: - preset["viewport_options"]["imagePlane"] = image_plane - else: - preset["viewport_options"] = {"imagePlane": image_plane} + # Override camera options + # Enforce persisting camera depth of field + camera_options = preset.setdefault("camera_options", {}) + camera_options["depthOfField"] = cmds.getAttr( + "{0}.depthOfField".format(camera) + ) - # Force viewer to False in call to capture because we have our own - # viewer opening call to allow a signal to trigger between - # playblast and viewer - preset["viewer"] = False + # Use Pan/Zoom from instance data instead of from preset + preset.pop("pan_zoom", None) + preset["camera_options"]["panZoomEnabled"] = instance.data["panZoom"] + + # Override viewport options by instance data + viewport_options = preset.setdefault("viewport_options", {}) + viewport_options["displayLights"] = instance.data["displayLights"] + viewport_options["imagePlane"] = instance.data.get("imagePlane", True) + + # Override transparency if requested. + transparency = instance.data.get("transparency", 0) + if transparency != 0: + preset["viewport2_options"]["transparencyAlgorithm"] = transparency # Update preset with current panel setting # if override_viewport_options is turned off @@ -335,15 +346,16 @@ def generate_capture_preset(instance, camera, path, @contextlib.contextmanager -def viewport_default_options(preset, instance): - # Disable Pan/Zoom. - pan_zoom = cmds.getAttr("{}.panZoomEnabled".format(preset["camera"])) - preset.pop("pan_zoom", None) - preset["camera_options"]["panZoomEnabled"] = instance.data["panZoom"] +def viewport_default_options(preset): + """Context manager used by `render_capture_preset`. + We need to explicitly enable some viewport changes so the viewport is + refreshed ahead of playblasting. + + """ + # TODO: Clarify in the docstring WHY we need to set it ahead of + # playblasting. What issues does it solve? viewport_defaults = {} - # Need to explicitly enable some viewport changes so the viewport is - # refreshed ahead of playblasting. try: keys = [ "useDefaultMaterial", @@ -355,24 +367,19 @@ def viewport_default_options(preset, instance): ] for key in keys: viewport_defaults[key] = cmds.modelEditor( - instance.data["panel"], query=True, **{key: True} + preset["panel"], query=True, **{key: True} ) if preset["viewport_options"][key]: cmds.modelEditor( - instance.data["panel"], edit=True, **{key: True} + preset["panel"], edit=True, **{key: True} ) yield finally: # Restoring viewport options. if viewport_defaults: cmds.modelEditor( - instance.data["panel"], edit=True, **viewport_defaults + preset["panel"], edit=True, **viewport_defaults ) - try: - cmds.setAttr( - "{}.panZoomEnabled".format(preset["camera"]), pan_zoom) - except RuntimeError: - self.log.warning("Cannot restore Pan/Zoom settings.") @contextlib.contextmanager @@ -2891,7 +2898,7 @@ def bake_to_world_space(nodes, return world_space_nodes -def load_capture_preset(data=None): +def load_capture_preset(data): """Convert OpenPype Extract Playblast settings to `capture` arguments Input data is the settings from: From 5a7079c2e4936a393237d3baed592546d09ce6ff Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 20 Dec 2023 21:49:48 +0100 Subject: [PATCH 108/183] Fix calls to refactored function name --- openpype/hosts/maya/plugins/publish/extract_playblast.py | 2 +- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 5a2beaca12..4ec4f733fd 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -57,7 +57,7 @@ class ExtractPlayblast(publish.Extractor): instance, camera, path, start=start, end=end, capture_preset=capture_preset) - path = lib.playblast_capture(preset, instance) + path = lib.render_capture_preset(preset) collected_files = os.listdir(stagingdir) patterns = [clique.PATTERNS["frames"]] diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 6f61515019..d85c00a7da 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -63,7 +63,7 @@ class ExtractThumbnail(publish.Extractor): "depthOfField": cmds.getAttr("{0}.depthOfField".format(camera)), # noqa } ) - path = lib.playblast_capture(preset, instance) + path = lib.render_capture_preset(preset) playblast = self._fix_playblast_output_path(path) From 9f543f89292d9c30bc05dd20f44f6d076c364835 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 20 Dec 2023 21:51:08 +0100 Subject: [PATCH 109/183] Remove `capture` import that's already imported at top --- openpype/hosts/maya/api/lib.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 5c15bfba26..cf4a6b6b6a 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -2912,8 +2912,6 @@ def load_capture_preset(data): """ - import capture - options = dict() viewport_options = dict() viewport2_options = dict() From 82e5e6bcdea325315ff7efcc85314c122b588339 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 20 Dec 2023 23:16:00 +0100 Subject: [PATCH 110/183] Clarify log messages --- openpype/hosts/maya/plugins/publish/extract_playblast.py | 2 +- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 4ec4f733fd..377b609603 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -24,7 +24,7 @@ class ExtractPlayblast(publish.Extractor): profiles = None def process(self, instance): - self.log.debug("Extracting capture..") + self.log.debug("Extracting playblast..") # get scene fps fps = instance.data.get("fps") or instance.context.data.get("fps") diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index d85c00a7da..d15877d603 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -20,7 +20,7 @@ class ExtractThumbnail(publish.Extractor): families = ["review"] def process(self, instance): - self.log.debug("Extracting capture..") + self.log.debug("Extracting thumbnail..") camera = instance.data["review_camera"] From 208e3f16540e5834b9549b82d858eae49acb5c77 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 20 Dec 2023 23:18:19 +0100 Subject: [PATCH 111/183] Depth of field is already preserved from camera by `generate_capture_preset` --- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index d15877d603..9bece030a4 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -60,7 +60,6 @@ class ExtractThumbnail(publish.Extractor): "displayFilmPivot": False, "displayFilmOrigin": False, "overscan": 1.0, - "depthOfField": cmds.getAttr("{0}.depthOfField".format(camera)), # noqa } ) path = lib.render_capture_preset(preset) From 4796bca514e03e0152534648ed10958f00f5c09d Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 20 Dec 2023 23:19:58 +0100 Subject: [PATCH 112/183] Cosmetics, + remove unused import --- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 9bece030a4..0d332d73ea 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -4,7 +4,6 @@ import tempfile from openpype.pipeline import publish from openpype.hosts.maya.api import lib -from maya.cmds import cmds class ExtractThumbnail(publish.Extractor): @@ -60,8 +59,7 @@ class ExtractThumbnail(publish.Extractor): "displayFilmPivot": False, "displayFilmOrigin": False, "overscan": 1.0, - } - ) + }) path = lib.render_capture_preset(preset) playblast = self._fix_playblast_output_path(path) From d880cdd1bb43213fb0c73991ec29eaaa6d433a39 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 20 Dec 2023 23:22:42 +0100 Subject: [PATCH 113/183] Cosmetics - avoid confusion about what `preset.get("filename")` actually is, it's the path passed to the generated preset. Remove unused `path` return value from `lib.render_capture_preset` Match representations logic with other extractors defining the list closer to creation of the representation, match more with ExtractThumbnail --- .../maya/plugins/publish/extract_playblast.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index 377b609603..c41cf67fb4 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -57,28 +57,25 @@ class ExtractPlayblast(publish.Extractor): instance, camera, path, start=start, end=end, capture_preset=capture_preset) - path = lib.render_capture_preset(preset) + lib.render_capture_preset(preset) + # Find playblast sequence collected_files = os.listdir(stagingdir) patterns = [clique.PATTERNS["frames"]] collections, remainder = clique.assemble(collected_files, minimum_items=1, patterns=patterns) - filename = preset.get("filename", "%TEMP%") - self.log.debug("filename {}".format(filename)) + self.log.debug("Searching playblast collection for: %s", path) frame_collection = None for collection in collections: filebase = collection.format("{head}").rstrip(".") - self.log.debug("collection head {}".format(filebase)) - if filebase in filename: + self.log.debug("Checking collection head: %s", filebase) + if filebase in path: frame_collection = collection self.log.debug( - "we found collection of interest {}".format( - str(frame_collection))) - - if "representations" not in instance.data: - instance.data["representations"] = [] + "Found playblast collection: %s", frame_collection + ) tags = ["review"] if not instance.data.get("keepImages"): @@ -92,6 +89,9 @@ class ExtractPlayblast(publish.Extractor): if len(collected_files) == 1: collected_files = collected_files[0] + if "representations" not in instance.data: + instance.data["representations"] = [] + representation = { "name": capture_preset["Codec"]["compression"], "ext": capture_preset["Codec"]["compression"], From fa032d5f5519c8ffd6ca7a111447c6fc0f953ffa Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 20 Dec 2023 23:27:20 +0100 Subject: [PATCH 114/183] Cosmetis + improve comment --- openpype/hosts/maya/api/lib.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index cf4a6b6b6a..0a835ebeed 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -291,10 +291,10 @@ def generate_capture_preset(instance, camera, path, review_instance_width = instance.data.get("review_width") review_instance_height = instance.data.get("review_height") - # Tests if project resolution is set, - # if it is a value other than zero, that value is - # used, if not then the asset resolution is - # used + # Use resolution from instance if review width/height is set + # Otherwise use the resolution from preset if it has non-zero values + # Otherwise fall back to asset width x height + # Else define no width, then `capture.capture` will use render resolution if review_instance_width and review_instance_height: preset["width"] = review_instance_width preset["height"] = review_instance_height @@ -320,7 +320,7 @@ def generate_capture_preset(instance, camera, path, # Use Pan/Zoom from instance data instead of from preset preset.pop("pan_zoom", None) - preset["camera_options"]["panZoomEnabled"] = instance.data["panZoom"] + camera_options["panZoomEnabled"] = instance.data["panZoom"] # Override viewport options by instance data viewport_options = preset.setdefault("viewport_options", {}) @@ -334,10 +334,7 @@ def generate_capture_preset(instance, camera, path, # Update preset with current panel setting # if override_viewport_options is turned off - override_viewport_options = ( - capture_preset["Viewport Options"]["override_viewport_options"] - ) - if not override_viewport_options: + if not capture_preset["Viewport Options"]["override_viewport_options"]: panel_preset = capture.parse_view(instance.data["panel"]) panel_preset.pop("camera") preset.update(panel_preset) From f922d3c8f78be9596f58829960b6889f2d4aacdf Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Thu, 21 Dec 2023 07:41:39 +0100 Subject: [PATCH 115/183] Update openpype/hosts/maya/api/lib.py Co-authored-by: Kayla Man <64118225+moonyuet@users.noreply.github.com> --- openpype/hosts/maya/api/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 0a835ebeed..8acf850782 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -335,7 +335,7 @@ def generate_capture_preset(instance, camera, path, # Update preset with current panel setting # if override_viewport_options is turned off if not capture_preset["Viewport Options"]["override_viewport_options"]: - panel_preset = capture.parse_view(instance.data["panel"]) + panel_preset = capture.parse_view(preset["panel"]) panel_preset.pop("camera") preset.update(panel_preset) From 67a6a1169ebb297d792d7f24f7dadb636ac439b5 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Thu, 21 Dec 2023 07:41:47 +0100 Subject: [PATCH 116/183] Update openpype/hosts/maya/api/lib.py Co-authored-by: Kayla Man <64118225+moonyuet@users.noreply.github.com> --- openpype/hosts/maya/api/lib.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 8acf850782..711b36e746 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -242,6 +242,7 @@ def render_capture_preset(preset): if reload_textures: # Regenerate all UDIM tiles previews reload_all_udim_tile_previews() + preset.pop("panel") path = capture.capture(log=self.log, **preset) return path From fcd605ae7dc99ab5f8965ada71bd317bce0c1a35 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 21 Dec 2023 15:43:08 +0800 Subject: [PATCH 117/183] make sure error will be raised if there is neither texture nor image search path --- .../maya/plugins/publish/collect_yeti_rig.py | 8 ++++---- .../maya/plugins/publish/extract_yeti_rig.py | 18 ++++-------------- openpype/pipeline/publish/lib.py | 2 +- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py b/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py index d67c51b895..f82f7b69cd 100644 --- a/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py +++ b/openpype/hosts/maya/plugins/publish/collect_yeti_rig.py @@ -6,6 +6,7 @@ from maya import cmds import pyblish.api from openpype.hosts.maya.api import lib +from openpype.pipeline.publish import KnownPublishError SETTINGS = {"renderDensity", @@ -116,7 +117,6 @@ class CollectYetiRig(pyblish.api.InstancePlugin): resources = [] image_search_paths = cmds.getAttr("{}.imageSearchPath".format(node)) - texture_filenames = [] if image_search_paths: # TODO: Somehow this uses OS environment path separator, `:` vs `;` @@ -124,8 +124,8 @@ class CollectYetiRig(pyblish.api.InstancePlugin): image_search_paths = [p for p in image_search_paths.split(os.path.pathsep) if p] - # find all ${TOKEN} tokens and replace them with $TOKEN env. variable - image_search_paths = self._replace_tokens(image_search_paths) + # find all ${TOKEN} tokens and replace them with $TOKEN env. variable + image_search_paths = self._replace_tokens(image_search_paths) # List all related textures texture_nodes = cmds.pgYetiGraph( @@ -163,7 +163,7 @@ class CollectYetiRig(pyblish.api.InstancePlugin): break if not files: - self.log.warning( + raise KnownPublishError( "No texture found for: %s " "(searched: %s)" % (texture, image_search_paths)) diff --git a/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py b/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py index c0c286dcc0..413961073f 100644 --- a/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py +++ b/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py @@ -142,20 +142,10 @@ class ExtractYetiRig(publish.Extractor): instance.data['transfers'] = [] for resource in instance.data.get('resources', []): - if resource["files"]: - for file in resource['files']: - src = file - dst = os.path.join( - image_search_path, os.path.basename(file)) - instance.data['transfers'].append([src, dst]) - else: - for file in resource['source']: - src = ( - file if os.path.isabs(file) else os.path.abspath(file) - ) - dst = os.path.join( - image_search_path, os.path.basename(file)) - instance.data['transfers'].append([src, dst]) + for file in resource['files']: + src = file + dst = os.path.join(image_search_path, os.path.basename(file)) + instance.data['transfers'].append([src, dst]) self.log.debug("adding transfer {} -> {}". format(src, dst)) diff --git a/openpype/pipeline/publish/lib.py b/openpype/pipeline/publish/lib.py index 4ea2f932f1..87ca3323cb 100644 --- a/openpype/pipeline/publish/lib.py +++ b/openpype/pipeline/publish/lib.py @@ -74,7 +74,7 @@ def get_template_name_profiles( project_settings ["global"] ["publish"] - ["IntegrateAssetNew"] + ["IntegrateHeroVersion"] ["template_name_profiles"] ) if legacy_profiles: From 92107167af33f5617df0add058bfb8399e7f4723 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 21 Dec 2023 15:43:51 +0800 Subject: [PATCH 118/183] restore unnecessary tweaks --- openpype/pipeline/publish/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/pipeline/publish/lib.py b/openpype/pipeline/publish/lib.py index 87ca3323cb..4ea2f932f1 100644 --- a/openpype/pipeline/publish/lib.py +++ b/openpype/pipeline/publish/lib.py @@ -74,7 +74,7 @@ def get_template_name_profiles( project_settings ["global"] ["publish"] - ["IntegrateHeroVersion"] + ["IntegrateAssetNew"] ["template_name_profiles"] ) if legacy_profiles: From 186ecff5470c3a26d614d9c587965cf2c70bcef1 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 21 Dec 2023 15:45:15 +0800 Subject: [PATCH 119/183] restore unnecessary tweaks --- openpype/hosts/maya/plugins/publish/extract_yeti_rig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py b/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py index 413961073f..da67cb911f 100644 --- a/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py +++ b/openpype/hosts/maya/plugins/publish/extract_yeti_rig.py @@ -147,7 +147,7 @@ class ExtractYetiRig(publish.Extractor): dst = os.path.join(image_search_path, os.path.basename(file)) instance.data['transfers'].append([src, dst]) - self.log.debug("adding transfer {} -> {}". format(src, dst)) + self.log.debug("adding transfer {} -> {}". format(src, dst)) # Ensure the imageSearchPath is being remapped to the publish folder attr_value = {"%s.imageSearchPath" % n: str(image_search_path) for From 5f309994c39ae8600f414da8ce1da15fec729408 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 21 Dec 2023 18:30:44 +0800 Subject: [PATCH 120/183] cosmetic tweaks and code clean up --- openpype/hosts/maya/api/exitstack.py | 16 +++++++++++++++- openpype/hosts/maya/api/lib.py | 14 ++++++-------- openpype/pipeline/publish/lib.py | 2 +- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/openpype/hosts/maya/api/exitstack.py b/openpype/hosts/maya/api/exitstack.py index cacaa396f0..2460f25f59 100644 --- a/openpype/hosts/maya/api/exitstack.py +++ b/openpype/hosts/maya/api/exitstack.py @@ -1,5 +1,19 @@ +"""Backwards compatible implementation of ExitStack for Python 2. + +ExitStack contextmanager was implemented with Python 3.3. As long as we support +Python 2 hosts we can use this backwards compatible implementation to support both +Python 2 and Python 3. + +Instead of using ExitStack from contextlib, use it from this module: + +>>> from openpype.hosts.maya.api.exitstack import ExitStack + +It will provide the appropriate ExitStack implementation for the current +running Python version. + +""" +# TODO: Remove the entire script once dropping Python 2 support. import contextlib -# TODO: Remove the entire script once dropping Python 2. if getattr(contextlib, "nested", None): from contextlib import ExitStack # noqa else: diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 711b36e746..e763ea6702 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -1,6 +1,7 @@ """Standalone helper functions""" import os +import copy from pprint import pformat import sys import uuid @@ -176,12 +177,9 @@ def maintained_selection(): def reload_all_udim_tile_previews(): """Regenerate all UDIM tile preview in texture file""" - texture_files = cmds.ls(type="file") - if texture_files: - for texture_file in texture_files: - if cmds.getAttr("{}.uvTilingMode".format(texture_file)) > 0: - cmds.ogs(regenerateUVTilePreview=texture_file) - cmds.ogs(reloadTextures=True) + for texture_file in cmds.ls(type="file"): + if cmds.getAttr("{}.uvTilingMode".format(texture_file)) > 0: + cmds.ogs(regenerateUVTilePreview=texture_file) @contextlib.contextmanager @@ -227,7 +225,7 @@ def render_capture_preset(preset): json.dumps(preset, indent=4, sort_keys=True) ) ) - + preset = copy.deepcopy(preset) # not supported by `capture` so we pop it off of the preset reload_textures = preset["viewport_options"].pop("reloadTextures", True) @@ -235,6 +233,7 @@ def render_capture_preset(preset): stack.enter_context(maintained_time()) stack.enter_context(panel_camera(preset["panel"], preset["camera"])) stack.enter_context(viewport_default_options(preset)) + preset.pop("panel") if preset["viewport_options"].get("textures"): # Force immediate texture loading when to ensure # all textures have loaded before the playblast starts @@ -242,7 +241,6 @@ def render_capture_preset(preset): if reload_textures: # Regenerate all UDIM tiles previews reload_all_udim_tile_previews() - preset.pop("panel") path = capture.capture(log=self.log, **preset) return path diff --git a/openpype/pipeline/publish/lib.py b/openpype/pipeline/publish/lib.py index 4ea2f932f1..87ca3323cb 100644 --- a/openpype/pipeline/publish/lib.py +++ b/openpype/pipeline/publish/lib.py @@ -74,7 +74,7 @@ def get_template_name_profiles( project_settings ["global"] ["publish"] - ["IntegrateAssetNew"] + ["IntegrateHeroVersion"] ["template_name_profiles"] ) if legacy_profiles: From 1d4acb78538364cd5ba5d16c82d8d561341eaa06 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 21 Dec 2023 18:33:25 +0800 Subject: [PATCH 121/183] hound --- openpype/hosts/maya/api/exitstack.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/maya/api/exitstack.py b/openpype/hosts/maya/api/exitstack.py index 2460f25f59..d151ee16d7 100644 --- a/openpype/hosts/maya/api/exitstack.py +++ b/openpype/hosts/maya/api/exitstack.py @@ -1,8 +1,8 @@ """Backwards compatible implementation of ExitStack for Python 2. -ExitStack contextmanager was implemented with Python 3.3. As long as we support -Python 2 hosts we can use this backwards compatible implementation to support both -Python 2 and Python 3. +ExitStack contextmanager was implemented with Python 3.3. +As long as we supportPython 2 hosts we can use this backwards +compatible implementation to support bothPython 2 and Python 3. Instead of using ExitStack from contextlib, use it from this module: From 19d9d37447211a9ddc393b8cd9978ae7a42faadb Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Thu, 21 Dec 2023 12:26:45 +0100 Subject: [PATCH 122/183] remove 'filters' in conversion --- openpype/settings/ayon_settings.py | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/openpype/settings/ayon_settings.py b/openpype/settings/ayon_settings.py index fd15fe41b9..2d10e771cd 100644 --- a/openpype/settings/ayon_settings.py +++ b/openpype/settings/ayon_settings.py @@ -479,13 +479,7 @@ def _convert_maya_project_settings(ayon_settings, output): } # Publish UI filters - new_filters = {} - for item in ayon_maya["filters"]: - new_filters[item["name"]] = { - subitem["name"]: subitem["value"] - for subitem in item["value"] - } - ayon_maya["filters"] = new_filters + ayon_maya["filters"] = {} # Maya dirmap ayon_maya_dirmap = ayon_maya.pop("maya_dirmap") @@ -885,14 +879,7 @@ def _convert_hiero_project_settings(ayon_settings, output): ayon_hiero = ayon_settings["hiero"] _convert_host_imageio(ayon_hiero) - new_gui_filters = {} - for item in ayon_hiero.pop("filters"): - subvalue = {} - key = item["name"] - for subitem in item["value"]: - subvalue[subitem["name"]] = subitem["value"] - new_gui_filters[key] = subvalue - ayon_hiero["filters"] = new_gui_filters + ayon_hiero["filters"] = {} ayon_load_clip = ayon_hiero["load"]["LoadClip"] if "product_types" in ayon_load_clip: @@ -953,16 +940,7 @@ def _convert_tvpaint_project_settings(ayon_settings, output): _convert_host_imageio(ayon_tvpaint) - filters = {} - for item in ayon_tvpaint["filters"]: - value = item["value"] - try: - value = json.loads(value) - - except ValueError: - value = {} - filters[item["name"]] = value - ayon_tvpaint["filters"] = filters + ayon_tvpaint["filters"] = {} ayon_publish_settings = ayon_tvpaint["publish"] for plugin_name in ( From 4d176e177f2e82546be0bc311017f16b7ec2a4b2 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Thu, 21 Dec 2023 13:13:54 +0100 Subject: [PATCH 123/183] keep hiero filters conversion --- openpype/settings/ayon_settings.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openpype/settings/ayon_settings.py b/openpype/settings/ayon_settings.py index 2d10e771cd..9a209b762c 100644 --- a/openpype/settings/ayon_settings.py +++ b/openpype/settings/ayon_settings.py @@ -879,7 +879,14 @@ def _convert_hiero_project_settings(ayon_settings, output): ayon_hiero = ayon_settings["hiero"] _convert_host_imageio(ayon_hiero) - ayon_hiero["filters"] = {} + new_gui_filters = {} + for item in ayon_hiero.pop("filters", []): + subvalue = {} + key = item["name"] + for subitem in item["value"]: + subvalue[subitem["name"]] = subitem["value"] + new_gui_filters[key] = subvalue + ayon_hiero["filters"] = new_gui_filters ayon_load_clip = ayon_hiero["load"]["LoadClip"] if "product_types" in ayon_load_clip: From b81cb684a15cd8acb30267c33d9c6c3ac59eb434 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Thu, 21 Dec 2023 13:14:06 +0100 Subject: [PATCH 124/183] remove tvpaint and maya filters completelly --- openpype/settings/ayon_settings.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/openpype/settings/ayon_settings.py b/openpype/settings/ayon_settings.py index 9a209b762c..a6d90d1cf0 100644 --- a/openpype/settings/ayon_settings.py +++ b/openpype/settings/ayon_settings.py @@ -478,9 +478,6 @@ def _convert_maya_project_settings(ayon_settings, output): for item in ayon_maya["ext_mapping"] } - # Publish UI filters - ayon_maya["filters"] = {} - # Maya dirmap ayon_maya_dirmap = ayon_maya.pop("maya_dirmap") ayon_maya_dirmap_path = ayon_maya_dirmap["paths"] @@ -947,8 +944,6 @@ def _convert_tvpaint_project_settings(ayon_settings, output): _convert_host_imageio(ayon_tvpaint) - ayon_tvpaint["filters"] = {} - ayon_publish_settings = ayon_tvpaint["publish"] for plugin_name in ( "ValidateProjectSettings", From b04190419f2dde91eed0504a0f8d25b64aea403f Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Thu, 21 Dec 2023 13:14:58 +0100 Subject: [PATCH 125/183] use correct label for filepath validations in traypublisher (#6084) --- .../hosts/traypublisher/plugins/publish/validate_filepaths.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/traypublisher/plugins/publish/validate_filepaths.py b/openpype/hosts/traypublisher/plugins/publish/validate_filepaths.py index 749199fbd3..b67e47d213 100644 --- a/openpype/hosts/traypublisher/plugins/publish/validate_filepaths.py +++ b/openpype/hosts/traypublisher/plugins/publish/validate_filepaths.py @@ -15,7 +15,7 @@ class ValidateFilePath(pyblish.api.InstancePlugin): This is primarily created for Simple Creator instances. """ - label = "Validate Workfile" + label = "Validate Filepaths" order = pyblish.api.ValidatorOrder - 0.49 hosts = ["traypublisher"] From a3f93790f1fcae59b2b7db18a5c1fd7a88b8b6ba Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Fri, 22 Dec 2023 00:07:16 +0800 Subject: [PATCH 126/183] repharse the preset pop for panel --- openpype/hosts/maya/api/lib.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index e763ea6702..57deb24a94 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -228,12 +228,11 @@ def render_capture_preset(preset): preset = copy.deepcopy(preset) # not supported by `capture` so we pop it off of the preset reload_textures = preset["viewport_options"].pop("reloadTextures", True) - + panel = preset.pop("panel") with ExitStack() as stack: stack.enter_context(maintained_time()) - stack.enter_context(panel_camera(preset["panel"], preset["camera"])) - stack.enter_context(viewport_default_options(preset)) - preset.pop("panel") + stack.enter_context(panel_camera(panel, preset["camera"])) + stack.enter_context(viewport_default_options(preset, panel)) if preset["viewport_options"].get("textures"): # Force immediate texture loading when to ensure # all textures have loaded before the playblast starts @@ -342,7 +341,7 @@ def generate_capture_preset(instance, camera, path, @contextlib.contextmanager -def viewport_default_options(preset): +def viewport_default_options(preset, panel): """Context manager used by `render_capture_preset`. We need to explicitly enable some viewport changes so the viewport is @@ -363,18 +362,18 @@ def viewport_default_options(preset): ] for key in keys: viewport_defaults[key] = cmds.modelEditor( - preset["panel"], query=True, **{key: True} + panel, query=True, **{key: True} ) if preset["viewport_options"][key]: cmds.modelEditor( - preset["panel"], edit=True, **{key: True} + panel, edit=True, **{key: True} ) yield finally: # Restoring viewport options. if viewport_defaults: cmds.modelEditor( - preset["panel"], edit=True, **viewport_defaults + panel, edit=True, **viewport_defaults ) From 6f5432611fb7020d76a69886a0798e157ede629e Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Fri, 22 Dec 2023 00:07:56 +0800 Subject: [PATCH 127/183] restore unnecessary tweaks --- openpype/pipeline/publish/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/pipeline/publish/lib.py b/openpype/pipeline/publish/lib.py index 87ca3323cb..4ea2f932f1 100644 --- a/openpype/pipeline/publish/lib.py +++ b/openpype/pipeline/publish/lib.py @@ -74,7 +74,7 @@ def get_template_name_profiles( project_settings ["global"] ["publish"] - ["IntegrateHeroVersion"] + ["IntegrateAssetNew"] ["template_name_profiles"] ) if legacy_profiles: From 7acbef93288da4f1925ba4ef29bf43b8cec23d9d Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Fri, 22 Dec 2023 00:35:21 +0800 Subject: [PATCH 128/183] change the args oder in viewport_default_options --- openpype/hosts/maya/api/lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 57deb24a94..1a8a80f224 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -232,7 +232,7 @@ def render_capture_preset(preset): with ExitStack() as stack: stack.enter_context(maintained_time()) stack.enter_context(panel_camera(panel, preset["camera"])) - stack.enter_context(viewport_default_options(preset, panel)) + stack.enter_context(viewport_default_options(panel, preset)) if preset["viewport_options"].get("textures"): # Force immediate texture loading when to ensure # all textures have loaded before the playblast starts @@ -341,7 +341,7 @@ def generate_capture_preset(instance, camera, path, @contextlib.contextmanager -def viewport_default_options(preset, panel): +def viewport_default_options(panel, preset): """Context manager used by `render_capture_preset`. We need to explicitly enable some viewport changes so the viewport is From 3fd9d47a387d9bc428ca809d473ce038ebac2a6f Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Fri, 22 Dec 2023 00:45:09 +0800 Subject: [PATCH 129/183] use filename = instance.name --- openpype/hosts/maya/plugins/publish/extract_playblast.py | 2 +- openpype/hosts/maya/plugins/publish/extract_thumbnail.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_playblast.py b/openpype/hosts/maya/plugins/publish/extract_playblast.py index c41cf67fb4..507229a7b3 100644 --- a/openpype/hosts/maya/plugins/publish/extract_playblast.py +++ b/openpype/hosts/maya/plugins/publish/extract_playblast.py @@ -48,7 +48,7 @@ class ExtractPlayblast(publish.Extractor): self.log ) stagingdir = self.staging_dir(instance) - filename = "{0}".format(instance.name) + filename = instance.name path = os.path.join(stagingdir, filename) self.log.debug("Outputting images to %s" % path) # get cameras diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 0d332d73ea..08f061985e 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -39,7 +39,7 @@ class ExtractThumbnail(publish.Extractor): "Create temp directory {} for thumbnail".format(dst_staging) ) # Store new staging to cleanup paths - filename = "{0}".format(instance.name) + filename = instance.name path = os.path.join(dst_staging, filename) self.log.debug("Outputting images to %s" % path) From fa24804eff3de6c6b39940123adb5417b8d41f12 Mon Sep 17 00:00:00 2001 From: Ynbot Date: Sat, 23 Dec 2023 03:25:06 +0000 Subject: [PATCH 130/183] [Automated] Bump version --- openpype/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/version.py b/openpype/version.py index c4ff4dde95..505148da16 100644 --- a/openpype/version.py +++ b/openpype/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring Pype version.""" -__version__ = "3.18.2-nightly.2" +__version__ = "3.18.2-nightly.3" From 226a2e0b8b0f03e48a47673d91871fe4fb2f5487 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 23 Dec 2023 03:25:38 +0000 Subject: [PATCH 131/183] chore(): update bug report / version --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index fd3455ac76..bacdfc3a15 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,6 +35,7 @@ body: label: Version description: What version are you running? Look to OpenPype Tray options: + - 3.18.2-nightly.3 - 3.18.2-nightly.2 - 3.18.2-nightly.1 - 3.18.1 @@ -134,7 +135,6 @@ body: - 3.15.5-nightly.1 - 3.15.4 - 3.15.4-nightly.3 - - 3.15.4-nightly.2 validations: required: true - type: dropdown From 4b6e7beb87f57d34931801c9993fa61f8a135a74 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Sat, 23 Dec 2023 21:23:34 +0800 Subject: [PATCH 132/183] make sure extract review intermediate disabled when both deprecrated and current setting diabled --- .../nuke/plugins/publish/extract_review_intermediates.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openpype/hosts/nuke/plugins/publish/extract_review_intermediates.py b/openpype/hosts/nuke/plugins/publish/extract_review_intermediates.py index 3ee166eb56..a02a807206 100644 --- a/openpype/hosts/nuke/plugins/publish/extract_review_intermediates.py +++ b/openpype/hosts/nuke/plugins/publish/extract_review_intermediates.py @@ -34,6 +34,11 @@ class ExtractReviewIntermediates(publish.Extractor): nuke_publish = project_settings["nuke"]["publish"] deprecated_setting = nuke_publish["ExtractReviewDataMov"] current_setting = nuke_publish.get("ExtractReviewIntermediates") + if not deprecated_setting["enabled"] and ( + not current_setting["enabled"] + ): + cls.enabled = False + if deprecated_setting["enabled"]: # Use deprecated settings if they are still enabled cls.viewer_lut_raw = deprecated_setting["viewer_lut_raw"] From 58172994cfe70afa169aa68dc414cc947a20ab98 Mon Sep 17 00:00:00 2001 From: Ynbot Date: Wed, 27 Dec 2023 03:25:47 +0000 Subject: [PATCH 133/183] [Automated] Bump version --- openpype/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/version.py b/openpype/version.py index 505148da16..93fdf432b3 100644 --- a/openpype/version.py +++ b/openpype/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring Pype version.""" -__version__ = "3.18.2-nightly.3" +__version__ = "3.18.2-nightly.4" From 11a3114de8c64bd64854bdccde3d257c746abdad Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 27 Dec 2023 03:26:21 +0000 Subject: [PATCH 134/183] chore(): update bug report / version --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index bacdfc3a15..a691e021fd 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,6 +35,7 @@ body: label: Version description: What version are you running? Look to OpenPype Tray options: + - 3.18.2-nightly.4 - 3.18.2-nightly.3 - 3.18.2-nightly.2 - 3.18.2-nightly.1 @@ -134,7 +135,6 @@ body: - 3.15.5-nightly.2 - 3.15.5-nightly.1 - 3.15.4 - - 3.15.4-nightly.3 validations: required: true - type: dropdown From adf9cb3e2c0054f34b0f7b10ac9cfaa4291916f3 Mon Sep 17 00:00:00 2001 From: Ynbot Date: Sat, 30 Dec 2023 03:25:08 +0000 Subject: [PATCH 135/183] [Automated] Bump version --- openpype/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/version.py b/openpype/version.py index 93fdf432b3..550bdb70c7 100644 --- a/openpype/version.py +++ b/openpype/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring Pype version.""" -__version__ = "3.18.2-nightly.4" +__version__ = "3.18.2-nightly.5" From 8ea81950e2341692dc3d76a6acdd5c5c0ddf96b6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 30 Dec 2023 03:25:40 +0000 Subject: [PATCH 136/183] chore(): update bug report / version --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index a691e021fd..f345829356 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,6 +35,7 @@ body: label: Version description: What version are you running? Look to OpenPype Tray options: + - 3.18.2-nightly.5 - 3.18.2-nightly.4 - 3.18.2-nightly.3 - 3.18.2-nightly.2 @@ -134,7 +135,6 @@ body: - 3.15.5 - 3.15.5-nightly.2 - 3.15.5-nightly.1 - - 3.15.4 validations: required: true - type: dropdown From ebc4f1467d5c4cef02031ceda4243a683c4c22ed Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 2 Jan 2024 16:20:58 +0800 Subject: [PATCH 137/183] allows users to set up the scene unit scale in Max with OP/AYON settings /refactor fbx extractors --- openpype/hosts/max/api/lib.py | 30 ++++++++++ openpype/hosts/max/api/menu.py | 8 +++ openpype/hosts/max/api/pipeline.py | 58 ++++++++++++++----- .../max/plugins/publish/extract_camera_fbx.py | 55 ------------------ .../{extract_model_fbx.py => extract_fbx.py} | 40 ++++++++++--- .../defaults/project_settings/max.json | 4 ++ .../projects_schema/schema_project_max.json | 31 ++++++++++ server_addon/max/server/settings/main.py | 30 ++++++++++ server_addon/max/server/version.py | 2 +- 9 files changed, 180 insertions(+), 78 deletions(-) delete mode 100644 openpype/hosts/max/plugins/publish/extract_camera_fbx.py rename openpype/hosts/max/plugins/publish/{extract_model_fbx.py => extract_fbx.py} (67%) diff --git a/openpype/hosts/max/api/lib.py b/openpype/hosts/max/api/lib.py index 8531233bb2..e98d4632ba 100644 --- a/openpype/hosts/max/api/lib.py +++ b/openpype/hosts/max/api/lib.py @@ -294,6 +294,35 @@ def reset_frame_range(fps: bool = True): frame_range["frameStartHandle"], frame_range["frameEndHandle"]) +def reset_unit_scale(): + """Apply the unit scale setting to 3dsMax + """ + project_name = get_current_project_name() + settings = get_project_settings(project_name).get("max") + unit_scale_setting = settings.get("unit_scale_settings") + if unit_scale_setting: + scene_scale = unit_scale_setting["scene_unit_scale"] + rt.units.SystemType = rt.Name(scene_scale) + +def convert_unit_scale(): + """Convert system unit scale in 3dsMax + for fbx export + + Returns: + str: unit scale + """ + unit_scale_dict = { + "inches": "in", + "feet": "ft", + "miles": "mi", + "millimeters": "mm", + "centimeters": "cm", + "meters": "m", + "kilometers": "km" + } + current_unit_scale = rt.Execute("units.SystemType as string") + return unit_scale_dict[current_unit_scale] + def set_context_setting(): """Apply the project settings from the project definition @@ -310,6 +339,7 @@ def set_context_setting(): reset_scene_resolution() reset_frame_range() reset_colorspace() + reset_unit_scale() def get_max_version(): diff --git a/openpype/hosts/max/api/menu.py b/openpype/hosts/max/api/menu.py index caaa3e3730..9bdb6bd7ce 100644 --- a/openpype/hosts/max/api/menu.py +++ b/openpype/hosts/max/api/menu.py @@ -124,6 +124,10 @@ class OpenPypeMenu(object): colorspace_action.triggered.connect(self.colorspace_callback) openpype_menu.addAction(colorspace_action) + unit_scale_action = QtWidgets.QAction("Set Unit Scale", openpype_menu) + unit_scale_action.triggered.connect(self.unit_scale_callback) + openpype_menu.addAction(unit_scale_action) + return openpype_menu def load_callback(self): @@ -157,3 +161,7 @@ class OpenPypeMenu(object): def colorspace_callback(self): """Callback to reset colorspace""" return lib.reset_colorspace() + + def unit_scale_callback(self): + """Callback to reset unit scale""" + return lib.reset_unit_scale() diff --git a/openpype/hosts/max/api/pipeline.py b/openpype/hosts/max/api/pipeline.py index d0ae854dc8..ea4ff35557 100644 --- a/openpype/hosts/max/api/pipeline.py +++ b/openpype/hosts/max/api/pipeline.py @@ -3,6 +3,7 @@ import os import logging from operator import attrgetter +from functools import partial import json @@ -13,6 +14,10 @@ from openpype.pipeline import ( register_loader_plugin_path, AVALON_CONTAINER_ID, ) +from openpype.lib import ( + register_event_callback, + emit_event +) from openpype.hosts.max.api.menu import OpenPypeMenu from openpype.hosts.max.api import lib from openpype.hosts.max.api.plugin import MS_CUSTOM_ATTRIB @@ -46,19 +51,14 @@ class MaxHost(HostBase, IWorkfileHost, ILoadHost, IPublishHost): register_loader_plugin_path(LOAD_PATH) register_creator_plugin_path(CREATE_PATH) - # self._register_callbacks() + self._register_callbacks() self.menu = OpenPypeMenu() + register_event_callback( + "init", self._deferred_menu_creation) self._has_been_setup = True - - def context_setting(): - return lib.set_context_setting() - - rt.callbacks.addScript(rt.Name('systemPostNew'), - context_setting) - - rt.callbacks.addScript(rt.Name('filePostOpen'), - lib.check_colorspace) + register_event_callback("open", on_open) + register_event_callback("new", on_new) def has_unsaved_changes(self): # TODO: how to get it from 3dsmax? @@ -83,11 +83,28 @@ class MaxHost(HostBase, IWorkfileHost, ILoadHost, IPublishHost): return ls() def _register_callbacks(self): - rt.callbacks.removeScripts(id=rt.name("OpenPypeCallbacks")) - - rt.callbacks.addScript( + unique_id = rt.Name("openpype_callbacks") + for handler, event in self._op_events.copy().items(): + if event is None: + continue + try: + rt.callbacks.removeScripts(id=unique_id) + self._op_events[handler] = None + except RuntimeError as exc: + self.log.info(exc) + #self._deferred_menu_creation + self._op_events["init"] = rt.callbacks.addScript( rt.Name("postLoadingMenus"), - self._deferred_menu_creation, id=rt.Name('OpenPypeCallbacks')) + partial(_emit_event_notification_param, "init"), + id=unique_id) + self._op_events["new"] = rt.callbacks.addScript( + rt.Name('systemPostNew'), + partial(_emit_event_notification_param, "new"), + id=unique_id) + self._op_events["open"] = rt.callbacks.addScript( + rt.Name('filePostOpen'), + partial(_emit_event_notification_param, "open"), + id=unique_id) def _deferred_menu_creation(self): self.log.info("Building menu ...") @@ -144,6 +161,19 @@ attributes "OpenPypeContext" rt.saveMaxFile(dst_path) +def _emit_event_notification_param(event): + notification = rt.callbacks.notificationParam() + emit_event(event, {"notificationParam": notification}) + + +def on_open(): + return lib.check_colorspace() + + +def on_new(): + return lib.set_context_setting() + + def ls() -> list: """Get all OpenPype instances.""" objs = rt.objects diff --git a/openpype/hosts/max/plugins/publish/extract_camera_fbx.py b/openpype/hosts/max/plugins/publish/extract_camera_fbx.py deleted file mode 100644 index 4b5631b05f..0000000000 --- a/openpype/hosts/max/plugins/publish/extract_camera_fbx.py +++ /dev/null @@ -1,55 +0,0 @@ -import os - -import pyblish.api -from pymxs import runtime as rt - -from openpype.hosts.max.api import maintained_selection -from openpype.pipeline import OptionalPyblishPluginMixin, publish - - -class ExtractCameraFbx(publish.Extractor, OptionalPyblishPluginMixin): - """Extract Camera with FbxExporter.""" - - order = pyblish.api.ExtractorOrder - 0.2 - label = "Extract Fbx Camera" - hosts = ["max"] - families = ["camera"] - optional = True - - def process(self, instance): - if not self.is_active(instance.data): - return - - stagingdir = self.staging_dir(instance) - filename = "{name}.fbx".format(**instance.data) - - filepath = os.path.join(stagingdir, filename) - rt.FBXExporterSetParam("Animation", True) - rt.FBXExporterSetParam("Cameras", True) - rt.FBXExporterSetParam("AxisConversionMethod", "Animation") - rt.FBXExporterSetParam("UpAxis", "Y") - rt.FBXExporterSetParam("Preserveinstances", True) - - with maintained_selection(): - # select and export - node_list = instance.data["members"] - rt.Select(node_list) - rt.ExportFile( - filepath, - rt.Name("noPrompt"), - selectedOnly=True, - using=rt.FBXEXP, - ) - - self.log.info("Performing Extraction ...") - if "representations" not in instance.data: - instance.data["representations"] = [] - - representation = { - "name": "fbx", - "ext": "fbx", - "files": filename, - "stagingDir": stagingdir, - } - instance.data["representations"].append(representation) - self.log.info(f"Extracted instance '{instance.name}' to: {filepath}") diff --git a/openpype/hosts/max/plugins/publish/extract_model_fbx.py b/openpype/hosts/max/plugins/publish/extract_fbx.py similarity index 67% rename from openpype/hosts/max/plugins/publish/extract_model_fbx.py rename to openpype/hosts/max/plugins/publish/extract_fbx.py index 6c42fd5364..d41f3e40fc 100644 --- a/openpype/hosts/max/plugins/publish/extract_model_fbx.py +++ b/openpype/hosts/max/plugins/publish/extract_fbx.py @@ -3,6 +3,7 @@ import pyblish.api from openpype.pipeline import publish, OptionalPyblishPluginMixin from pymxs import runtime as rt from openpype.hosts.max.api import maintained_selection +from openpype.hosts.max.api.lib import convert_unit_scale class ExtractModelFbx(publish.Extractor, OptionalPyblishPluginMixin): @@ -23,14 +24,7 @@ class ExtractModelFbx(publish.Extractor, OptionalPyblishPluginMixin): stagingdir = self.staging_dir(instance) filename = "{name}.fbx".format(**instance.data) filepath = os.path.join(stagingdir, filename) - - rt.FBXExporterSetParam("Animation", False) - rt.FBXExporterSetParam("Cameras", False) - rt.FBXExporterSetParam("Lights", False) - rt.FBXExporterSetParam("PointCache", False) - rt.FBXExporterSetParam("AxisConversionMethod", "Animation") - rt.FBXExporterSetParam("UpAxis", "Y") - rt.FBXExporterSetParam("Preserveinstances", True) + self._set_fbx_attributes() with maintained_selection(): # select and export @@ -56,3 +50,33 @@ class ExtractModelFbx(publish.Extractor, OptionalPyblishPluginMixin): self.log.info( "Extracted instance '%s' to: %s" % (instance.name, filepath) ) + + def _set_fbx_attributes(self): + unit_scale = convert_unit_scale() + rt.FBXExporterSetParam("Animation", False) + rt.FBXExporterSetParam("Cameras", False) + rt.FBXExporterSetParam("Lights", False) + rt.FBXExporterSetParam("PointCache", False) + rt.FBXExporterSetParam("AxisConversionMethod", "Animation") + rt.FBXExporterSetParam("UpAxis", "Y") + rt.FBXExporterSetParam("Preserveinstances", True) + if unit_scale: + rt.FBXExporterSetParam("ConvertUnit", unit_scale) + +class ExtractCameraFbx(ExtractModelFbx): + """Extract Camera with FbxExporter.""" + + order = pyblish.api.ExtractorOrder - 0.2 + label = "Extract Fbx Camera" + families = ["camera"] + optional = True + + def _set_fbx_attributes(self): + unit_scale = convert_unit_scale() + rt.FBXExporterSetParam("Animation", True) + rt.FBXExporterSetParam("Cameras", True) + rt.FBXExporterSetParam("AxisConversionMethod", "Animation") + rt.FBXExporterSetParam("UpAxis", "Y") + rt.FBXExporterSetParam("Preserveinstances", True) + if unit_scale: + rt.FBXExporterSetParam("ConvertUnit", unit_scale) diff --git a/openpype/settings/defaults/project_settings/max.json b/openpype/settings/defaults/project_settings/max.json index 19c9d10496..1b574dc4d3 100644 --- a/openpype/settings/defaults/project_settings/max.json +++ b/openpype/settings/defaults/project_settings/max.json @@ -1,4 +1,8 @@ { + "unit_scale_settings": { + "enabled": true, + "scene_unit_scale": "Inches" + }, "imageio": { "activate_host_color_management": true, "ocio_config": { diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json index 78cca357a3..1df14c04e1 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json @@ -5,6 +5,37 @@ "label": "Max", "is_file": true, "children": [ + { + "key": "unit_scale_settings", + "type": "dict", + "label": "Set Unit Scale", + "collapsible": true, + "is_group": true, + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "key": "scene_unit_scale", + "label": "Scene Unit Scale", + "type": "enum", + "multiselection": false, + "defaults": "exr", + "enum_items": [ + {"Inches": "in"}, + {"Feet": "ft"}, + {"Miles": "mi"}, + {"Millimeters": "mm"}, + {"Centimeters": "cm"}, + {"Meters": "m"}, + {"Kilometers": "km"} + ] + } + ] + }, { "key": "imageio", "type": "dict", diff --git a/server_addon/max/server/settings/main.py b/server_addon/max/server/settings/main.py index ea6a11915a..94dee3e55c 100644 --- a/server_addon/max/server/settings/main.py +++ b/server_addon/max/server/settings/main.py @@ -12,6 +12,28 @@ from .publishers import ( ) +def unit_scale_enum(): + """Return enumerator for scene unit scale.""" + return [ + {"label": "in", "value": "Inches"}, + {"label": "ft", "value": "Feet"}, + {"label": "mi", "value": "Miles"}, + {"label": "mm", "value": "Millimeters"}, + {"label": "cm", "value": "Centimeters"}, + {"label": "m", "value": "Meters"}, + {"label": "km", "value": "Kilometers"} + ] + + +class UnitScaleSettings(BaseSettingsModel): + enabled: bool = Field(True, title="Enabled") + scene_unit_scale: str = Field( + "Centimeters", + title="Scene Unit Scale", + enum_resolver=unit_scale_enum + ) + + class PRTAttributesModel(BaseSettingsModel): _layout = "compact" name: str = Field(title="Name") @@ -24,6 +46,10 @@ class PointCloudSettings(BaseSettingsModel): class MaxSettings(BaseSettingsModel): + unit_scale_settings: UnitScaleSettings = Field( + default_factory=UnitScaleSettings, + title="Set Unit Scale" + ) imageio: ImageIOSettings = Field( default_factory=ImageIOSettings, title="Color Management (ImageIO)" @@ -46,6 +72,10 @@ class MaxSettings(BaseSettingsModel): DEFAULT_VALUES = { + "unit_scale_settings": { + "enabled": True, + "scene_unit_scale": "cm" + }, "RenderSettings": DEFAULT_RENDER_SETTINGS, "CreateReview": DEFAULT_CREATE_REVIEW_SETTINGS, "PointCloud": { diff --git a/server_addon/max/server/version.py b/server_addon/max/server/version.py index ae7362549b..bbab0242f6 100644 --- a/server_addon/max/server/version.py +++ b/server_addon/max/server/version.py @@ -1 +1 @@ -__version__ = "0.1.3" +__version__ = "0.1.4" From 1795290f4d18d7ad259f1bec889bbc878d80b448 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 2 Jan 2024 17:17:40 +0800 Subject: [PATCH 138/183] hound --- openpype/hosts/max/api/lib.py | 1 + openpype/hosts/max/api/pipeline.py | 2 +- openpype/hosts/max/plugins/publish/extract_fbx.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/max/api/lib.py b/openpype/hosts/max/api/lib.py index e98d4632ba..9b3d3fda98 100644 --- a/openpype/hosts/max/api/lib.py +++ b/openpype/hosts/max/api/lib.py @@ -304,6 +304,7 @@ def reset_unit_scale(): scene_scale = unit_scale_setting["scene_unit_scale"] rt.units.SystemType = rt.Name(scene_scale) + def convert_unit_scale(): """Convert system unit scale in 3dsMax for fbx export diff --git a/openpype/hosts/max/api/pipeline.py b/openpype/hosts/max/api/pipeline.py index ea4ff35557..98895b858e 100644 --- a/openpype/hosts/max/api/pipeline.py +++ b/openpype/hosts/max/api/pipeline.py @@ -92,7 +92,7 @@ class MaxHost(HostBase, IWorkfileHost, ILoadHost, IPublishHost): self._op_events[handler] = None except RuntimeError as exc: self.log.info(exc) - #self._deferred_menu_creation + self._op_events["init"] = rt.callbacks.addScript( rt.Name("postLoadingMenus"), partial(_emit_event_notification_param, "init"), diff --git a/openpype/hosts/max/plugins/publish/extract_fbx.py b/openpype/hosts/max/plugins/publish/extract_fbx.py index d41f3e40fc..7454cd08d1 100644 --- a/openpype/hosts/max/plugins/publish/extract_fbx.py +++ b/openpype/hosts/max/plugins/publish/extract_fbx.py @@ -63,6 +63,7 @@ class ExtractModelFbx(publish.Extractor, OptionalPyblishPluginMixin): if unit_scale: rt.FBXExporterSetParam("ConvertUnit", unit_scale) + class ExtractCameraFbx(ExtractModelFbx): """Extract Camera with FbxExporter.""" From e107526bbd8e3daf9cfed36de3d06c5db3cb078b Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Tue, 2 Jan 2024 11:59:18 +0100 Subject: [PATCH 139/183] fix action to be able to run --- .../ftrack/event_handlers_user/action_djvview.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openpype/modules/ftrack/event_handlers_user/action_djvview.py b/openpype/modules/ftrack/event_handlers_user/action_djvview.py index 334519b4bb..bd9cd62e49 100644 --- a/openpype/modules/ftrack/event_handlers_user/action_djvview.py +++ b/openpype/modules/ftrack/event_handlers_user/action_djvview.py @@ -190,12 +190,12 @@ class DJVViewAction(BaseAction): """Callback method for DJVView action.""" # Launching application - event_data = event["data"] - if "values" not in event_data: + event_values = event["data"].get("value") + if not event_values: return - djv_app_name = event_data["djv_app_name"] - app = self.applicaion_manager.applications.get(djv_app_name) + djv_app_name = event_values["djv_app_name"] + app = self.application_manager.applications.get(djv_app_name) executable = None if app is not None: executable = app.find_executable() @@ -206,11 +206,11 @@ class DJVViewAction(BaseAction): "message": "Couldn't find DJV executable." } - filpath = os.path.normpath(event_data["values"]["path"]) + filpath = os.path.normpath(event_values["path"]) cmd = [ # DJV path - executable, + str(executable), # PATH TO COMPONENT filpath ] From 1e485614bdd01169627b2a05f2005b4d1ef0ade6 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Tue, 2 Jan 2024 11:59:45 +0100 Subject: [PATCH 140/183] keep process in momery for some time --- .../modules/ftrack/event_handlers_user/action_djvview.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openpype/modules/ftrack/event_handlers_user/action_djvview.py b/openpype/modules/ftrack/event_handlers_user/action_djvview.py index bd9cd62e49..5cc056cd91 100644 --- a/openpype/modules/ftrack/event_handlers_user/action_djvview.py +++ b/openpype/modules/ftrack/event_handlers_user/action_djvview.py @@ -217,7 +217,10 @@ class DJVViewAction(BaseAction): try: # Run DJV with these commands - subprocess.Popen(cmd) + _process = subprocess.Popen(cmd) + # Keep process in memory for some time + time.sleep(0.1) + except FileNotFoundError: return { "success": False, From 58a36c541462eda406f90e5d8d0174a689d3ec3b Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Tue, 2 Jan 2024 12:00:03 +0100 Subject: [PATCH 141/183] formatting changes --- .../event_handlers_user/action_djvview.py | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/openpype/modules/ftrack/event_handlers_user/action_djvview.py b/openpype/modules/ftrack/event_handlers_user/action_djvview.py index 5cc056cd91..5778f0d26e 100644 --- a/openpype/modules/ftrack/event_handlers_user/action_djvview.py +++ b/openpype/modules/ftrack/event_handlers_user/action_djvview.py @@ -60,7 +60,7 @@ class DJVViewAction(BaseAction): return False def interface(self, session, entities, event): - if event['data'].get('values', {}): + if event["data"].get("values", {}): return entity = entities[0] @@ -70,32 +70,32 @@ class DJVViewAction(BaseAction): if entity_type == "assetversion": if ( entity[ - 'components' - ][0]['file_type'][1:] in self.allowed_types + "components" + ][0]["file_type"][1:] in self.allowed_types ): versions.append(entity) else: master_entity = entity if entity_type == "task": - master_entity = entity['parent'] + master_entity = entity["parent"] - for asset in master_entity['assets']: - for version in asset['versions']: + for asset in master_entity["assets"]: + for version in asset["versions"]: # Get only AssetVersion of selected task if ( entity_type == "task" and - version['task']['id'] != entity['id'] + version["task"]["id"] != entity["id"] ): continue # Get only components with allowed type - filetype = version['components'][0]['file_type'] + filetype = version["components"][0]["file_type"] if filetype[1:] in self.allowed_types: versions.append(version) if len(versions) < 1: return { - 'success': False, - 'message': 'There are no Asset Versions to open.' + "success": False, + "message": "There are no Asset Versions to open." } # TODO sort them (somehow?) @@ -134,57 +134,57 @@ class DJVViewAction(BaseAction): last_available = None select_value = None for version in versions: - for component in version['components']: + for component in version["components"]: label = base_label.format( - str(version['version']).zfill(3), - version['asset']['type']['name'], - component['name'] + str(version["version"]).zfill(3), + version["asset"]["type"]["name"], + component["name"] ) try: location = component[ - 'component_locations' - ][0]['location'] + "component_locations" + ][0]["location"] file_path = location.get_filesystem_path(component) except Exception: file_path = component[ - 'component_locations' - ][0]['resource_identifier'] + "component_locations" + ][0]["resource_identifier"] if os.path.isdir(os.path.dirname(file_path)): last_available = file_path - if component['name'] == default_component: + if component["name"] == default_component: select_value = file_path version_items.append( - {'label': label, 'value': file_path} + {"label": label, "value": file_path} ) if len(version_items) == 0: return { - 'success': False, - 'message': ( - 'There are no Asset Versions with accessible path.' + "success": False, + "message": ( + "There are no Asset Versions with accessible path." ) } item = { - 'label': 'Items to view', - 'type': 'enumerator', - 'name': 'path', - 'data': sorted( + "label": "Items to view", + "type": "enumerator", + "name": "path", + "data": sorted( version_items, - key=itemgetter('label'), + key=itemgetter("label"), reverse=True ) } if select_value is not None: - item['value'] = select_value + item["value"] = select_value else: - item['value'] = last_available + item["value"] = last_available items.append(item) - return {'items': items} + return {"items": items} def launch(self, session, entities, event): """Callback method for DJVView action.""" From 480c509f8ea4ac4baa835dcb5ae52cb428ad3cbf Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Tue, 2 Jan 2024 15:36:51 +0100 Subject: [PATCH 142/183] fix used key --- openpype/modules/ftrack/event_handlers_user/action_djvview.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/modules/ftrack/event_handlers_user/action_djvview.py b/openpype/modules/ftrack/event_handlers_user/action_djvview.py index 5778f0d26e..cc37faacf2 100644 --- a/openpype/modules/ftrack/event_handlers_user/action_djvview.py +++ b/openpype/modules/ftrack/event_handlers_user/action_djvview.py @@ -13,7 +13,7 @@ class DJVViewAction(BaseAction): description = "DJV View Launcher" icon = statics_icon("app_icons", "djvView.png") - type = 'Application' + type = "Application" allowed_types = [ "cin", "dpx", "avi", "dv", "gif", "flv", "mkv", "mov", "mpg", "mpeg", @@ -190,7 +190,7 @@ class DJVViewAction(BaseAction): """Callback method for DJVView action.""" # Launching application - event_values = event["data"].get("value") + event_values = event["data"].get("values") if not event_values: return From cf29a532d2ace421651d39e2104c03014b9a8aff Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 2 Jan 2024 22:51:51 +0800 Subject: [PATCH 143/183] make sure the texture only loaded when the texture is being enabled --- openpype/hosts/maya/api/lib.py | 12 ++++++------ .../settings/defaults/project_settings/maya.json | 2 +- .../projects_schema/schemas/schema_maya_capture.json | 8 ++++---- .../maya/server/settings/publish_playblast.py | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 1a8a80f224..6a0ccbdbfa 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -227,19 +227,19 @@ def render_capture_preset(preset): ) preset = copy.deepcopy(preset) # not supported by `capture` so we pop it off of the preset - reload_textures = preset["viewport_options"].pop("reloadTextures", True) + reload_textures = preset["viewport_options"].get("loadTextures") panel = preset.pop("panel") with ExitStack() as stack: stack.enter_context(maintained_time()) stack.enter_context(panel_camera(panel, preset["camera"])) stack.enter_context(viewport_default_options(panel, preset)) - if preset["viewport_options"].get("textures"): + if reload_textures: # Force immediate texture loading when to ensure # all textures have loaded before the playblast starts - stack.enter_context(material_loading_mode("immediate")) - if reload_textures: - # Regenerate all UDIM tiles previews - reload_all_udim_tile_previews() + stack.enter_context(material_loading_mode(mode="immediate")) + # Regenerate all UDIM tiles previews + reload_all_udim_tile_previews() + preset["viewport_options"].pop("loadTextures") path = capture.capture(log=self.log, **preset) return path diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 1778530311..8136af8c73 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -1289,7 +1289,7 @@ "twoSidedLighting": true, "lineAAEnable": true, "multiSample": 8, - "reloadTextures": false, + "loadTextures": false, "useDefaultMaterial": false, "wireframeOnShaded": false, "xray": false, diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index 1aa5b3d2e4..76ad9a3ba2 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -238,8 +238,8 @@ }, { "type": "boolean", - "key": "reloadTextures", - "label": "Reload Textures" + "key": "loadTextures", + "label": "Load Textures" }, { "type": "boolean", @@ -915,8 +915,8 @@ }, { "type": "boolean", - "key": "reloadTextures", - "label": "Reload Textures", + "key": "loadTextures", + "label": "Load Textures", "default": false }, { diff --git a/server_addon/maya/server/settings/publish_playblast.py b/server_addon/maya/server/settings/publish_playblast.py index 205f0eb847..db92c80db7 100644 --- a/server_addon/maya/server/settings/publish_playblast.py +++ b/server_addon/maya/server/settings/publish_playblast.py @@ -108,7 +108,7 @@ class ViewportOptionsSetting(BaseSettingsModel): True, title="Enable Anti-Aliasing", section="Anti-Aliasing" ) multiSample: int = Field(8, title="Anti Aliasing Samples") - reloadTextures: bool = Field(False, title="Reload Textures") + loadTextures: bool = Field(False, title="Reload Textures") useDefaultMaterial: bool = Field(False, title="Use Default Material") wireframeOnShaded: bool = Field(False, title="Wireframe On Shaded") xray: bool = Field(False, title="X-Ray") @@ -303,7 +303,7 @@ DEFAULT_PLAYBLAST_SETTING = { "twoSidedLighting": True, "lineAAEnable": True, "multiSample": 8, - "reloadTextures": False, + "loadTextures": False, "useDefaultMaterial": False, "wireframeOnShaded": False, "xray": False, From d351e5f1745f9875b496cbf873eec8b3c0e61ab1 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Tue, 2 Jan 2024 22:54:22 +0800 Subject: [PATCH 144/183] renamed reload Textures to Load Textures --- server_addon/maya/server/settings/publish_playblast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server_addon/maya/server/settings/publish_playblast.py b/server_addon/maya/server/settings/publish_playblast.py index db92c80db7..0abc9f7110 100644 --- a/server_addon/maya/server/settings/publish_playblast.py +++ b/server_addon/maya/server/settings/publish_playblast.py @@ -108,7 +108,7 @@ class ViewportOptionsSetting(BaseSettingsModel): True, title="Enable Anti-Aliasing", section="Anti-Aliasing" ) multiSample: int = Field(8, title="Anti Aliasing Samples") - loadTextures: bool = Field(False, title="Reload Textures") + loadTextures: bool = Field(False, title="Load Textures") useDefaultMaterial: bool = Field(False, title="Use Default Material") wireframeOnShaded: bool = Field(False, title="Wireframe On Shaded") xray: bool = Field(False, title="X-Ray") From bea3c78079e2caa27876873beabc83efea9b6d07 Mon Sep 17 00:00:00 2001 From: erictsaivfx Date: Tue, 2 Jan 2024 09:31:10 -0800 Subject: [PATCH 145/183] fix arrow to timezone typo --- openpype/tools/ayon_workfiles/models/workfiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/tools/ayon_workfiles/models/workfiles.py b/openpype/tools/ayon_workfiles/models/workfiles.py index d74a8e164d..f9f910ac8a 100644 --- a/openpype/tools/ayon_workfiles/models/workfiles.py +++ b/openpype/tools/ayon_workfiles/models/workfiles.py @@ -606,7 +606,7 @@ class PublishWorkfilesModel: print("Failed to format workfile path: {}".format(exc)) dirpath, filename = os.path.split(workfile_path) - created_at = arrow.get(repre_entity["createdAt"].to("local")) + created_at = arrow.get(repre_entity["createdAt"]).to("local") return FileItem( dirpath, filename, From c4ee2f785849db86db967c54d4f256946fbb093a Mon Sep 17 00:00:00 2001 From: Ynbot Date: Wed, 3 Jan 2024 03:26:06 +0000 Subject: [PATCH 146/183] [Automated] Bump version --- openpype/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/version.py b/openpype/version.py index 550bdb70c7..6a8e6f0d95 100644 --- a/openpype/version.py +++ b/openpype/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring Pype version.""" -__version__ = "3.18.2-nightly.5" +__version__ = "3.18.2-nightly.6" From 58909f2b4d90fc6165142014ad59825bad550eda Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jan 2024 03:26:39 +0000 Subject: [PATCH 147/183] chore(): update bug report / version --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index f345829356..3471c32430 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,6 +35,7 @@ body: label: Version description: What version are you running? Look to OpenPype Tray options: + - 3.18.2-nightly.6 - 3.18.2-nightly.5 - 3.18.2-nightly.4 - 3.18.2-nightly.3 @@ -134,7 +135,6 @@ body: - 3.15.6-nightly.1 - 3.15.5 - 3.15.5-nightly.2 - - 3.15.5-nightly.1 validations: required: true - type: dropdown From 379674d7931d4e479b157443757465850c582976 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 3 Jan 2024 15:27:09 +0800 Subject: [PATCH 148/183] remove the condition with the deprecated environment variable in AYON --- openpype/hosts/maya/api/lib.py | 15 ++++++--------- .../maya/plugins/publish/extract_thumbnail.py | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 6a0ccbdbfa..394f92ed42 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -218,16 +218,14 @@ def render_capture_preset(preset): refresh_frame_int = int(cmds.playbackOptions(query=True, minTime=True)) cmds.currentTime(refresh_frame_int - 1, edit=True) cmds.currentTime(refresh_frame_int, edit=True) - - if os.environ.get("OPENPYPE_DEBUG") == "1": - log.debug( - "Using preset: {}".format( - json.dumps(preset, indent=4, sort_keys=True) - ) + log.debug( + "Using preset: {}".format( + json.dumps(preset, indent=4, sort_keys=True) ) + ) preset = copy.deepcopy(preset) # not supported by `capture` so we pop it off of the preset - reload_textures = preset["viewport_options"].get("loadTextures") + reload_textures = preset["viewport_options"].pop("loadTextures", False) panel = preset.pop("panel") with ExitStack() as stack: stack.enter_context(maintained_time()) @@ -239,7 +237,6 @@ def render_capture_preset(preset): stack.enter_context(material_loading_mode(mode="immediate")) # Regenerate all UDIM tiles previews reload_all_udim_tile_previews() - preset["viewport_options"].pop("loadTextures") path = capture.capture(log=self.log, **preset) return path @@ -364,7 +361,7 @@ def viewport_default_options(panel, preset): viewport_defaults[key] = cmds.modelEditor( panel, query=True, **{key: True} ) - if preset["viewport_options"][key]: + if preset["viewport_options"].get(key): cmds.modelEditor( panel, edit=True, **{key: True} ) diff --git a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py index 08f061985e..28362b355c 100644 --- a/openpype/hosts/maya/plugins/publish/extract_thumbnail.py +++ b/openpype/hosts/maya/plugins/publish/extract_thumbnail.py @@ -34,7 +34,7 @@ class ExtractThumbnail(publish.Extractor): # Create temp directory for thumbnail # - this is to avoid "override" of source file - dst_staging = tempfile.mkdtemp(prefix="pyblish_tmp_") + dst_staging = tempfile.mkdtemp(prefix="pyblish_tmp_thumbnail") self.log.debug( "Create temp directory {} for thumbnail".format(dst_staging) ) From 0734682faad9cfb000332af5de7f1b8524c9ae06 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 3 Jan 2024 15:36:27 +0800 Subject: [PATCH 149/183] code tweaks based on Oscar's comment --- openpype/hosts/max/api/lib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/max/api/lib.py b/openpype/hosts/max/api/lib.py index 9b3d3fda98..48b32ad6af 100644 --- a/openpype/hosts/max/api/lib.py +++ b/openpype/hosts/max/api/lib.py @@ -299,9 +299,9 @@ def reset_unit_scale(): """ project_name = get_current_project_name() settings = get_project_settings(project_name).get("max") - unit_scale_setting = settings.get("unit_scale_settings") - if unit_scale_setting: - scene_scale = unit_scale_setting["scene_unit_scale"] + scene_scale = settings.get("unit_scale_settings", + {}).get("scene_unit_scale") + if scene_scale: rt.units.SystemType = rt.Name(scene_scale) From e5784320146e1b95af59b1381bae18b08682b5d6 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 3 Jan 2024 17:42:24 +0800 Subject: [PATCH 150/183] using metric types when the unit type enabled instead of using metric types --- openpype/hosts/max/api/lib.py | 11 +++++------ openpype/settings/defaults/project_settings/max.json | 2 +- .../schemas/projects_schema/schema_project_max.json | 3 --- server_addon/max/server/settings/main.py | 5 +---- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/openpype/hosts/max/api/lib.py b/openpype/hosts/max/api/lib.py index 48b32ad6af..74b53d6426 100644 --- a/openpype/hosts/max/api/lib.py +++ b/openpype/hosts/max/api/lib.py @@ -302,8 +302,10 @@ def reset_unit_scale(): scene_scale = settings.get("unit_scale_settings", {}).get("scene_unit_scale") if scene_scale: - rt.units.SystemType = rt.Name(scene_scale) - + rt.units.DisplayType = rt.Name("Metric") + rt.units.MetricType = rt.Name(scene_scale) + else: + rt.units.DisplayType = rt.Name("Generic") def convert_unit_scale(): """Convert system unit scale in 3dsMax @@ -313,15 +315,12 @@ def convert_unit_scale(): str: unit scale """ unit_scale_dict = { - "inches": "in", - "feet": "ft", - "miles": "mi", "millimeters": "mm", "centimeters": "cm", "meters": "m", "kilometers": "km" } - current_unit_scale = rt.Execute("units.SystemType as string") + current_unit_scale = rt.Execute("units.MetricType as string") return unit_scale_dict[current_unit_scale] def set_context_setting(): diff --git a/openpype/settings/defaults/project_settings/max.json b/openpype/settings/defaults/project_settings/max.json index 1b574dc4d3..d1610610dc 100644 --- a/openpype/settings/defaults/project_settings/max.json +++ b/openpype/settings/defaults/project_settings/max.json @@ -1,7 +1,7 @@ { "unit_scale_settings": { "enabled": true, - "scene_unit_scale": "Inches" + "scene_unit_scale": "Meters" }, "imageio": { "activate_host_color_management": true, diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json index 1df14c04e1..e4d4d40ce7 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_max.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_max.json @@ -25,9 +25,6 @@ "multiselection": false, "defaults": "exr", "enum_items": [ - {"Inches": "in"}, - {"Feet": "ft"}, - {"Miles": "mi"}, {"Millimeters": "mm"}, {"Centimeters": "cm"}, {"Meters": "m"}, diff --git a/server_addon/max/server/settings/main.py b/server_addon/max/server/settings/main.py index 94dee3e55c..582226eb62 100644 --- a/server_addon/max/server/settings/main.py +++ b/server_addon/max/server/settings/main.py @@ -15,9 +15,6 @@ from .publishers import ( def unit_scale_enum(): """Return enumerator for scene unit scale.""" return [ - {"label": "in", "value": "Inches"}, - {"label": "ft", "value": "Feet"}, - {"label": "mi", "value": "Miles"}, {"label": "mm", "value": "Millimeters"}, {"label": "cm", "value": "Centimeters"}, {"label": "m", "value": "Meters"}, @@ -74,7 +71,7 @@ class MaxSettings(BaseSettingsModel): DEFAULT_VALUES = { "unit_scale_settings": { "enabled": True, - "scene_unit_scale": "cm" + "scene_unit_scale": "m" }, "RenderSettings": DEFAULT_RENDER_SETTINGS, "CreateReview": DEFAULT_CREATE_REVIEW_SETTINGS, From 791ca6782e41261ca63be0454cc3cc53cc54cc71 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 3 Jan 2024 17:45:43 +0800 Subject: [PATCH 151/183] hound --- openpype/hosts/max/api/lib.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openpype/hosts/max/api/lib.py b/openpype/hosts/max/api/lib.py index 74b53d6426..4adb30ab65 100644 --- a/openpype/hosts/max/api/lib.py +++ b/openpype/hosts/max/api/lib.py @@ -323,6 +323,7 @@ def convert_unit_scale(): current_unit_scale = rt.Execute("units.MetricType as string") return unit_scale_dict[current_unit_scale] + def set_context_setting(): """Apply the project settings from the project definition From d9f8b9e0f212f61648da3c5aeb444c4f976e6bf3 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 3 Jan 2024 17:50:48 +0800 Subject: [PATCH 152/183] hound --- openpype/hosts/max/api/lib.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openpype/hosts/max/api/lib.py b/openpype/hosts/max/api/lib.py index 4adb30ab65..e2d8d9c55f 100644 --- a/openpype/hosts/max/api/lib.py +++ b/openpype/hosts/max/api/lib.py @@ -307,6 +307,7 @@ def reset_unit_scale(): else: rt.units.DisplayType = rt.Name("Generic") + def convert_unit_scale(): """Convert system unit scale in 3dsMax for fbx export From e4e6503017c4b1333129df4c16208fd239a7f779 Mon Sep 17 00:00:00 2001 From: Toke Jepsen Date: Wed, 3 Jan 2024 12:07:32 +0100 Subject: [PATCH 153/183] Testing: Release Maya/Deadline job from pending when testing. (#5988) * Release job from pending when testing. * Removed render instance This test was created as simple model and workfile publish, without Deadline rendering. Cleaned up render elements. * Revert changes in submit publish plugin --------- Co-authored-by: kalisp --- .../modules/deadline/plugins/publish/submit_maya_deadline.py | 4 ++-- .../modules/deadline/plugins/publish/submit_publish_job.py | 4 +++- .../work/test_task/test_project_test_asset_test_task_v001.ma | 4 ++-- .../work/test_task/test_project_test_asset_test_task_v002.ma | 4 ++-- .../input/workfile/test_project_test_asset_test_task_v001.ma | 4 ++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/submit_maya_deadline.py b/openpype/modules/deadline/plugins/publish/submit_maya_deadline.py index 26a605a744..5591db151a 100644 --- a/openpype/modules/deadline/plugins/publish/submit_maya_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_maya_deadline.py @@ -231,7 +231,7 @@ class MayaSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, job_info.EnvironmentKeyValue["OPENPYPE_LOG_NO_COLORS"] = "1" # Adding file dependencies. - if self.asset_dependencies: + if not bool(os.environ.get("IS_TEST")) and self.asset_dependencies: dependencies = instance.context.data["fileDependencies"] for dependency in dependencies: job_info.AssetDependency += dependency @@ -570,7 +570,7 @@ class MayaSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline, job_info = copy.deepcopy(self.job_info) - if self.asset_dependencies: + if not bool(os.environ.get("IS_TEST")) and self.asset_dependencies: # Asset dependency to wait for at least the scene file to sync. job_info.AssetDependency += self.scene_path diff --git a/openpype/modules/deadline/plugins/publish/submit_publish_job.py b/openpype/modules/deadline/plugins/publish/submit_publish_job.py index 228aa3ec81..04ce2b3433 100644 --- a/openpype/modules/deadline/plugins/publish/submit_publish_job.py +++ b/openpype/modules/deadline/plugins/publish/submit_publish_job.py @@ -297,7 +297,9 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin, job_index)] = assembly_id # noqa: E501 job_index += 1 elif instance.data.get("bakingSubmissionJobs"): - self.log.info("Adding baking submission jobs as dependencies...") + self.log.info( + "Adding baking submission jobs as dependencies..." + ) job_index = 0 for assembly_id in instance.data["bakingSubmissionJobs"]: payload["JobInfo"]["JobDependency{}".format( diff --git a/tests/integration/hosts/maya/test_publish_in_maya/expected/test_project/test_asset/work/test_task/test_project_test_asset_test_task_v001.ma b/tests/integration/hosts/maya/test_publish_in_maya/expected/test_project/test_asset/work/test_task/test_project_test_asset_test_task_v001.ma index 2cc87c2f48..8b90e987de 100644 --- a/tests/integration/hosts/maya/test_publish_in_maya/expected/test_project/test_asset/work/test_task/test_project_test_asset_test_task_v001.ma +++ b/tests/integration/hosts/maya/test_publish_in_maya/expected/test_project/test_asset/work/test_task/test_project_test_asset_test_task_v001.ma @@ -185,7 +185,7 @@ createNode objectSet -n "modelMain"; addAttr -ci true -sn "attrPrefix" -ln "attrPrefix" -dt "string"; addAttr -ci true -sn "publish_attributes" -ln "publish_attributes" -dt "string"; addAttr -ci true -sn "creator_attributes" -ln "creator_attributes" -dt "string"; - addAttr -ci true -sn "__creator_attributes_keys" -ln "__creator_attributes_keys" + addAttr -ci true -sn "__creator_attributes_keys" -ln "__creator_attributes_keys" -dt "string"; setAttr ".ihi" 0; setAttr ".cbId" -type "string" "60df31e2be2b48bd3695c056:7364ea6776c9"; @@ -296,7 +296,7 @@ createNode objectSet -n "workfileMain"; addAttr -ci true -sn "task" -ln "task" -dt "string"; addAttr -ci true -sn "publish_attributes" -ln "publish_attributes" -dt "string"; addAttr -ci true -sn "creator_attributes" -ln "creator_attributes" -dt "string"; - addAttr -ci true -sn "__creator_attributes_keys" -ln "__creator_attributes_keys" + addAttr -ci true -sn "__creator_attributes_keys" -ln "__creator_attributes_keys" -dt "string"; setAttr ".ihi" 0; setAttr ".hio" yes; diff --git a/tests/integration/hosts/maya/test_publish_in_maya/expected/test_project/test_asset/work/test_task/test_project_test_asset_test_task_v002.ma b/tests/integration/hosts/maya/test_publish_in_maya/expected/test_project/test_asset/work/test_task/test_project_test_asset_test_task_v002.ma index 6bd334466a..f2906058cf 100644 --- a/tests/integration/hosts/maya/test_publish_in_maya/expected/test_project/test_asset/work/test_task/test_project_test_asset_test_task_v002.ma +++ b/tests/integration/hosts/maya/test_publish_in_maya/expected/test_project/test_asset/work/test_task/test_project_test_asset_test_task_v002.ma @@ -185,7 +185,7 @@ createNode objectSet -n "modelMain"; addAttr -ci true -sn "attrPrefix" -ln "attrPrefix" -dt "string"; addAttr -ci true -sn "publish_attributes" -ln "publish_attributes" -dt "string"; addAttr -ci true -sn "creator_attributes" -ln "creator_attributes" -dt "string"; - addAttr -ci true -sn "__creator_attributes_keys" -ln "__creator_attributes_keys" + addAttr -ci true -sn "__creator_attributes_keys" -ln "__creator_attributes_keys" -dt "string"; setAttr ".ihi" 0; setAttr ".cbId" -type "string" "60df31e2be2b48bd3695c056:7364ea6776c9"; @@ -296,7 +296,7 @@ createNode objectSet -n "workfileMain"; addAttr -ci true -sn "task" -ln "task" -dt "string"; addAttr -ci true -sn "publish_attributes" -ln "publish_attributes" -dt "string"; addAttr -ci true -sn "creator_attributes" -ln "creator_attributes" -dt "string"; - addAttr -ci true -sn "__creator_attributes_keys" -ln "__creator_attributes_keys" + addAttr -ci true -sn "__creator_attributes_keys" -ln "__creator_attributes_keys" -dt "string"; setAttr ".ihi" 0; setAttr ".hio" yes; diff --git a/tests/integration/hosts/maya/test_publish_in_maya/input/workfile/test_project_test_asset_test_task_v001.ma b/tests/integration/hosts/maya/test_publish_in_maya/input/workfile/test_project_test_asset_test_task_v001.ma index 2cc87c2f48..8b90e987de 100644 --- a/tests/integration/hosts/maya/test_publish_in_maya/input/workfile/test_project_test_asset_test_task_v001.ma +++ b/tests/integration/hosts/maya/test_publish_in_maya/input/workfile/test_project_test_asset_test_task_v001.ma @@ -185,7 +185,7 @@ createNode objectSet -n "modelMain"; addAttr -ci true -sn "attrPrefix" -ln "attrPrefix" -dt "string"; addAttr -ci true -sn "publish_attributes" -ln "publish_attributes" -dt "string"; addAttr -ci true -sn "creator_attributes" -ln "creator_attributes" -dt "string"; - addAttr -ci true -sn "__creator_attributes_keys" -ln "__creator_attributes_keys" + addAttr -ci true -sn "__creator_attributes_keys" -ln "__creator_attributes_keys" -dt "string"; setAttr ".ihi" 0; setAttr ".cbId" -type "string" "60df31e2be2b48bd3695c056:7364ea6776c9"; @@ -296,7 +296,7 @@ createNode objectSet -n "workfileMain"; addAttr -ci true -sn "task" -ln "task" -dt "string"; addAttr -ci true -sn "publish_attributes" -ln "publish_attributes" -dt "string"; addAttr -ci true -sn "creator_attributes" -ln "creator_attributes" -dt "string"; - addAttr -ci true -sn "__creator_attributes_keys" -ln "__creator_attributes_keys" + addAttr -ci true -sn "__creator_attributes_keys" -ln "__creator_attributes_keys" -dt "string"; setAttr ".ihi" 0; setAttr ".hio" yes; From 70062011f7f052f8f918c2a22897a8765cbb1e9e Mon Sep 17 00:00:00 2001 From: Ynbot Date: Wed, 3 Jan 2024 15:14:06 +0000 Subject: [PATCH 154/183] [Automated] Release --- CHANGELOG.md | 317 ++++++++++++++++++++++++++++++++++++++++++++ openpype/version.py | 2 +- pyproject.toml | 2 +- 3 files changed, 319 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f309d904eb..4a21882008 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,323 @@ # Changelog +## [3.18.2](https://github.com/ynput/OpenPype/tree/3.18.2) + + +[Full Changelog](https://github.com/ynput/OpenPype/compare/3.18.1...3.18.2) + +### **🚀 Enhancements** + + +

+Testing: Release Maya/Deadline job from pending when testing. #5988 + +When testing we wont put the Deadline jobs into pending with dependencies, so the worker can start as soon as possible. + + +___ + +
+ + +
+Max: Tweaks on Extractions for the exporters #5814 + +With this PR +- Suspend Refresh would be introduced in abc & obj extractors for optimization. +- Allow users to choose the custom attributes to be included in abc exports + + +___ + +
+ + +
+Maya: Optional preserve references. #5994 + +Optional preserve references when publishing Maya scenes. + + +___ + +
+ + +
+AYON ftrack: Expect 'ayon' group in custom attributes #6066 + +Expect `ayon` group as one of options to get custom attributes. + + +___ + +
+ + +
+AYON Chore: Remove dependencies related to separated addons #6074 + +Removed dependencies from openpype client pyproject.toml that are already defined by addons which require them. + + +___ + +
+ + +
+Editorial & chore: Stop using pathlib2 #6075 + +Do not use `pathlib2` which is Python 2 backport for `pathlib` module in python 3. + + +___ + +
+ + +
+Traypublisher: Correct validator label #6084 + +Use correct label for Validate filepaths. + + +___ + +
+ + +
+Nuke: Extract Review Intermediate disabled when both Extract Review Mov and Extract Review Intermediate disabled in setting #6089 + +Report in Discord https://discord.com/channels/517362899170230292/563751989075378201/1187874498234556477 + + +___ + +
+ +### **🐛 Bug fixes** + + +
+Maya: Bug fix the file from texture node not being collected correctly in Yeti Rig #5990 + +Fix the bug of collect Yeti Rig not being able to get the file parameter(s) from the texture node(s), resulting to the failure of publishing the textures to the resource directory. + + +___ + +
+ + +
+Bug: fix AYON settings for Maya workspace #6069 + +This is changing bug in default AYON setting for Maya workspace, where missing semicolumn caused workspace not being set. This is also syncing default workspace settings to OpenPype + + +___ + +
+ + +
+Refactor colorspace handling in CollectColorspace plugin #6033 + +Traypublisher is now capable set available colorspaces or roles to publishing images sequence or video. This is fix of new implementation where we allowed to use roles in the enumerator selector. + + +___ + +
+ + +
+Bugfix: Houdini render split bugs #6037 + +This PR is a follow up PR to https://github.com/ynput/OpenPype/pull/5420This PR does: +- refactor `get_output_parameter` to what is used to be. +- fix a bug with split render +- rename `exportJob` flag to `split_render` + + +___ + +
+ + +
+Fusion: fix for single frame rendering #6056 + +Fixes publishes of single frame of `render` product type. + + +___ + +
+ + +
+Photoshop: fix layer publish thumbnail missing in loader #6061 + +Thumbnails from any products (either `review` nor separate layer instances) weren't stored in Ayon.This resulted in not showing them in Loader and Server UI. After this PR thumbnails should be shown in the Loader and on the Server (`http://YOUR_AYON_HOSTNAME:5000/projects/YOUR_PROJECT/browser`). + + +___ + +
+ + +
+AYON Chore: Do not use thumbnailSource for thumbnail integration #6063 + +Do not use `thumbnailSource` for thumbnail integration. + + +___ + +
+ + +
+Photoshop: fix creation of .mov #6064 + +Generation of .mov file with 1 frame per published layer was failing. + + +___ + +
+ + +
+Photoshop: fix Collect Color Coded settings #6065 + +Fix for wrong default value for `Collect Color Coded Instances` Settings + + +___ + +
+ + +
+Bug: Fix Publisher parent window in Nuke #6067 + +Fixing issue where publisher parent window wasn't set because wrong use of version constant. + + +___ + +
+ + +
+Python console widget: Save registry fix #6076 + +Do not save registry until there is something to save. + + +___ + +
+ + +
+Ftrack: update asset names for multiple reviewable items #6077 + +Multiple reviewable assetVersion components with better grouping to asset version name. + + +___ + +
+ + +
+Ftrack: DJV action fixes #6098 + +Fix bugs in DJV ftrack action. + + +___ + +
+ + +
+AYON Workfiles tool: Fix arrow to timezone typo #6099 + +Fix parenthesis typo with arrow local timezone function. + + +___ + +
+ +### **🔀 Refactored code** + + +
+Chore: Update folder-favorite icon to ayon icon #5718 + +Updates old "Pype-2.0-era" (from ancient greece times) to AYON logo equivalent.I believe it's only used in Nuke. + + +___ + +
+ +### **Merged pull requests** + + +
+Chore: Maya / Nuke remove publish gui filters from settings #5570 + +- Remove Publish GUI Filters from Nuke settings +- Remove Publish GUI Filters from Maya settings + + +___ + +
+ + +
+Fusion: Project/User option for output format (create_saver) #6045 + +Adds "Output Image Format" option which can be set via project settings and overwritten by users in "Create" menu. This replaces the current behaviour of being hardcoded to "exr". Replacing the need for people to manually edit the saver path if they require a different extension. + + +___ + +
+ + +
+Fusion: Output Image Format Updating Instances (create_saver) #6060 + +Adds the ability to update Saver image output format if changed in the Publish UI.~~Adds an optional validator that compares "Output Image Format" in the Publish menu against the one currently found on the saver. It then offers a repair action to update the output extension on the saver.~~ + + +___ + +
+ + +
+Tests: Fix representation count for AE legacy test #6072 + + +___ + +
+ + + + ## [3.18.1](https://github.com/ynput/OpenPype/tree/3.18.1) diff --git a/openpype/version.py b/openpype/version.py index 6a8e6f0d95..4d7b8f372f 100644 --- a/openpype/version.py +++ b/openpype/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring Pype version.""" -__version__ = "3.18.2-nightly.6" +__version__ = "3.18.2" diff --git a/pyproject.toml b/pyproject.toml index e64018498f..38236f88bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "OpenPype" -version = "3.18.1" # OpenPype +version = "3.18.2" # OpenPype description = "Open VFX and Animation pipeline with support." authors = ["OpenPype Team "] license = "MIT License" From c4dea2c74a2ce25963a796d29a130c8355778718 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jan 2024 15:15:06 +0000 Subject: [PATCH 155/183] chore(): update bug report / version --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 3471c32430..132e960885 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,6 +35,7 @@ body: label: Version description: What version are you running? Look to OpenPype Tray options: + - 3.18.2 - 3.18.2-nightly.6 - 3.18.2-nightly.5 - 3.18.2-nightly.4 @@ -134,7 +135,6 @@ body: - 3.15.6-nightly.2 - 3.15.6-nightly.1 - 3.15.5 - - 3.15.5-nightly.2 validations: required: true - type: dropdown From be3bc7af8e64c727ab51ce834d5232d7d8fc7ce1 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 3 Jan 2024 23:20:17 +0800 Subject: [PATCH 156/183] code changes based on Ondrej's comment --- openpype/hosts/max/api/pipeline.py | 56 +++++++----------------------- 1 file changed, 13 insertions(+), 43 deletions(-) diff --git a/openpype/hosts/max/api/pipeline.py b/openpype/hosts/max/api/pipeline.py index 98895b858e..d0ae854dc8 100644 --- a/openpype/hosts/max/api/pipeline.py +++ b/openpype/hosts/max/api/pipeline.py @@ -3,7 +3,6 @@ import os import logging from operator import attrgetter -from functools import partial import json @@ -14,10 +13,6 @@ from openpype.pipeline import ( register_loader_plugin_path, AVALON_CONTAINER_ID, ) -from openpype.lib import ( - register_event_callback, - emit_event -) from openpype.hosts.max.api.menu import OpenPypeMenu from openpype.hosts.max.api import lib from openpype.hosts.max.api.plugin import MS_CUSTOM_ATTRIB @@ -51,14 +46,19 @@ class MaxHost(HostBase, IWorkfileHost, ILoadHost, IPublishHost): register_loader_plugin_path(LOAD_PATH) register_creator_plugin_path(CREATE_PATH) - self._register_callbacks() + # self._register_callbacks() self.menu = OpenPypeMenu() - register_event_callback( - "init", self._deferred_menu_creation) self._has_been_setup = True - register_event_callback("open", on_open) - register_event_callback("new", on_new) + + def context_setting(): + return lib.set_context_setting() + + rt.callbacks.addScript(rt.Name('systemPostNew'), + context_setting) + + rt.callbacks.addScript(rt.Name('filePostOpen'), + lib.check_colorspace) def has_unsaved_changes(self): # TODO: how to get it from 3dsmax? @@ -83,28 +83,11 @@ class MaxHost(HostBase, IWorkfileHost, ILoadHost, IPublishHost): return ls() def _register_callbacks(self): - unique_id = rt.Name("openpype_callbacks") - for handler, event in self._op_events.copy().items(): - if event is None: - continue - try: - rt.callbacks.removeScripts(id=unique_id) - self._op_events[handler] = None - except RuntimeError as exc: - self.log.info(exc) + rt.callbacks.removeScripts(id=rt.name("OpenPypeCallbacks")) - self._op_events["init"] = rt.callbacks.addScript( + rt.callbacks.addScript( rt.Name("postLoadingMenus"), - partial(_emit_event_notification_param, "init"), - id=unique_id) - self._op_events["new"] = rt.callbacks.addScript( - rt.Name('systemPostNew'), - partial(_emit_event_notification_param, "new"), - id=unique_id) - self._op_events["open"] = rt.callbacks.addScript( - rt.Name('filePostOpen'), - partial(_emit_event_notification_param, "open"), - id=unique_id) + self._deferred_menu_creation, id=rt.Name('OpenPypeCallbacks')) def _deferred_menu_creation(self): self.log.info("Building menu ...") @@ -161,19 +144,6 @@ attributes "OpenPypeContext" rt.saveMaxFile(dst_path) -def _emit_event_notification_param(event): - notification = rt.callbacks.notificationParam() - emit_event(event, {"notificationParam": notification}) - - -def on_open(): - return lib.check_colorspace() - - -def on_new(): - return lib.set_context_setting() - - def ls() -> list: """Get all OpenPype instances.""" objs = rt.objects From 02d41c4cd699d801a16b80fb5867b3e44dee3952 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 3 Jan 2024 23:51:08 +0800 Subject: [PATCH 157/183] small setting bug tweaks on ayon setting --- server_addon/max/server/settings/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server_addon/max/server/settings/main.py b/server_addon/max/server/settings/main.py index 582226eb62..cad6024cf7 100644 --- a/server_addon/max/server/settings/main.py +++ b/server_addon/max/server/settings/main.py @@ -71,7 +71,7 @@ class MaxSettings(BaseSettingsModel): DEFAULT_VALUES = { "unit_scale_settings": { "enabled": True, - "scene_unit_scale": "m" + "scene_unit_scale": "Centimeters" }, "RenderSettings": DEFAULT_RENDER_SETTINGS, "CreateReview": DEFAULT_CREATE_REVIEW_SETTINGS, From aa9dbf612eda69cf03c21c086f229aaf73b600d4 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Thu, 4 Jan 2024 10:51:18 +0100 Subject: [PATCH 158/183] Chore: Event callbacks can have order (#6080) * EventCallback object have order * callbacks are processed by the callback order * safer approach to get function information * modified docstring a little * added tests for ordered calbacks * fix python 2 support * added support for partial methods * removed unused '_get_func_info' * formatting fix * change test functions docstring * added test for removement of source function when partial is used * Allow order 'None' * implemented 'weakref_partial' to allow partial callbacks * minor tweaks * added support to pass additional arguments to 'wearkref_partial' * modify docstring * added 'weakref_partial' to tests * move public method before prive methods * added required order back but use '100' as default order * fix typo Co-authored-by: Roy Nieterau --------- Co-authored-by: Roy Nieterau --- openpype/lib/events.py | 387 +++++++++++++++---- openpype/lib/python_module_tools.py | 2 +- tests/unit/openpype/lib/test_event_system.py | 97 ++++- 3 files changed, 399 insertions(+), 87 deletions(-) diff --git a/openpype/lib/events.py b/openpype/lib/events.py index 496b765a05..774790b80a 100644 --- a/openpype/lib/events.py +++ b/openpype/lib/events.py @@ -16,6 +16,113 @@ class MissingEventSystem(Exception): pass +def _get_func_ref(func): + if inspect.ismethod(func): + return WeakMethod(func) + return weakref.ref(func) + + +def _get_func_info(func): + path = "" + if func is None: + return "", path + + if hasattr(func, "__name__"): + name = func.__name__ + else: + name = str(func) + + # Get path to file and fallback to '' if fails + # NOTE This was added because of 'partial' functions which is handled, + # but who knows what else can cause this to fail? + try: + path = os.path.abspath(inspect.getfile(func)) + except TypeError: + pass + + return name, path + + +class weakref_partial: + """Partial function with weak reference to the wrapped function. + + Can be used as 'functools.partial' but it will store weak reference to + function. That means that the function must be reference counted + to avoid garbage collecting the function itself. + + When the referenced functions is garbage collected then calling the + weakref partial (no matter the args/kwargs passed) will do nothing. + It will fail silently, returning `None`. The `is_valid()` method can + be used to detect whether the reference is still valid. + + Is useful for object methods. In that case the callback is + deregistered when object is destroyed. + + Warnings: + Values passed as *args and **kwargs are stored strongly in memory. + That may "keep alive" objects that should be already destroyed. + It is recommended to pass only immutable objects like 'str', + 'bool', 'int' etc. + + Args: + func (Callable): Function to wrap. + *args: Arguments passed to the wrapped function. + **kwargs: Keyword arguments passed to the wrapped function. + """ + + def __init__(self, func, *args, **kwargs): + self._func_ref = _get_func_ref(func) + self._args = args + self._kwargs = kwargs + + def __call__(self, *args, **kwargs): + func = self._func_ref() + if func is None: + return + + new_args = tuple(list(self._args) + list(args)) + new_kwargs = dict(self._kwargs) + new_kwargs.update(kwargs) + return func(*new_args, **new_kwargs) + + def get_func(self): + """Get wrapped function. + + Returns: + Union[Callable, None]: Wrapped function or None if it was + destroyed. + """ + + return self._func_ref() + + def is_valid(self): + """Check if wrapped function is still valid. + + Returns: + bool: Is wrapped function still valid. + """ + + return self._func_ref() is not None + + def validate_signature(self, *args, **kwargs): + """Validate if passed arguments are supported by wrapped function. + + Returns: + bool: Are passed arguments supported by wrapped function. + """ + + func = self._func_ref() + if func is None: + return False + + new_args = tuple(list(self._args) + list(args)) + new_kwargs = dict(self._kwargs) + new_kwargs.update(kwargs) + return is_func_signature_supported( + func, *new_args, **new_kwargs + ) + + class EventCallback(object): """Callback registered to a topic. @@ -34,20 +141,37 @@ class EventCallback(object): or none arguments. When 1 argument is expected then the processed 'Event' object is passed in. - The registered callbacks don't keep function in memory so it is not - possible to store lambda function as callback. + The callbacks are validated against their reference counter, that is + achieved using 'weakref' module. That means that the callback must + be stored in memory somewhere. e.g. lambda functions are not + supported as valid callback. + + You can use 'weakref_partial' functions. In that case is partial object + stored in the callback object and reference counter is checked for + the wrapped function. Args: - topic(str): Topic which will be listened. - func(func): Callback to a topic. + topic (str): Topic which will be listened. + func (Callable): Callback to a topic. + order (Union[int, None]): Order of callback. Lower number means higher + priority. Raises: TypeError: When passed function is not a callable object. """ - def __init__(self, topic, func): + def __init__(self, topic, func, order): + if not callable(func): + raise TypeError(( + "Registered callback is not callable. \"{}\"" + ).format(str(func))) + + self._validate_order(order) + self._log = None self._topic = topic + self._order = order + self._enabled = True # Replace '*' with any character regex and escape rest of text # - when callback is registered for '*' topic it will receive all # events @@ -63,37 +187,38 @@ class EventCallback(object): topic_regex = re.compile(topic_regex_str) self._topic_regex = topic_regex - # Convert callback into references - # - deleted functions won't cause crashes - if inspect.ismethod(func): - func_ref = WeakMethod(func) - elif callable(func): - func_ref = weakref.ref(func) + # Callback function prep + if isinstance(func, weakref_partial): + partial_func = func + (name, path) = _get_func_info(func.get_func()) + func_ref = None + expect_args = partial_func.validate_signature("fake") + expect_kwargs = partial_func.validate_signature(event="fake") + else: - raise TypeError(( - "Registered callback is not callable. \"{}\"" - ).format(str(func))) + partial_func = None + (name, path) = _get_func_info(func) + # Convert callback into references + # - deleted functions won't cause crashes + func_ref = _get_func_ref(func) - # Collect function name and path to file for logging - func_name = func.__name__ - func_path = os.path.abspath(inspect.getfile(func)) - - # Get expected arguments from function spec - # - positional arguments are always preferred - expect_args = is_func_signature_supported(func, "fake") - expect_kwargs = is_func_signature_supported(func, event="fake") + # Get expected arguments from function spec + # - positional arguments are always preferred + expect_args = is_func_signature_supported(func, "fake") + expect_kwargs = is_func_signature_supported(func, event="fake") self._func_ref = func_ref - self._func_name = func_name - self._func_path = func_path + self._partial_func = partial_func + self._ref_is_valid = True self._expect_args = expect_args self._expect_kwargs = expect_kwargs - self._ref_valid = func_ref is not None - self._enabled = True + + self._name = name + self._path = path def __repr__(self): return "< {} - {} > {}".format( - self.__class__.__name__, self._func_name, self._func_path + self.__class__.__name__, self._name, self._path ) @property @@ -104,32 +229,83 @@ class EventCallback(object): @property def is_ref_valid(self): - return self._ref_valid + """ + + Returns: + bool: Is reference to callback valid. + """ + + self._validate_ref() + return self._ref_is_valid def validate_ref(self): - if not self._ref_valid: - return + """Validate if reference to callback is valid. - callback = self._func_ref() - if not callback: - self._ref_valid = False + Deprecated: + Reference is always live checkd with 'is_ref_valid'. + """ + + # Trigger validate by getting 'is_valid' + _ = self.is_ref_valid @property def enabled(self): - """Is callback enabled.""" + """Is callback enabled. + + Returns: + bool: Is callback enabled. + """ + return self._enabled def set_enabled(self, enabled): - """Change if callback is enabled.""" + """Change if callback is enabled. + + Args: + enabled (bool): Change enabled state of the callback. + """ + self._enabled = enabled def deregister(self): """Calling this function will cause that callback will be removed.""" - # Fake reference - self._ref_valid = False + + self._ref_is_valid = False + self._partial_func = None + self._func_ref = None + + def get_order(self): + """Get callback order. + + Returns: + Union[int, None]: Callback order. + """ + + return self._order + + def set_order(self, order): + """Change callback order. + + Args: + order (Union[int, None]): Order of callback. Lower number means + higher priority. + """ + + self._validate_order(order) + self._order = order + + order = property(get_order, set_order) def topic_matches(self, topic): - """Check if event topic matches callback's topic.""" + """Check if event topic matches callback's topic. + + Args: + topic (str): Topic name. + + Returns: + bool: Topic matches callback's topic. + """ + return self._topic_regex.match(topic) def process_event(self, event): @@ -139,36 +315,69 @@ class EventCallback(object): event(Event): Event that was triggered. """ - # Skip if callback is not enabled or has invalid reference - if not self._ref_valid or not self._enabled: + # Skip if callback is not enabled + if not self._enabled: return - # Get reference - callback = self._func_ref() - # Check if reference is valid or callback's topic matches the event - if not callback: - # Change state if is invalid so the callback is removed - self._ref_valid = False + # Get reference and skip if is not available + callback = self._get_callback() + if callback is None: + return - elif self.topic_matches(event.topic): - # Try execute callback - try: - if self._expect_args: - callback(event) + if not self.topic_matches(event.topic): + return - elif self._expect_kwargs: - callback(event=event) + # Try to execute callback + try: + if self._expect_args: + callback(event) - else: - callback() + elif self._expect_kwargs: + callback(event=event) - except Exception: - self.log.warning( - "Failed to execute event callback {}".format( - str(repr(self)) - ), - exc_info=True - ) + else: + callback() + + except Exception: + self.log.warning( + "Failed to execute event callback {}".format( + str(repr(self)) + ), + exc_info=True + ) + + def _validate_order(self, order): + if isinstance(order, int): + return + + raise TypeError( + "Expected type 'int' got '{}'.".format(str(type(order))) + ) + + def _get_callback(self): + if self._partial_func is not None: + return self._partial_func + + if self._func_ref is not None: + return self._func_ref() + return None + + def _validate_ref(self): + if self._ref_is_valid is False: + return + + if self._func_ref is not None: + self._ref_is_valid = self._func_ref() is not None + + elif self._partial_func is not None: + self._ref_is_valid = self._partial_func.is_valid() + + else: + self._ref_is_valid = False + + if not self._ref_is_valid: + self._func_ref = None + self._partial_func = None # Inherit from 'object' for Python 2 hosts @@ -282,30 +491,39 @@ class Event(object): class EventSystem(object): """Encapsulate event handling into an object. - System wraps registered callbacks and triggered events into single object - so it is possible to create mutltiple independent systems that have their + System wraps registered callbacks and triggered events into single object, + so it is possible to create multiple independent systems that have their topics and callbacks. - + Callbacks are stored by order of their registration, but it is possible to + manually define order of callbacks using 'order' argument within + 'add_callback'. """ + default_order = 100 + def __init__(self): self._registered_callbacks = [] - def add_callback(self, topic, callback): + def add_callback(self, topic, callback, order=None): """Register callback in event system. Args: topic (str): Topic for EventCallback. - callback (Callable): Function or method that will be called - when topic is triggered. + callback (Union[Callable, weakref_partial]): Function or method + that will be called when topic is triggered. + order (Optional[int]): Order of callback. Lower number means + higher priority. Returns: EventCallback: Created callback object which can be used to stop listening. """ - callback = EventCallback(topic, callback) + if order is None: + order = self.default_order + + callback = EventCallback(topic, callback, order) self._registered_callbacks.append(callback) return callback @@ -341,22 +559,6 @@ class EventSystem(object): event.emit() return event - def _process_event(self, event): - """Process event topic and trigger callbacks. - - Args: - event (Event): Prepared event with topic and data. - """ - - invalid_callbacks = [] - for callback in self._registered_callbacks: - callback.process_event(event) - if not callback.is_ref_valid: - invalid_callbacks.append(callback) - - for callback in invalid_callbacks: - self._registered_callbacks.remove(callback) - def emit_event(self, event): """Emit event object. @@ -366,6 +568,21 @@ class EventSystem(object): self._process_event(event) + def _process_event(self, event): + """Process event topic and trigger callbacks. + + Args: + event (Event): Prepared event with topic and data. + """ + + callbacks = tuple(sorted( + self._registered_callbacks, key=lambda x: x.order + )) + for callback in callbacks: + callback.process_event(event) + if not callback.is_ref_valid: + self._registered_callbacks.remove(callback) + class QueuedEventSystem(EventSystem): """Events are automatically processed in queue. diff --git a/openpype/lib/python_module_tools.py b/openpype/lib/python_module_tools.py index bedf19562d..4f9eb7f667 100644 --- a/openpype/lib/python_module_tools.py +++ b/openpype/lib/python_module_tools.py @@ -269,7 +269,7 @@ def is_func_signature_supported(func, *args, **kwargs): True Args: - func (function): A function where the signature should be tested. + func (Callable): A function where the signature should be tested. *args (Any): Positional arguments for function signature. **kwargs (Any): Keyword arguments for function signature. diff --git a/tests/unit/openpype/lib/test_event_system.py b/tests/unit/openpype/lib/test_event_system.py index aa3f929065..b0a011d83e 100644 --- a/tests/unit/openpype/lib/test_event_system.py +++ b/tests/unit/openpype/lib/test_event_system.py @@ -1,4 +1,9 @@ -from openpype.lib.events import EventSystem, QueuedEventSystem +from functools import partial +from openpype.lib.events import ( + EventSystem, + QueuedEventSystem, + weakref_partial, +) def test_default_event_system(): @@ -81,3 +86,93 @@ def test_manual_event_system_queue(): assert output == expected_output, ( "Callbacks were not called in correct order") + + +def test_unordered_events(): + """ + Validate if callbacks are triggered in order of their register. + """ + + result = [] + + def function_a(): + result.append("A") + + def function_b(): + result.append("B") + + def function_c(): + result.append("C") + + # Without order + event_system = QueuedEventSystem() + event_system.add_callback("test", function_a) + event_system.add_callback("test", function_b) + event_system.add_callback("test", function_c) + event_system.emit("test", {}, "test") + + assert result == ["A", "B", "C"] + + +def test_ordered_events(): + """ + Validate if callbacks are triggered by their order and order + of their register. + """ + result = [] + + def function_a(): + result.append("A") + + def function_b(): + result.append("B") + + def function_c(): + result.append("C") + + def function_d(): + result.append("D") + + def function_e(): + result.append("E") + + def function_f(): + result.append("F") + + # Without order + event_system = QueuedEventSystem() + event_system.add_callback("test", function_a) + event_system.add_callback("test", function_b, order=-10) + event_system.add_callback("test", function_c, order=200) + event_system.add_callback("test", function_d, order=150) + event_system.add_callback("test", function_e) + event_system.add_callback("test", function_f, order=200) + event_system.emit("test", {}, "test") + + assert result == ["B", "A", "E", "D", "C", "F"] + + +def test_events_partial_callbacks(): + """ + Validate if partial callbacks are triggered. + """ + + result = [] + + def function(name): + result.append(name) + + def function_regular(): + result.append("regular") + + event_system = QueuedEventSystem() + event_system.add_callback("test", function_regular) + event_system.add_callback("test", partial(function, "foo")) + event_system.add_callback("test", weakref_partial(function, "bar")) + event_system.emit("test", {}, "test") + + # Delete function should also make partial callbacks invalid + del function + event_system.emit("test", {}, "test") + + assert result == ["regular", "bar", "regular"] From 989ec8beb2947c8abef969c9e2922bea0eec2f8f Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 4 Jan 2024 18:03:05 +0800 Subject: [PATCH 159/183] make sure the default shader assigned to the redshift proxy --- openpype/hosts/maya/plugins/load/load_redshift_proxy.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py index b3fbfb2ed9..0ed09c6007 100644 --- a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py @@ -137,6 +137,14 @@ class RedshiftProxyLoader(load.LoaderPlugin): cmds.connectAttr("{}.outMesh".format(rs_mesh), "{}.inMesh".format(mesh_shape)) + # TODO: use the assigned shading group as shaders if existed + # assign default shader to redshift proxy + shader_grp = next( + (shader_group for shader_group in cmds.ls(type="shadingEngine") + if shader_group=="initialShadingGroup") + ) + cmds.sets(mesh_shape, forceElement=shader_grp) + group_node = cmds.group(empty=True, name="{}_GRP".format(name)) mesh_transform = cmds.listRelatives(mesh_shape, parent=True, fullPath=True) From fba52796d61c9968543a5ccaec3b4cf23459535d Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 4 Jan 2024 18:04:03 +0800 Subject: [PATCH 160/183] assign the textures when the initial shading group is located --- openpype/hosts/maya/plugins/load/load_redshift_proxy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py index 0ed09c6007..340533ccbd 100644 --- a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py @@ -143,7 +143,8 @@ class RedshiftProxyLoader(load.LoaderPlugin): (shader_group for shader_group in cmds.ls(type="shadingEngine") if shader_group=="initialShadingGroup") ) - cmds.sets(mesh_shape, forceElement=shader_grp) + if shader_grp: + cmds.sets(mesh_shape, forceElement=shader_grp) group_node = cmds.group(empty=True, name="{}_GRP".format(name)) mesh_transform = cmds.listRelatives(mesh_shape, From a7efe2ea759a6775c42bb0b53a3992201e0f00a3 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 4 Jan 2024 18:14:26 +0800 Subject: [PATCH 161/183] hound --- openpype/hosts/maya/plugins/load/load_redshift_proxy.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py index 340533ccbd..f67fe1c529 100644 --- a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py @@ -139,10 +139,9 @@ class RedshiftProxyLoader(load.LoaderPlugin): # TODO: use the assigned shading group as shaders if existed # assign default shader to redshift proxy - shader_grp = next( - (shader_group for shader_group in cmds.ls(type="shadingEngine") - if shader_group=="initialShadingGroup") - ) + shader_grp = next((shader_group for shader_group + in cmds.ls(type="shadingEngine") + if shader_group=="initialShadingGroup")) if shader_grp: cmds.sets(mesh_shape, forceElement=shader_grp) From 3af7795f19e93082824e0162f0436687f13dee51 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 4 Jan 2024 18:18:13 +0800 Subject: [PATCH 162/183] hound --- .../hosts/maya/plugins/load/load_redshift_proxy.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py index f67fe1c529..7f88f1b152 100644 --- a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py @@ -139,11 +139,11 @@ class RedshiftProxyLoader(load.LoaderPlugin): # TODO: use the assigned shading group as shaders if existed # assign default shader to redshift proxy - shader_grp = next((shader_group for shader_group - in cmds.ls(type="shadingEngine") - if shader_group=="initialShadingGroup")) - if shader_grp: - cmds.sets(mesh_shape, forceElement=shader_grp) + shader_grp = next( + (shader_group for shader_group in cmds.ls(type="shadingEngine") + if shader_group == "initialShadingGroup") + ) + cmds.sets(mesh_shape, forceElement=shader_grp) group_node = cmds.group(empty=True, name="{}_GRP".format(name)) mesh_transform = cmds.listRelatives(mesh_shape, From bcea8967acab10bbc406fdfb0d7db4b12680f121 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 4 Jan 2024 19:18:33 +0800 Subject: [PATCH 163/183] code tweaks on shader_grp's variable --- openpype/hosts/maya/plugins/load/load_redshift_proxy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py index 7f88f1b152..7b657f9184 100644 --- a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py @@ -140,8 +140,9 @@ class RedshiftProxyLoader(load.LoaderPlugin): # TODO: use the assigned shading group as shaders if existed # assign default shader to redshift proxy shader_grp = next( - (shader_group for shader_group in cmds.ls(type="shadingEngine") - if shader_group == "initialShadingGroup") + (shader_group for shader_group in + cmds.ls("initialShadingGroup", type="shadingEngine") + ) ) cmds.sets(mesh_shape, forceElement=shader_grp) From b40cba08016a9607d4e5f82ac534e0970079bae8 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 4 Jan 2024 19:20:43 +0800 Subject: [PATCH 164/183] hound --- openpype/hosts/maya/plugins/load/load_redshift_proxy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py index 7b657f9184..33f39ebf38 100644 --- a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py @@ -140,8 +140,9 @@ class RedshiftProxyLoader(load.LoaderPlugin): # TODO: use the assigned shading group as shaders if existed # assign default shader to redshift proxy shader_grp = next( - (shader_group for shader_group in - cmds.ls("initialShadingGroup", type="shadingEngine") + ( + shader_group for shader_group in + cmds.ls("initialShadingGroup", type="shadingEngine") ) ) cmds.sets(mesh_shape, forceElement=shader_grp) From 584341dcef9a4d4185ba1d159d60fcba9d0dc755 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Thu, 4 Jan 2024 19:30:43 +0800 Subject: [PATCH 165/183] code tweaks on default shader grp --- openpype/hosts/maya/plugins/load/load_redshift_proxy.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py index 33f39ebf38..40385f34d6 100644 --- a/openpype/hosts/maya/plugins/load/load_redshift_proxy.py +++ b/openpype/hosts/maya/plugins/load/load_redshift_proxy.py @@ -139,13 +139,8 @@ class RedshiftProxyLoader(load.LoaderPlugin): # TODO: use the assigned shading group as shaders if existed # assign default shader to redshift proxy - shader_grp = next( - ( - shader_group for shader_group in - cmds.ls("initialShadingGroup", type="shadingEngine") - ) - ) - cmds.sets(mesh_shape, forceElement=shader_grp) + if cmds.ls("initialShadingGroup", type="shadingEngine"): + cmds.sets(mesh_shape, forceElement="initialShadingGroup") group_node = cmds.group(empty=True, name="{}_GRP".format(name)) mesh_transform = cmds.listRelatives(mesh_shape, From 6043d5f7d9a053cbc82936c3978ad590b2053798 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:17:45 +0100 Subject: [PATCH 166/183] openpype addon defines runtime dependencies (#6095) --- server_addon/openpype/client/pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server_addon/openpype/client/pyproject.toml b/server_addon/openpype/client/pyproject.toml index 318ceb0185..d8de9d4d96 100644 --- a/server_addon/openpype/client/pyproject.toml +++ b/server_addon/openpype/client/pyproject.toml @@ -16,3 +16,8 @@ pynput = "^1.7.2" # Timers manager - TODO remove "Qt.py" = "^1.3.3" qtawesome = "0.7.3" speedcopy = "^2.1" + +[ayon.runtimeDependencies] +OpenTimelineIO = "0.14.1" +opencolorio = "2.2.1" +Pillow = "9.5.0" From 91a1fb1cdbff63442426b1b0e6bb6768a17aa49e Mon Sep 17 00:00:00 2001 From: kaa Date: Thu, 4 Jan 2024 15:59:26 +0100 Subject: [PATCH 167/183] General: We should keep current subset version when we switch only the representation type (#4629) * keep current subset version when switch repre * added comment and safe switch repres * more clearly variable names and revert last feat * check selected but no change * fix switch hero version --- .../tools/sceneinventory/switch_dialog.py | 39 ++++++++++++++----- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/openpype/tools/sceneinventory/switch_dialog.py b/openpype/tools/sceneinventory/switch_dialog.py index ce2272df57..150e369678 100644 --- a/openpype/tools/sceneinventory/switch_dialog.py +++ b/openpype/tools/sceneinventory/switch_dialog.py @@ -1230,12 +1230,12 @@ class SwitchAssetDialog(QtWidgets.QDialog): version_ids = list() - version_docs_by_parent_id = {} + version_docs_by_parent_id_and_name = collections.defaultdict(dict) for version_doc in version_docs: parent_id = version_doc["parent"] - if parent_id not in version_docs_by_parent_id: - version_ids.append(version_doc["_id"]) - version_docs_by_parent_id[parent_id] = version_doc + version_ids.append(version_doc["_id"]) + name = version_doc["name"] + version_docs_by_parent_id_and_name[parent_id][name] = version_doc hero_version_docs_by_parent_id = {} for hero_version_doc in hero_version_docs: @@ -1293,13 +1293,32 @@ class SwitchAssetDialog(QtWidgets.QDialog): repre_doc = _repres.get(container_repre_name) if not repre_doc: - version_doc = version_docs_by_parent_id[subset_id] - version_id = version_doc["_id"] - repres_by_name = repre_docs_by_parent_id_by_name[version_id] - if selected_representation: - repre_doc = repres_by_name[selected_representation] + version_docs_by_name = version_docs_by_parent_id_and_name[ + subset_id + ] + + # If asset or subset are selected for switching, we use latest + # version else we try to keep the current container version. + if ( + selected_asset not in (None, container_asset_name) + or selected_subset not in (None, container_subset_name) + ): + version_name = max(version_docs_by_name) else: - repre_doc = repres_by_name[container_repre_name] + version_name = container_version["name"] + + version_doc = version_docs_by_name[version_name] + version_id = version_doc["_id"] + repres_docs_by_name = repre_docs_by_parent_id_by_name[ + version_id + ] + + if selected_representation: + repres_name = selected_representation + else: + repres_name = container_repre_name + + repre_doc = repres_docs_by_name[repres_name] error = None try: From fd87751c36dc2c1fe1565dc8d782d8dcd786bf3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Sat, 6 Jan 2024 00:01:14 +0100 Subject: [PATCH 168/183] :art: add split export support for redshift --- .../plugins/publish/collect_redshift_rop.py | 19 +++++++++++++++++++ .../publish/submit_houdini_render_deadline.py | 10 ++++++++++ server_addon/deadline/server/version.py | 2 +- server_addon/houdini/server/version.py | 2 +- 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py b/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py index 0acddab011..cd3bb2bb7a 100644 --- a/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py @@ -45,6 +45,25 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin): beauty_suffix = rop.evalParm("RS_outputBeautyAOVSuffix") render_products = [] + # Store whether we are splitting the render job (export + render) + split_render = bool(rop.parm("RS_archive_enable").eval()) + instance.data["splitRender"] = split_render + export_prefix = None + export_products = [] + if split_render: + export_prefix = evalParmNoFrame( + rop, "RS_archive_file", pad_character="0" + ) + beauty_export_product = self.get_render_product_name( + prefix=export_prefix, + suffix=None) + export_products.append(beauty_export_product) + self.log.debug( + "Found export product: {}".format(beauty_export_product) + ) + instance.data["ifdFile"] = beauty_export_product + instance.data["exportFiles"] = list(export_products) + # Default beauty AOV beauty_product = self.get_render_product_name( prefix=default_prefix, suffix=beauty_suffix diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index c8960185b2..0bfb37ee1c 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -41,6 +41,11 @@ class VrayRenderPluginInfo(): SeparateFilesPerFrame = attr.ib(default=True) +@attr.s +class RedshiftRenderPluginInfo(): + SceneFile = attr.ib(default=None) + Version = attr.ib(default=None) + class HoudiniSubmitDeadline( abstract_submit_deadline.AbstractSubmitDeadline, OpenPypePyblishPluginMixin @@ -262,6 +267,11 @@ class HoudiniSubmitDeadline( plugin_info = VrayRenderPluginInfo( InputFilename=instance.data["ifdFile"], ) + elif family == "redshift_rop": + plugin_info = RedshiftRenderPluginInfo( + SceneFile=instance.data["ifdFile"], + Version=os.getenv("REDSHIFT_VERSION", "3.5.22"), + ) else: self.log.error( "Family '%s' not supported yet to split render job", diff --git a/server_addon/deadline/server/version.py b/server_addon/deadline/server/version.py index 1276d0254f..0a8da88258 100644 --- a/server_addon/deadline/server/version.py +++ b/server_addon/deadline/server/version.py @@ -1 +1 @@ -__version__ = "0.1.5" +__version__ = "0.1.6" diff --git a/server_addon/houdini/server/version.py b/server_addon/houdini/server/version.py index 6232f7ab18..5635676f6b 100644 --- a/server_addon/houdini/server/version.py +++ b/server_addon/houdini/server/version.py @@ -1 +1 @@ -__version__ = "0.2.10" +__version__ = "0.2.11" From 8f43b87d3628f1eb0ca97f5c017c64e0407bb3bb Mon Sep 17 00:00:00 2001 From: Ynbot Date: Sat, 6 Jan 2024 03:25:10 +0000 Subject: [PATCH 169/183] [Automated] Bump version --- openpype/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/version.py b/openpype/version.py index 4d7b8f372f..dba782ded4 100644 --- a/openpype/version.py +++ b/openpype/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring Pype version.""" -__version__ = "3.18.2" +__version__ = "3.18.3-nightly.1" From 9df4160595cd6678a6501bdc2dc79e40ba4b264b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 6 Jan 2024 03:25:49 +0000 Subject: [PATCH 170/183] chore(): update bug report / version --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 132e960885..2e854061d5 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,6 +35,7 @@ body: label: Version description: What version are you running? Look to OpenPype Tray options: + - 3.18.3-nightly.1 - 3.18.2 - 3.18.2-nightly.6 - 3.18.2-nightly.5 @@ -134,7 +135,6 @@ body: - 3.15.6-nightly.3 - 3.15.6-nightly.2 - 3.15.6-nightly.1 - - 3.15.5 validations: required: true - type: dropdown From 18e1f62ba29ff796e35b6e8da6bba3ce1f113e29 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Mon, 8 Jan 2024 11:27:43 +0200 Subject: [PATCH 171/183] add split setting in redshift rop creator --- .../plugins/create/create_redshift_rop.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py index 1b8826a932..d790aaa340 100644 --- a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py @@ -15,6 +15,9 @@ class CreateRedshiftROP(plugin.HoudiniCreator): icon = "magic" ext = "exr" + # Default to split export and render jobs + split_render = True + def create(self, subset_name, instance_data, pre_create_data): instance_data.pop("active", None) @@ -76,6 +79,16 @@ class CreateRedshiftROP(plugin.HoudiniCreator): camera = node.path() parms.update({ "RS_renderCamera": camera or ""}) + + if pre_create_data.get("split_render"): + rs_filepath = \ + "{export_dir}{subset_name}/{subset_name}.$F4.rs".format( + export_dir=hou.text.expandString("$HIP/pyblish/rs/"), + subset_name=subset_name, + ) + parms["RS_archive_enable"] = 1 + parms["RS_archive_file"] = rs_filepath + instance_node.setParms(parms) # Lock some Avalon attributes @@ -102,6 +115,9 @@ class CreateRedshiftROP(plugin.HoudiniCreator): BoolDef("farm", label="Submitting to Farm", default=True), + BoolDef("split_render", + label="Split export and render jobs", + default=self.split_render), EnumDef("image_format", image_format_enum, default=self.ext, From 808a2b7031d0ec81516ee170fd3bcef1fa5e3b1c Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Mon, 8 Jan 2024 11:43:04 +0200 Subject: [PATCH 172/183] BigRoy's comments --- .../plugins/create/create_redshift_rop.py | 16 +++++++++------- .../plugins/publish/collect_redshift_rop.py | 1 - 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py index d790aaa340..097c703283 100644 --- a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py @@ -80,14 +80,16 @@ class CreateRedshiftROP(plugin.HoudiniCreator): parms.update({ "RS_renderCamera": camera or ""}) - if pre_create_data.get("split_render"): - rs_filepath = \ - "{export_dir}{subset_name}/{subset_name}.$F4.rs".format( - export_dir=hou.text.expandString("$HIP/pyblish/rs/"), - subset_name=subset_name, - ) + rs_filepath = \ + "{export_dir}{subset_name}/{subset_name}.$F4.rs".format( + export_dir=hou.text.expandString("$HIP/pyblish/rs/"), + subset_name=subset_name, + ) + parms["RS_archive_file"] = rs_filepath + + if pre_create_data.get("split_render", self.split_render): parms["RS_archive_enable"] = 1 - parms["RS_archive_file"] = rs_filepath + instance_node.setParms(parms) diff --git a/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py b/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py index cd3bb2bb7a..056684b3a3 100644 --- a/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py @@ -48,7 +48,6 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin): # Store whether we are splitting the render job (export + render) split_render = bool(rop.parm("RS_archive_enable").eval()) instance.data["splitRender"] = split_render - export_prefix = None export_products = [] if split_render: export_prefix = evalParmNoFrame( From 938d9126a2bf76df4f9a3e5ccde2231dfd6507c3 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Mon, 8 Jan 2024 11:48:23 +0200 Subject: [PATCH 173/183] BigRoy's comment - stick to code style --- .../deadline/plugins/publish/submit_houdini_render_deadline.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index 0bfb37ee1c..8b03f682fc 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -46,6 +46,7 @@ class RedshiftRenderPluginInfo(): SceneFile = attr.ib(default=None) Version = attr.ib(default=None) + class HoudiniSubmitDeadline( abstract_submit_deadline.AbstractSubmitDeadline, OpenPypePyblishPluginMixin From 1e3fad27b0147691a3e535b9473ff330e84cfd51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Mon, 8 Jan 2024 10:57:05 +0100 Subject: [PATCH 174/183] :recycle: some code style changes --- .../plugins/create/create_redshift_rop.py | 25 ++++++++----------- .../plugins/publish/collect_redshift_rop.py | 13 ++++------ .../publish/submit_houdini_render_deadline.py | 1 + 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py index 097c703283..b36580f67e 100644 --- a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py @@ -39,12 +39,15 @@ class CreateRedshiftROP(plugin.HoudiniCreator): # Also create the linked Redshift IPR Rop try: ipr_rop = instance_node.parent().createNode( - "Redshift_IPR", node_name=basename + "_IPR" + "Redshift_IPR", node_name=f"{basename}_IPR" ) - except hou.OperationFailed: + except hou.OperationFailed as e: raise plugin.OpenPypeCreatorError( - ("Cannot create Redshift node. Is Redshift " - "installed and enabled?")) + ( + "Cannot create Redshift node. Is Redshift " + "installed and enabled?" + ) + ) from e # Move it to directly under the Redshift ROP ipr_rop.setPosition(instance_node.position() + hou.Vector2(0, -1)) @@ -77,22 +80,16 @@ class CreateRedshiftROP(plugin.HoudiniCreator): for node in self.selected_nodes: if node.type().name() == "cam": camera = node.path() - parms.update({ - "RS_renderCamera": camera or ""}) + parms["RS_renderCamera"] = camera or "" - rs_filepath = \ - "{export_dir}{subset_name}/{subset_name}.$F4.rs".format( - export_dir=hou.text.expandString("$HIP/pyblish/rs/"), - subset_name=subset_name, - ) + export_dir=hou.text.expandString("$HIP/pyblish/rs/") + rs_filepath = f"{export_dir}{subset_name}/{subset_name}.$F4.rs" parms["RS_archive_file"] = rs_filepath + instance_node.setParms(parms) if pre_create_data.get("split_render", self.split_render): parms["RS_archive_enable"] = 1 - - instance_node.setParms(parms) - # Lock some Avalon attributes to_lock = ["family", "id"] self.lock_parameters(instance_node, to_lock) diff --git a/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py b/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py index 056684b3a3..aec7e07fbc 100644 --- a/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/publish/collect_redshift_rop.py @@ -31,7 +31,6 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin): families = ["redshift_rop"] def process(self, instance): - rop = hou.node(instance.data.get("instance_node")) # Collect chunkSize @@ -43,8 +42,6 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin): default_prefix = evalParmNoFrame(rop, "RS_outputFileNamePrefix") beauty_suffix = rop.evalParm("RS_outputBeautyAOVSuffix") - render_products = [] - # Store whether we are splitting the render job (export + render) split_render = bool(rop.parm("RS_archive_enable").eval()) instance.data["splitRender"] = split_render @@ -67,7 +64,7 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin): beauty_product = self.get_render_product_name( prefix=default_prefix, suffix=beauty_suffix ) - render_products.append(beauty_product) + render_products = [beauty_product] files_by_aov = { "_": self.generate_expected_files(instance, beauty_product)} @@ -77,11 +74,11 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin): i = index + 1 # Skip disabled AOVs - if not rop.evalParm("RS_aovEnable_%s" % i): + if not rop.evalParm(f"RS_aovEnable_{i}"): continue - aov_suffix = rop.evalParm("RS_aovSuffix_%s" % i) - aov_prefix = evalParmNoFrame(rop, "RS_aovCustomPrefix_%s" % i) + aov_suffix = rop.evalParm(f"RS_aovSuffix_{i}") + aov_prefix = evalParmNoFrame(rop, f"RS_aovCustomPrefix_{i}") if not aov_prefix: aov_prefix = default_prefix @@ -103,7 +100,7 @@ class CollectRedshiftROPRenderProducts(pyblish.api.InstancePlugin): instance.data["attachTo"] = [] # stub required data if "expectedFiles" not in instance.data: - instance.data["expectedFiles"] = list() + instance.data["expectedFiles"] = [] instance.data["expectedFiles"].append(files_by_aov) # update the colorspace data diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index 8b03f682fc..fd5e789d0e 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -15,6 +15,7 @@ from openpype.lib import ( NumberDef ) + @attr.s class DeadlinePluginInfo(): SceneFile = attr.ib(default=None) From 3e4b8a152217af7473d38e8de4dd6f11ec84170b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Mon, 8 Jan 2024 11:16:33 +0100 Subject: [PATCH 175/183] :dog: fix hound --- openpype/hosts/houdini/plugins/create/create_redshift_rop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py index b36580f67e..151fd26074 100644 --- a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py @@ -82,7 +82,7 @@ class CreateRedshiftROP(plugin.HoudiniCreator): camera = node.path() parms["RS_renderCamera"] = camera or "" - export_dir=hou.text.expandString("$HIP/pyblish/rs/") + export_dir = hou.text.expandString("$HIP/pyblish/rs/") rs_filepath = f"{export_dir}{subset_name}/{subset_name}.$F4.rs" parms["RS_archive_file"] = rs_filepath From 5d787d3fc3c77b2977f18b6da1ee7161610e4a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Mon, 8 Jan 2024 11:17:12 +0100 Subject: [PATCH 176/183] :recycle: change how redshift version is passed --- .../plugins/publish/submit_houdini_render_deadline.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index fd5e789d0e..abcc3378da 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -271,9 +271,11 @@ class HoudiniSubmitDeadline( ) elif family == "redshift_rop": plugin_info = RedshiftRenderPluginInfo( - SceneFile=instance.data["ifdFile"], - Version=os.getenv("REDSHIFT_VERSION", "3.5.22"), + SceneFile=instance.data["ifdFile"] ) + if os.getenv("REDSHIFT_VERSION"): + plugin_info.Version = os.getenv("REDSHIFT_VERSION"), + else: self.log.error( "Family '%s' not supported yet to split render job", From 5f837d6f0b381f0ffc4db488c563bac10127b481 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Mon, 8 Jan 2024 11:51:28 +0100 Subject: [PATCH 177/183] AfterEffects: exposing Deadline pools fields in Publisher UI (#6079) * OP-6421 - added render family to families filter As published instances follow product type `render` now, fields wouldn't be shown for them. * OP-6421 - updated documentation * OP-6421 - added hosts filter Limits this with higher precision. --- .../deadline/plugins/publish/collect_pools.py | 40 +++++++++++++++---- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/collect_pools.py b/openpype/modules/deadline/plugins/publish/collect_pools.py index a25b149f11..9ee079b892 100644 --- a/openpype/modules/deadline/plugins/publish/collect_pools.py +++ b/openpype/modules/deadline/plugins/publish/collect_pools.py @@ -1,7 +1,4 @@ # -*- coding: utf-8 -*- -"""Collect Deadline pools. Choose default one from Settings - -""" import pyblish.api from openpype.lib import TextDef from openpype.pipeline.publish import OpenPypePyblishPluginMixin @@ -9,11 +6,35 @@ from openpype.pipeline.publish import OpenPypePyblishPluginMixin class CollectDeadlinePools(pyblish.api.InstancePlugin, OpenPypePyblishPluginMixin): - """Collect pools from instance if present, from Setting otherwise.""" + """Collect pools from instance or Publisher attributes, from Setting + otherwise. + + Pools are used to control which DL workers could render the job. + + Pools might be set: + - directly on the instance (set directly in DCC) + - from Publisher attributes + - from defaults from Settings. + + Publisher attributes could be shown even for instances that should be + rendered locally as visibility is driven by product type of the instance + (which will be `render` most likely). + (Might be resolved in the future and class attribute 'families' should + be cleaned up.) + + """ order = pyblish.api.CollectorOrder + 0.420 label = "Collect Deadline Pools" - families = ["rendering", + hosts = ["aftereffects", + "fusion", + "harmony" + "nuke", + "maya", + "max"] + + families = ["render", + "rendering", "render.farm", "renderFarm", "renderlayer", @@ -30,7 +51,6 @@ class CollectDeadlinePools(pyblish.api.InstancePlugin, cls.secondary_pool = settings.get("secondary_pool", None) def process(self, instance): - attr_values = self.get_attr_values_from_data(instance.data) if not instance.data.get("primaryPool"): instance.data["primaryPool"] = ( @@ -60,8 +80,12 @@ class CollectDeadlinePools(pyblish.api.InstancePlugin, return [ TextDef("primaryPool", label="Primary Pool", - default=cls.primary_pool), + default=cls.primary_pool, + tooltip="Deadline primary pool, " + "applicable for farm rendering"), TextDef("secondaryPool", label="Secondary Pool", - default=cls.secondary_pool) + default=cls.secondary_pool, + tooltip="Deadline secondary pool, " + "applicable for farm rendering") ] From cf17ea8377e21c4820756c83f03cd43f2eafeeeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Mon, 8 Jan 2024 12:09:06 +0100 Subject: [PATCH 178/183] :memo: add comment and warning about unspecified RS version --- .../publish/submit_houdini_render_deadline.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index abcc3378da..bf7fb45a8b 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -273,8 +273,20 @@ class HoudiniSubmitDeadline( plugin_info = RedshiftRenderPluginInfo( SceneFile=instance.data["ifdFile"] ) + # Note: To use different versions of Redshift on Deadline + # set the `REDSHIFT_VERSION` env variable in the Tools + # settings in the AYON Application plugin. You will also + # need to set that version in `Redshift.param` file + # of the Redshift Deadline plugin: + # [Redshift_Executable_*] + # where * is the version number. if os.getenv("REDSHIFT_VERSION"): - plugin_info.Version = os.getenv("REDSHIFT_VERSION"), + plugin_info.Version = os.getenv("REDSHIFT_VERSION") + else: + self.log.warning(( + "REDSHIFT_VERSION env variable is not set" + " - using version configured in Deadline" + )) else: self.log.error( From 9d8378502436c1188fdb03be0185552cdfae2a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Mon, 8 Jan 2024 12:41:22 +0100 Subject: [PATCH 179/183] :bug: fix render archive enable flag settings --- openpype/hosts/houdini/plugins/create/create_redshift_rop.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py index 151fd26074..9d1c7bc90d 100644 --- a/openpype/hosts/houdini/plugins/create/create_redshift_rop.py +++ b/openpype/hosts/houdini/plugins/create/create_redshift_rop.py @@ -86,10 +86,11 @@ class CreateRedshiftROP(plugin.HoudiniCreator): rs_filepath = f"{export_dir}{subset_name}/{subset_name}.$F4.rs" parms["RS_archive_file"] = rs_filepath - instance_node.setParms(parms) if pre_create_data.get("split_render", self.split_render): parms["RS_archive_enable"] = 1 + instance_node.setParms(parms) + # Lock some Avalon attributes to_lock = ["family", "id"] self.lock_parameters(instance_node, to_lock) From 05cbb8b019d2e14fdcde07c38d4a7d80dfc2c3cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Mon, 8 Jan 2024 13:33:51 +0100 Subject: [PATCH 180/183] :wrench: fix and update pydocstyle configuration --- pyproject.toml | 5 +++++ setup.cfg | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 38236f88bc..ee8e8017e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -181,3 +181,8 @@ reportMissingTypeStubs = false [tool.poetry.extras] docs = ["Sphinx", "furo", "sphinxcontrib-napoleon"] + +[tool.pydocstyle] +inherit = false +convetion = "google" +match = "(?!test_).*\\.py" diff --git a/setup.cfg b/setup.cfg index ead9b25164..f0f754fb24 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,10 +16,6 @@ max-complexity = 30 [pylint.'MESSAGES CONTROL'] disable = no-member -[pydocstyle] -convention = google -ignore = D107 - [coverage:run] branch = True omit = /tests From 86cf80027c039a9a353911760eaf13ae78279ea0 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:16:28 +0100 Subject: [PATCH 181/183] Chore: Remove deprecated templates profiles (#6103) * do not use 'IntegrateAssetNew' settings which are not available anymore * don't use 'IntegrateHeroVersion' settings to get hero version template name * remove 'template_name_profiles' from 'IntegrateHeroVersion' * remove unused attribute --- openpype/pipeline/publish/lib.py | 55 +------------------ .../plugins/publish/integrate_hero_version.py | 1 - .../schemas/schema_global_publish.json | 43 --------------- .../core/server/settings/publish_plugins.py | 20 ------- 4 files changed, 2 insertions(+), 117 deletions(-) diff --git a/openpype/pipeline/publish/lib.py b/openpype/pipeline/publish/lib.py index 4ea2f932f1..40cb94e2bf 100644 --- a/openpype/pipeline/publish/lib.py +++ b/openpype/pipeline/publish/lib.py @@ -58,41 +58,13 @@ def get_template_name_profiles( if not project_settings: project_settings = get_project_settings(project_name) - profiles = ( + return copy.deepcopy( project_settings ["global"] ["tools"] ["publish"] ["template_name_profiles"] ) - if profiles: - return copy.deepcopy(profiles) - - # Use legacy approach for cases new settings are not filled yet for the - # project - legacy_profiles = ( - project_settings - ["global"] - ["publish"] - ["IntegrateAssetNew"] - ["template_name_profiles"] - ) - if legacy_profiles: - if not logger: - logger = Logger.get_logger("get_template_name_profiles") - - logger.warning(( - "Project \"{}\" is using legacy access to publish template." - " It is recommended to move settings to new location" - " 'project_settings/global/tools/publish/template_name_profiles'." - ).format(project_name)) - - # Replace "tasks" key with "task_names" - profiles = [] - for profile in copy.deepcopy(legacy_profiles): - profile["task_names"] = profile.pop("tasks", []) - profiles.append(profile) - return profiles def get_hero_template_name_profiles( @@ -121,36 +93,13 @@ def get_hero_template_name_profiles( if not project_settings: project_settings = get_project_settings(project_name) - profiles = ( + return copy.deepcopy( project_settings ["global"] ["tools"] ["publish"] ["hero_template_name_profiles"] ) - if profiles: - return copy.deepcopy(profiles) - - # Use legacy approach for cases new settings are not filled yet for the - # project - legacy_profiles = copy.deepcopy( - project_settings - ["global"] - ["publish"] - ["IntegrateHeroVersion"] - ["template_name_profiles"] - ) - if legacy_profiles: - if not logger: - logger = Logger.get_logger("get_hero_template_name_profiles") - - logger.warning(( - "Project \"{}\" is using legacy access to hero publish template." - " It is recommended to move settings to new location" - " 'project_settings/global/tools/publish/" - "hero_template_name_profiles'." - ).format(project_name)) - return legacy_profiles def get_publish_template_name( diff --git a/openpype/plugins/publish/integrate_hero_version.py b/openpype/plugins/publish/integrate_hero_version.py index 9f0f7fe7f3..59dc6b5c64 100644 --- a/openpype/plugins/publish/integrate_hero_version.py +++ b/openpype/plugins/publish/integrate_hero_version.py @@ -54,7 +54,6 @@ class IntegrateHeroVersion(pyblish.api.InstancePlugin): # permissions error on files (files were used or user didn't have perms) # *but all other plugins must be sucessfully completed - template_name_profiles = [] _default_template_name = "hero" def process(self, instance): 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 ac2d9e190d..64f292a140 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 @@ -1023,49 +1023,6 @@ { "type": "label", "label": "NOTE: Hero publish template profiles settings were moved to Tools/Publish/Hero template name profiles. Please move values there." - }, - { - "type": "list", - "key": "template_name_profiles", - "label": "Template name profiles (DEPRECATED)", - "use_label_wrap": true, - "object_type": { - "type": "dict", - "children": [ - { - "key": "families", - "label": "Families", - "type": "list", - "object_type": "text" - }, - { - "type": "hosts-enum", - "key": "hosts", - "label": "Hosts", - "multiselection": true - }, - { - "key": "task_types", - "label": "Task types", - "type": "task-types-enum" - }, - { - "key": "task_names", - "label": "Task names", - "type": "list", - "object_type": "text" - }, - { - "type": "separator" - }, - { - "type": "text", - "key": "template_name", - "label": "Template name", - "tooltip": "Name of template from Anatomy templates" - } - ] - } } ] }, diff --git a/server_addon/core/server/settings/publish_plugins.py b/server_addon/core/server/settings/publish_plugins.py index ef52416369..0c9b9c96ef 100644 --- a/server_addon/core/server/settings/publish_plugins.py +++ b/server_addon/core/server/settings/publish_plugins.py @@ -697,13 +697,6 @@ class IntegrateHeroVersionModel(BaseSettingsModel): optional: bool = Field(False, title="Optional") active: bool = Field(True, title="Active") families: list[str] = Field(default_factory=list, title="Families") - # TODO remove when removed from client code - template_name_profiles: list[IntegrateHeroTemplateNameProfileModel] = ( - Field( - default_factory=list, - title="Template name profiles" - ) - ) class CleanUpModel(BaseSettingsModel): @@ -1049,19 +1042,6 @@ DEFAULT_PUBLISH_VALUES = { "layout", "mayaScene", "simpleUnrealTexture" - ], - "template_name_profiles": [ - { - "product_types": [ - "simpleUnrealTexture" - ], - "hosts": [ - "standalonepublisher" - ], - "task_types": [], - "task_names": [], - "template_name": "simpleUnrealTextureHero" - } ] }, "CleanUp": { From faf22c7c6df76247af2ed7a653bbfe0b84220116 Mon Sep 17 00:00:00 2001 From: Ynbot Date: Wed, 10 Jan 2024 03:25:43 +0000 Subject: [PATCH 182/183] [Automated] Bump version --- openpype/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/version.py b/openpype/version.py index dba782ded4..279575d110 100644 --- a/openpype/version.py +++ b/openpype/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring Pype version.""" -__version__ = "3.18.3-nightly.1" +__version__ = "3.18.3-nightly.2" From 4aec54f577f42b08fb4006c657ff4c94e109fa27 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 10 Jan 2024 03:26:22 +0000 Subject: [PATCH 183/183] chore(): update bug report / version --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 2e854061d5..7d6c5650d1 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -35,6 +35,7 @@ body: label: Version description: What version are you running? Look to OpenPype Tray options: + - 3.18.3-nightly.2 - 3.18.3-nightly.1 - 3.18.2 - 3.18.2-nightly.6 @@ -134,7 +135,6 @@ body: - 3.15.6 - 3.15.6-nightly.3 - 3.15.6-nightly.2 - - 3.15.6-nightly.1 validations: required: true - type: dropdown