[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41724] trunk/blender: Whitespace tweaks

Joshua Leung aligorith at gmail.com
Thu Nov 10 11:34:26 CET 2011


Revision: 41724
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41724
Author:   aligorith
Date:     2011-11-10 10:34:26 +0000 (Thu, 10 Nov 2011)
Log Message:
-----------
Whitespace tweaks

Modified Paths:
--------------
    trunk/blender/SConstruct
    trunk/blender/build_files/scons/tools/mstoolkit.py

Modified: trunk/blender/SConstruct
===================================================================
--- trunk/blender/SConstruct	2011-11-10 10:24:34 UTC (rev 41723)
+++ trunk/blender/SConstruct	2011-11-10 10:34:26 UTC (rev 41724)
@@ -162,7 +162,7 @@
 
 if sys.platform=='win32':
     if env['CC'] in ['cl', 'cl.exe']:
-         platform = 'win64-vc' if bitness == 64 else 'win32-vc'
+        platform = 'win64-vc' if bitness == 64 else 'win32-vc'
     elif env['CC'] in ['gcc']:
         platform = 'win32-mingw'
 

Modified: trunk/blender/build_files/scons/tools/mstoolkit.py
===================================================================
--- trunk/blender/build_files/scons/tools/mstoolkit.py	2011-11-10 10:24:34 UTC (rev 41723)
+++ trunk/blender/build_files/scons/tools/mstoolkit.py	2011-11-10 10:34:26 UTC (rev 41724)
@@ -49,198 +49,198 @@
 CXXSuffixes = ['.cc', '.cpp', '.cxx', '.c++', '.C++']
 
 def get_msvctoolkit_paths():
-        """Return a 4-tuple of (INCLUDE, LIB, PATH, TOOLKIT) as the values of those
-        three environment variables that should be set in order to execute
-        the MSVC .NET tools properly, if the information wasn't available
-        from the registry."""
+    """Return a 4-tuple of (INCLUDE, LIB, PATH, TOOLKIT) as the values of those
+    three environment variables that should be set in order to execute
+    the MSVC .NET tools properly, if the information wasn't available
+    from the registry."""
 
-        MSToolkitDir = None
-        paths = {}
-        exe_path = ''
-        lib_path = ''
-        include_path = ''
+    MSToolkitDir = None
+    paths = {}
+    exe_path = ''
+    lib_path = ''
+    include_path = ''
 
-        # First, we get the shell folder for this user:
-        if not SCons.Util.can_read_reg:
-                raise SCons.Errors.InternalError, "No Windows registry module was found"
+    # First, we get the shell folder for this user:
+    if not SCons.Util.can_read_reg:
+        raise SCons.Errors.InternalError, "No Windows registry module was found"
 
-        # look for toolkit
-        if os.environ.has_key('VCToolkitInstallDir'):
-                MSToolkitDir = os.path.normpath(os.environ['VCToolkitInstallDir'])
-        else:
-                # last resort -- default install location
-                MSToolkitDir = r'C:\Program Files\Microsoft Visual C++ Toolkit 2003'
+    # look for toolkit
+    if os.environ.has_key('VCToolkitInstallDir'):
+        MSToolkitDir = os.path.normpath(os.environ['VCToolkitInstallDir'])
+    else:
+        # last resort -- default install location
+        MSToolkitDir = r'C:\Program Files\Microsoft Visual C++ Toolkit 2003'
 
-        # look for platform sdk
-        if os.environ.has_key('MSSdk'):
-                PlatformSDKDir = os.path.normpath(os.environ['MSSdk'])
-        else:
-                try:
-                        PlatformSDKDir = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\MicrosoftSDK\Directories\Install Dir')[0]
-                        PlatformSDKDir = str(PlatformSDKDir)
-                except SCons.Util.RegError:
-                        raise SCons.Errors.InternalError, "The Platform SDK directory was not found in the registry or in the `MSSdk` environment variable."
+    # look for platform sdk
+    if os.environ.has_key('MSSdk'):
+        PlatformSDKDir = os.path.normpath(os.environ['MSSdk'])
+    else:
+        try:
+            PlatformSDKDir = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\MicrosoftSDK\Directories\Install Dir')[0]
+            PlatformSDKDir = str(PlatformSDKDir)
+        except SCons.Util.RegError:
+            raise SCons.Errors.InternalError, "The Platform SDK directory was not found in the registry or in the `MSSdk` environment variable."
 
-        # look for DX Sdk (expecting DX9)
-        # dxsdk docs have a directory key, look for it, extract path
-        #dxsdkdocs = ""
-        DXsdkDir = ""
-        #try:
-        #        dxsdkdocs = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\DirectX SDK\DX9SDK Doc Path')
-        #except SCons.Util.RegError:
-        #        raise SCons.Errors.InternalError, "The DXSDK directory was not found in the registry."
-        if os.environ.has_key('DXSDK_DIR'):
-                DXsdkDir = os.path.normpath(os.environ['DXSDK_DIR'])
+    # look for DX Sdk (expecting DX9)
+    # dxsdk docs have a directory key, look for it, extract path
+    #dxsdkdocs = ""
+    DXsdkDir = ""
+    #try:
+    #   dxsdkdocs = SCons.Util.RegGetValue(SCons.Util.HKEY_LOCAL_MACHINE, r'SOFTWARE\Microsoft\DirectX SDK\DX9SDK Doc Path')
+    #except SCons.Util.RegError:
+    #   raise SCons.Errors.InternalError, "The DXSDK directory was not found in the registry."
+    if os.environ.has_key('DXSDK_DIR'):
+        DXsdkDir = os.path.normpath(os.environ['DXSDK_DIR'])
 
-        #DXsdkDir = os.path.split(dxsdkdocs[0])[0]
-        DXsdkDir = os.path.split(DXsdkDir)[0]
+    #DXsdkDir = os.path.split(dxsdkdocs[0])[0]
+    DXsdkDir = os.path.split(DXsdkDir)[0]
 
-        include_path = r'%s\include;%s\include;%s\include' % (MSToolkitDir, PlatformSDKDir, DXsdkDir)
-        lib_path = r'%s\lib;%s\lib;%s\lib' % (MSToolkitDir, PlatformSDKDir, DXsdkDir)
-        exe_path = r'%s\bin;%s\bin\win95;%s\bin' % (MSToolkitDir, PlatformSDKDir, PlatformSDKDir)
-        return (include_path, lib_path, exe_path, PlatformSDKDir)
+    include_path = r'%s\include;%s\include;%s\include' % (MSToolkitDir, PlatformSDKDir, DXsdkDir)
+    lib_path = r'%s\lib;%s\lib;%s\lib' % (MSToolkitDir, PlatformSDKDir, DXsdkDir)
+    exe_path = r'%s\bin;%s\bin\win95;%s\bin' % (MSToolkitDir, PlatformSDKDir, PlatformSDKDir)
+    return (include_path, lib_path, exe_path, PlatformSDKDir)
 
 def validate_vars(env):
-        """Validate the PDB, PCH, and PCHSTOP construction variables."""
-        if env.has_key('PCH') and env['PCH']:
-                if not env.has_key('PCHSTOP'):
-                        raise SCons.Errors.UserError, "The PCHSTOP construction must be defined if PCH is defined."
-                if not SCons.Util.is_String(env['PCHSTOP']):
-                        raise SCons.Errors.UserError, "The PCHSTOP construction variable must be a string: %r"%env['PCHSTOP']
+    """Validate the PDB, PCH, and PCHSTOP construction variables."""
+    if env.has_key('PCH') and env['PCH']:
+        if not env.has_key('PCHSTOP'):
+            raise SCons.Errors.UserError, "The PCHSTOP construction must be defined if PCH is defined."
+        if not SCons.Util.is_String(env['PCHSTOP']):
+            raise SCons.Errors.UserError, "The PCHSTOP construction variable must be a string: %r"%env['PCHSTOP']
 
 def pch_emitter(target, source, env):
-        """Sets up the PDB dependencies for a pch file, and adds the object
-        file target."""
+    """Sets up the PDB dependencies for a pch file, and adds the object
+    file target."""
 
-        validate_vars(env)
+    validate_vars(env)
 
-        pch = None
-        obj = None
+    pch = None
+    obj = None
 
-        for t in target:
-                if SCons.Util.splitext(str(t))[1] == '.pch':
-                        pch = t
-                if SCons.Util.splitext(str(t))[1] == '.obj':
-                        obj = t
+    for t in target:
+        if SCons.Util.splitext(str(t))[1] == '.pch':
+            pch = t
+        if SCons.Util.splitext(str(t))[1] == '.obj':
+            obj = t
 
-        if not obj:
-                obj = SCons.Util.splitext(str(pch))[0]+'.obj'
+    if not obj:
+        obj = SCons.Util.splitext(str(pch))[0]+'.obj'
 
-        target = [pch, obj] # pch must be first, and obj second for the PCHCOM to work
+    target = [pch, obj] # pch must be first, and obj second for the PCHCOM to work
 
-        if env.has_key('PDB') and env['PDB']:
-                env.SideEffect(env['PDB'], target)
-                env.Precious(env['PDB'])
+    if env.has_key('PDB') and env['PDB']:
+        env.SideEffect(env['PDB'], target)
+        env.Precious(env['PDB'])
 
-        return (target, source)
+    return (target, source)
 
 def object_emitter(target, source, env, parent_emitter):
-        """Sets up the PDB and PCH dependencies for an object file."""
+    """Sets up the PDB and PCH dependencies for an object file."""
 
-        validate_vars(env)
+    validate_vars(env)
 
-        parent_emitter(target, source, env)
+    parent_emitter(target, source, env)
 
-        if env.has_key('PDB') and env['PDB']:
-                env.SideEffect(env['PDB'], target)
-                env.Precious(env['PDB'])
+    if env.has_key('PDB') and env['PDB']:
+        env.SideEffect(env['PDB'], target)
+        env.Precious(env['PDB'])
 
-        if env.has_key('PCH') and env['PCH']:
-                env.Depends(target, env['PCH'])
+    if env.has_key('PCH') and env['PCH']:
+        env.Depends(target, env['PCH'])
 
-        return (target, source)
+    return (target, source)
 
 def static_object_emitter(target, source, env):
-        return object_emitter(target, source, env,
-                                                  SCons.Defaults.StaticObjectEmitter)
+    return object_emitter(target, source, env,
+                          SCons.Defaults.StaticObjectEmitter)
 
 def shared_object_emitter(target, source, env):
-        return object_emitter(target, source, env,
-                                                  SCons.Defaults.SharedObjectEmitter)
+    return object_emitter(target, source, env,
+                          SCons.Defaults.SharedObjectEmitter)
 
 pch_builder = SCons.Builder.Builder(action='$PCHCOM', suffix='.pch', emitter=pch_emitter)
 res_builder = SCons.Builder.Builder(action='$RCCOM', suffix='.res')
 
 def pdbGenerator(env, target, source, for_signature):
-        if target and env.has_key('PDB') and env['PDB']:
-                return ['/PDB:%s'%target[0].File(env['PDB']).get_string(for_signature),
-                                '/DEBUG']
+    if target and env.has_key('PDB') and env['PDB']:
+        return ['/PDB:%s'%target[0].File(env['PDB']).get_string(for_signature),
+                '/DEBUG']
 
 def win32ShlinkTargets(target, source, env, for_signature):
-        listCmd = []
-        dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
-        if dll: listCmd.append("/out:%s"%dll.get_string(for_signature))
+    listCmd = []
+    dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list