[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41638] trunk/blender: cmake & pep8 tidy up, also some style edits.
Campbell Barton
ideasman42 at gmail.com
Tue Nov 8 02:32:34 CET 2011
Revision: 41638
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41638
Author: campbellbarton
Date: 2011-11-08 01:32:34 +0000 (Tue, 08 Nov 2011)
Log Message:
-----------
cmake & pep8 tidy up, also some style edits.
remove unneeded collection length function.
Modified Paths:
--------------
trunk/blender/doc/python_api/examples/bpy.app.handlers.1.py
trunk/blender/doc/python_api/examples/bpy.app.handlers.py
trunk/blender/extern/libmv/CMakeLists.txt
trunk/blender/release/scripts/modules/bpy/ops.py
trunk/blender/release/scripts/modules/bpyml_ui.py
trunk/blender/release/scripts/startup/bl_operators/clip.py
trunk/blender/release/scripts/startup/bl_operators/object_quick_effects.py
trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py
trunk/blender/release/scripts/startup/bl_ui/properties_data_camera.py
trunk/blender/release/scripts/startup/bl_ui/properties_data_lamp.py
trunk/blender/release/scripts/startup/bl_ui/properties_game.py
trunk/blender/release/scripts/startup/bl_ui/properties_material.py
trunk/blender/release/scripts/startup/bl_ui/properties_object.py
trunk/blender/release/scripts/startup/bl_ui/properties_physics_cloth.py
trunk/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py
trunk/blender/release/scripts/startup/bl_ui/properties_render.py
trunk/blender/release/scripts/startup/bl_ui/space_clip.py
trunk/blender/release/scripts/startup/bl_ui/space_image.py
trunk/blender/release/scripts/startup/bl_ui/space_userpref.py
trunk/blender/release/scripts/startup/bl_ui/space_userpref_keymap.py
trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
trunk/blender/source/blender/blenkernel/CMakeLists.txt
trunk/blender/source/blender/blenkernel/intern/movieclip.c
trunk/blender/source/blender/makesdna/DNA_modifier_types.h
trunk/blender/source/blender/makesrna/intern/rna_tracking.c
Modified: trunk/blender/doc/python_api/examples/bpy.app.handlers.1.py
===================================================================
--- trunk/blender/doc/python_api/examples/bpy.app.handlers.1.py 2011-11-08 00:20:50 UTC (rev 41637)
+++ trunk/blender/doc/python_api/examples/bpy.app.handlers.1.py 2011-11-08 01:32:34 UTC (rev 41638)
@@ -15,6 +15,6 @@
@persistent
def load_handler(dummy):
- print("Load Handler:", bpy.data.filepath)
+ print("Load Handler:", bpy.data.filepath)
bpy.app.handlers.load_post.append(load_handler)
Modified: trunk/blender/doc/python_api/examples/bpy.app.handlers.py
===================================================================
--- trunk/blender/doc/python_api/examples/bpy.app.handlers.py 2011-11-08 00:20:50 UTC (rev 41637)
+++ trunk/blender/doc/python_api/examples/bpy.app.handlers.py 2011-11-08 01:32:34 UTC (rev 41638)
@@ -6,7 +6,8 @@
import bpy
+
def my_handler(scene):
- print("Frame Change", scene.frame_current)
+ print("Frame Change", scene.frame_current)
bpy.app.handlers.frame_change_pre.append(my_handler)
Modified: trunk/blender/extern/libmv/CMakeLists.txt
===================================================================
--- trunk/blender/extern/libmv/CMakeLists.txt 2011-11-08 00:20:50 UTC (rev 41637)
+++ trunk/blender/extern/libmv/CMakeLists.txt 2011-11-08 01:32:34 UTC (rev 41638)
@@ -25,8 +25,8 @@
set(INC
.
../Eigen3
- ./third_party/ssba
- ./third_party/ldl/Include
+ third_party/ssba
+ third_party/ldl/Include
../colamd/Include
)
@@ -130,7 +130,7 @@
third_party/msinttypes/inttypes.h
)
-IF(WIN32)
+if(WIN32)
list(APPEND SRC
third_party/glog/src/logging.cc
third_party/glog/src/raw_logging.cc
@@ -158,23 +158,23 @@
)
list(APPEND INC
- ./third_party/glog/src/windows
+ third_party/glog/src/windows
)
- IF(NOT MINGW)
+ if(NOT MINGW)
list(APPEND INC
- ./third_party/msinttypes
+ third_party/msinttypes
)
- ENDIF(NOT MINGW)
+ endif()
- IF(MSVC)
+ if(MSVC)
set(MSVC_OFLAGS O1 O2 Ox)
foreach(FLAG )
string(REPLACE "" "Od" CMAKE_CXX_FLAGS_RELEASE "")
string(REPLACE "" "Od" CMAKE_C_FLAGS_RELWITHDEBINFO "")
endforeach()
- ENDIF(MSVC)
-ELSE(WIN32)
+ endif()
+else(WIN32)
list(APPEND SRC
third_party/glog/src/utilities.cc
third_party/glog/src/symbolize.cc
@@ -206,9 +206,9 @@
)
list(APPEND INC
- ./third_party/glog/src
+ third_party/glog/src
)
-ENDIF(WIN32)
+endif()
add_definitions(-DV3DLIB_ENABLE_SUITESPARSE -DGOOGLE_GLOG_DLL_DECL=)
Modified: trunk/blender/release/scripts/modules/bpy/ops.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy/ops.py 2011-11-08 00:20:50 UTC (rev 41637)
+++ trunk/blender/release/scripts/modules/bpy/ops.py 2011-11-08 01:32:34 UTC (rev 41638)
@@ -208,7 +208,7 @@
return "# %s\n%s" % (descr, as_string)
def __str__(self): # used for print(...)
- return "<function bpy.ops.%s.%s at 0x%x'>" % \
- (self.module, self.func, id(self))
+ return ("<function bpy.ops.%s.%s at 0x%x'>" %
+ (self.module, self.func, id(self)))
ops_fake_module = BPyOps()
Modified: trunk/blender/release/scripts/modules/bpyml_ui.py
===================================================================
--- trunk/blender/release/scripts/modules/bpyml_ui.py 2011-11-08 00:20:50 UTC (rev 41637)
+++ trunk/blender/release/scripts/modules/bpyml_ui.py 2011-11-08 01:32:34 UTC (rev 41638)
@@ -25,9 +25,11 @@
_uilayout_rna = _bpy.types.UILayout.bl_rna
-_uilayout_tags = ["ui"] + \
- _uilayout_rna.properties.keys() + \
+_uilayout_tags = (
+ ["ui"] +
+ _uilayout_rna.properties.keys() +
_uilayout_rna.functions.keys()
+ )
# these need to be imported directly
# >>> from bpyml_ui.locals import *
Modified: trunk/blender/release/scripts/startup/bl_operators/clip.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/clip.py 2011-11-08 00:20:50 UTC (rev 41637)
+++ trunk/blender/release/scripts/startup/bl_operators/clip.py 2011-11-08 01:32:34 UTC (rev 41638)
@@ -155,7 +155,8 @@
self._rmproxy(d + '_undistorted')
self._rmproxy(os.path.join(absproxy, 'proxy_' + str(x) + '.avi'))
- tc = ('free_run.blen_tc', 'interp_free_run.blen_tc', \
+ tc = ('free_run.blen_tc',
+ 'interp_free_run.blen_tc',
'record_run.blen_tc')
for x in tc:
@@ -280,10 +281,10 @@
efra = max(efra, track.markers[-1].frame)
if sfra is None or efra is None:
- return
+ return
# Store object matrices
- for x in range(sfra, efra+1):
+ for x in range(sfra, efra + 1):
scene.frame_set(x)
matrices.append(ob.matrix_world.copy())
@@ -291,7 +292,7 @@
# Apply matrices on object and insert keyframes
i = 0
- for x in range(sfra, efra+1):
+ for x in range(sfra, efra + 1):
scene.frame_set(x)
ob.matrix_world = matrices[i]
Modified: trunk/blender/release/scripts/startup/bl_operators/object_quick_effects.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/object_quick_effects.py 2011-11-08 00:20:50 UTC (rev 41637)
+++ trunk/blender/release/scripts/startup/bl_operators/object_quick_effects.py 2011-11-08 01:32:34 UTC (rev 41638)
@@ -105,8 +105,7 @@
psys.settings.child_type = 'INTERPOLATED'
obj.data.materials.append(mat)
- obj.particle_systems[-1].settings.material = \
- len(obj.data.materials)
+ psys.settings.material = len(obj.data.materials)
return {'FINISHED'}
Modified: trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py 2011-11-08 00:20:50 UTC (rev 41637)
+++ trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py 2011-11-08 01:32:34 UTC (rev 41638)
@@ -212,8 +212,11 @@
# Edge intersect test
for ed in edgeLoopsSource:
for seg in edgeLoopsTarget:
- i = geometry.intersect_line_line_2d(\
- seg[0], seg[1], SourceOffset+ed[0], SourceOffset+ed[1])
+ i = geometry.intersect_line_line_2d(seg[0],
+ seg[1],
+ SourceOffset+ed[0],
+ SourceOffset+ed[1],
+ )
if i:
return 1 # LINE INTERSECTION
@@ -773,15 +776,16 @@
global ROTMAT_2D_POS_45D
global RotMatStepRotation
- ROTMAT_2D_POS_90D = Matrix.Rotation( radians(90.0), 2)
- ROTMAT_2D_POS_45D = Matrix.Rotation( radians(45.0), 2)
+ ROTMAT_2D_POS_90D = Matrix.Rotation(radians(90.0), 2)
+ ROTMAT_2D_POS_45D = Matrix.Rotation(radians(45.0), 2)
RotMatStepRotation = []
rot_angle = 22.5 #45.0/2
while rot_angle > 0.1:
- RotMatStepRotation.append([\
- Matrix.Rotation( radians(rot_angle), 2),\
- Matrix.Rotation( radians(-rot_angle), 2)])
+ RotMatStepRotation.append([
+ Matrix.Rotation(radians(+rot_angle), 2),
+ Matrix.Rotation(radians(-rot_angle), 2),
+ ])
rot_angle = rot_angle/2.0
Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_camera.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_camera.py 2011-11-08 00:20:50 UTC (rev 41637)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_camera.py 2011-11-08 01:32:34 UTC (rev 41638)
@@ -108,6 +108,7 @@
col.prop(cam, "clip_start", text="Start")
col.prop(cam, "clip_end", text="End")
+
class DATA_PT_camera(CameraButtonsPanel, Panel):
bl_label = "Camera"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -120,8 +121,8 @@
row = layout.row(align=True)
row.menu("CAMERA_MT_presets", text=bpy.types.CAMERA_MT_presets.bl_label)
- row.operator("camera.preset_add", text="", icon="ZOOMIN")
- row.operator("camera.preset_add", text="", icon="ZOOMOUT").remove_active = True
+ row.operator("camera.preset_add", text="", icon='ZOOMIN')
+ row.operator("camera.preset_add", text="", icon='ZOOMOUT').remove_active = True
layout.label(text="Sensor:")
@@ -137,6 +138,7 @@
col = split.column(align=True)
col.prop(cam, "sensor_fit", text="")
+
class DATA_PT_camera_dof(CameraButtonsPanel, Panel):
bl_label = "Depth of Field"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -156,6 +158,7 @@
col.active = cam.dof_object is None
col.prop(cam, "dof_distance", text="Distance")
+
class DATA_PT_camera_display(CameraButtonsPanel, Panel):
bl_label = "Display"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_lamp.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_lamp.py 2011-11-08 00:20:50 UTC (rev 41637)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_lamp.py 2011-11-08 01:32:34 UTC (rev 41638)
@@ -134,8 +134,8 @@
row = layout.row(align=True)
row.prop(lamp, "use_sky")
row.menu("LAMP_MT_sunsky_presets", text=bpy.types.LAMP_MT_sunsky_presets.bl_label)
- row.operator("lamp.sunsky_preset_add", text="", icon="ZOOMIN")
- row.operator("lamp.sunsky_preset_add", text="", icon="ZOOMOUT").remove_active = True
+ row.operator("lamp.sunsky_preset_add", text="", icon='ZOOMIN')
+ row.operator("lamp.sunsky_preset_add", text="", icon='ZOOMOUT').remove_active = True
row = layout.row()
row.active = lamp.use_sky or lamp.use_atmosphere
Modified: trunk/blender/release/scripts/startup/bl_ui/properties_game.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_game.py 2011-11-08 00:20:50 UTC (rev 41637)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_game.py 2011-11-08 01:32:34 UTC (rev 41638)
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list