[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53830] trunk/blender: code cleanup:

Campbell Barton ideasman42 at gmail.com
Wed Jan 16 00:17:45 CET 2013


Revision: 53830
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53830
Author:   campbellbarton
Date:     2013-01-15 23:17:45 +0000 (Tue, 15 Jan 2013)
Log Message:
-----------
code cleanup:
- cycles ui used 'cscene' for scene.cycles and scene.cycles_curves
- style cleanup

Modified Paths:
--------------
    trunk/blender/build_files/buildbot/master.cfg
    trunk/blender/build_files/buildbot/slave_rsync.py
    trunk/blender/build_files/cmake/cmake_static_check_clang_array.py
    trunk/blender/build_files/cmake/cmake_static_check_cppcheck.py
    trunk/blender/build_files/cmake/cmake_static_check_smatch.py
    trunk/blender/build_files/cmake/cmake_static_check_sparse.py
    trunk/blender/build_files/cmake/cmake_static_check_splint.py
    trunk/blender/build_files/cmake/project_info.py
    trunk/blender/build_files/cmake/project_source_info.py
    trunk/blender/doc/python_api/examples/bpy.props.5.py
    trunk/blender/doc/python_api/examples/bpy.types.UIList.py
    trunk/blender/doc/python_api/rst_from_bmesh_opdefines.py
    trunk/blender/doc/python_api/sphinx_doc_gen.py
    trunk/blender/intern/cycles/blender/addon/__init__.py
    trunk/blender/intern/cycles/blender/addon/engine.py
    trunk/blender/intern/cycles/blender/addon/osl.py
    trunk/blender/intern/cycles/blender/addon/properties.py
    trunk/blender/intern/cycles/blender/addon/ui.py
    trunk/blender/intern/tools/credits_svn_gen.py
    trunk/blender/intern/tools/pydna.py
    trunk/blender/source/blender/editors/interface/interface_regions.c
    trunk/blender/source/blender/editors/transform/transform.h
    trunk/blender/source/tests/bl_load_addons.py
    trunk/blender/source/tests/bl_rst_completeness.py
    trunk/blender/source/tests/rst_to_doctree_mini.py
    trunk/blender/source/tools/check_style_c.py

Modified: trunk/blender/build_files/buildbot/master.cfg
===================================================================
--- trunk/blender/build_files/buildbot/master.cfg	2013-01-15 23:15:32 UTC (rev 53829)
+++ trunk/blender/build_files/buildbot/master.cfg	2013-01-15 23:17:45 UTC (rev 53830)
@@ -28,8 +28,8 @@
 from buildbot.changes.svnpoller import SVNPoller
 
 c['change_source'] = SVNPoller(
-       'https://svn.blender.org/svnroot/bf-blender/trunk/',
-       pollinterval=1200)
+    'https://svn.blender.org/svnroot/bf-blender/trunk/',
+    pollinterval=1200)
 
 # BUILDERS
 #
@@ -74,9 +74,11 @@
     else:
         return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender')
 
+
 def lib_svn_step(dir):
     return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir)
 
+
 def rsync_step(id, branch, rsync_script):
     return ShellCommand(name='rsync', command=['python', rsync_script, id, branch], description='uploading', descriptionDone='uploaded', workdir='install')
 
@@ -155,9 +157,9 @@
 
     print(names)
     c['schedulers'].append(timed.Nightly(name='nightly' + str(i),
-        builderNames=names,
-        hour=3+i,
-        minute=0))
+                                         builderNames=names,
+                                         hour=3 + i,
+                                         minute=0))
 
 # STATUS TARGETS
 #

Modified: trunk/blender/build_files/buildbot/slave_rsync.py
===================================================================
--- trunk/blender/build_files/buildbot/slave_rsync.py	2013-01-15 23:15:32 UTC (rev 53829)
+++ trunk/blender/build_files/buildbot/slave_rsync.py	2013-01-15 23:17:45 UTC (rev 53830)
@@ -41,5 +41,3 @@
 
 ret = os.system(command)
 sys.exit(ret)
-
-

Modified: trunk/blender/build_files/cmake/cmake_static_check_clang_array.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_static_check_clang_array.py	2013-01-15 23:15:32 UTC (rev 53829)
+++ trunk/blender/build_files/cmake/cmake_static_check_clang_array.py	2013-01-15 23:17:45 UTC (rev 53830)
@@ -50,7 +50,7 @@
     check_commands = []
     for c, inc_dirs, defs in source_info:
         cmd = ([CHECKER_BIN] +
-                CHECKER_ARGS +
+               CHECKER_ARGS +
                [c] +
                [("-I%s" % i) for i in inc_dirs] +
                [("-D%s" % d) for d in defs]

Modified: trunk/blender/build_files/cmake/cmake_static_check_cppcheck.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_static_check_cppcheck.py	2013-01-15 23:15:32 UTC (rev 53829)
+++ trunk/blender/build_files/cmake/cmake_static_check_cppcheck.py	2013-01-15 23:17:45 UTC (rev 53830)
@@ -56,7 +56,7 @@
     check_commands = []
     for c, inc_dirs, defs in source_info:
         cmd = ([CHECKER_BIN] +
-                CHECKER_ARGS +
+               CHECKER_ARGS +
                [c] +
                [("-I%s" % i) for i in inc_dirs] +
                [("-D%s" % d) for d in defs]

Modified: trunk/blender/build_files/cmake/cmake_static_check_smatch.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_static_check_smatch.py	2013-01-15 23:15:32 UTC (rev 53829)
+++ trunk/blender/build_files/cmake/cmake_static_check_smatch.py	2013-01-15 23:17:45 UTC (rev 53830)
@@ -41,6 +41,7 @@
 
 USE_QUIET = (os.environ.get("QUIET", None) is not None)
 
+
 def main():
     source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
 
@@ -48,7 +49,7 @@
     for c, inc_dirs, defs in source_info:
 
         cmd = ([CHECKER_BIN] +
-                CHECKER_ARGS +
+               CHECKER_ARGS +
                [c] +
                [("-I%s" % i) for i in inc_dirs] +
                [("-D%s" % d) for d in defs]

Modified: trunk/blender/build_files/cmake/cmake_static_check_sparse.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_static_check_sparse.py	2013-01-15 23:15:32 UTC (rev 53829)
+++ trunk/blender/build_files/cmake/cmake_static_check_sparse.py	2013-01-15 23:17:45 UTC (rev 53830)
@@ -47,7 +47,7 @@
     for c, inc_dirs, defs in source_info:
 
         cmd = ([CHECKER_BIN] +
-                CHECKER_ARGS +
+               CHECKER_ARGS +
                [c] +
                [("-I%s" % i) for i in inc_dirs] +
                [("-D%s" % d) for d in defs]

Modified: trunk/blender/build_files/cmake/cmake_static_check_splint.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_static_check_splint.py	2013-01-15 23:15:32 UTC (rev 53829)
+++ trunk/blender/build_files/cmake/cmake_static_check_splint.py	2013-01-15 23:17:45 UTC (rev 53830)
@@ -79,7 +79,7 @@
     check_commands = []
     for c, inc_dirs, defs in source_info:
         cmd = ([CHECKER_BIN] +
-                CHECKER_ARGS +
+               CHECKER_ARGS +
                [c] +
                [("-I%s" % i) for i in inc_dirs] +
                [("-D%s" % d) for d in defs]

Modified: trunk/blender/build_files/cmake/project_info.py
===================================================================
--- trunk/blender/build_files/cmake/project_info.py	2013-01-15 23:15:32 UTC (rev 53829)
+++ trunk/blender/build_files/cmake/project_info.py	2013-01-15 23:17:45 UTC (rev 53830)
@@ -150,7 +150,6 @@
 
         os.system(cmd)
         return join(CMAKE_DIR, ".cproject")
-        
 
     includes = []
     defines = []

Modified: trunk/blender/build_files/cmake/project_source_info.py
===================================================================
--- trunk/blender/build_files/cmake/project_source_info.py	2013-01-15 23:15:32 UTC (rev 53829)
+++ trunk/blender/build_files/cmake/project_source_info.py	2013-01-15 23:17:45 UTC (rev 53830)
@@ -89,12 +89,12 @@
     if make_exe_basename.startswith("make"):
         print("running 'make' with --dry-run ...")
         process = subprocess.Popen([make_exe, "--always-make", "--dry-run", "--keep-going", "VERBOSE=1"],
-                                    stdout=subprocess.PIPE,
+                                   stdout=subprocess.PIPE,
                                    )
     elif make_exe_basename.startswith("ninja"):
         print("running 'ninja' with -t commands ...")
         process = subprocess.Popen([make_exe, "-t", "commands"],
-                                    stdout=subprocess.PIPE,
+                                   stdout=subprocess.PIPE,
                                    )
 
     while process.poll():

Modified: trunk/blender/doc/python_api/examples/bpy.props.5.py
===================================================================
--- trunk/blender/doc/python_api/examples/bpy.props.5.py	2013-01-15 23:15:32 UTC (rev 53829)
+++ trunk/blender/doc/python_api/examples/bpy.props.5.py	2013-01-15 23:17:45 UTC (rev 53830)
@@ -16,6 +16,7 @@
 def get_float(self):
     return self["testprop"]
 
+
 def set_float(self, value):
     self["testprop"] = value
 
@@ -36,6 +37,7 @@
 def get_array(self):
     return (True, self["somebool"])
 
+
 def set_array(self, values):
     self["somebool"] = values[0] and values[1]
 
@@ -51,10 +53,12 @@
     ("YELLOW", "Red", "", 4),
     ]
 
+
 def get_enum(self):
     import random
     return random.randint(1, 4)
 
+
 def set_enum(self, value):
     print("setting value", value)
 
@@ -66,16 +70,16 @@
 scene = bpy.context.scene
 
 scene.test_float = 12.34
-print (scene.test_float)
+print(scene.test_float)
 
 scene.test_array = (True, False)
-print ([x for x in scene.test_array])
+print([x for x in scene.test_array])
 
 #scene.test_date = "blah"   # this would fail, property is read-only
-print (scene.test_date)
+print(scene.test_date)
 
 scene.test_enum = 'BLUE'
-print (scene.test_enum)
+print(scene.test_enum)
 
 
 # >>> 12.34000015258789

Modified: trunk/blender/doc/python_api/examples/bpy.types.UIList.py
===================================================================
--- trunk/blender/doc/python_api/examples/bpy.types.UIList.py	2013-01-15 23:15:32 UTC (rev 53829)
+++ trunk/blender/doc/python_api/examples/bpy.types.UIList.py	2013-01-15 23:17:45 UTC (rev 53830)
@@ -86,4 +86,4 @@
 
 
 if __name__ == "__main__":
-    register()
\ No newline at end of file
+    register()

Modified: trunk/blender/doc/python_api/rst_from_bmesh_opdefines.py
===================================================================
--- trunk/blender/doc/python_api/rst_from_bmesh_opdefines.py	2013-01-15 23:15:32 UTC (rev 53829)
+++ trunk/blender/doc/python_api/rst_from_bmesh_opdefines.py	2013-01-15 23:17:45 UTC (rev 53830)
@@ -65,10 +65,10 @@
     fsrc = open(FILE_OP_DEFINES_C, 'r', encoding="utf-8")
 
     blocks = []
-    
+
     is_block = False
     is_comment = False  # /* global comments only */
-    
+
     comment_ctx = None
     block_ctx = None
 
@@ -82,7 +82,7 @@
         elif l.strip().startswith("/*"):
             is_comment = True
             comment_ctx = []
-        
+
         if is_block:
             if l.strip().startswith("//"):
                 pass
@@ -93,11 +93,11 @@
                     l = l[:cpp_comment]
 
                 block_ctx.append(l)
-            
+
             if l.strip() == "};":
                 is_block = False
                 comment_ctx = None
-        
+
         if is_comment:
             c_comment_start = l.find("/*")
             if c_comment_start != -1:
@@ -113,7 +113,6 @@
     fsrc.close()
     del fsrc
 
-
    # namespace hack
     vars = (
         "BMO_OP_SLOT_ELEMENT_BUF",
@@ -124,7 +123,7 @@
         "BMO_OP_SLOT_VEC",
         "BMO_OP_SLOT_PTR",
         "BMO_OP_SLOT_MAPPING",
-        
+
         "BMO_OP_SLOT_SUBTYPE_MAP_ELEM",
         "BMO_OP_SLOT_SUBTYPE_MAP_BOOL",
         "BMO_OP_SLOT_SUBTYPE_MAP_INT",
@@ -157,23 +156,23 @@
     for comment, b in blocks:
         # magic, translate into python
         b[0] = b[0].replace("static BMOpDefine ", "")
-        
+
         for i, l in enumerate(b):
             l = l.strip()
             l = l.replace("{", "(")
             l = l.replace("}", ")")
-            
+
             if l.startswith("/*"):
                 l = l.replace("/*", "'''own <")
             else:
                 l = l.replace("/*", "'''inline <")
             l = l.replace("*/", ">''',")

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list