else:
INTERNAL_ENCODING=FS_ENCODING
+def register():
+ pass
+
+def unregister():
+ pass
+
SCENE=None
def initialize(name, scene):
global SCENE
progress_finish()
def message(msg):
- pass
+ print(msg)
def enterEditMode():
bpy.ops.object.mode_set(mode='EDIT', toggle=False)
return empty
@staticmethod
+ def each():
+ for o in SCENE.objects:
+ yield o
+
+ @staticmethod
def makeParent(parent, child):
child.parent=parent
def duplicate(o):
global SCENE
bpy.ops.object.select_all(action='DESELECT')
- o.selected=True
+ o.select=True
SCENE.objects.active=o
bpy.ops.object.duplicate()
dumy=SCENE.objects.active
@staticmethod
def select(o):
- o.selected=True
+ o.select=True
@staticmethod
def activate(o):
global SCENE
- o.selected=True
+ o.select=True
SCENE.objects.active=o
@staticmethod
@staticmethod
def isVisible(o):
- return o.restrict_view
+ return False if o.hide else True
@staticmethod
def getShapeKeys(o):
texture=bpy.data.textures.new(os.path.basename(path))
texture.type='IMAGE'
texture=texture.recast_type()
- image=bpy.data.images.load(path)
- texture.image=image
texture.mipmap=True
texture.interpolation=True
texture.use_alpha=True
+ try:
+ image=bpy.data.images.load(path)
+ except SystemError:
+ image=bpy.data.images.new('Image')
+ texture.image=image
return texture, image
@staticmethod
if t.type=="IMAGE":
image=t.image
if image:
- return image.filename
+ return image.filepath
class material:
image=texture.image
if not image:
continue
- yield image.filename
+ yield image.filepath
@staticmethod
def eachEnalbeTexturePath(m):
image=texture.image
if not image:
continue
- yield image.filename
+ yield image.filepath
class mesh:
enterObjectMode()
for i in remove_vertices:
- m.verts[i].selected=True
+ m.verts[i].select=True
enterEditMode()
bpy.ops.mesh.delete(type='VERT')
def isIKSolver(c):
return c.type=='IK'
-