forked from bartvdbraak/blender
add NDEBUG to scons release flags + some pep8 cleanup for examples.
This commit is contained in:
parent
b25db7c8cb
commit
bc15e0e295
@ -165,8 +165,8 @@ CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
|
|||||||
|
|
||||||
CPPFLAGS = [ '-DXP_UNIX', '-DWIN32', '-DFREE_WINDOWS' ]
|
CPPFLAGS = [ '-DXP_UNIX', '-DWIN32', '-DFREE_WINDOWS' ]
|
||||||
CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
|
CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
|
||||||
REL_CFLAGS = [ '-O2' ]
|
REL_CFLAGS = ['-DNDEBUG', '-O2' ]
|
||||||
REL_CCFLAGS = [ '-O2' ]
|
REL_CCFLAGS = ['-DNDEBUG', '-O2' ]
|
||||||
C_WARN = [ '-Wall' , '-Wno-char-subscripts', '-Wdeclaration-after-statement' ]
|
C_WARN = [ '-Wall' , '-Wno-char-subscripts', '-Wdeclaration-after-statement' ]
|
||||||
|
|
||||||
CC_WARN = [ '-Wall' ]
|
CC_WARN = [ '-Wall' ]
|
||||||
|
@ -312,14 +312,14 @@ if USE_SDK==True:
|
|||||||
|
|
||||||
#Intel Macs are CoreDuo and Up
|
#Intel Macs are CoreDuo and Up
|
||||||
if MACOSX_ARCHITECTURE == 'i386' or MACOSX_ARCHITECTURE == 'x86_64':
|
if MACOSX_ARCHITECTURE == 'i386' or MACOSX_ARCHITECTURE == 'x86_64':
|
||||||
REL_CFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse']
|
REL_CFLAGS = ['-DNDEBUG', '-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse']
|
||||||
REL_CCFLAGS = ['-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse']
|
REL_CCFLAGS = ['-DNDEBUG', '-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse']
|
||||||
else:
|
else:
|
||||||
CFLAGS = CFLAGS+['-fno-strict-aliasing']
|
CFLAGS = CFLAGS+['-fno-strict-aliasing']
|
||||||
CCFLAGS = CCFLAGS+['-fno-strict-aliasing']
|
CCFLAGS = CCFLAGS+['-fno-strict-aliasing']
|
||||||
CXXFLAGS = CXXFLAGS+['-fno-strict-aliasing']
|
CXXFLAGS = CXXFLAGS+['-fno-strict-aliasing']
|
||||||
REL_CFLAGS = ['-O2']
|
REL_CFLAGS = ['-DNDEBUG', '-O2']
|
||||||
REL_CCFLAGS = ['-O2']
|
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||||
|
|
||||||
# Intel 64bit Macs are Core2Duo and up
|
# Intel 64bit Macs are Core2Duo and up
|
||||||
if MACOSX_ARCHITECTURE == 'x86_64':
|
if MACOSX_ARCHITECTURE == 'x86_64':
|
||||||
|
@ -180,8 +180,8 @@ CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFI
|
|||||||
if WITH_BF_FFMPEG:
|
if WITH_BF_FFMPEG:
|
||||||
# libavutil needs UINT64_C()
|
# libavutil needs UINT64_C()
|
||||||
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
|
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
|
||||||
REL_CFLAGS = ['-O2']
|
REL_CFLAGS = ['-DNDEBUG', '-O2']
|
||||||
REL_CCFLAGS = ['-O2']
|
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||||
##BF_DEPEND = True
|
##BF_DEPEND = True
|
||||||
##
|
##
|
||||||
##AR = ar
|
##AR = ar
|
||||||
|
@ -180,8 +180,8 @@ CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFI
|
|||||||
if WITH_BF_FFMPEG:
|
if WITH_BF_FFMPEG:
|
||||||
# libavutil needs UINT64_C()
|
# libavutil needs UINT64_C()
|
||||||
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
|
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
|
||||||
REL_CFLAGS = ['-O2']
|
REL_CFLAGS = ['-DNDEBUG', '-O2']
|
||||||
REL_CCFLAGS = ['-O2']
|
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||||
##BF_DEPEND = True
|
##BF_DEPEND = True
|
||||||
##
|
##
|
||||||
##AR = ar
|
##AR = ar
|
||||||
|
@ -180,8 +180,8 @@ CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFI
|
|||||||
if WITH_BF_FFMPEG:
|
if WITH_BF_FFMPEG:
|
||||||
# libavutil needs UINT64_C()
|
# libavutil needs UINT64_C()
|
||||||
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
|
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
|
||||||
REL_CFLAGS = ['-O2']
|
REL_CFLAGS = ['-DNDEBUG', '-O2']
|
||||||
REL_CCFLAGS = ['-O2']
|
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||||
##BF_DEPEND = True
|
##BF_DEPEND = True
|
||||||
##
|
##
|
||||||
##AR = ar
|
##AR = ar
|
||||||
|
@ -163,8 +163,8 @@ CCFLAGS = ['-pipe','-fPIC', '-n32']
|
|||||||
|
|
||||||
CPPFLAGS = []
|
CPPFLAGS = []
|
||||||
CXXFLAGS = ['-pipe','-fPIC', '-n32']
|
CXXFLAGS = ['-pipe','-fPIC', '-n32']
|
||||||
REL_CFLAGS = ['-O2']
|
REL_CFLAGS = ['-DNDEBUG', '-O2']
|
||||||
REL_CCFLAGS = ['-O2']
|
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||||
##BF_DEPEND = 'true'
|
##BF_DEPEND = 'true'
|
||||||
##
|
##
|
||||||
##AR = ar
|
##AR = ar
|
||||||
|
@ -198,8 +198,8 @@ CXXFLAGS += ['-fpermissive']
|
|||||||
if WITH_BF_FFMPEG:
|
if WITH_BF_FFMPEG:
|
||||||
# libavutil needs UINT64_C()
|
# libavutil needs UINT64_C()
|
||||||
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
|
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
|
||||||
REL_CFLAGS = ['-O2']
|
REL_CFLAGS = ['-DNDEBUG', '-O2']
|
||||||
REL_CCFLAGS = ['-O2']
|
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||||
##BF_DEPEND = True
|
##BF_DEPEND = True
|
||||||
##
|
##
|
||||||
##AR = ar
|
##AR = ar
|
||||||
|
@ -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']
|
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE']
|
||||||
CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
|
CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
|
||||||
REL_CFLAGS = [ '-O2' ]
|
REL_CFLAGS = ['-DNDEBUG', '-O2']
|
||||||
REL_CCFLAGS = [ '-O2' ]
|
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||||
C_WARN = ['-Wall', '-Wstrict-prototypes', '-Wno-char-subscripts', '-Wdeclaration-after-statement']
|
C_WARN = ['-Wall', '-Wstrict-prototypes', '-Wno-char-subscripts', '-Wdeclaration-after-statement']
|
||||||
|
|
||||||
CC_WARN = [ '-Wall' ]
|
CC_WARN = [ '-Wall' ]
|
||||||
|
@ -122,8 +122,8 @@ CFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
|||||||
CPPFLAGS = []
|
CPPFLAGS = []
|
||||||
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
||||||
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
||||||
REL_CFLAGS = ['-O2']
|
REL_CFLAGS = ['-DNDEBUG', '-O2']
|
||||||
REL_CCFLAGS = ['-O2']
|
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||||
##BF_DEPEND = True
|
##BF_DEPEND = True
|
||||||
##
|
##
|
||||||
##AR = ar
|
##AR = ar
|
||||||
|
@ -138,8 +138,8 @@ CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
|||||||
|
|
||||||
CPPFLAGS = ['-DSUN_OGL_NO_VERTEX_MACROS']
|
CPPFLAGS = ['-DSUN_OGL_NO_VERTEX_MACROS']
|
||||||
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
|
||||||
REL_CFLAGS = ['-O2']
|
REL_CFLAGS = ['-DNDEBUG', '-O2']
|
||||||
REL_CCFLAGS = ['-O2']
|
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||||
##BF_DEPEND = True
|
##BF_DEPEND = True
|
||||||
##
|
##
|
||||||
##AR = ar
|
##AR = ar
|
||||||
|
@ -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']
|
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE']
|
||||||
CXXFLAGS = ['-pipe', '-mwindows', '-funsigned-char', '-fno-strict-aliasing' ]
|
CXXFLAGS = ['-pipe', '-mwindows', '-funsigned-char', '-fno-strict-aliasing' ]
|
||||||
REL_CFLAGS = [ '-O2' ]
|
REL_CFLAGS = ['-DNDEBUG', '-O2']
|
||||||
REL_CCFLAGS = [ '-O2' ]
|
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||||
|
|
||||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||||
|
|
||||||
|
@ -27,4 +27,4 @@ bpy.ops.mesh.subdivide(number_cuts=3, smoothness=0.5)
|
|||||||
|
|
||||||
# check poll() to avoid exception.
|
# check poll() to avoid exception.
|
||||||
if bpy.ops.object.mode_set.poll():
|
if bpy.ops.object.mode_set.poll():
|
||||||
bpy.ops.object.mode_set(mode='EDIT')
|
bpy.ops.object.mode_set(mode='EDIT')
|
||||||
|
@ -8,6 +8,7 @@ Custom properties can be added to any subclass of an :class:`ID`,
|
|||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
|
|
||||||
|
|
||||||
# Assign a collection
|
# Assign a collection
|
||||||
class SceneSettingItem(bpy.types.PropertyGroup):
|
class SceneSettingItem(bpy.types.PropertyGroup):
|
||||||
name = bpy.props.StringProperty(name="Test Prop", default="Unknown")
|
name = bpy.props.StringProperty(name="Test Prop", default="Unknown")
|
||||||
@ -30,4 +31,4 @@ my_item.name = "Eggs"
|
|||||||
my_item.value = 30
|
my_item.value = 30
|
||||||
|
|
||||||
for my_item in bpy.context.scene.my_settings:
|
for my_item in bpy.context.scene.my_settings:
|
||||||
print(my_item.name, my_item.value)
|
print(my_item.name, my_item.value)
|
||||||
|
@ -12,7 +12,7 @@ class SubMenu(bpy.types.Menu):
|
|||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
layout.operator("object.select_all", text="Select/Deselect All")
|
layout.operator("object.select_all", text="Select/Deselect All")
|
||||||
layout.operator("object.select_inverse", text="Inverse")
|
layout.operator("object.select_inverse", text="Inverse")
|
||||||
layout.operator("object.select_random", text="Random")
|
layout.operator("object.select_random", text="Random")
|
||||||
|
@ -10,6 +10,7 @@ The function menu_draw acts like Menu.draw
|
|||||||
"""
|
"""
|
||||||
import bpy
|
import bpy
|
||||||
|
|
||||||
|
|
||||||
def menu_draw(self, context):
|
def menu_draw(self, context):
|
||||||
self.layout.operator("wm.save_homefile")
|
self.layout.operator("wm.save_homefile")
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ class BasicMenu(bpy.types.Menu):
|
|||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
layout.operator("object.select_all", text="Select/Deselect All")
|
layout.operator("object.select_all", text="Select/Deselect All")
|
||||||
layout.operator("object.select_inverse", text="Inverse")
|
layout.operator("object.select_inverse", text="Inverse")
|
||||||
layout.operator("object.select_random", text="Random")
|
layout.operator("object.select_random", text="Random")
|
||||||
|
@ -25,7 +25,7 @@ class ModalOperator(bpy.types.Operator):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
print("Start")
|
print("Start")
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
print("End")
|
print("End")
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ class ModalOperator(bpy.types.Operator):
|
|||||||
context.object.location.x = self.value / 100.0
|
context.object.location.x = self.value / 100.0
|
||||||
|
|
||||||
def modal(self, context, event):
|
def modal(self, context, event):
|
||||||
if event.type == 'MOUSEMOVE': # Apply
|
if event.type == 'MOUSEMOVE': # Apply
|
||||||
self.value = event.mouse_x
|
self.value = event.mouse_x
|
||||||
self.execute(context)
|
self.execute(context)
|
||||||
elif event.type == 'LEFTMOUSE': # Confirm
|
elif event.type == 'LEFTMOUSE': # Confirm
|
||||||
@ -51,7 +51,6 @@ class ModalOperator(bpy.types.Operator):
|
|||||||
return {'RUNNING_MODAL'}
|
return {'RUNNING_MODAL'}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bpy.utils.register_class(ModalOperator)
|
bpy.utils.register_class(ModalOperator)
|
||||||
|
|
||||||
# test call
|
# test call
|
||||||
|
@ -23,7 +23,6 @@ class ObjectSelectPanel(bpy.types.Panel):
|
|||||||
layout = self.layout
|
layout = self.layout
|
||||||
obj = context.object
|
obj = context.object
|
||||||
layout.prop(obj, "select", text="")
|
layout.prop(obj, "select", text="")
|
||||||
|
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
@ -6,6 +6,7 @@ A mix-in parent class can be used to share common properties and
|
|||||||
"""
|
"""
|
||||||
import bpy
|
import bpy
|
||||||
|
|
||||||
|
|
||||||
class View3DPanel():
|
class View3DPanel():
|
||||||
bl_space_type = 'VIEW_3D'
|
bl_space_type = 'VIEW_3D'
|
||||||
bl_region_type = 'TOOLS'
|
bl_region_type = 'TOOLS'
|
||||||
|
@ -782,7 +782,7 @@ def pyrna2sphinx(BASEPATH):
|
|||||||
for op in ops.values():
|
for op in ops.values():
|
||||||
op_modules.setdefault(op.module_name, []).append(op)
|
op_modules.setdefault(op.module_name, []).append(op)
|
||||||
del op
|
del op
|
||||||
|
|
||||||
for op_module_name, ops_mod in op_modules.items():
|
for op_module_name, ops_mod in op_modules.items():
|
||||||
filepath = os.path.join(BASEPATH, "bpy.ops.%s.rst" % op_module_name)
|
filepath = os.path.join(BASEPATH, "bpy.ops.%s.rst" % op_module_name)
|
||||||
file = open(filepath, "w")
|
file = open(filepath, "w")
|
||||||
|
Loading…
Reference in New Issue
Block a user