forked from bartvdbraak/blender
Scripts:
- A Vanpoucke (xand) updated Axis Orientation Copy. - Additions: - Campbell Barton contributed the Archimap UV Unwrapper. - Mikael Lagre contributed Collada importer and exporter (ongoing work, no support for animation yet). Thanks to them!
This commit is contained in:
parent
66d0d7e2db
commit
9d55687d30
@ -2,7 +2,7 @@
|
||||
|
||||
""" Registration info for Blender menus: <- these words are ignored
|
||||
Name: 'Axis Orientation Copy'
|
||||
Blender: 233
|
||||
Blender: 239
|
||||
Group: 'Object'
|
||||
Tip: 'Copy the axis orientation of the active object to all selected mesh objects'
|
||||
"""
|
||||
@ -10,7 +10,7 @@ Tip: 'Copy the axis orientation of the active object to all selected mesh object
|
||||
__author__ = "A Vanpoucke (xand)"
|
||||
__url__ = ("blender", "elysiun",
|
||||
"French Blender support forum, http://www.zoo-logique.org/3D.Blender/newsportal/thread.php?group=3D.Blender")
|
||||
__version__ = "1.1 11/05/04"
|
||||
__version__ = "2 17/12/05"
|
||||
|
||||
__bpydoc__ = """\
|
||||
This script copies the axis orientation -- X, Y and Z rotations -- of the
|
||||
@ -75,7 +75,7 @@ from Blender.Mathutils import *
|
||||
|
||||
def applyTransform(mesh,mat):
|
||||
for v in mesh.verts:
|
||||
vec = VecMultMat(v.co,mat)
|
||||
vec = v.co*mat
|
||||
v.co[0], v.co[1], v.co[2] = vec[0], vec[1], vec[2]
|
||||
|
||||
|
||||
@ -87,12 +87,12 @@ lenob=len(oblist)
|
||||
error = 0
|
||||
for o in oblist[1:]:
|
||||
if o.getType() != "Mesh":
|
||||
Draw.PupMenu("ERROR%t|Selected objects must be meshes")
|
||||
Draw.PupMenu("Error: selected objects must be meshes")
|
||||
error = 1
|
||||
|
||||
if not error:
|
||||
if lenob<2:
|
||||
Draw.PupMenu("ERROR%t|You must select at least 2 objects")
|
||||
Draw.PupMenu("Error: you must select at least 2 objects")
|
||||
else :
|
||||
source=oblist[0]
|
||||
nsource=source.name
|
||||
@ -102,9 +102,9 @@ if not error:
|
||||
|
||||
for cible in oblist[1:]:
|
||||
if source.rot!=cible.rot:
|
||||
rotcible=cible.mat.toEuler().toMatrix()
|
||||
rotsource=source.mat.toEuler().toMatrix()
|
||||
rotsourcet = CopyMat(rotsource)
|
||||
rotcible=cible.mat.rotationPart().toEuler().toMatrix()
|
||||
rotsource=source.mat.rotationPart().toEuler().toMatrix()
|
||||
rotsourcet = Matrix(rotsource)
|
||||
rotsourcet.invert()
|
||||
mat=rotcible*rotsourcet
|
||||
ncible=cible.name
|
||||
|
1634
release/scripts/archimap.py
Normal file
1634
release/scripts/archimap.py
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user