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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-08-08 09:21:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-08 09:21:37 +0400
commit22d2764d50f8571c0bbcdb4e7c944ba02763b43c (patch)
tree52c4f97b66f45d1153f97cc69f6eae127c293e3a /release/scripts/modules/rna_info.py
parent0160901c90f0db6ad615af31dd8c9201b660257f (diff)
use static sets rather then tuples, python optimizes this case.
minor change to lightmap unpack collecting unique meshes.
Diffstat (limited to 'release/scripts/modules/rna_info.py')
-rw-r--r--release/scripts/modules/rna_info.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index 93a344f4b09..943f86adecb 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -148,7 +148,7 @@ class InfoStructRNA:
import types
functions = []
for identifier, attr in self._get_py_visible_attrs():
- if type(attr) in (types.FunctionType, types.MethodType):
+ if type(attr) in {types.FunctionType, types.MethodType}:
functions.append((identifier, attr))
return functions
@@ -156,7 +156,7 @@ class InfoStructRNA:
import types
functions = []
for identifier, attr in self._get_py_visible_attrs():
- if type(attr) in (types.BuiltinMethodType, types.BuiltinFunctionType):
+ if type(attr) in {types.BuiltinMethodType, types.BuiltinFunctionType}:
functions.append((identifier, attr))
return functions
@@ -260,7 +260,7 @@ class InfoPropertyRNA:
if self.array_length:
type_str += " array of %d items" % (self.array_length)
- if self.type in ("float", "int"):
+ if self.type in {"float", "int"}:
type_str += " in [%s, %s]" % (range_str(self.min), range_str(self.max))
elif self.type == "enum":
if self.is_enum_flag:
@@ -595,7 +595,7 @@ def BuildRNAInfo():
for prop in rna_info.properties:
# ERROR CHECK
default = prop.default
- if type(default) in (float, int):
+ if type(default) in {float, int}:
if default < prop.min or default > prop.max:
print("\t %s.%s, %s not in [%s - %s]" % (rna_info.identifier, prop.identifier, default, prop.min, prop.max))