[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36848] branches/bmesh/blender: svn merge -r36801:36840 https://svn.blender.org/svnroot/bf-blender/trunk/ blender
Campbell Barton
ideasman42 at gmail.com
Tue May 24 06:35:21 CEST 2011
Revision: 36848
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36848
Author: campbellbarton
Date: 2011-05-24 04:35:21 +0000 (Tue, 24 May 2011)
Log Message:
-----------
svn merge -r36801:36840 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36801
Modified Paths:
--------------
branches/bmesh/blender/CMakeLists.txt
branches/bmesh/blender/build_files/cmake/macros.cmake
branches/bmesh/blender/intern/ghost/intern/GHOST_WindowCocoa.mm
branches/bmesh/blender/intern/tools/ui_snapshot.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_object_constraint.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_particle.py
branches/bmesh/blender/release/scripts/startup/bl_ui/space_userpref.py
branches/bmesh/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
branches/bmesh/blender/source/blender/blenkernel/BKE_text.h
branches/bmesh/blender/source/blender/blenkernel/intern/anim.c
branches/bmesh/blender/source/blender/blenkernel/intern/depsgraph.c
branches/bmesh/blender/source/blender/blenkernel/intern/displist.c
branches/bmesh/blender/source/blender/blenkernel/intern/object.c
branches/bmesh/blender/source/blender/blenkernel/intern/particle.c
branches/bmesh/blender/source/blender/blenkernel/intern/particle_system.c
branches/bmesh/blender/source/blender/blenkernel/intern/softbody.c
branches/bmesh/blender/source/blender/blenkernel/intern/text.c
branches/bmesh/blender/source/blender/blenlib/BLI_path_util.h
branches/bmesh/blender/source/blender/blenlib/intern/BLI_kdopbvh.c
branches/bmesh/blender/source/blender/blenlib/intern/math_base.c
branches/bmesh/blender/source/blender/blenlib/intern/pbvh.c
branches/bmesh/blender/source/blender/blenlib/intern/rct.c
branches/bmesh/blender/source/blender/blenloader/intern/readfile.c
branches/bmesh/blender/source/blender/blenloader/intern/writefile.c
branches/bmesh/blender/source/blender/editors/animation/keyframes_draw.c
branches/bmesh/blender/source/blender/editors/armature/editarmature.c
branches/bmesh/blender/source/blender/editors/armature/poseobject.c
branches/bmesh/blender/source/blender/editors/curve/editcurve.c
branches/bmesh/blender/source/blender/editors/gpencil/drawgpencil.c
branches/bmesh/blender/source/blender/editors/gpencil/gpencil_edit.c
branches/bmesh/blender/source/blender/editors/gpencil/gpencil_paint.c
branches/bmesh/blender/source/blender/editors/include/ED_view3d.h
branches/bmesh/blender/source/blender/editors/mesh/bmesh_select.c
branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c
branches/bmesh/blender/source/blender/editors/mesh/knifetool.c
branches/bmesh/blender/source/blender/editors/object/object_relations.c
branches/bmesh/blender/source/blender/editors/physics/particle_edit.c
branches/bmesh/blender/source/blender/editors/render/render_opengl.c
branches/bmesh/blender/source/blender/editors/screen/screen_edit.c
branches/bmesh/blender/source/blender/editors/screen/screen_ops.c
branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_image.c
branches/bmesh/blender/source/blender/editors/sculpt_paint/sculpt.c
branches/bmesh/blender/source/blender/editors/space_buttons/buttons_ops.c
branches/bmesh/blender/source/blender/editors/space_graph/graph_select.c
branches/bmesh/blender/source/blender/editors/space_text/text_ops.c
branches/bmesh/blender/source/blender/editors/space_view3d/drawobject.c
branches/bmesh/blender/source/blender/editors/space_view3d/view3d_draw.c
branches/bmesh/blender/source/blender/editors/space_view3d/view3d_edit.c
branches/bmesh/blender/source/blender/editors/space_view3d/view3d_fly.c
branches/bmesh/blender/source/blender/editors/space_view3d/view3d_intern.h
branches/bmesh/blender/source/blender/editors/space_view3d/view3d_ops.c
branches/bmesh/blender/source/blender/editors/space_view3d/view3d_toolbar.c
branches/bmesh/blender/source/blender/editors/space_view3d/view3d_view.c
branches/bmesh/blender/source/blender/editors/transform/transform.c
branches/bmesh/blender/source/blender/editors/transform/transform_conversions.c
branches/bmesh/blender/source/blender/editors/transform/transform_manipulator.c
branches/bmesh/blender/source/blender/editors/transform/transform_snap.c
branches/bmesh/blender/source/blender/gpu/intern/gpu_material.c
branches/bmesh/blender/source/blender/imbuf/intern/IMB_anim.h
branches/bmesh/blender/source/blender/imbuf/intern/md5.h
branches/bmesh/blender/source/blender/imbuf/intern/targa.c
branches/bmesh/blender/source/blender/makesdna/DNA_userdef_types.h
branches/bmesh/blender/source/blender/makesdna/intern/makesdna.c
branches/bmesh/blender/source/blender/makesrna/intern/rna_object_force.c
branches/bmesh/blender/source/blender/makesrna/intern/rna_userdef.c
branches/bmesh/blender/source/blender/python/generic/mathutils_Matrix.c
branches/bmesh/blender/source/blender/python/intern/bpy.c
branches/bmesh/blender/source/blender/windowmanager/WM_api.h
branches/bmesh/blender/source/blender/windowmanager/intern/wm_event_system.c
branches/bmesh/blender/source/blender/windowmanager/intern/wm_operators.c
branches/bmesh/blender/source/creator/creator.c
Property Changed:
----------------
branches/bmesh/blender/
branches/bmesh/blender/release/scripts/startup/bl_operators/add_mesh_torus.py
branches/bmesh/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py
branches/bmesh/blender/release/scripts/startup/bl_operators/vertexpaint_dirt.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_armature.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_bone.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_camera.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_empty.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_lamp.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_lattice.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_mesh.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_metaball.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_modifier.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_game.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_material.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_particle.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_physics_field.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_physics_smoke.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_texture.py
branches/bmesh/blender/release/scripts/startup/bl_ui/properties_world.py
branches/bmesh/blender/release/scripts/startup/bl_ui/space_node.py
branches/bmesh/blender/source/blender/editors/render/render_update.c
branches/bmesh/blender/source/blender/editors/uvedit/uvedit_buttons.c
Property changes on: branches/bmesh/blender
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/blender:31524-36801
+ /trunk/blender:31524-36840
Modified: branches/bmesh/blender/CMakeLists.txt
===================================================================
--- branches/bmesh/blender/CMakeLists.txt 2011-05-24 01:54:13 UTC (rev 36847)
+++ branches/bmesh/blender/CMakeLists.txt 2011-05-24 04:35:21 UTC (rev 36848)
@@ -55,33 +55,19 @@
# quiet output for Makefiles, 'make -s' helps too
# set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
-# ignore system set flag, use our own
-# must be before project(...)
-# if the user wants to add their own its ok after first run.
-if(DEFINED CMAKE_C_STANDARD_LIBRARIES)
- set(_reset_standard_libraries OFF)
-else()
- set(_reset_standard_libraries ON)
-endif()
+#-----------------------------------------------------------------------------
+# Load some macros.
+include(build_files/cmake/macros.cmake)
-project(Blender)
+#-----------------------------------------------------------------------------
+# Initialize project.
+blender_project_hack_pre()
-if (_reset_standard_libraries)
- # Must come after project(...)
- #
- # MINGW workaround for -ladvapi32 being included which surprisingly causes
- # string formatting of floats, eg: printf("%.*f", 3, value). to crash blender
- # with a meaningless stack trace. by overriding this flag we ensure we only
- # have libs we define and that cmake & scons builds match.
- set(CMAKE_C_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
- set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
- mark_as_advanced(CMAKE_C_STANDARD_LIBRARIES)
- mark_as_advanced(CMAKE_CXX_STANDARD_LIBRARIES)
-endif()
-unset(_reset_standard_libraries)
+project(Blender)
+blender_project_hack_post()
enable_testing()
@@ -92,10 +78,6 @@
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE )
#-----------------------------------------------------------------------------
-# Load some macros.
-include(build_files/cmake/macros.cmake)
-
-#-----------------------------------------------------------------------------
# Set default config options
get_blender_version()
@@ -984,6 +966,12 @@
#-----------------------------------------------------------------------------
# Common.
+if(APPLE OR WIN32)
+ if(NOT IS_DIRECTORY "${LIBDIR}")
+ message(FATAL_ERROR "Apple and Windows require pre-compiled libs at: '${LIBDIR}'")
+ endif()
+endif()
+
if(WITH_RAYOPTIMIZATION)
if(CMAKE_COMPILER_IS_GNUCC)
if(SUPPORT_SSE_BUILD)
Modified: branches/bmesh/blender/build_files/cmake/macros.cmake
===================================================================
--- branches/bmesh/blender/build_files/cmake/macros.cmake 2011-05-24 01:54:13 UTC (rev 36847)
+++ branches/bmesh/blender/build_files/cmake/macros.cmake 2011-05-24 04:35:21 UTC (rev 36848)
@@ -388,3 +388,71 @@
# message(STATUS "Version (Internal): ${BLENDER_VERSION}.${BLENDER_SUBVERSION}, Version (external): ${BLENDER_VERSION}${BLENDER_VERSION_CHAR}-${BLENDER_VERSION_CYCLE}")
endmacro()
+
+
+# hacks to override initial project settings
+# these macros must be called directly before/after project(Blender)
+macro(blender_project_hack_pre)
+ # ----------------
+ # MINGW HACK START
+ # ignore system set flag, use our own
+ # must be before project(...)
+ # if the user wants to add their own its ok after first run.
+ if(DEFINED CMAKE_C_STANDARD_LIBRARIES)
+ set(_reset_standard_libraries OFF)
+ else()
+ set(_reset_standard_libraries ON)
+ endif()
+
+ # ------------------
+ # GCC -O3 HACK START
+ # needed because O3 can cause problems but
+ # allow the builder to set O3 manually after.
+ if(DEFINED CMAKE_C_FLAGS_RELEASE)
+ set(_reset_standard_cflags_rel OFF)
+ else()
+ set(_reset_standard_cflags_rel ON)
+ endif()
+ if(DEFINED CMAKE_CXX_FLAGS_RELEASE)
+ set(_reset_standard_cxxflags_rel OFF)
+ else()
+ set(_reset_standard_cxxflags_rel ON)
+ endif()
+endmacro()
+
+
+macro(blender_project_hack_post)
+ # --------------
+ # MINGW HACK END
+ if (_reset_standard_libraries)
+ # Must come after project(...)
+ #
+ # MINGW workaround for -ladvapi32 being included which surprisingly causes
+ # string formatting of floats, eg: printf("%.*f", 3, value). to crash blender
+ # with a meaningless stack trace. by overriding this flag we ensure we only
+ # have libs we define and that cmake & scons builds match.
+ set(CMAKE_C_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
+ set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
+ mark_as_advanced(CMAKE_C_STANDARD_LIBRARIES)
+ mark_as_advanced(CMAKE_CXX_STANDARD_LIBRARIES)
+ endif()
+ unset(_reset_standard_libraries)
+
+
+ # ----------------
+ # GCC -O3 HACK END
+ if(_reset_standard_cflags_rel)
+ string(REGEX REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}" CACHE STRING "" FORCE)
+ mark_as_advanced(CMAKE_C_FLAGS_RELEASE)
+ endif()
+
+ if(_reset_standard_cxxflags_rel)
+ string(REGEX REPLACE "-O3" "-O2" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "" FORCE)
+ mark_as_advanced(CMAKE_CXX_FLAGS_RELEASE)
+ endif()
+
+ unset(_reset_standard_cflags_rel)
+ unset(_reset_standard_cxxflags_rel)
+endmacro()
Modified: branches/bmesh/blender/intern/ghost/intern/GHOST_WindowCocoa.mm
===================================================================
--- branches/bmesh/blender/intern/ghost/intern/GHOST_WindowCocoa.mm 2011-05-24 01:54:13 UTC (rev 36847)
+++ branches/bmesh/blender/intern/ghost/intern/GHOST_WindowCocoa.mm 2011-05-24 04:35:21 UTC (rev 36848)
@@ -461,9 +461,13 @@
GHOST_WindowCocoa::~GHOST_WindowCocoa()
{
- if (m_customCursor) delete m_customCursor;
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ if (m_customCursor) {
+ [m_customCursor release];
+ m_customCursor = nil;
+ }
+
[m_openGLView release];
if (m_window) {
Modified: branches/bmesh/blender/intern/tools/ui_snapshot.py
===================================================================
--- branches/bmesh/blender/intern/tools/ui_snapshot.py 2011-05-24 01:54:13 UTC (rev 36847)
+++ branches/bmesh/blender/intern/tools/ui_snapshot.py 2011-05-24 04:35:21 UTC (rev 36848)
@@ -28,15 +28,15 @@
TEMP_DIR = "/tmp"
PROPERTY_MAPPING = {
- "armature_edit": '',
- "bone": '',
+ "armature_edit": 'DATA',
+ "bone": 'BONE',
"bone_constraint": '',
"constraint": '',
"curve_edit": '',
"data": '',
"imagepaint": '',
- "lattice_edit": '',
- "material": '',
+ "lattice_edit": 'DATA',
+ "material": 'MATERIAL',
"mball_edit": '',
"mesh_edit": '',
"modifier": '',
@@ -45,7 +45,7 @@
"particle": '',
"particlemode": '',
"physics": '',
- "posemode": '',
+ "posemode": '', # toolbar
"render": 'RENDER',
"scene": 'SCENE',
"surface_edit": '',
@@ -61,6 +61,19 @@
import bpy
+
+def clear_startup_blend():
+ import bpy
+ if bpy.ops.object.mode_set.poll():
+ bpy.ops.object.mode_set(mode='OBJECT')
+
+ import bpy
+
+ for scene in bpy.data.scenes:
+ for obj in scene.objects:
+ scene.objects.unlink(obj)
+
+
def force_redraw():
bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)
@@ -71,8 +84,28 @@
force_redraw()
bpy.ops.screen.screenshot(filepath=path)
+def context_setup(bl_context, class_name):
+ if bl_context == "object":
+ bpy.ops.object.add(type='EMPTY')
+ elif bl_context == "bone":
+ bpy.ops.object.armature_add()
+ bpy.ops.object.mode_set(mode='EDIT')
+ elif bl_context == "armature_edit":
+ bpy.ops.object.armature_add()
+ bpy.ops.object.mode_set(mode='EDIT')
+ elif bl_context == "posemode":
+ bpy.ops.object.armature_add()
+ bpy.ops.object.mode_set(mode='POSE')
+ elif bl_context == "lattice_edit":
+ bpy.ops.object.add(type='LATTICE')
+ bpy.ops.object.mode_set(mode='EDIT')
+ elif bl_context == "material":
+ bpy.ops.object.add(type='MESH')
+ bpy.context.object.data.materials.append(bpy.data.materials.new("Material"))
+ bpy.ops.object.mode_set(mode='EDIT')
+
-def main():
+def main():
panel_subclasses = []
for cls_name in dir(bpy.types):
@@ -107,9 +140,13 @@
for bl_context in sorted(button_contexts):
print(list(sorted(button_contexts)))
# TODO
- if bl_context in PROPERTY_SKIP:
- continue
+ # if bl_context in PROPERTY_SKIP:
+ # continue
+ ## TESTING ONLY
+ #if bl_context != "material":
+ # continue
+
prop_context = PROPERTY_MAPPING[bl_context]
if not prop_context:
print(" TODO, skipping", bl_context)
@@ -121,6 +158,10 @@
if cls.bl_space_type == 'PROPERTIES':
if cls.bl_region_type == 'WINDOW':
if cls.bl_context == bl_context:
+
+ clear_startup_blend()
+ context_setup(bl_context, cls.__name__)
+
file_base = os.path.join(TEMP_DIR, "%s_%s" % (bl_context, "_" + cls.__name__.replace(".", "_")))
file_old = file_base + "_old.png"
file_new = file_base + "_new.png"
Property changes on: branches/bmesh/blender/release/scripts/startup/bl_operators/add_mesh_torus.py
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py:36154-36801
+ /trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py:36154-36840
Property changes on: branches/bmesh/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py:36154-36801
+ /trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py:36154-36840
Property changes on: branches/bmesh/blender/release/scripts/startup/bl_operators/vertexpaint_dirt.py
___________________________________________________________________
Modified: svn:mergeinfo
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list