Fix for bug #5758 and #17585: armatures with IK constraint did not
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 14 Sep 2008 03:51:51 +0000 (03:51 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 14 Sep 2008 03:51:51 +0000 (03:51 +0000)
work in the game player, now the IK lib is linked into the player.

Makefiles/Scons/CMake buildsystems have been updated.

Fix materials nodes to work in the game player.

blenderplayer/CMakeLists.txt
intern/iksolver/CMakeLists.txt
intern/iksolver/SConscript
source/Makefile
source/blender/blenkernel/bad_level_call_stubs/stubs.c
source/creator/CMakeLists.txt
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp

index e32390466c757eaeeb2575c819cc1597f36f421c..9786b7e61b210ebc61475f3cb41b666542bf74e0 100644 (file)
@@ -86,6 +86,7 @@ IF(UNIX)
     bf_oglrasterizer 
     bf_expressions 
     bf_scenegraph 
     bf_oglrasterizer 
     bf_expressions 
     bf_scenegraph 
+       bf_IK
     bf_moto 
     bf_soundsystem 
     bf_kernel 
     bf_moto 
     bf_soundsystem 
     bf_kernel 
index da69f2a3332661616bee2b2fce22a03bbcbbecd8..736a2a78bb2a57e4ba6d6137c61fd53f798e89c9 100644 (file)
@@ -28,5 +28,5 @@ SET(INC intern ../moto/include ../memutil)
 
 FILE(GLOB SRC intern/*.cpp)
 
 
 FILE(GLOB SRC intern/*.cpp)
 
-BLENDERLIB_NOLIST(blender_IK "${SRC}" "${INC}")
+BLENDERLIB(bf_IK "${SRC}" "${INC}")
 #, libtype=['blender'], priority = [10] )
 #, libtype=['blender'], priority = [10] )
index 81bf61dfcd84bdd896d3d8b3db8f8648669f7878..543ee46487ceb6c31a02e69d0477f930cfed15c9 100644 (file)
@@ -5,4 +5,5 @@ sources = env.Glob('intern/*.cpp')
 
 incs = 'intern ../moto/include ../memutil'
 
 
 incs = 'intern ../moto/include ../memutil'
 
-env.BlenderLib ('blender_IK', sources, Split(incs), [], libtype='blender', priority=10 )
+env.BlenderLib ('bf_IK', sources, Split(incs), [], libtype=['intern','player'], priority=[20,100] )
+
index 37833a5829cfddce1bec5fe61b3d7d044cce82b9..99155206987448c4edb90fd2cbbf0b047c8d61b8 100644 (file)
@@ -100,6 +100,7 @@ COMLIB += $(OCGDIR)/blender/nodes_cmp/$(DEBUG_DIR)libnodes_cmp.a
 COMLIB += $(OCGDIR)/blender/nodes/$(DEBUG_DIR)libnodes.a
 COMLIB += $(OCGDIR)/blender/imbuf/$(DEBUG_DIR)libimbuf.a
 COMLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
 COMLIB += $(OCGDIR)/blender/nodes/$(DEBUG_DIR)libnodes.a
 COMLIB += $(OCGDIR)/blender/imbuf/$(DEBUG_DIR)libimbuf.a
 COMLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
+COMLIB += $(NAN_IKSOLVER)/lib/libiksolver.a
 COMLIB += $(NAN_OPENNL)/lib/$(DEBUG_DIR)libopennl.a
 COMLIB += $(NAN_SUPERLU)/lib/$(DEBUG_DIR)libsuperlu.a  
 COMLIB += $(OCGDIR)/blender/avi/$(DEBUG_DIR)libavi.a
 COMLIB += $(NAN_OPENNL)/lib/$(DEBUG_DIR)libopennl.a
 COMLIB += $(NAN_SUPERLU)/lib/$(DEBUG_DIR)libsuperlu.a  
 COMLIB += $(OCGDIR)/blender/avi/$(DEBUG_DIR)libavi.a
@@ -227,8 +228,7 @@ ifeq ($(WITH_OPENEXR), true)
     COMLIB += $(NAN_OPENEXR_LIBS)
 endif
 
     COMLIB += $(NAN_OPENEXR_LIBS)
 endif
 
-PULIB = $(NAN_IKSOLVER)/lib/libiksolver.a
-PULIB += $(NAN_MOTO)/lib/libmoto.a
+PULIB = $(NAN_MOTO)/lib/libmoto.a
 PULIB += $(NAN_ELBEEM)/lib/$(DEBUG_DIR)libelbeem.a
 PULIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
 PULIB += $(OCGDIR)/blender/src/$(DEBUG_DIR)libsrcpublisher.a
 PULIB += $(NAN_ELBEEM)/lib/$(DEBUG_DIR)libelbeem.a
 PULIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
 PULIB += $(OCGDIR)/blender/src/$(DEBUG_DIR)libsrcpublisher.a
index 4b6cb5e0999b1bd22ddd90789dbc317349e4bfac..d7ef5cb54ff471fde4d99fd253486da3b70d0f60 100644 (file)
@@ -216,30 +216,6 @@ struct EditEdge *findedgelist(struct EditVert *v1, struct EditVert *v2)  { retur
 
 void countall(void) {}
 
 
 void countall(void) {}
 
-
-/* IKsolver stubs */
-#include "IK_solver.h"
-
-IK_Segment *IK_CreateSegment(int flag) { return 0; }
-void IK_FreeSegment(IK_Segment *seg) {}
-
-void IK_SetParent(IK_Segment *seg, IK_Segment *parent) {}
-void IK_SetTransform(IK_Segment *seg, float start[3], float rest_basis[][3], float basis[][3], float length) {}
-void IK_GetBasisChange(IK_Segment *seg, float basis_change[][3]) {}
-void IK_GetTranslationChange(IK_Segment *seg, float *translation_change) {};
-void IK_SetLimit(IK_Segment *seg, IK_SegmentAxis axis, float lower, float upper) {};
-void IK_SetStiffness(IK_Segment *seg, IK_SegmentAxis axis, float stiffness) {};
-
-IK_Solver *IK_CreateSolver(IK_Segment *root) { return 0; }
-void IK_FreeSolver(IK_Solver *solver) {};
-
-void IK_SolverAddGoal(IK_Solver *solver, IK_Segment *tip, float goal[3], float weight) {}
-void IK_SolverAddGoalOrientation(IK_Solver *solver, IK_Segment *tip, float goal[][3], float weight) {}
-void IK_SolverSetPoleVectorConstraint(IK_Solver *solver, IK_Segment *tip, float goal[3], float polegoal[3], float poleangle, int getangle) {}
-float IK_SolverGetPoleAngle(IK_Solver *solver) { return 0.0f; }
-
-int IK_Solve(IK_Solver *solver, float tolerance, int max_iterations) { return 0; }
-
 /* exotic.c */
 int BPY_call_importloader(char *name)
 {
 /* exotic.c */
 int BPY_call_importloader(char *name)
 {
index 04219ac586805d95379696705b32ce367f118452..93cc0e8afb55d1998bccaac3a3398a10cdeb52c8 100644 (file)
@@ -191,7 +191,7 @@ ADD_DEPENDENCIES(blender makesdna)
 
 FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
 
 
 FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS)
 
-SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} src blender_python blender_render blender_radiosity blender_IK bf_elbeem)
+SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} src blender_python blender_render blender_radiosity bf_elbeem)
 
 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
   SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)
 
 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
   SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc)
@@ -226,7 +226,7 @@ IF(UNIX)
     bf_decimation 
     bf_elbeem 
     bf_yafray 
     bf_decimation 
     bf_elbeem 
     bf_yafray 
-    blender_IK 
+    bf_IK 
     bf_memutil 
     bf_guardedalloc 
     blender_CTR 
     bf_memutil 
     bf_guardedalloc 
     blender_CTR 
index b0950fece5f8d964c75fbc41020de1f8b9587827..a50577e226662119b7e060ec526baa7d3b96b423 100644 (file)
@@ -54,6 +54,7 @@ extern "C"
 #endif  // __cplusplus
 #include "BKE_global.h"        
 #include "BKE_icons.h" 
 #endif  // __cplusplus
 #include "BKE_global.h"        
 #include "BKE_icons.h" 
+#include "BKE_node.h"  
 #include "BLI_blenlib.h"
 #include "DNA_scene_types.h"
 #include "BLO_readfile.h"
 #include "BLI_blenlib.h"
 #include "DNA_scene_types.h"
 #include "BLO_readfile.h"
@@ -376,6 +377,8 @@ int main(int argc, char** argv)
                  ::DisposeNibReference(nibRef);
     */
 #endif // __APPLE__
                  ::DisposeNibReference(nibRef);
     */
 #endif // __APPLE__
+
+       init_nodesystem();
        
        GEN_init_messaging_system();
  
        
        GEN_init_messaging_system();
  
@@ -846,6 +849,8 @@ int main(int argc, char** argv)
                }
        }
 
                }
        }
 
+       free_nodesystem();
+
        if (pyGlobalDictString) {
                free(pyGlobalDictString);
                pyGlobalDictString = NULL;
        if (pyGlobalDictString) {
                free(pyGlobalDictString);
                pyGlobalDictString = NULL;