New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maya: Set default value for RenderSetupIncludeLights option #3944
Conversation
RenderSetupIncludeLights must be either set to 1 or 0 or not set at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another question is, for cases with the missing attribute on the instance and in settings, if the "safer" default value should be 0 instead of 1 |
I think it should follow Maya default and that is |
default_rs_include_lights = instance.context.data\ | ||
.get('project_settings')\ | ||
.get('maya')\ | ||
.get('RenderSettings')\ | ||
.get('enable_all_lights') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This .get().get().get()
feels wrong. As soon as one of the keys doesn't exist it'd be None
and doing .get()
would fail. So it's just as prone to error as just doing ["project_settings"]["maya"]["RenderSettings"]["enable_all_lights"]
Also the fallback down below to the default value could thus still fall back to "None" otherwise if enable_all_lights
wouldn't exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right, I've just copy&pasted it from somewhere. I guess it was like that because of readability but that is questionable anyway.
that's exactly what I meant. I thought our default 0 is Maya's default. You are correct it is 1, so we should change our defaults in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix
RenderSetupIncludeLights
must be either set to 1 or 0 or not at all. This PR is adding default value for edge cases where this is not handled. Without it, DL is crashing.