bigger plane zone in bone mode
parent
5ca9c9707e
commit
8748728953
6
utils.py
6
utils.py
|
@ -177,7 +177,6 @@ def plane_on_bone(bone, arm=None, cam=None, set_rotation=True, mesh=True):
|
|||
## Use mid bone to better follow movement
|
||||
mat.translation = arm.matrix_world @ ((bone.tail + bone.head) / 2) # Mid bone
|
||||
|
||||
mat_scale = Matrix.Scale(10, 4) # maybe move above mesh condition
|
||||
|
||||
if mesh:
|
||||
# get/create collection
|
||||
|
@ -199,6 +198,7 @@ def plane_on_bone(bone, arm=None, cam=None, set_rotation=True, mesh=True):
|
|||
plane.matrix_world = mat
|
||||
return plane
|
||||
|
||||
mat_scale = Matrix.Scale(10, 4)
|
||||
plane = plane_coords()
|
||||
return matrix_transform(plane, mat @ mat_scale)
|
||||
|
||||
|
@ -272,8 +272,8 @@ def create_plane(name='Plane', collection=None):
|
|||
'''Create a plane using pydata
|
||||
collection: link in passed collection, else do not link in scene
|
||||
'''
|
||||
x = 1.0
|
||||
y = 1.0
|
||||
x = 100.0
|
||||
y = 100.0
|
||||
vert = [(-x, -y, 0.0), (x, -y, 0.0), (-x, y, 0.0), (x, y, 0.0)]
|
||||
fac = [(0, 1, 3, 2)]
|
||||
pl_data = bpy.data.meshes.new(name)
|
||||
|
|
Loading…
Reference in New Issue