Skip to content

Commit

Permalink
Fixed a bug when using random spin
Browse files Browse the repository at this point in the history
Also,m the default spin object is now the object itself
  • Loading branch information
pherbers committed Feb 4, 2020
1 parent 8390ef2 commit 087f1f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mst_blender/mst_blender.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def createTreeObject(options = None):
else:
up_axis = mathutils.Vector((1.0, 0.0, 0.0))

axis = bpy.data.objects[options.spin_object].rotation_euler.to_matrix() * up_axis
axis = bpy.data.objects[options.spin_object].rotation_euler.to_matrix() @ up_axis
location = bpy.data.objects[options.spin_object].location - root_point

points = spinPoints(points, np.array(location), np.array(axis), options.spin_degrees, seed)
Expand Down Expand Up @@ -253,6 +253,7 @@ def invoke(self, context, event):
if ao is not None:
self.source_object = ao.name
self.root_data_object = ao.name
self.spin_object = ao.name
if len(ao.particle_systems):
self.source_particle_system = context.active_object.particle_systems[0].name
wm = context.window_manager
Expand Down

0 comments on commit 087f1f6

Please sign in to comment.