svn merge -r38000:38200 https://svn.blender.org/svnroot/bf-blender/trunk/blender
authorCampbell Barton <ideasman42@gmail.com>
Mon, 25 Jul 2011 17:51:30 +0000 (17:51 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 25 Jul 2011 17:51:30 +0000 (17:51 +0000)
18 files changed:
1  2 
intern/ghost/test/CMakeLists.txt
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/intern/BME_tools.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenlib/intern/math_geom.c
source/blender/editors/curve/editcurve.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_relations.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_manipulator.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_scene.c
source/blenderplayer/CMakeLists.txt
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/CMakeLists.txt

index 0000000000000000000000000000000000000000,b8630427b71cfc46f7dfd2faeb36bccec64e8158..f834b55b387ff17f747bcb6986af40480d76a6d2
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,123 +1,155 @@@
+ cmake_policy(SET CMP0003 NEW)
+ cmake_policy(SET CMP0005 NEW)
+ cmake_minimum_required(VERSION 2.8)
+ # -----------------------------------------------------------------------------
+ # Macros
+ # stub macro, does nothing
+ macro(blender_add_lib
+       name
+       sources
+       includes
+       includes_sys
+       )
+ endmacro()
+ # suffix relative paths so we can use external cmake files
+ macro(suffix_relpaths
+       new_files files prefix)
+       set(${new_files})
+       foreach(_file ${files})
+               if(IS_ABSOLUTE _file)
+                       list(APPEND ${new_files} ${_file})
+               else()
+                       list(APPEND ${new_files} "${prefix}${_file}")
+               endif()
+       endforeach()
+       unset(_file)
+ endmacro()
+ # -----------------------------------------------------------------------------
+ # Libraries
+ # ghost
+ include(${CMAKE_SOURCE_DIR}/../CMakeLists.txt)
+ suffix_relpaths(INC_NEW "${INC}" "../")
+ suffix_relpaths(SRC_NEW "${SRC}" "../")
+ include_directories(${INC_NEW})
+ add_library(ghost_lib ${SRC_NEW})
+ # string
+ include(${CMAKE_SOURCE_DIR}/../../string/CMakeLists.txt)
+ suffix_relpaths(INC_NEW "${INC}" "../../string/")
+ suffix_relpaths(SRC_NEW "${SRC}" "../../string/")
+ include_directories(${INC_NEW})
+ add_library(string_lib ${SRC_NEW})
+ # guardedalloc
+ include(${CMAKE_SOURCE_DIR}/../../guardedalloc/CMakeLists.txt)
+ suffix_relpaths(INC_NEW "${INC}" "../../guardedalloc/")
+ suffix_relpaths(SRC_NEW "${SRC}" "../../guardedalloc/")
+ include_directories(${INC_NEW})
+ add_library(guardedalloc_lib ${SRC_NEW})
++# blenfont 
++include(${CMAKE_SOURCE_DIR}/../../../source/blender/blenfont/CMakeLists.txt)
++suffix_relpaths(INC_NEW "${INC}" "../../../source/blender/blenfont/")
++suffix_relpaths(SRC_NEW "${SRC}" "../../../source/blender/blenfont/")
++include_directories(${INC_NEW})
++add_library(blenfont_lib ${SRC_NEW})
++
++# grr, blenfont needs BLI
++include_directories(
++              "../../../source/blender/blenlib"
++              "../../../source/blender/blenloader"
++              )
++add_library(bli_lib 
++              "../../../source/blender/blenlib/intern/fileops.c"
++              "../../../source/blender/blenlib/intern/rct.c"
++              "../../../source/blender/blenlib/intern/string.c"
++              "../../../source/blender/blenlib/intern/listbase.c"
++              "../../../source/blender/blenlib/intern/storage.c"
++              "../../../source/blender/blenlib/intern/path_util.c"
++              "../../../source/blender/blenlib/intern/BLI_dynstr.c"
++              "../../../source/blender/blenlib/intern/BLI_linklist.c"
++              "../../../source/blender/blenlib/intern/BLI_memarena.c"
++              )
++
+ find_package(OpenGL REQUIRED)
++find_package(Freetype REQUIRED)
++
+ include_directories(${CMAKE_SOURCE_DIR}/../)
+ include_directories(${OPENGL_INCLUDE_DIR})
++include_directories(${FREETYPE_INCLUDE_DIRS})
++include_directories(${CMAKE_SOURCE_DIR}/../../../source/blender/blenfont)
+ if(UNIX AND NOT APPLE)
+       find_package(X11 REQUIRED)
+       set(PLATFORM_LINKLIBS
+               ${X11_X11_LIB}
+               ${X11_Xinput_LIB}
+       )
+ endif()
+ # -----------------------------------------------------------------------------
+ # Executables
+ # Gears (C)
+ add_executable(gears_c
+               ${CMAKE_SOURCE_DIR}/gears/GHOST_C-Test.c)
+ target_link_libraries(gears_c
+               ghost_lib
+               string_lib
+               ${OPENGL_gl_LIBRARY}
+               ${OPENGL_glu_LIBRARY}
+               ${PLATFORM_LINKLIBS}
+               )
+ # Gears (C++)
+ add_executable(gears_cpp
+               ${CMAKE_SOURCE_DIR}/gears/GHOST_Test.cpp)
+ target_link_libraries(gears_cpp
+               ghost_lib
+               string_lib
+               ${OPENGL_gl_LIBRARY}
+               ${OPENGL_glu_LIBRARY}
+               ${PLATFORM_LINKLIBS}
+               )
+ # MultiTest (C)
+ add_executable(multitest_c
++      ${CMAKE_SOURCE_DIR}/../../../source/blender/editors/datafiles/bfont.ttf.c
+       ${CMAKE_SOURCE_DIR}/multitest/Basic.c
+       ${CMAKE_SOURCE_DIR}/multitest/EventToBuf.c
+       ${CMAKE_SOURCE_DIR}/multitest/MultiTest.c
+       ${CMAKE_SOURCE_DIR}/multitest/ScrollBar.c
+       ${CMAKE_SOURCE_DIR}/multitest/Util.c
+       ${CMAKE_SOURCE_DIR}/multitest/WindowData.c
+ )
+ target_link_libraries(multitest_c
++              blenfont_lib
++              bli_lib
+               ghost_lib
+               string_lib
+               guardedalloc_lib
+               ${OPENGL_gl_LIBRARY}
+               ${OPENGL_glu_LIBRARY}
++              ${FREETYPE_LIBRARY}
+               ${PLATFORM_LINKLIBS}
+               )
index 31a7194ea028631010a2acc8032f0f3932f2698c,d62227a122d7081ebc5efc36bd031206b32ef3a5..218e90af717b35f03a6c7a98ce2f105bc293a79c
@@@ -312,13 -310,65 +313,76 @@@ int calc_manipulator_stats(const bConte
                                calc_tw_center(scene, vec);
                                totsel= 1;
                        } else {
++#if 1                 /* OLD CODE */
 +                              /* do vertices for center, and if still no normal found, use vertex normals */
 +                              BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) {
 +                                      if(BM_TestHFlag(eve, BM_SELECT)) {
 +                                              totsel++;
 +                                              calc_tw_center(scene, eve->co);
 +                                      }
 +                              }
++
++#else                 // BMESH_TODO
+                               /* do vertices/edges/faces for center depending on selection
+                                  mode. note we can't use just vertex selection flag because
+                                  it is not flush down on changes */
+                               if(ts->selectmode & SCE_SELECT_VERTEX) {
+                                       for(eve= em->verts.first; eve; eve= eve->next) {
+                                               if(eve->f & SELECT) {
+                                                       totsel++;
+                                                       calc_tw_center(scene, eve->co);
+                                               }
+                                       }
+                               }
+                               else if(ts->selectmode & SCE_SELECT_EDGE) {
+                                       EditEdge *eed;
+                                       for(eve= em->verts.first; eve; eve= eve->next) eve->f1= 0;
+                                       for(eed= em->edges.first; eed; eed= eed->next) {
+                                               if(eed->h==0 && (eed->f & SELECT)) {
+                                                       if(!eed->v1->f1) {
+                                                               eed->v1->f1= 1;
+                                                               totsel++;
+                                                               calc_tw_center(scene, eed->v1->co);
+                                                       }
+                                                       if(!eed->v2->f1) {
+                                                               eed->v2->f1= 1;
+                                                               totsel++;
+                                                               calc_tw_center(scene, eed->v2->co);
+                                                       }
+                                               }
+                                       }
+                               }
+                               else {
+                                       EditFace *efa;
+                                       for(eve= em->verts.first; eve; eve= eve->next) eve->f1= 0;
+                                       for(efa= em->faces.first; efa; efa= efa->next) {
+                                               if(efa->h==0 && (efa->f & SELECT)) {
+                                                       if(!efa->v1->f1) {
+                                                               efa->v1->f1= 1;
+                                                               totsel++;
+                                                               calc_tw_center(scene, efa->v1->co);
+                                                       }
+                                                       if(!efa->v2->f1) {
+                                                               efa->v2->f1= 1;
+                                                               totsel++;
+                                                               calc_tw_center(scene, efa->v2->co);
+                                                       }
+                                                       if(!efa->v3->f1) {
+                                                               efa->v3->f1= 1;
+                                                               totsel++;
+                                                               calc_tw_center(scene, efa->v3->co);
+                                                       }
+                                                       if(efa->v4 && !efa->v4->f1) {
+                                                               efa->v4->f1= 1;
+                                                               totsel++;
+                                                               calc_tw_center(scene, efa->v4->co);
+                                                       }
+                                               }
+                                       }
+                               }
++#endif
                        }
                } /* end editmesh */
                else if (obedit->type==OB_ARMATURE){
Simple merge
Simple merge