Skip to content
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

Quaternion and axis-angle keyframed rotation is not supported #515

Closed
rlguy opened this issue Jan 22, 2021 · 1 comment
Closed

Quaternion and axis-angle keyframed rotation is not supported #515

rlguy opened this issue Jan 22, 2021 · 1 comment
Labels

Comments

@rlguy
Copy link
Owner

rlguy commented Jan 22, 2021

It has been reported that if an object is exported with keyframe animated quaternion or axis-angle rotation, the object motion will not be matched correctly within the simulator or will generate an error. It looks like this bug has been in the addon since version 1.0.4 (Aug 2018).

In the current version 1.0.9, quaternion motion will not match correctly, and if axis-angle rotation is used, an error will be generated:

Python: Traceback (most recent call last):
  File "C:\Users\ryanl\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\flip_fluids_addon\operators\export_operators.py", line 137, in modal
    is_finished = self.geometry_exporter.update_export(self.export_step_time)
  File "C:\Users\ryanl\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\flip_fluids_addon\objects\flip_fluid_geometry_exporter.py", line 134, in update_export
    raise e
  File "C:\Users\ryanl\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\flip_fluids_addon\objects\flip_fluid_geometry_exporter.py", line 124, in update_export
    self._process_work_item(work_item)
  File "C:\Users\ryanl\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\flip_fluids_addon\objects\flip_fluid_geometry_exporter.py", line 484, in _process_work_item
    self._process_mesh_object(work_item)
  File "C:\Users\ryanl\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\flip_fluids_addon\objects\flip_fluid_geometry_exporter.py", line 385, in _process_mesh_object
    matrix_world = work_item.geometry_export_object.get_matrix_world_at_frame(frame_id)
  File "C:\Users\ryanl\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\flip_fluids_addon\objects\flip_fluid_geometry_export_object.py", line 372, in get_matrix_world_at_frame
    return get_matrix_world_at_frame(bl_object, frame_id)
  File "C:\Users\ryanl\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\flip_fluids_addon\objects\flip_fluid_geometry_export_object.py", line 70, in get_matrix_world_at_frame
    axis = Vector(axis_angle[1], axis_angle[2], axis_angle[3])
TypeError: mathutils.Vector(): more than a single arg given

Euler rotation is still fully supported.

Workaround

A workaround is to enable the Export Animated Mesh option on the object.

@rlguy rlguy added the bug label Jan 22, 2021
@rlguy
Copy link
Owner Author

rlguy commented Jan 25, 2021

Fixed, thanks to help from Artell!

This fix will be available in the next experimental build v9.0.9.13 on January 27th.

@rlguy rlguy closed this as completed Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant