Conversation
BigRoy
left a comment
There was a problem hiding this comment.
Don't have substance painter installed on my machine currently - so can't test.
Code seems fine overall, just had some small remarks - see comments.
LiborBatek
left a comment
There was a problem hiding this comment.
The Load with Options works ok and offer all the settings including UDIM tiles workflow etc.

When Loading with options, all works ok as seen on the vid
SP_Load_Options.mp4
But when just Load model without diving into Options then it starts to have issues, check the vid pls.
SP_Load_No_Options.mp4
I would say it mimicks the issue as in ayon-core repo.
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
LiborBatek
left a comment
There was a problem hiding this comment.
Getting error on Load Model atm
Traceback (most recent call last):
File "C:\Work\REPO\OpenPype\openpype\tools\loader\widgets.py", line 1592, in _load_representations_by_loader
load_with_repre_context(
File "C:\Work\REPO\OpenPype\openpype\pipeline\load\utils.py", line 324, in load_with_repre_context
return loader.load(repre_context, name, namespace, options)
File "C:\Work\REPO\OpenPype\openpype\hosts\substancepainter\plugins\load\load_mesh.py", line 160, in load
result = SubstanceProjectConfigurationWindow.prompt(
File "C:\Work\REPO\OpenPype\openpype\hosts\substancepainter\plugins\load\load_mesh.py", line 136, in prompt
dialog = cls(templates)
File "C:\Work\REPO\OpenPype\openpype\hosts\substancepainter\plugins\load\load_mesh.py", line 84, in __init__
self._update_to_match_template(template_name)
File "C:\Work\REPO\OpenPype\openpype\hosts\substancepainter\plugins\load\load_mesh.py", line 115, in _update_to_match_template
self.widgets["import_cameras"].setChecked(template["import_cameras"])
KeyError: 'import_cameras'
LiborBatek
left a comment
There was a problem hiding this comment.
Now all working and also Template presets propagates its params into the popup win UI with Project Configuration so when some attrib being off it will be also disabled in this UI widget.
Good to go!




Changelog Description
This PR is to add the support of template settings in the mesh loaders for Substance project creation. User can customize and add template settings in AYON settings and apply it through the option mode(the button with memo icon).
Additional info
This PR also refactors the original loader's setting without directly import qargparse.
Prefers user to use options (memo icon) to set up their preferences as the prompt dialog might not set up the project as expected(It is still experimental).
Testing notes:
Customize the template with a template name in Substance Painter OP setting
Launch Substance Painter
Click Load..
It would pop up the dialog to allow you to choose your template settings
Click Ok

It should apply all the settings you set in AYON settings