Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--io_convert_image_to_mesh_img/import_img.py6
-rw-r--r--io_import_scene_mhx.py18
-rw-r--r--io_scene_fbx/__init__.py4
-rw-r--r--io_scene_x3d/import_x3d.py30
-rw-r--r--light_field_tools/light_field_tools.py2
-rw-r--r--object_animrenderbake.py2
-rw-r--r--rigify/generate.py3
-rw-r--r--rigify/rigs/biped/arm/fk.py2
-rw-r--r--rigify/rigs/biped/leg/deform.py5
-rw-r--r--rigify/rigs/biped/leg/fk.py6
-rw-r--r--rigify/rigs/biped/leg/ik.py4
-rw-r--r--rigify/rigs/misc/delta.py2
-rw-r--r--rigify/rigs/palm.py2
-rw-r--r--rigify/rigs/spine.py6
14 files changed, 45 insertions, 47 deletions
diff --git a/io_convert_image_to_mesh_img/import_img.py b/io_convert_image_to_mesh_img/import_img.py
index 40813bf1..1735d1c3 100644
--- a/io_convert_image_to_mesh_img/import_img.py
+++ b/io_convert_image_to_mesh_img/import_img.py
@@ -102,7 +102,7 @@ class hirise_dtm_helper(object):
# When are we done with this level?
endStr = "END"
- if not currentObjectName == None:
+ if not currentObjectName is None:
endStr = "END_OBJECT = %s" % currentObjectName
line = ""
@@ -408,9 +408,9 @@ class hirise_dtm_helper(object):
# dimensions shrink as we remove pixels
processed_dims = img_props.processed_dims()
- if XSize == None:
+ if XSize is None:
XSize = processed_dims[0]
- if YSize == None:
+ if YSize is None:
YSize = processed_dims[1]
if XSize + XOffset > processed_dims[0]:
diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py
index c2b2dfa1..491e4a3a 100644
--- a/io_import_scene_mhx.py
+++ b/io_import_scene_mhx.py
@@ -531,7 +531,7 @@ def parseDefaultType(typ, args, tokens):
bpyType = typ.capitalize()
print(bpyType, name, data)
loadedData[bpyType][name] = data
- if data == None:
+ if data is None:
return None
for (key, val, sub) in tokens:
@@ -572,7 +572,7 @@ def parseAction(args, tokens):
act = ob.animation_data.action
loadedData['Action'][name] = act
- if act == None:
+ if act is None:
print("Ignoring action %s" % name)
return act
act.name = name
@@ -691,7 +691,7 @@ def parseAnimationData(rna, args, tokens):
if not eval(args[1]):
return
print("Parse Animation data")
- if rna.animation_data == None:
+ if rna.animation_data is None:
rna.animation_data_create()
adata = rna.animation_data
for (key, val, sub) in tokens:
@@ -813,7 +813,7 @@ def parseMaterial(args, tokens):
global todo
name = args[0]
mat = bpy.data.materials.new(name)
- if mat == None:
+ if mat is None:
return None
loadedData['Material'][name] = mat
for (key, val, sub) in tokens:
@@ -1030,7 +1030,7 @@ def parseImage(args, tokens):
for n in range(1,len(val)):
filename += " " + val[n]
img = loadImage(filename)
- if img == None:
+ if img is None:
return None
img.name = imgName
else:
@@ -1070,7 +1070,7 @@ def parseObject(args, tokens):
except:
ob = None
- if ob == None:
+ if ob is None:
print("Create", name, data, datName)
ob = createObject(typ, name, data, datName)
print("created", ob)
@@ -1113,7 +1113,7 @@ def createObject(typ, name, data, datName):
def linkObject(ob, data):
#print("Data", data, ob.data)
- if data and ob.data == None:
+ if data and ob.data is None:
ob.data = data
print("Data linked", ob, ob.data)
scn = bpy.context.scene
@@ -2174,7 +2174,7 @@ def parseProcess(args, tokens):
eb = None
tb = ebones[val[1]]
typ = val[2]
- if eb == None:
+ if eb is None:
pass
elif typ == 'Inv':
eb.head = tb.tail
@@ -2309,7 +2309,7 @@ def defaultKey(ext, args, tokens, var, exclude, glbals, lcals):
data = None
# print("Old structrna", nvar, data)
- if data == None:
+ if data is None:
try:
creator = args[3]
except:
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index 18eb19ea..191f5824 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -113,8 +113,8 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
keywords = self.as_keywords(ignore=("TX_XROT90", "TX_YROT90", "TX_ZROT90", "TX_SCALE", "check_existing", "filter_glob"))
keywords["GLOBAL_MATRIX"] = GLOBAL_MATRIX
- import io_scene_fbx.export_fbx
- return io_scene_fbx.export_fbx.save(self, context, **keywords)
+ from . import export_fbx
+ return export_fbx.save(self, context, **keywords)
def menu_func(self, context):
diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py
index a72d4ff5..389ffe2c 100644
--- a/io_scene_x3d/import_x3d.py
+++ b/io_scene_x3d/import_x3d.py
@@ -416,7 +416,7 @@ class vrmlNode(object):
self.PROTO_NAMESPACE = {}
def isRoot(self):
- if self.filename == None:
+ if self.filename is None:
return False
else:
return True
@@ -518,7 +518,7 @@ class vrmlNode(object):
# where the parent of this object is not the real parent
# - In this case we have added the proto as a child to a node instancing it.
# This is a bit arbitary, but its how Proto's are done with this importer.
- if child.getProtoName() == None and child.getExternprotoName() == None:
+ if child.getProtoName() is None and child.getExternprotoName() is None:
child.getSerialized(results, ancestry)
else:
@@ -624,7 +624,7 @@ class vrmlNode(object):
self_real = self.getRealNode() # incase we're an instance
f = self_real.getFieldName(field, ancestry)
- if f == None:
+ if f is None:
return default
if ',' in f:
f = f[:f.index(',')] # strip after the comma
@@ -643,7 +643,7 @@ class vrmlNode(object):
self_real = self.getRealNode() # incase we're an instance
f = self_real.getFieldName(field, ancestry)
- if f == None:
+ if f is None:
return default
if ',' in f:
f = f[:f.index(',')] # strip after the comma
@@ -662,7 +662,7 @@ class vrmlNode(object):
self_real = self.getRealNode() # incase we're an instance
f = self_real.getFieldName(field, ancestry)
- if f == None:
+ if f is None:
return default
# if ',' in f: f = f[:f.index(',')] # strip after the comma
@@ -689,7 +689,7 @@ class vrmlNode(object):
self_real = self.getRealNode() # incase we're an instance
f = self_real.getFieldName(field, ancestry)
- if f == None:
+ if f is None:
return default
if ',' in f:
f = f[:f.index(',')] # strip after the comma
@@ -710,7 +710,7 @@ class vrmlNode(object):
self_real = self.getRealNode() # incase we're an instance
f = self_real.getFieldName(field, ancestry)
- if f == None:
+ if f is None:
return default
if len(f) < 1:
print('\t"%s" wrong length for string conversion for field "%s"' % (f, field))
@@ -763,7 +763,7 @@ class vrmlNode(object):
if not data_split:
return []
array_data = ' '.join(data_split)
- if array_data == None:
+ if array_data is None:
return []
array_data = array_data.replace(',', ' ')
@@ -1150,7 +1150,7 @@ class vrmlNode(object):
except:
pass
- if values == None: # dont parse
+ if values is None: # dont parse
values = l_split
# This should not extend over multiple lines however it is possible
@@ -1250,7 +1250,7 @@ def gzipOpen(path):
else:
print('\tNote, gzip module could not be imported, compressed files will fail to load')
- if data == None:
+ if data is None:
try:
data = open(path, 'rU').read()
except:
@@ -1266,7 +1266,7 @@ def vrml_parse(path):
'''
data = gzipOpen(path)
- if data == None:
+ if data is None:
return None, 'Failed to open file: ' + path
# Stripped above
@@ -1393,7 +1393,7 @@ def x3d_parse(path):
# Could add a try/except here, but a console error is more useful.
data = gzipOpen(path)
- if data == None:
+ if data is None:
return None, 'Failed to open file: ' + path
doc = xml.dom.minidom.parseString(data)
@@ -2111,13 +2111,13 @@ def importShape(node, ancestry):
if ima:
ima_url = ima.getFieldAsString('url', None, ancestry)
- if ima_url == None:
+ if ima_url is None:
try:
ima_url = ima.getFieldAsStringArray('url', ancestry)[0] # in some cases we get a list of images.
except:
ima_url = None
- if ima_url == None:
+ if ima_url is None:
print("\twarning, image with no URL, this is odd")
else:
bpyima = image_utils.image_load(ima_url, dirName(node.getFilename()), place_holder=False, recursive=False, convert_callback=imageConvertCompat)
@@ -2604,7 +2604,7 @@ def load_web3d(path, PREF_FLAT=False, PREF_CIRCLE_DIV=16, HELPER_FUNC=None):
# Assign anim curves
node = defDict[key]
- if node.blendObject == None: # Add an object if we need one for animation
+ if node.blendObject is None: # Add an object if we need one for animation
node.blendObject = bpy.data.objects.new('AnimOb', None) # , name)
bpy.context.scene.objects.link(node.blendObject)
diff --git a/light_field_tools/light_field_tools.py b/light_field_tools/light_field_tools.py
index e6bd0083..e8f81500 100644
--- a/light_field_tools/light_field_tools.py
+++ b/light_field_tools/light_field_tools.py
@@ -337,7 +337,7 @@ class OBJECT_OT_create_lightfield_basemesh(bpy.types.Operator):
scene.objects.link(nobj)
nobj.select = True
- if scene.objects.active == None or scene.objects.active.mode == 'OBJECT':
+ if scene.objects.active is None or scene.objects.active.mode == 'OBJECT':
scene.objects.active = nobj
diff --git a/object_animrenderbake.py b/object_animrenderbake.py
index c72fcc9b..6a9efdc7 100644
--- a/object_animrenderbake.py
+++ b/object_animrenderbake.py
@@ -85,7 +85,7 @@ class OBJECT_OT_animrenderbake(bpy.types.Operator):
img = uvdata.image
break
- if img == None:
+ if img is None:
self.report({'ERROR'}, "No valid image found to bake to")
return {'CANCELLED'}
diff --git a/rigify/generate.py b/rigify/generate.py
index a860b86b..7dd0dac2 100644
--- a/rigify/generate.py
+++ b/rigify/generate.py
@@ -231,7 +231,7 @@ def generate_rig(context, metarig):
# Parent any free-floating bones to the root.
bpy.ops.object.mode_set(mode='EDIT')
for bone in bones:
- if obj.data.edit_bones[bone].parent == None:
+ if obj.data.edit_bones[bone].parent is None:
obj.data.edit_bones[bone].use_connect = False
obj.data.edit_bones[bone].parent = obj.data.edit_bones[root_bone]
bpy.ops.object.mode_set(mode='OBJECT')
@@ -351,4 +351,3 @@ def param_name(param_name, rig_type):
""" Get the actual parameter name, sans-rig-type.
"""
return param_name[len(rig_type) + 1:]
-
diff --git a/rigify/rigs/biped/arm/fk.py b/rigify/rigs/biped/arm/fk.py
index 20ba89f2..77dcc6a6 100644
--- a/rigify/rigs/biped/arm/fk.py
+++ b/rigify/rigs/biped/arm/fk.py
@@ -49,7 +49,7 @@ class Rig:
raise MetarigError("RIGIFY ERROR: Bone '%s': input to rig type must be a chain of 3 bones." % (strip_org(bone)))
# Get (optional) parent
- if self.obj.data.bones[bone].parent == None:
+ if self.obj.data.bones[bone].parent is None:
self.org_parent = None
else:
self.org_parent = self.obj.data.bones[bone].parent.name
diff --git a/rigify/rigs/biped/leg/deform.py b/rigify/rigs/biped/leg/deform.py
index 2f9b2b02..bb6b6f39 100644
--- a/rigify/rigs/biped/leg/deform.py
+++ b/rigify/rigs/biped/leg/deform.py
@@ -99,7 +99,7 @@ class Rig:
else:
heel = b.name
- if foot == None or heel == None:
+ if foot is None or heel is None:
raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type." % (strip_org(bone)))
# Get the toe
@@ -108,7 +108,7 @@ class Rig:
if b.use_connect == True:
toe = b.name
- if toe == None:
+ if toe is None:
raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type." % (strip_org(bone)))
self.org_bones = leg_bones + [foot, toe, heel]
@@ -261,4 +261,3 @@ class Rig:
con.name = "track_to"
con.target = self.obj
con.subtarget = stip
-
diff --git a/rigify/rigs/biped/leg/fk.py b/rigify/rigs/biped/leg/fk.py
index bc7a8dbd..e231fa8e 100644
--- a/rigify/rigs/biped/leg/fk.py
+++ b/rigify/rigs/biped/leg/fk.py
@@ -59,7 +59,7 @@ class Rig:
else:
heel = b.name
- if foot == None or heel == None:
+ if foot is None or heel is None:
raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type." % (strip_org(bone)))
# Get the toe
@@ -69,13 +69,13 @@ class Rig:
toe = b.name
# Get the toe
- if toe == None:
+ if toe is None:
raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type." % (strip_org(bone)))
self.org_bones = leg_bones + [foot, toe, heel]
# Get (optional) parent
- if self.obj.data.bones[bone].parent == None:
+ if self.obj.data.bones[bone].parent is None:
self.org_parent = None
else:
self.org_parent = self.obj.data.bones[bone].parent.name
diff --git a/rigify/rigs/biped/leg/ik.py b/rigify/rigs/biped/leg/ik.py
index 42ead8b5..265b4e32 100644
--- a/rigify/rigs/biped/leg/ik.py
+++ b/rigify/rigs/biped/leg/ik.py
@@ -112,7 +112,7 @@ class Rig:
if len(b.children) > 0:
rocker = b.children[0].name
- if foot == None or heel == None:
+ if foot is None or heel is None:
print("blah")
raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type." % (strip_org(bone)))
@@ -123,7 +123,7 @@ class Rig:
toe = b.name
# Get toe
- if toe == None:
+ if toe is None:
raise MetarigError("RIGIFY ERROR: Bone '%s': incorrect bone configuration for rig type." % (strip_org(bone)))
self.org_bones = leg_bones + [foot, toe, heel, rocker]
diff --git a/rigify/rigs/misc/delta.py b/rigify/rigs/misc/delta.py
index bc5f7eba..dc8edd41 100644
--- a/rigify/rigs/misc/delta.py
+++ b/rigify/rigs/misc/delta.py
@@ -39,7 +39,7 @@ class Rig:
"""
bb = obj.data.bones
- if bb[bone].children == None:
+ if bb[bone].children is None:
raise MetarigError("RIGIFY ERROR: bone '%s': rig type requires one child." % org_name(bone.name))
if bb[bone].use_connect == True:
raise MetarigError("RIGIFY ERROR: bone '%s': rig type cannot be connected to parent." % org_name(bone.name))
diff --git a/rigify/rigs/palm.py b/rigify/rigs/palm.py
index 26cb3715..d1a3cf61 100644
--- a/rigify/rigs/palm.py
+++ b/rigify/rigs/palm.py
@@ -32,7 +32,7 @@ def bone_siblings(obj, bone):
"""
parent = obj.data.bones[bone].parent
- if parent == None:
+ if parent is None:
return []
bones = []
diff --git a/rigify/rigs/spine.py b/rigify/rigs/spine.py
index 2318b3b9..37dda1b1 100644
--- a/rigify/rigs/spine.py
+++ b/rigify/rigs/spine.py
@@ -215,7 +215,7 @@ class Rig:
# Parenting
bone_e.use_connect = False
helper_e.use_connect = False
- if prev_bone == None:
+ if prev_bone is None:
helper_e.parent = eb[hip_control]
bone_e.parent = helper_e
@@ -314,7 +314,7 @@ class Rig:
flip_bone(self.obj, bone)
bone_e.tail = Vector(eb[b[0]].head)
#bone_e.head = Vector(eb[b[0]].tail)
- if prev_bone == None:
+ if prev_bone is None:
pass # Position base bone wherever you want, for now do nothing (i.e. position at hips)
else:
put_bone(self.obj, bone, eb[prev_bone].tail)
@@ -331,7 +331,7 @@ class Rig:
con = bone_p.constraints.new('COPY_LOCATION')
con.name = "copy_location"
con.target = self.obj
- if prev_bone == None:
+ if prev_bone is None:
con.subtarget = hip_control # Position base bone wherever you want, for now hips
else:
con.subtarget = prev_bone