提交 b03b10b6 编写于 作者: C CoDEmanX

Corrected bl_info for 2.65 exporter as well [1][2], replaced != and == by "is...

Corrected bl_info for 2.65 exporter as well [1][2], replaced != and == by "is not" and "is" if comparing with None.

[1] https://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3086

[2] https://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4078
上级 c95216f2
......@@ -25,8 +25,7 @@ bl_info = {
"name": "three.js format",
"author": "mrdoob, kikko, alteredq, remoe, pxf, n3tfr34k",
"version": (1, 4, 0),
"blender": (2, 6, 5),
"api": 35622,
"blender": (2, 65, 0),
"location": "File > Import-Export",
"description": "Import-Export three.js meshes",
"warning": "",
......@@ -322,7 +321,7 @@ class ExportTHREEJS(bpy.types.Operator, ExportHelper):
@classmethod
def poll(cls, context):
return context.active_object != None
return context.active_object is not None
def execute(self, context):
print("Selected: " + context.active_object.name)
......
......@@ -714,7 +714,7 @@ def generate_bones(option_bones, flipyz):
TEMPLATE_BONE = '{"parent":%d,"name":"%s","pos":[%g,%g,%g],"rotq":[0,0,0,1]}'
for bone in armature.bones:
if bone.parent == None:
if bone.parent is None:
if flipyz:
joint = TEMPLATE_BONE % (-1, bone.name, bone.head.x, bone.head.z, -bone.head.y)
hierarchy.append(joint)
......@@ -959,7 +959,7 @@ def position(bone, frame):
position = position * bone.matrix_local.inverted()
if bone.parent == None:
if bone.parent is None:
position.x += bone.head.x
position.y += bone.head.y
......
......@@ -321,7 +321,7 @@ class ExportTHREEJS(bpy.types.Operator, ExportHelper):
@classmethod
def poll(cls, context):
return context.active_object != None
return context.active_object is not None
def execute(self, context):
print("Selected: " + context.active_object.name)
......
......@@ -737,7 +737,7 @@ def generate_bones(option_bones, flipyz):
for bone in armature.bones:
bonePos = None
boneIndex = None
if bone.parent == None:
if bone.parent is None:
bonePos = bone.head_local
boneIndex = -1
else:
......@@ -995,7 +995,7 @@ def position(bone, frame, action, armatureMatrix):
position = position * bone.matrix_local.inverted()
if bone.parent == None:
if bone.parent is None:
position.x += bone.head.x
position.y += bone.head.y
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册