[Bf-blender-cvs] [aea00c7] master: Code cleanup: style
Campbell Barton
noreply at git.blender.org
Wed Feb 12 22:52:51 CET 2014
Commit: aea00c7a81de90fd3f0b976ee1a7d5040c9f18e7
Author: Campbell Barton
Date: Thu Feb 13 08:51:33 2014 +1100
https://developer.blender.org/rBaea00c7a81de90fd3f0b976ee1a7d5040c9f18e7
Code cleanup: style
===================================================================
M doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_set.py
M doc/python_api/examples/mathutils.kdtree.py
M intern/cycles/blender/addon/engine.py
M intern/cycles/blender/addon/properties.py
M intern/cycles/blender/addon/ui.py
M release/scripts/modules/animsys_refactor.py
M release/scripts/modules/bl_i18n_utils/utils.py
M release/scripts/modules/bl_i18n_utils/utils_rtl.py
M release/scripts/modules/bpy_extras/io_utils.py
M release/scripts/modules/bpy_extras/object_utils.py
M release/scripts/modules/sys_info.py
M release/scripts/startup/bl_operators/object.py
M release/scripts/startup/bl_ui/properties_data_modifier.py
M release/scripts/startup/bl_ui/space_view3d_toolbar.py
M source/blender/compositor/intern/COM_Debug.cpp
M source/blender/datatoc/datatoc_icon.py
M source/blender/editors/interface/interface_regions.c
M source/blender/editors/sculpt_paint/sculpt_uv.c
M source/blender/editors/transform/transform_snap.c
M source/blender/makesrna/intern/rna_cloth.c
M source/tests/bl_run_operators.py
===================================================================
diff --git a/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_set.py b/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_set.py
index 06ed484..b84bf02 100644
--- a/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_set.py
+++ b/doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_set.py
@@ -8,4 +8,3 @@ collection.foreach_set(attr, some_seq)
# Python equivalent
for i in range(len(some_seq)):
setattr(collection[i], attr, some_seq[i])
-
diff --git a/doc/python_api/examples/mathutils.kdtree.py b/doc/python_api/examples/mathutils.kdtree.py
index d367582..18e61a2 100644
--- a/doc/python_api/examples/mathutils.kdtree.py
+++ b/doc/python_api/examples/mathutils.kdtree.py
@@ -34,4 +34,3 @@ print("Close points within 0.5 distance")
co_find = context.scene.cursor_location
for (co, index, dist) in kd.find_range(co_find, 0.5):
print(" ", co, index, dist)
-
diff --git a/intern/cycles/blender/addon/engine.py b/intern/cycles/blender/addon/engine.py
index 66dc5e7..b9ce655 100644
--- a/intern/cycles/blender/addon/engine.py
+++ b/intern/cycles/blender/addon/engine.py
@@ -88,7 +88,8 @@ def available_devices():
def with_osl():
import _cycles
return _cycles.with_osl
-
+
+
def with_network():
import _cycles
return _cycles.with_network
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 0f0bff2..c80e8a3 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -33,7 +33,7 @@ enum_devices = (
)
if _cycles.with_network:
- enum_devices += (('NETWORK', "Networked Device", "Use networked device for rendering"),)
+ enum_devices += (('NETWORK', "Networked Device", "Use networked device for rendering"),)
enum_feature_set = (
('SUPPORTED', "Supported", "Only use finished and supported features"),
@@ -371,7 +371,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
min=0.0, max=1e8,
default=0.0,
)
-
+
cls.sample_clamp_indirect = FloatProperty(
name="Clamp Indirect",
description="If non-zero, the maximum value for an indirect sample, "
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 65eb75a..c0ce804 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -1195,7 +1195,7 @@ class CyclesRender_PT_CurveRendering(CyclesButtonsPanel, Panel):
layout.prop(ccscene, "primitive", text="Primitive")
layout.prop(ccscene, "shape", text="Shape")
- if (ccscene.primitive in {'CURVE_SEGMENTS', 'LINE_SEGMENTS'} and ccscene.shape == 'RIBBONS') == False:
+ if not (ccscene.primitive in {'CURVE_SEGMENTS', 'LINE_SEGMENTS'} and ccscene.shape == 'RIBBONS'):
layout.prop(ccscene, "cull_backfacing", text="Cull back-faces")
if ccscene.primitive == 'TRIANGLES' and ccscene.shape == 'THICK':
@@ -1382,6 +1382,7 @@ def get_panels():
return [getattr(types, p) for p in panels if hasattr(types, p)]
+
def register():
bpy.types.RENDER_PT_render.append(draw_device)
bpy.types.VIEW3D_HT_header.append(draw_pause)
diff --git a/release/scripts/modules/animsys_refactor.py b/release/scripts/modules/animsys_refactor.py
index 9730a05..8899bbf 100644
--- a/release/scripts/modules/animsys_refactor.py
+++ b/release/scripts/modules/animsys_refactor.py
@@ -22,7 +22,7 @@
This module has utility functions for renaming
rna values in fcurves and drivers.
-Currently unused, but might become useful later again.
+Currently unused, but might become useful later again.
"""
IS_TESTING = False
diff --git a/release/scripts/modules/bl_i18n_utils/utils.py b/release/scripts/modules/bl_i18n_utils/utils.py
index 53146fd..8597764 100644
--- a/release/scripts/modules/bl_i18n_utils/utils.py
+++ b/release/scripts/modules/bl_i18n_utils/utils.py
@@ -1285,7 +1285,6 @@ class I18n:
return path, env[tuple_id]
return None, None # No data...
-
def parse(self, kind, src, langs=set()):
self.parsers[kind](self, src, langs)
@@ -1372,6 +1371,7 @@ class I18n:
({} currently).
""".format(self.settings.PARSER_TEMPLATE_ID)
default_context = self.settings.DEFAULT_CONTEXT
+
def _gen_py(self, langs, tab=" "):
_lencomm = len(self.settings.PO_COMMENT_PREFIX)
_lengen = len(self.settings.PO_COMMENT_PREFIX_GENERATED)
@@ -1451,7 +1451,7 @@ class I18n:
ret.append(tab + lngsp + ' "' + comments[-1] + '"))),')
else:
ret[-1] = ret[-1] + " (" + (('"' + comments[0] + '",') if comments else "") + "))),"
-
+
ret.append(tab + "),")
ret += [
")",
diff --git a/release/scripts/modules/bl_i18n_utils/utils_rtl.py b/release/scripts/modules/bl_i18n_utils/utils_rtl.py
index f08d7ef..261d154 100755
--- a/release/scripts/modules/bl_i18n_utils/utils_rtl.py
+++ b/release/scripts/modules/bl_i18n_utils/utils_rtl.py
@@ -118,7 +118,7 @@ def protect_format_seq(msg):
dlt = 2
while (idx + dlt) < ln and msg[idx + dlt] in digits:
dlt += 1
- if (idx + dlt) < ln and msg[idx + dlt] is '|':
+ if (idx + dlt) < ln and msg[idx + dlt] is '|':
dlt += 1
# %.4f
elif idx < (ln - 3) and msg[idx] == '%' and msg[idx + 1] in digits:
diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py
index 790233c..b1877a9 100644
--- a/release/scripts/modules/bpy_extras/io_utils.py
+++ b/release/scripts/modules/bpy_extras/io_utils.py
@@ -409,7 +409,9 @@ def path_reference(filepath,
if mode == 'ABSOLUTE':
return filepath_abs
elif mode == 'RELATIVE':
- try: # can't always find the relative path (between drive letters on windows)
+ # can't always find the relative path
+ # (between drive letters on windows)
+ try:
return os.path.relpath(filepath_abs, base_dst)
except ValueError:
return filepath_abs
diff --git a/release/scripts/modules/bpy_extras/object_utils.py b/release/scripts/modules/bpy_extras/object_utils.py
index a14f012..766da46 100644
--- a/release/scripts/modules/bpy_extras/object_utils.py
+++ b/release/scripts/modules/bpy_extras/object_utils.py
@@ -232,7 +232,8 @@ def object_add_grid_scale_apply_operator(operator, context):
if not properties.is_property_set(prop_id):
prop_def = properties_def[prop_id]
if prop_def.unit == 'LENGTH' and prop_def.subtype == 'DISTANCE':
- setattr(operator, prop_id, getattr(operator, prop_id) * grid_scale)
+ setattr(operator, prop_id,
+ getattr(operator, prop_id) * grid_scale)
def object_image_guess(obj, bm=None):
diff --git a/release/scripts/modules/sys_info.py b/release/scripts/modules/sys_info.py
index bd89578..f87cf61 100644
--- a/release/scripts/modules/sys_info.py
+++ b/release/scripts/modules/sys_info.py
@@ -133,7 +133,7 @@ def write_sysinfo(op):
oiio = bpy.app.oiio
output.write("OpenImageIO: ")
- if ocio.supported :
+ if ocio.supported:
output.write("%s\n" % (oiio.version_string))
else:
output.write("Blender was built without OpenImageIO support\n")
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py
index 383f67f..ae13ba8 100644
--- a/release/scripts/startup/bl_operators/object.py
+++ b/release/scripts/startup/bl_operators/object.py
@@ -938,4 +938,3 @@ class LodGenerate(Operator):
scene.objects.active = ob
return {'FINISHED'}
-
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 441d314..093b7f2 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -63,9 +63,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.prop(md, "use_bone_envelopes", text="Bone Envelopes")
layout.separator()
-
+
split = layout.split()
-
+
row = split.row(align=True)
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
sub = row.row(align=True)
@@ -139,7 +139,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
elif md.limit_method == 'VGROUP':
layout.label(text="Vertex Group:")
layout.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
-
+
layout.label(text="Width Method:")
layout.row().prop(md, "offset_type", expand=True)
@@ -262,12 +262,12 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
if decimate_type == 'COLLAPSE':
layout.prop(md, "ratio")
-
+
split = layout.split()
row = split.row(align=True)
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
-
+
split.prop(md, "use_collapse_triangulate")
elif decimate_type == 'UNSUBDIV':
layout.prop(md, "iterations")
@@ -464,10 +464,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.active = not md.is_bound
col.label(text="Object:")
col.prop(md, "object", text="")
-
+
col = split.column()
col.label(text="Vertex Group:")
-
+
row = col.row(align=True)
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
sub = row.row(align=True)
@@ -792,18 +792,18 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
col.prop(md, "thickness")
col.prop(md, "thickness_clamp")
-
+
col.separator()
-
+
row = col.row(align=True)
row.prop_search(md, "vertex_group", ob, "vertex_groups",
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list