Skip to content

Commit

Permalink
fix(submitter): read includeAllLights setting correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
jericht committed Jan 8, 2025
1 parent d0594a8 commit 31a6818
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/deadline/maya_submitter/render_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from enum import IntEnum
from typing import List

import maya.app.renderSetup.model.renderSetupPreferences as renderSetupPrefs # type: ignore
import maya.cmds
import maya.mel

Expand Down Expand Up @@ -64,8 +65,10 @@ def render_setup_include_all_lights() -> bool:
Returns whether a Render Layer should contain all lights in the scene automatically
(machine level setting)
"""
# The maya.cmds.optionVar query did not work
return bool(maya.mel.eval("optionVar -q renderSetup_includeAllLights"))
try:
return renderSetupPrefs.IncludeAllLightsSetting.isEnabled()
except AttributeError:
return True


@contextmanager
Expand Down

0 comments on commit 31a6818

Please sign in to comment.