Skip to content

Commit

Permalink
Merge pull request #302 from Exairnous/fix-loop-animation-startoffset…
Browse files Browse the repository at this point in the history
…-import

Fix the import for the Loop Animation component's startOffset property.
  • Loading branch information
Exairnous authored Jul 26, 2024
2 parents 528a011 + e1d3913 commit 8eb5eed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions addons/io_hubs_addon/components/definitions/loop_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,10 @@ def gather_import(cls, gltf, blender_host, component_name, component_value, impo
tracks = property_value.split(",")
import_tracks(tracks, blender_ob, blender_component)
else:
if property_name == 'startOffset':
fps = bpy.context.scene.render.fps / bpy.context.scene.render.fps_base
property_value = round(property_value * fps)

assign_property(gltf.vnodes, blender_component,
property_name, property_value)

Expand Down

0 comments on commit 8eb5eed

Please sign in to comment.