for v in args])
return newfn
+def register():
+ pass
+
+def unregister():
+ pass
SCENE=None
def initialize(name, scene):
return empty
@staticmethod
+ def each():
+ for o in SCENE.objects:
+ yield o
+
+ @staticmethod
def makeParent(parent, child):
parent.makeParent([child])
g.name=name
g.color_set=color_set
+ @staticmethod
+ def boneGroups(o):
+ return object.getPose(o).bone_groups
+
class modifier:
@staticmethod
texture.imageFlags|=Blender.Texture.ImageFlags.USEALPHA
return texture, image
+ @staticmethod
+ def getPath(t):
+ image=t.getImage()
+ if image:
+ return image.getFilename()
+
class material:
@staticmethod
@staticmethod
def getTexture(m, index):
- return m.textures[index]
+ return m.textures[index].tex
@staticmethod
def hasTexture(m):
@staticmethod
def setUseTexture(m, index, enable):
- enable_textures=set(m.enabledTextures)
+ enabledTextures=set(m.enabledTextures)
if enable:
enabledTextures.add(index)
- else;
+ else:
enabledTextures.remove(index)
m.enabledTextures=list(enabledTextures)
continue
yield image.getFilename()
+ @staticmethod
+ def eachEnalbeTexturePath(m, dirname):
+ for i, texture in enumerate(m.getTextures()):
+ if (i in m.enabledTextures) and texture and texture.tex and texture.tex.getImage():
+ image=texture.tex.getImage()
+ if not image:
+ continue
+ yield image.getFilename()
+
class mesh:
@staticmethod
def addMaterial(m, material):
m.materials+=[material]
+ @staticmethod
+ def getMaterial(m, index):
+ return m.materials[index]
+
class vertex:
@staticmethod
- def setNormal(mvert, normal):
- mvert.no=Mathutils.Vector(*normal)
+ def getNormal(v):
+ return v.no
@staticmethod
- def setUv(mvert, uv):
- mvert.uvco=uv
+ def setNormal(v, normal):
+ v.no=Mathutils.Vector(*normal)
+
+ @staticmethod
+ def setUv(v, uv):
+ v.uvco=uv
class face:
def isIKSolver(c):
return c.type==Blender.Constraint.Type.IKSOLVER
-