ynput / ayon-substance-painter

SubstancePainter integration for AYON
Apache License 2.0
2 stars 0 forks source link

Collect Texture Set Error out in Substance Painter 10.1 #13

Open moonyuet opened 8 hours ago

moonyuet commented 8 hours ago

Is there an existing issue for this?

Current Behavior:

When you create the texture set and publish, the texture set collector errors out due to the API changes of the Substance Painter 10.1

Expected Behavior:

The collector should not be errored out and the texture set being published successfully.

Version

1.0.0

What platform you are running on?

Windows

Steps To Reproduce:

  1. Create Texture Set
  2. Publish

Are there any labels you wish to add?

Relevant log output:

DEBUG: Exporting using preset: resource://starter_assets/Redshift (rsMaterial)
DEBUG: http://localhost:5000 "POST /graphql HTTP/1.1" 200 727
DEBUG: Response <RestApiResponse [200]>
DEBUG: http://localhost:5000 "POST /graphql HTTP/1.1" 200 645
DEBUG: Response <RestApiResponse [200]>
Traceback (most recent call last):
  File "C:\Users\Kayla\AppData\Local\Ynput\AYON\dependency_packages\ayon_2402141620_windows.zip\dependencies\pyblish\plugin.py", line 527, in __explicit_process
    runner(*args)
  File "D:\ayon-addon_template\ayon-substance-painter\client\ayon_substancepainter\plugins\publish\collect_textureset_images.py", line 43, in process
    maps = get_parsed_export_maps(config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ayon-addon_template\ayon-substance-painter\client\ayon_substancepainter\api\lib.py", line 403, in get_parsed_export_maps
    templates = get_export_templates(config, strip_folder=False)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ayon-addon_template\ayon-substance-painter\client\ayon_substancepainter\api\lib.py", line 200, in get_export_templates
    result = substance_painter.js.evaluate(cmd)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files/Adobe/Adobe Substance 3D Painter/resources/python/modules\substance_painter\js.py", line 56, in evaluate
    return json.loads(_substance_painter.js.evaluate(js_code))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: TypeError: Passing incompatible arguments to C++ functions from JavaScript is not allowed.
BigRoy commented 7 hours ago

🤷‍♂️ Oh boy - wouldn't backward compatible APIs be nice!

Thanks for the report.

moonyuet commented 7 hours ago

@BigRoy As I double check on the docs, the original js command of f'alg.mapexport.getPathsExportDocumentMaps("{preset}", "{folder}", "{format}")' is still there (same arguments) and I dont think they have done any update in regards. This is weird issue. Maybe the optional argument could be the reason image

BigRoy commented 7 hours ago

Thanks for the details - this is in the backlog now. When it gets some priority I'll update to latest substance painter and look into it.