New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global | Nuke: Creator placeholders in workfile template builder #4266
Global | Nuke: Creator placeholders in workfile template builder #4266
Conversation
Updated the testing procedure, please follow try it again, it should work file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not able to test Maya, but I can confirm that creators work in Nuke 12.2 and 13.2, with and without kept placeholders. I've tested render, prerender and still creators.
On a side note, the template nodes leave behind knobs named x_init and y_init when replaced by Nuke nodes. Sometimes more than one pair, and not hidden. Not connected with this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving this, please note I tested Nuke only
Yeah, I had noticed it. I believe that is the feature for connecting loaded containers with placeholders trough position matching. Yes, this doesn't need to be added, since placeholders are removed. Will look into it in next PR. Thanks for mentioning ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was testing Maya for a while and couple of issues arise along the way.
first the issue not connected to this PR with inability to resolve project key in template path - created a separate issue for it #4282
after fixing the template path there is another issue with the missing attribute '_parent_in_hierarhchy'
which looks like a typo should be '_parent_in_hierarchy'
most probably
# openpype.lib.profiles_filtering : Looking for matching profile for: task_names: "lighting" | task_types: "Lighting" #
# openpype.lib.profiles_filtering : Profile selected: {u'path': u'{root[work]}/murphy_22101/templates/template_model.ma', u'task_types': [u'Lighting'], u'task_names': [], u'placeholder_keep': True} #
# >>> [ Found template at: 'D:\PROJECTS\murphy_22101\templates\template_model.ma' ]
# File read in 0.012 seconds. #
# # >>> [ Loading modelMain from testYeti with loader ReferenceLoader
Loader arguments used : ]
# openpype.pipeline.load.utils : Running 'ReferenceLoader' on 'testYeti' #
# SubsetLoader : {} #
# File read in 0.0098 seconds. #
# # *** WRN: >>> { <openpype.hosts.maya.api.workfile_template_builder.MayaTemplateBuilder object at 0x0000016FE3B5F518> }: [ Failed to process placeholder |locator1|All_model_assets with plugin MayaPlaceholderLoadPlugin ]
# ==============================
# 'MayaPlaceholderLoadPlugin' object has no attribute '_parent_in_hierarhchy'
# ==============================
# Traceback (most recent call last):
# File "D:\REPO\OpenPype\openpype\pipeline\workfile\workfile_template_builder.py", line 586, in populate_scene_placeholders
# placeholder_plugin.populate_placeholder(placeholder)
# File "D:\REPO\OpenPype\openpype\hosts\maya\api\workfile_template_builder.py", line 208, in populate_placeholder
# self.populate_load_placeholder(placeholder)
# File "D:\REPO\OpenPype\openpype\pipeline\workfile\workfile_template_builder.py", line 1450, in populate_load_placeholder
# self.load_succeed(placeholder, container)
# File "D:\REPO\OpenPype\openpype\hosts\maya\api\workfile_template_builder.py", line 243, in load_succeed
# self._parent_in_hierarhchy(placeholder, container)
AttributeError: 'MayaPlaceholderLoadPlugin' object has no attribute '_parent_in_hierarhchy'
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Testing notes had been updated please repeate step 4. since attribute name had changed and your settings needs to be updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I can confirm resolving the project key in the template path is working correctly now
- I can confirm
'_parent_in_hierarchy'
is working correctly now
there is a new error though AttributeError: 'LoadPlaceholderItem' object has no attribute '_scene_identifier'
# pymel.core : Updating pymel with pre-loaded plugins: svgFileTranslator, invertShape, mayaHIK, GamePipeline, curveWarp, tiffFloatReader, poseInterpolator, hairPhysicalShader, cacheEvaluator, ikSpringSolver, ik2Bsolver, AbcExport, retargeterNodes, gameFbxExporter, OpenEXRLoader, lookdevKit, Unfold3D, mayaCharacterization, Type, meshReorder, modelingToolkit, rotateHelper, MayaMuscle, matrixNodes, AbcImport, autoLoader, deformerEvaluator, sceneAssembly, gpuCache, OneClick, shaderFXPlugin, objExport, renderSetup, GPUBuiltInDeformer, ArubaTessellator, quatNodes, fbxmaya
# File read in 0.013 seconds.
# # *** WRN: >>> { <openpype.hosts.maya.api.workfile_template_builder.MayaTemplateBuilder object at 0x00000246283CCF98> }: [ Failed to process placeholder |locator1|All_model_assets with plugin MayaPlaceholderLoadPlugin ]
# ==============================
# 'LoadPlaceholderItem' object has no attribute '_scene_identifier'
# ==============================
# Traceback (most recent call last):
# File "D:\REPO\OpenPype\openpype\pipeline\workfile\workfile_template_builder.py", line 586, in populate_scene_placeholders
# placeholder_plugin.populate_placeholder(placeholder)
# File "D:\REPO\OpenPype\openpype\hosts\maya\api\workfile_template_builder.py", line 208, in populate_placeholder
# self.populate_load_placeholder(placeholder)
# File "D:\REPO\OpenPype\openpype\pipeline\workfile\workfile_template_builder.py", line 1458, in populate_load_placeholder
# self.cleanup_placeholder(placeholder, failed)
# File "D:\REPO\OpenPype\openpype\hosts\maya\api\workfile_template_builder.py", line 223, in cleanup_placeholder
# node = placeholder._scene_identifier
AttributeError: 'LoadPlaceholderItem' object has no attribute '_scene_identifier'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the building process from template in Maya works as expected
there is just small issue with Maya implementation, will create a separate issue for it
# # *** WRN: >>> { <openpype.hosts.maya.api.workfile_template_builder.MayaTemplateBuilder object at 0x00000222E9AFE9B0> }: [ Failed to process placeholder |All_assets_grp|All_model_assets with plugin MayaPlaceholderLoadPlugin ]
# ==============================
# No object matches name: |All_assets_grp|All_model_assets
# ==============================
# Traceback (most recent call last):
# File "D:\REPO\OpenPype\openpype\pipeline\workfile\workfile_template_builder.py", line 585, in populate_scene_placeholders
# placeholder_plugin.populate_placeholder(placeholder)
# File "D:\REPO\OpenPype\openpype\hosts\maya\api\workfile_template_builder.py", line 208, in populate_placeholder
# self.populate_load_placeholder(placeholder)
# File "D:\REPO\OpenPype\openpype\pipeline\workfile\workfile_template_builder.py", line 1462, in populate_load_placeholder
# self.load_succeed(placeholder, container)
# File "D:\REPO\OpenPype\openpype\hosts\maya\api\workfile_template_builder.py", line 243, in load_succeed
# self._parent_in_hierarchy(placeholder, container)
# File "D:\REPO\OpenPype\openpype\hosts\maya\api\workfile_template_builder.py", line 277, in _parent_in_hierarchy
# worldSpace=True
ValueError: No object matches name: |All_assets_grp|All_model_assets
|
"multipath": false | ||
}, | ||
{ | ||
"key": "keep_placeholder", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be added only to nuke (the setting is there for maya too but does not affect the result).
name = None | ||
if hasattr("name", self): | ||
name = self.name | ||
if hasattr("_scene_identifier ", self): | ||
name = self._scene_identifier | ||
|
||
return "< {} {} >".format(self.__class__.__name__, name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name = None | |
if hasattr("name", self): | |
name = self.name | |
if hasattr("_scene_identifier ", self): | |
name = self._scene_identifier | |
return "< {} {} >".format(self.__class__.__name__, name) | |
return "< {} {} >".format(self.__class__.__name__, self._scene_identifier) |
Brief description
Adding Creator Placeholder plugin implementation
Description
New placeholders for creators are now available. Templates can be now build included publishable instances.
Additional info
Several global abstractions at parent workfile building classes had to be altered. Creator plugin abstraction can now be implemented also into other hosts.
Need to be tested in:
Testing notes [ Nuke ]:
\OP02_VFX_demo
ideally on sh020 because the template is expecting data from this project. Project can be deployed with/tools/unpack_project.ps1
(follow instructions inside of the .ps1 file), here is where you can download it from.project_settings/nuke/templated_workfile_build
DO NOT SAVE
and test backward compatibility in Nuke by building from template. All should work as it was.5.a If you are creating new preset then paste following onto
project_settings/nuke/templated_workfile_build
and fix the path to your in case it is different.5.b dowload this settings patch then copy context of the file to clipboard. Go to
project_settings/nuke/imageio
and RMB click at the ImageIO and paste. It will take about 5mins to update and then save the settings.6. then open Nuke from sh020 and remove all nodes in scene (just not to collide with already created write node)
7. template should show in script and no Placeholders should stay in the scene under loaded Read nodes and Render write node should be created at bottom. Here is how it should look
9. Try it again but switch the settings
placeholder_keep
to active.10. Placeholders should stay in the scene after the template is builded.
Dependencies:
This PR branch is based on #4258 and ideally needs to be merged as second.