forked from bartvdbraak/blender
removed the now unneeded resize4d operation for instant 2.43 incompatability. :/
This commit is contained in:
parent
1df2871f2f
commit
0740e4ab1c
@ -1046,10 +1046,7 @@ def pointInsideMesh(ob, pt):
|
|||||||
|
|
||||||
obImvMat = Blender.Mathutils.Matrix(ob.matrixWorld)
|
obImvMat = Blender.Mathutils.Matrix(ob.matrixWorld)
|
||||||
obImvMat.invert()
|
obImvMat.invert()
|
||||||
pt.resize4D()
|
obSpacePt = pt*obImvMat
|
||||||
obSpacePt = pt* obImvMat
|
|
||||||
pt.resize3D()
|
|
||||||
obSpacePt.resize3D()
|
|
||||||
ray = Vector(0,0,-1)
|
ray = Vector(0,0,-1)
|
||||||
me= ob.getData(mesh=1)
|
me= ob.getData(mesh=1)
|
||||||
|
|
||||||
|
@ -144,7 +144,6 @@ def copy_bone_influences(_from, _to, PREF_SEL_ONLY, PREF_NO_XCROSS):
|
|||||||
for group in from_groups:
|
for group in from_groups:
|
||||||
me_to.addVertGroup(group)
|
me_to.addVertGroup(group)
|
||||||
|
|
||||||
|
|
||||||
add_ = Mesh.AssignModes.ADD
|
add_ = Mesh.AssignModes.ADD
|
||||||
|
|
||||||
for i, co in enumerate(world_verts_to):
|
for i, co in enumerate(world_verts_to):
|
||||||
@ -169,13 +168,7 @@ def copy_bone_influences(_from, _to, PREF_SEL_ONLY, PREF_NO_XCROSS):
|
|||||||
# ZSORT return (i/co) tuples, used for fast seeking of the snapvert.
|
# ZSORT return (i/co) tuples, used for fast seeking of the snapvert.
|
||||||
def worldspace_verts_idx(me, ob):
|
def worldspace_verts_idx(me, ob):
|
||||||
mat= ob.matrixWorld
|
mat= ob.matrixWorld
|
||||||
def worldvert(v):
|
verts_zsort= [ (i, v.co*mat) for i, v in enumerate(me.verts) ]
|
||||||
vec= Vector(v)
|
|
||||||
vec.resize4D()
|
|
||||||
vec= vec*mat
|
|
||||||
vec.resize3D()
|
|
||||||
return vec
|
|
||||||
verts_zsort= [ (i, worldvert(v.co)) for i, v in enumerate(me.verts) ]
|
|
||||||
|
|
||||||
# Sorts along the Z Axis so we can optimize the getsnap.
|
# Sorts along the Z Axis so we can optimize the getsnap.
|
||||||
verts_zsort.sort(lambda a,b: cmp(a[1].z, b[1].z,))
|
verts_zsort.sort(lambda a,b: cmp(a[1].z, b[1].z,))
|
||||||
@ -184,13 +177,7 @@ def worldspace_verts_idx(me, ob):
|
|||||||
|
|
||||||
def worldspace_verts(me, ob):
|
def worldspace_verts(me, ob):
|
||||||
mat= ob.matrixWorld
|
mat= ob.matrixWorld
|
||||||
def worldvert(v):
|
return [ v.co*mat for v in me.verts ]
|
||||||
vec= Vector(v)
|
|
||||||
vec.resize4D()
|
|
||||||
vec= vec*mat
|
|
||||||
vec.resize3D()
|
|
||||||
return vec
|
|
||||||
return [ worldvert(v.co) for v in me.verts ]
|
|
||||||
|
|
||||||
def subdivMesh(me, subdivs):
|
def subdivMesh(me, subdivs):
|
||||||
oldmode = Mesh.Mode()
|
oldmode = Mesh.Mode()
|
||||||
|
@ -124,7 +124,7 @@ def main():
|
|||||||
'Image Options',
|
'Image Options',
|
||||||
('Pixel Size:', PREF_IMAGE_SIZE, 64, 4096, 'Image Width and Height.'),\
|
('Pixel Size:', PREF_IMAGE_SIZE, 64, 4096, 'Image Width and Height.'),\
|
||||||
('Pixel Bleed:', PREF_IMAGE_BLEED, 0, 64, 'Image Bleed pixels.'),\
|
('Pixel Bleed:', PREF_IMAGE_BLEED, 0, 64, 'Image Bleed pixels.'),\
|
||||||
('Image Include', PREF_USE_IMAGE, 'Image Bleed pixels.'),\
|
('Image Include', PREF_USE_IMAGE, 'Render the faces image with vertex colors.'),\
|
||||||
'',\
|
'',\
|
||||||
('Normal Map', PREF_USE_NORMAL, 'Use Normals instead of VCols.'),\
|
('Normal Map', PREF_USE_NORMAL, 'Use Normals instead of VCols.'),\
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user