Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Maya: Render Creator has configurable options. #3097

Conversation

ghost
Copy link

@ghost ghost commented Apr 25, 2022

Brief description

Adds configurable render options in the settings. Resolves #2282.

Description

Adds schema specified render options to be triggered through the settings instead of hard-coded render options in the render creator plugins.

Additional info

The intent is to have the configurable options grabbed through a function that's within the render creator class, and that will append the settings by being triggered within the render creator function that sets the renderer settings.

BigRoy and others added 30 commits February 2, 2022 22:53
…or and potentially other things.

- Leave it up to validators to ensure the output matches what the user wanted it to match so we can never submit wrong renders.
- This is a first step to allow the default render settings to be applied from elsewhere.
- Also simplifies the logic of the actual Creator
…0_Maya_Render_creator-should-have-configurable-options-
@antirotor
Copy link
Member

antirotor commented Jul 26, 2022

So I have a scene where I've set Maya Hardware 2.0 renderer. When I create render instance, I get this error:

Failed to create Subset: "renderingMain" Family: "rendering" in Asset: "s010"

Error: 'mayahardware2'

Traceback (most recent call last):
  File "E:\projects\openpype\3x\openpype\tools\creator\window.py", line 432, in _on_create
    data={"variant": variant}
  File "E:\projects\openpype\3x\openpype\pipeline\create\legacy_create.py", line 153, in legacy_create
    instance = plugin.process()
  File "E:\projects\openpype\3x\openpype\hosts\maya\plugins\create\create_render.py", line 168, in process
    lib_rendersettings.RenderSettings.apply_defaults()
  File "E:\projects\openpype\3x\openpype\hosts\maya\api\lib_rendersettings.py", line 62, in apply_defaults
    render_settings.set_default_renderer_settings(renderer)
  File "E:\projects\openpype\3x\openpype\hosts\maya\api\lib_rendersettings.py", line 82, in set_default_renderer_settings
    prefix = self._image_prefixes[renderer]
KeyError: 'mayahardware2'

I think we should just create the instance, not trying to do anything clever :)

@antirotor
Copy link
Member

Also this:
image
still doesn't work - it always applies render settings even when disabled.

@ghost
Copy link
Author

ghost commented Jul 26, 2022

I opted for this to gray out the settings apply button in the OP menu when it's toggled off, so I'm not entirely sure what's happening

Edit: I see it now, fixing it.

image

@ghost ghost requested a review from antirotor August 1, 2022 07:29
Copy link
Member

@m-u-r-p-h-y m-u-r-p-h-y left a comment

Choose a reason for hiding this comment

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

Traceback (most recent call last):
  File "D:\REPO\OpenPype\openpype\tools\creator\window.py", line 432, in _on_create
    data={"variant": variant}
  File "D:\REPO\OpenPype\openpype\pipeline\create\legacy_create.py", line 148, in legacy_create
    plugin = Creator(name, asset, options, data)
  File "D:\REPO\OpenPype\openpype\hosts\maya\plugins\create\create_render.py", line 91, in __init__
    lib_rendersettings.RenderSettings().set_default_renderer_settings()
  File "D:\REPO\OpenPype\openpype\hosts\maya\api\lib_rendersettings.py", line 95, in set_default_renderer_settings
    self._set_redshift_settings(width, height)
  File "D:\REPO\OpenPype\openpype\hosts\maya\api\lib_rendersettings.py", line 162, in _set_redshift_settings
    cmds.setAttr("redshiftOptions.imageFormat", img_ext)
RuntimeError: setAttr: Error reading data element number 1: exr

image

@ghost ghost requested a review from m-u-r-p-h-y August 1, 2022 12:21
Copy link
Member

@m-u-r-p-h-y m-u-r-p-h-y left a comment

Choose a reason for hiding this comment

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

it works as expected.

tested with Maya2022 and Redshift 3.0.67

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
host: Maya type: enhancement Enhancements to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maya: Render creator should have configurable options 🎬
5 participants