fix a bug with custom cutters+exact mode

centering of the cutter was wrong, due to a new blender operator
feature.
pull/6/head
vilemnovak 2015-09-26 18:52:20 +02:00
rodzic 6932765078
commit 73917cbe40
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -54,7 +54,8 @@ def getCutterBullet(o):
scale=o.cutter_diameter/cutob.dimensions.x
cutter.scale*=BULLET_SCALE*scale
bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY')
bpy.ops.object.origin_set(type='GEOMETRY_ORIGIN',center = 'BOUNDS')
#print(cutter.dimensions,scale)
bpy.ops.rigidbody.object_add(type='ACTIVE')
cutter.rigid_body.collision_shape = 'CONVEX_HULL'