OpenPype icon indicating copy to clipboard operation
OpenPype copied to clipboard

Max : Optional validator to check invalid context data

Open moonyuet opened this issue 1 year ago • 2 comments

Changelog Description

Add optional validator check on invalid context data for asset and task in 3dsMax

Additional info

Reference to maya's Validate Instance in Context

Testing notes:

  1. Launch 3dsMax via launcher
  2. Create two instances with same families, one of them set different asset and task
  3. Publish
  4. Error would be raised if you enable the validator which check on invalid context data
  5. Repair it
  6. Run publisher again it will pass without error

moonyuet avatar Feb 05 '24 10:02 moonyuet

It seems that there is a issue in max addon 1.5 and gives me error on Ayon server:

Description
Unable to load max 0.1.5 settings
Message
Unable to load max 0.1.5 settings

    Traceback (most recent call last):
      File "/backend/api/settings/settings.py", line 163, in get_all_settings
        settings = await addon.get_studio_settings(variant)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/backend/ayon_server/addons/addon.py", line 288, in get_studio_settings
        settings = await self.get_default_settings()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/addons/max/0.1.5/__init__.py", line 17, in get_default_settings
        return settings_model_cls(**DEFAULT_VALUES)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
    pydantic.error_wrappers.ValidationError: 3 validation errors for MaxSettings
    publish -> enabled
      field required (type=value_error.missing)
    publish -> optional
      field required (type=value_error.missing)
    publish -> active
      field required (type=value_error.missing)

LiborBatek avatar Feb 05 '24 14:02 LiborBatek

It seems that there is a issue in max addon 1.5 and gives me error on Ayon server:

Description
Unable to load max 0.1.5 settings
Message
Unable to load max 0.1.5 settings

    Traceback (most recent call last):
      File "/backend/api/settings/settings.py", line 163, in get_all_settings
        settings = await addon.get_studio_settings(variant)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/backend/ayon_server/addons/addon.py", line 288, in get_studio_settings
        settings = await self.get_default_settings()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/addons/max/0.1.5/__init__.py", line 17, in get_default_settings
        return settings_model_cls(**DEFAULT_VALUES)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
    pydantic.error_wrappers.ValidationError: 3 validation errors for MaxSettings
    publish -> enabled
      field required (type=value_error.missing)
    publish -> optional
      field required (type=value_error.missing)
    publish -> active
      field required (type=value_error.missing)

@LiborBatek I forgot to add something into the settings. Can you please build and install the new Max addons and test it again? Thanks!

moonyuet avatar Feb 06 '24 06:02 moonyuet