add NDEBUG to scons release flags + some pep8 cleanup for examples.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 25 Feb 2011 16:19:50 +0000 (16:19 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 25 Feb 2011 16:19:50 +0000 (16:19 +0000)
20 files changed:
build_files/scons/config/aix4-config.py
build_files/scons/config/darwin-config.py
build_files/scons/config/freebsd7-config.py
build_files/scons/config/freebsd8-config.py
build_files/scons/config/freebsd9-config.py
build_files/scons/config/irix6-config.py
build_files/scons/config/linux2-config.py
build_files/scons/config/linuxcross-config.py
build_files/scons/config/openbsd3-config.py
build_files/scons/config/sunos5-config.py
build_files/scons/config/win32-mingw-config.py
doc/python_api/examples/bpy.ops.py
doc/python_api/examples/bpy.props.3.py
doc/python_api/examples/bpy.types.Menu.1.py
doc/python_api/examples/bpy.types.Menu.2.py
doc/python_api/examples/bpy.types.Menu.py
doc/python_api/examples/bpy.types.Operator.5.py
doc/python_api/examples/bpy.types.Panel.1.py
doc/python_api/examples/bpy.types.Panel.2.py
doc/python_api/sphinx_doc_gen.py

index 2e9a1dc0bf3c3f882dabca8956f3518f90ace757..c3c28d27e6e2b9763e66398d1b8c68dc8bf076ff 100644 (file)
@@ -165,8 +165,8 @@ CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
 
 CPPFLAGS = [ '-DXP_UNIX', '-DWIN32', '-DFREE_WINDOWS' ]
 CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
-REL_CFLAGS = [ '-O2' ]
-REL_CCFLAGS = [ '-O2' ]
+REL_CFLAGS = ['-DNDEBUG', '-O2' ]
+REL_CCFLAGS = ['-DNDEBUG', '-O2' ]
 C_WARN = [ '-Wall' , '-Wno-char-subscripts', '-Wdeclaration-after-statement' ]
 
 CC_WARN = [ '-Wall' ]
index ff6029a7cb5ab961c1367cd9e0b53ff4dd798c88..fb59eb69a2dba93c929babe80800d952688c7e59 100644 (file)
@@ -312,14 +312,14 @@ if USE_SDK==True:
 
 #Intel Macs are CoreDuo and Up 
 if MACOSX_ARCHITECTURE == 'i386' or MACOSX_ARCHITECTURE == 'x86_64':
-       REL_CFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse']
-       REL_CCFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse']
+       REL_CFLAGS = ['-DNDEBUG', '-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse']
+       REL_CCFLAGS = ['-DNDEBUG', '-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse']
 else:
        CFLAGS = CFLAGS+['-fno-strict-aliasing']
        CCFLAGS =  CCFLAGS+['-fno-strict-aliasing']
        CXXFLAGS = CXXFLAGS+['-fno-strict-aliasing']
-       REL_CFLAGS = ['-O2']
-       REL_CCFLAGS = ['-O2']
+       REL_CFLAGS = ['-DNDEBUG', '-O2']
+       REL_CCFLAGS = ['-DNDEBUG', '-O2']
 
 # Intel 64bit Macs are Core2Duo and up
 if MACOSX_ARCHITECTURE == 'x86_64':
index aa39b193fc710474e06e574bbf6f4d5e779d1b27..387b4ed521af9cdd40c9555c34824e80df214dea 100644 (file)
@@ -180,8 +180,8 @@ CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFI
 if WITH_BF_FFMPEG:
   # libavutil needs UINT64_C()
   CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
-REL_CFLAGS = ['-O2']
-REL_CCFLAGS = ['-O2']
+REL_CFLAGS = ['-DNDEBUG', '-O2']
+REL_CCFLAGS = ['-DNDEBUG', '-O2']
 ##BF_DEPEND = True
 ##
 ##AR = ar
index 8f22b32ba87d4ad94542b12d0956b6ed27a02dac..1ceeea9d823cfc5efd64cdf8eaebe299acb49433 100644 (file)
@@ -180,8 +180,8 @@ CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFI
 if WITH_BF_FFMPEG:
   # libavutil needs UINT64_C()
   CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
-REL_CFLAGS = ['-O2']
-REL_CCFLAGS = ['-O2']
+REL_CFLAGS = ['-DNDEBUG', '-O2']
+REL_CCFLAGS = ['-DNDEBUG', '-O2']
 ##BF_DEPEND = True
 ##
 ##AR = ar
index 87d979f33bb6313dc62778885729ea48d95f1f19..4209ff4ab72a3253bd14edb76be76fed3e0e2b7b 100644 (file)
@@ -180,8 +180,8 @@ CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFI
 if WITH_BF_FFMPEG:
   # libavutil needs UINT64_C()
   CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
-REL_CFLAGS = ['-O2']
-REL_CCFLAGS = ['-O2']
+REL_CFLAGS = ['-DNDEBUG', '-O2']
+REL_CCFLAGS = ['-DNDEBUG', '-O2']
 ##BF_DEPEND = True
 ##
 ##AR = ar
index f5680aa29a659ba12f890576a09437fdc418e443..14dc04c4259d0e8902f0f29d32f21284fe9b92e1 100644 (file)
@@ -163,8 +163,8 @@ CCFLAGS = ['-pipe','-fPIC', '-n32']
 
 CPPFLAGS = []
 CXXFLAGS = ['-pipe','-fPIC', '-n32']
-REL_CFLAGS = ['-O2']
-REL_CCFLAGS = ['-O2']
+REL_CFLAGS = ['-DNDEBUG', '-O2']
+REL_CCFLAGS = ['-DNDEBUG', '-O2']
 ##BF_DEPEND = 'true'
 ##
 ##AR = ar
index 6a01d0236fc6db2983fd7361223c4132eb1dc4b4..b0054ea472e3edc53a1c07fe06c6ca038b05ebdd 100644 (file)
@@ -198,8 +198,8 @@ CXXFLAGS += ['-fpermissive']
 if WITH_BF_FFMPEG:
   # libavutil needs UINT64_C()
   CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
-REL_CFLAGS = ['-O2']
-REL_CCFLAGS = ['-O2']
+REL_CFLAGS = ['-DNDEBUG', '-O2']
+REL_CCFLAGS = ['-DNDEBUG', '-O2']
 ##BF_DEPEND = True
 ##
 ##AR = ar
index 4302cb2b884f3123224a683278a031b6fb0faafc..8ba82f795a590241efb2275329688a96cdf06cb6 100644 (file)
@@ -176,8 +176,8 @@ CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
 
 CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE']
 CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
-REL_CFLAGS = [ '-O2' ]
-REL_CCFLAGS = [ '-O2' ]
+REL_CFLAGS = ['-DNDEBUG',  '-O2']
+REL_CCFLAGS = ['-DNDEBUG',  '-O2']
 C_WARN = ['-Wall', '-Wstrict-prototypes', '-Wno-char-subscripts', '-Wdeclaration-after-statement']
 
 CC_WARN = [ '-Wall' ]
index 4125e4c367c80fb250dfc9da6c31ec54adca601a..4ecc0b158caaabb0869474b6ad978659200992a8 100644 (file)
@@ -122,8 +122,8 @@ CFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
 CPPFLAGS = []
 CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
 CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
-REL_CFLAGS = ['-O2']
-REL_CCFLAGS = ['-O2']
+REL_CFLAGS = ['-DNDEBUG', '-O2']
+REL_CCFLAGS = ['-DNDEBUG', '-O2']
 ##BF_DEPEND = True
 ##
 ##AR = ar
index fd9dfecb7055bc8aab164240460685f549e33140..9f998c168d045cc2a827ef538c54c0acad3d2000 100644 (file)
@@ -138,8 +138,8 @@ CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
 
 CPPFLAGS = ['-DSUN_OGL_NO_VERTEX_MACROS']
 CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
-REL_CFLAGS = ['-O2']
-REL_CCFLAGS = ['-O2']
+REL_CFLAGS = ['-DNDEBUG', '-O2']
+REL_CCFLAGS = ['-DNDEBUG', '-O2']
 ##BF_DEPEND = True
 ##
 ##AR = ar
index 845110c0993b72531b3c9a115aeba700c2bd8ae9..98ab63b5e738da864bb1b2efff0bcd6c47f619ae 100644 (file)
@@ -166,8 +166,8 @@ CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
 
 CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE']
 CXXFLAGS = ['-pipe', '-mwindows', '-funsigned-char', '-fno-strict-aliasing' ]
-REL_CFLAGS = [ '-O2' ]
-REL_CCFLAGS = [ '-O2' ]
+REL_CFLAGS = ['-DNDEBUG',  '-O2']
+REL_CCFLAGS = ['-DNDEBUG',  '-O2']
 
 C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
 
index 487d6039327d5281f7232eaaf66d3fdadbe8bf0c..20e8773652d9d2bb8788226aa593b5b81f68fc86 100644 (file)
@@ -27,4 +27,4 @@ bpy.ops.mesh.subdivide(number_cuts=3, smoothness=0.5)
 
 # check poll() to avoid exception.
 if bpy.ops.object.mode_set.poll():
-       bpy.ops.object.mode_set(mode='EDIT')
+    bpy.ops.object.mode_set(mode='EDIT')
index e4964c366cfdf11e47affbb2feb2167e3d838499..e0b2cf419d2ab1168ecd396b278dee9e809668cf 100644 (file)
@@ -8,6 +8,7 @@ Custom properties can be added to any subclass of an :class:`ID`,
 
 import bpy
 
+
 # Assign a collection
 class SceneSettingItem(bpy.types.PropertyGroup):
     name = bpy.props.StringProperty(name="Test Prop", default="Unknown")
@@ -30,4 +31,4 @@ my_item.name = "Eggs"
 my_item.value = 30
 
 for my_item in bpy.context.scene.my_settings:
-       print(my_item.name, my_item.value)
+    print(my_item.name, my_item.value)
index fa23e2dcfd38a4355a42ecbaf733a3feb4ef53e1..92c961e93d275cf11a46ed1beb8b4f1f55185bdc 100644 (file)
@@ -12,7 +12,7 @@ class SubMenu(bpy.types.Menu):
 
     def draw(self, context):
         layout = self.layout
-        
+
         layout.operator("object.select_all", text="Select/Deselect All")
         layout.operator("object.select_inverse", text="Inverse")
         layout.operator("object.select_random", text="Random")
index 4579dd6c485a46c23d4e10e3df6054910b38addf..c87b10cb6e74c2c1d4a7c6add4bcec1bba301ef9 100644 (file)
@@ -10,6 +10,7 @@ The function menu_draw acts like Menu.draw
 """
 import bpy
 
+
 def menu_draw(self, context):
     self.layout.operator("wm.save_homefile")
 
index a6abba6bfad2e31c5b17a64ae5d23f6e193ccbc4..3fbc0f6a8f00d2fc66c5f3a29598292d6c3fc841 100644 (file)
@@ -20,7 +20,7 @@ class BasicMenu(bpy.types.Menu):
 
     def draw(self, context):
         layout = self.layout
-        
+
         layout.operator("object.select_all", text="Select/Deselect All")
         layout.operator("object.select_inverse", text="Inverse")
         layout.operator("object.select_random", text="Random")
index fd09120d3b02bbf098e88f2e50235b1285cf093d..7d1a98d4c34220903897b4d96f52f5fa98fa0487 100644 (file)
@@ -25,7 +25,7 @@ class ModalOperator(bpy.types.Operator):
 
     def __init__(self):
         print("Start")
-        
+
     def __del__(self):
         print("End")
 
@@ -33,7 +33,7 @@ class ModalOperator(bpy.types.Operator):
         context.object.location.x = self.value / 100.0
 
     def modal(self, context, event):
-        if event.type == 'MOUSEMOVE': # Apply
+        if event.type == 'MOUSEMOVE':  # Apply
             self.value = event.mouse_x
             self.execute(context)
         elif event.type == 'LEFTMOUSE':  # Confirm
@@ -51,7 +51,6 @@ class ModalOperator(bpy.types.Operator):
         return {'RUNNING_MODAL'}
 
 
-
 bpy.utils.register_class(ModalOperator)
 
 # test call
index afe9493438e05d8920ed67f3bd5f64e84de75cb1..ab32a0437061a40d4a434a276255b91e3c8df306 100644 (file)
@@ -23,7 +23,6 @@ class ObjectSelectPanel(bpy.types.Panel):
         layout = self.layout
         obj = context.object
         layout.prop(obj, "select", text="")
-        
 
     def draw(self, context):
         layout = self.layout
index 661d7cba76697971bc036ed7e2575ceeade8b71d..a4b2f1fd3381981db22a4f513a8b559fdbe9365d 100644 (file)
@@ -6,6 +6,7 @@ A mix-in parent class can be used to share common properties and
 """
 import bpy
 
+
 class View3DPanel():
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'TOOLS'
index 8058ebeb137b502c83be5390c8bb9f8e31baf4c5..e10d5c5cf9a421cdded0cbf5bf3b33ebefe7a95d 100644 (file)
@@ -782,7 +782,7 @@ def pyrna2sphinx(BASEPATH):
         for op in ops.values():
             op_modules.setdefault(op.module_name, []).append(op)
         del op
-        
+
         for op_module_name, ops_mod in op_modules.items():
             filepath = os.path.join(BASEPATH, "bpy.ops.%s.rst" % op_module_name)
             file = open(filepath, "w")