fix ignore_orientation
This commit is contained in:
parent
8609db1597
commit
c95e010f81
1 changed files with 17 additions and 25 deletions
12
butils.py
12
butils.py
|
@ -950,7 +950,7 @@ def set_text_on_curve(text_properties, reset_timeout_s=0.1, reset_depsgraph_n=4)
|
|||
else:
|
||||
ob.location = location + text_properties.translation
|
||||
|
||||
if not text_properties.ignore_orientation:
|
||||
# orientation / rotation
|
||||
mask = [0]
|
||||
input_rotations = [mathutils.Vector((0.0, 0.0, 0.0))]
|
||||
vectors = [tangent]
|
||||
|
@ -958,7 +958,7 @@ def set_text_on_curve(text_properties, reset_timeout_s=0.1, reset_depsgraph_n=4)
|
|||
local_main_axis = mathutils.Vector((1.0, 0.0, 0.0))
|
||||
motor = align_rotations_auto_pivot(
|
||||
mask, input_rotations, vectors, factors, local_main_axis
|
||||
)
|
||||
) if not text_properties.ignore_orientation else [mathutils.Matrix()]
|
||||
|
||||
q = mathutils.Quaternion()
|
||||
q.rotate(text_properties.orientation)
|
||||
|
@ -969,14 +969,6 @@ def set_text_on_curve(text_properties, reset_timeout_s=0.1, reset_depsgraph_n=4)
|
|||
).to_quaternion()
|
||||
else:
|
||||
ob.rotation_quaternion = motor[0].to_quaternion()
|
||||
else:
|
||||
q = mathutils.Quaternion()
|
||||
q.rotate(text_properties.orientation)
|
||||
# obg.rotation_quaternion = q
|
||||
obg.rotation_quaternion = (
|
||||
mom.matrix_world @ q.to_matrix().to_4x4()
|
||||
).to_quaternion()
|
||||
# ob.rotation_quaternion = (mom.matrix_world @ q.to_matrix().to_4x4()).to_quaternion()
|
||||
|
||||
if previous_ob_rotation_mode:
|
||||
ob.rotation_mode = previous_ob_rotation_mode
|
||||
|
|
Loading…
Add table
Reference in a new issue