Skip to content

Commit 087f1f6

Browse files
committed
Fixed a bug when using random spin
Also,m the default spin object is now the object itself
1 parent 8390ef2 commit 087f1f6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mst_blender/mst_blender.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def createTreeObject(options = None):
131131
else:
132132
up_axis = mathutils.Vector((1.0, 0.0, 0.0))
133133

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

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

0 commit comments

Comments
 (0)