mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-27 06:12:19 +01:00
Fix baking to world space
This commit is contained in:
parent
4e760c593d
commit
3de333ef67
2 changed files with 7 additions and 6 deletions
|
|
@ -1856,7 +1856,7 @@ def bake(nodes,
|
|||
|
||||
Args:
|
||||
nodes (list): Names of transform nodes, eg. camera, light.
|
||||
frame_range (tuple): frame range with start and end frame.
|
||||
frame_range (list): frame range with start and end frame.
|
||||
or if None then takes timeSliderRange
|
||||
simulation (bool): Whether to perform a full simulation of the
|
||||
attributes over time.
|
||||
|
|
@ -1878,9 +1878,10 @@ def bake(nodes,
|
|||
|
||||
assert isinstance(nodes, (list, tuple)), "Nodes must be a list or tuple"
|
||||
|
||||
# If frame range is None fall back to time slider range
|
||||
# If frame range is None fall back to time slider playback time range
|
||||
if frame_range is None:
|
||||
frame_range = getTimeSliderRange()
|
||||
frame_range = [cmds.playbackOptions(query=True, minTime=True),
|
||||
cmds.playbackOptions(query=True, maxTime=True)]
|
||||
|
||||
# If frame range is single frame bake one frame more,
|
||||
# otherwise maya.cmds.bakeResults gets confused
|
||||
|
|
|
|||
|
|
@ -97,8 +97,8 @@ class ExtractCameraMayaAscii(colorbleed.api.Extractor):
|
|||
# TODO: Implement a bake to non-world space
|
||||
# Currently it will always bake the resulting camera to world-space
|
||||
# and it does not allow to include the parent hierarchy, even though
|
||||
# with `bake_to_world_space` set to False it should include its hierarchy
|
||||
# to be correct with the family implementation.
|
||||
# with `bake_to_world_space` set to False it should include its
|
||||
# hierarchy to be correct with the family implementation.
|
||||
if not bake_to_worldspace:
|
||||
self.log.warning("Camera (Maya Ascii) export only supports world"
|
||||
"space baked camera extractions. The disabled "
|
||||
|
|
@ -128,7 +128,7 @@ class ExtractCameraMayaAscii(colorbleed.api.Extractor):
|
|||
with avalon.maya.maintained_selection():
|
||||
with lib.evaluation("off"):
|
||||
with lib.no_refresh():
|
||||
baked = lib.bake_to_worldspace(
|
||||
baked = lib.bake_to_world_space(
|
||||
transform,
|
||||
frameRange=range_with_handles,
|
||||
step=step
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue