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>2010-01-31 17:46:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-31 17:46:28 +0300
commit95069f29099b40055c0a3e4d10f4a7b0c602a1df (patch)
tree150ab0c4796c71a89c628c62213df625e4a72670 /release/scripts/modules
parentfbadf21b00dba10945d269cf7a82e091833bfcb4 (diff)
pep8 changes
Diffstat (limited to 'release/scripts/modules')
-rw-r--r--release/scripts/modules/bpy/__init__.py1
-rw-r--r--release/scripts/modules/bpy/ops.py2
-rw-r--r--release/scripts/modules/bpy/utils.py3
-rw-r--r--release/scripts/modules/bpy_types.py17
-rw-r--r--release/scripts/modules/rna_prop_ui.py3
5 files changed, 14 insertions, 12 deletions
diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py
index 8d654fb3978..e4a2dfa5b05 100644
--- a/release/scripts/modules/bpy/__init__.py
+++ b/release/scripts/modules/bpy/__init__.py
@@ -37,7 +37,6 @@ ops = _ops_module.ops_fake_module
import sys as _sys
-
def _main():
# security issue, dont allow the $CWD in the path.
diff --git a/release/scripts/modules/bpy/ops.py b/release/scripts/modules/bpy/ops.py
index b7cdbfc2f7a..efa4a51530b 100644
--- a/release/scripts/modules/bpy/ops.py
+++ b/release/scripts/modules/bpy/ops.py
@@ -135,7 +135,7 @@ class bpy_ops_submodule_op(object):
def idname(self):
# submod.foo -> SUBMOD_OT_foo
return self.module.upper() + "_OT_" + self.func
-
+
def idname_py(self):
# submod.foo -> SUBMOD_OT_foo
return self.module + "." + self.func
diff --git a/release/scripts/modules/bpy/utils.py b/release/scripts/modules/bpy/utils.py
index dee1b36592f..a719e74b19f 100644
--- a/release/scripts/modules/bpy/utils.py
+++ b/release/scripts/modules/bpy/utils.py
@@ -27,6 +27,7 @@ import bpy as _bpy
import os as _os
import sys as _sys
+
def load_scripts(reload_scripts=False, refresh_scripts=False):
import traceback
import time
@@ -65,7 +66,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
module_name = getattr(type_class, "__module__", "")
if module_name and module_name != "bpy.types": # hard coded for C types
- loaded_modules.add(module_name)
+ loaded_modules.add(module_name)
for module_name in loaded_modules:
print("Reloading:", module_name)
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index 98363005d9f..f6567af6121 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -61,6 +61,7 @@ class Object(bpy_types.ID):
name = self.name
return [scene for scene in bpy.data.scenes if name in scene.objects]
+
class _GenericBone:
"""
functions for bones, common between Armature/Pose/Edit bones.
@@ -89,24 +90,24 @@ class _GenericBone:
i += 1
return 0
-
+
@property
def x_axis(self):
""" Vector pointing down the x-axis of the bone.
"""
- return self.matrix.rotation_part() * Vector(1,0,0)
-
+ return self.matrix.rotation_part() * Vector(1.0, 0.0, 0.0)
+
@property
def y_axis(self):
""" Vector pointing down the x-axis of the bone.
"""
- return self.matrix.rotation_part() * Vector(0,1,0)
-
+ return self.matrix.rotation_part() * Vector(0.0, 1.0, 0.0)
+
@property
def z_axis(self):
""" Vector pointing down the x-axis of the bone.
"""
- return self.matrix.rotation_part() * Vector(0,0,1)
+ return self.matrix.rotation_part() * Vector(0.0, 0.0, 1.0)
@property
def basename(self):
@@ -244,6 +245,7 @@ class EditBone(StructRNA, _GenericBone):
self.tail_radius *= scalar
self.align_roll(matrix * z_vec)
+
def ord_ind(i1, i2):
if i1 < i2:
return i1, i2
@@ -388,6 +390,7 @@ class MeshEdge(StructRNA):
class MeshFace(StructRNA):
__slots__ = ()
+
@property
def center(self):
"""The midpoint of the face."""
@@ -464,7 +467,7 @@ class _GenericUI:
def prepend(cls, draw_func):
"""Prepend a draw function to this menu, takes the same arguments as the menus draw function."""
draw_funcs = cls._dyn_ui_initialize()
- draw_funcs.insert(0, draw_func)
+ draw_funcs.insert(0, draw_func)
class Panel(StructRNA, _GenericUI):
diff --git a/release/scripts/modules/rna_prop_ui.py b/release/scripts/modules/rna_prop_ui.py
index f5b9e518c8f..a9e50592059 100644
--- a/release/scripts/modules/rna_prop_ui.py
+++ b/release/scripts/modules/rna_prop_ui.py
@@ -126,7 +126,7 @@ def draw(layout, context, context_member, use_edit=True):
class PropertyPanel(bpy.types.Panel):
"""
- The subclass should have its own poll function
+ The subclass should have its own poll function
and the variable '_context_path' MUST be set.
"""
bl_label = "Custom Properties"
@@ -269,4 +269,3 @@ class WM_OT_properties_remove(bpy.types.Operator):
item = eval("context.%s" % self.properties.path)
del item[self.properties.property]
return {'FINISHED'}
-