Skip to content

Conversation

@antirotor
Copy link
Member

Changelog Description

This PR demonstrate use of representation traits for data published and loaded to Marvelous Designer.

Note

This PR is targeting #2

@antirotor antirotor requested a review from moonyuet December 19, 2025 15:52
@antirotor antirotor self-assigned this Dec 19, 2025
@antirotor antirotor added the type: enhancement Improvement of existing functionality or minor addition label Dec 19, 2025
@moonyuet
Copy link
Member

moonyuet commented Dec 21, 2025

modelThumb_meta_data.xml
This is the exported data from xml. Mainly used for finding texture.
In terms of the more industrial side, it records the data of shear and stretch values. But these data can be recorded from zfab if They are just for MD.

Copy link
Member

@moonyuet moonyuet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not quite working as we dont have the backward compatibility for integrator.

publish-report-251221-15-11.json

I also got this when loading the data

During load error happened on Product: "modelObj" Representation: "obj" Version: 1

Error message: the JSON object must be str, bytes or bytearray, not NoneType

Traceback (most recent call last):
  File "D:\ayon-core\client\ayon_core\tools\loader\models\actions.py", line 1005, in _load_representations_by_loader
    load_with_repre_context(
  File "D:\ayon-core\client\ayon_core\pipeline\load\utils.py", line 327, in load_with_repre_context
    return loader.load(repre_context, name, namespace, options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ayon-core\client\ayon_core\pipeline\load\plugins.py", line 419, in wrapped_method
    result = original_method(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ayon-addon_template\ayon-marvelous-designer\client\ayon_marvelousdesigner\plugins\load\load_pointcache.py", line 48, in load
    trait_data=json.loads(traits_raw),
               ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/Public/Documents/MarvelousDesigner/Configuration/python311/Lib\json\__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not NoneType

@moonyuet
Copy link
Member

moonyuet commented Jan 6, 2026

I have tested with ynput/ayon-core#1627 and but the integrator is still errored out with two different errors respectively when testing to publish with different product types.
You can find the publish report below.
publish-report-260106-13-14.json
publish-report-260106-13-08.json

@antirotor
Copy link
Member Author

publish-report-260106-13-14.json

This one is because you are integrating 3 representations with the same name "pointcache"
(for obj, abc and fbx). Representations must have unique name.

publish-report-260106-13-08.json

This one is easy - representation has invalid name - "representation": "zfab file" - we do not allow spaces in representation name.

@moonyuet
Copy link
Member

moonyuet commented Jan 6, 2026

publish-report-260106-13-14.json

This one is because you are integrating 3 representations with the same name "pointcache" (for obj, abc and fbx). Representations must have unique name.

publish-report-260106-13-08.json

This one is easy - representation has invalid name - "representation": "zfab file" - we do not allow spaces in representation name.

publish-report-260106-13-14.json

This one is because you are integrating 3 representations with the same name "pointcache" (for obj, abc and fbx). Representations must have unique name.

publish-report-260106-13-08.json

This one is easy - representation has invalid name - "representation": "zfab file" - we do not allow spaces in representation name.

Thank you!
The publish went successfully but if I loaded the asset back I hit the issue:

Traceback (most recent call last):
  File "C:\Users\Kayla\AppData\Local\Ynput\AYON\addons\core_1.7.0+dev\ayon_core\tools\loader\models\actions.py", line 1005, in _load_representations_by_loader
    load_with_repre_context(
  File "C:\Users\Kayla\AppData\Local\Ynput\AYON\addons\core_1.7.0+dev\ayon_core\pipeline\load\utils.py", line 327, in load_with_repre_context
    return loader.load(repre_context, name, namespace, options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Kayla\AppData\Local\Ynput\AYON\addons\core_1.7.0+dev\ayon_core\pipeline\load\plugins.py", line 426, in wrapped_method
    result = original_method(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ayon-addon_template\ayon-marvelous-designer\client\ayon_marvelousdesigner\plugins\load\load_zfab.py", line 46, in load
    file_path = self._get_filepath(context)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ayon-addon_template\ayon-marvelous-designer\client\ayon_marvelousdesigner\plugins\load\load_zfab.py", line 97, in _get_filepath
    representation = Representation.from_dict(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Kayla\AppData\Local\Ynput\AYON\addons\core_1.7.0+dev\ayon_core\pipeline\traits\representation.py", line 672, in from_dict
    trait_class = cls.get_trait_class_by_trait_id(trait_id)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Kayla\AppData\Local\Ynput\AYON\addons\core_1.7.0+dev\ayon_core\pipeline\traits\representation.py", line 586, in get_trait_class_by_trait_id
    trait_class = cls._get_trait_class(trait_id=trait_id)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Kayla\AppData\Local\Ynput\AYON\addons\core_1.7.0+dev\ayon_core\pipeline\traits\representation.py", line 536, in _get_trait_class
    trait_candidates = cls._get_possible_trait_classes_from_modules(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Kayla\AppData\Local\Ynput\AYON\addons\core_1.7.0+dev\ayon_core\pipeline\traits\representation.py", line 499, in _get_possible_trait_classes_from_modules
    klass = getattr(module, attr_name)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ayon_launcher\ayon-launcher\build\output\dependencies\urllib3\packages\six.py", line 96, in __get__
    result = self._resolve()
             ^^^^^^^^^^^^^^^
  File "D:\ayon_launcher\ayon-launcher\build\output\dependencies\urllib3\packages\six.py", line 118, in _resolve
    return _import_module(self.mod)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ayon_launcher\ayon-launcher\build\output\dependencies\urllib3\packages\six.py", line 87, in _import_module
    __import__(name)
  File "C:\Users/Public/Documents/MarvelousDesigner/Configuration/python311/Lib\dbm\gnu.py", line 3, in <module>
    from _gdbm import *
ModuleNotFoundError: No module named '_gdbm'

@moonyuet moonyuet merged commit f2c4208 into feature/initial_integration Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants