Revision: 16328
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16328
Author:   campbellbarton
Date:     2008-09-01 09:03:09 +0200 (Mon, 01 Sep 2008)

Log Message:
-----------
svn merge -r 16297:HEAD https://svn.blender.org/svnroot/bf-blender/trunk/blender

Modified Paths:
--------------
    branches/apricot/CMakeLists.txt
    branches/apricot/release/scripts/bpymodules/colladaImEx/cstartup.py
    branches/apricot/source/blender/blenkernel/intern/ipo.c
    branches/apricot/source/blender/include/BIF_editarmature.h
    branches/apricot/source/blender/makesdna/DNA_sensor_types.h
    branches/apricot/source/blender/src/buttons_logic.c
    branches/apricot/source/blender/src/drawgpencil.c
    branches/apricot/source/blender/src/editarmature.c
    branches/apricot/source/blender/src/editnode.c
    branches/apricot/source/blender/src/editobject.c
    branches/apricot/source/blender/src/gpencil.c
    branches/apricot/source/blender/src/header_view3d.c
    branches/apricot/source/blender/src/transform_conversions.c
    branches/apricot/source/gameengine/Converter/BL_ArmatureObject.cpp
    branches/apricot/source/gameengine/Converter/BL_ArmatureObject.h
    branches/apricot/source/gameengine/Converter/KX_ConvertSensors.cpp
    branches/apricot/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
    branches/apricot/source/gameengine/GameLogic/Joystick/SCA_Joystick.h
    branches/apricot/source/gameengine/GameLogic/Joystick/SCA_JoystickDefines.h
    branches/apricot/source/gameengine/GameLogic/SCA_JoystickManager.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_JoystickManager.h
    branches/apricot/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
    branches/apricot/source/gameengine/GameLogic/SCA_JoystickSensor.h
    branches/apricot/source/gameengine/PyDoc/KX_GameObject.py
    branches/apricot/source/gameengine/PyDoc/KX_ObjectActuator.py
    branches/apricot/source/gameengine/PyDoc/KX_PolyProxy.py
    branches/apricot/source/gameengine/PyDoc/KX_TrackToActuator.py
    branches/apricot/source/gameengine/PyDoc/Rasterizer.py
    branches/apricot/source/gameengine/PyDoc/SCA_DelaySensor.py

Modified: branches/apricot/CMakeLists.txt
===================================================================
--- branches/apricot/CMakeLists.txt     2008-09-01 06:25:13 UTC (rev 16327)
+++ branches/apricot/CMakeLists.txt     2008-09-01 07:03:09 UTC (rev 16328)
@@ -255,7 +255,11 @@
   
   SET(GETTEXT ${LIBDIR}/gettext)
   SET(GETTEXT_INC ${GETTEXT}/include)
-  SET(GETTEXT_LIB gnu_gettext)
+  IF(CMAKE_CL_64)
+       SET(GETTEXT_LIB gettextlib)
+  ELSE(CMAKE_CL_64)
+       SET(GETTEXT_LIB gnu_gettext)
+  ENDIF(CMAKE_CL_64)
   SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
 
   SET(FREETYPE ${LIBDIR}/freetype)
@@ -286,7 +290,12 @@
   SET(FFMPEG_LIB avcodec-51 avformat-51 avutil-49)
   SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
 
+  IF(CMAKE_CL_64)
+  SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
+  ELSE(CMAKE_CL_64)
   SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 
uuid ws2_32 vfw32 winmm)
+  ENDIF(CMAKE_CL_64)
+  
   IF(WITH_OPENAL)
     SET(LLIBS ${LLIBS} dxguid)
   ENDIF(WITH_OPENAL)
@@ -324,7 +333,7 @@
   SET(WINTAB_INC ${LIBDIR}/wintab/include) 
 
   IF(CMAKE_CL_64)
-  SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib;MSVCRT.lib ")
+  SET(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib;MSVCRT.lib ")
   ELSE(CMAKE_CL_64)
   SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
   ENDIF(CMAKE_CL_64)

Modified: branches/apricot/release/scripts/bpymodules/colladaImEx/cstartup.py
===================================================================
--- branches/apricot/release/scripts/bpymodules/colladaImEx/cstartup.py 
2008-09-01 06:25:13 UTC (rev 16327)
+++ branches/apricot/release/scripts/bpymodules/colladaImEx/cstartup.py 
2008-09-01 07:03:09 UTC (rev 16328)
@@ -53,6 +53,7 @@
 # Check if full version of python is installed.
 try:
        import os
+       import xml
 except ImportError:
        print"Error! Could not find full version of Python..."
        _ERROR = True

Modified: branches/apricot/source/blender/blenkernel/intern/ipo.c
===================================================================
--- branches/apricot/source/blender/blenkernel/intern/ipo.c     2008-09-01 
06:25:13 UTC (rev 16327)
+++ branches/apricot/source/blender/blenkernel/intern/ipo.c     2008-09-01 
07:03:09 UTC (rev 16328)
@@ -1695,6 +1695,8 @@
                                icu->ymax= 5.0; break;
                        case MA_ADD:
                                icu->ymax= 1.0; break;
+                       case MA_EMIT:
+                               icu->ymax= 2.0; break;
                        default:
                                icu->ymax= 1.0; break;
                        }

Modified: branches/apricot/source/blender/include/BIF_editarmature.h
===================================================================
--- branches/apricot/source/blender/include/BIF_editarmature.h  2008-09-01 
06:25:13 UTC (rev 16327)
+++ branches/apricot/source/blender/include/BIF_editarmature.h  2008-09-01 
07:03:09 UTC (rev 16328)
@@ -100,13 +100,14 @@
 
 void   make_editArmature(void);
 void   make_trans_bones (char mode);
+void   remake_editArmature(void);
+void   editbones_to_armature(struct ListBase *list, struct Object *ob);
 
 int            do_pose_selectbuffer(struct Base *base, unsigned int *buffer, 
short hits);
 
 void generateSkeleton(void);
 
 void   mouse_armature(void);
-void   remake_editArmature(void);
 void   selectconnected_armature(void);
 void   selectconnected_posearmature(void);
 void   armature_select_hierarchy(short direction, short add_to_sel);

Modified: branches/apricot/source/blender/makesdna/DNA_sensor_types.h
===================================================================
--- branches/apricot/source/blender/makesdna/DNA_sensor_types.h 2008-09-01 
06:25:13 UTC (rev 16327)
+++ branches/apricot/source/blender/makesdna/DNA_sensor_types.h 2008-09-01 
07:03:09 UTC (rev 16328)
@@ -164,7 +164,7 @@
 typedef struct bJoystickSensor {
        char name[32];
        short type;
-       short pad;
+       short joyindex;
        int axis;
        int axisf;
        int button;
@@ -266,6 +266,7 @@
 #define SENS_JOY_HAT_DIR               0
 
 #define SENS_DELAY_REPEAT              1
-
+// should match JOYINDEX_MAX in SCA_JoystickDefines.h */
+#define SENS_JOY_MAXINDEX              8
 #endif
 

Modified: branches/apricot/source/blender/src/buttons_logic.c
===================================================================
--- branches/apricot/source/blender/src/buttons_logic.c 2008-09-01 06:25:13 UTC 
(rev 16327)
+++ branches/apricot/source/blender/src/buttons_logic.c 2008-09-01 07:03:09 UTC 
(rev 16328)
@@ -1444,10 +1444,13 @@
                        draw_default_sensor_header(sens, block, xco, yco, 
width);
 
                        joy= sens->data;
-                       
 
+                       uiDefButS(block, NUM, 1, "Index:", xco+10, yco-44, 0.6 
* (width-120), 19,
+                       &joy->joyindex, 0, SENS_JOY_MAXINDEX-1, 100, 0,
+                       "Spesify which joystick to use");                       
+
                        str= "Type %t|Button %x0|Axis %x1|Hat%x2"; 
-                       uiDefButS(block, MENU, B_REDR, str, xco+10, yco-44, 0.6 
* (width-20), 19,
+                       uiDefButS(block, MENU, B_REDR, str, xco+87, yco-44, 0.6 
* (width-150), 19,
                                &joy->type, 0, 31, 0, 0,
                                "The type of event this joystick sensor is 
triggered on.");
                        

Modified: branches/apricot/source/blender/src/drawgpencil.c
===================================================================
--- branches/apricot/source/blender/src/drawgpencil.c   2008-09-01 06:25:13 UTC 
(rev 16327)
+++ branches/apricot/source/blender/src/drawgpencil.c   2008-09-01 07:03:09 UTC 
(rev 16328)
@@ -145,6 +145,13 @@
        allqueue(REDRAWACTION, 0);
 }
 
+/* convert the active layer to geometry */
+void gp_ui_convertlayer_cb (void *gpd, void *gpl)
+{
+       gpencil_layer_setactive(gpd, gpl);
+       gpencil_convert_menu();
+}
+
 /* ------- Drawing Code ------- */
 
 /* draw the controls for a given layer */
@@ -166,7 +173,7 @@
                /* rounded header */
                if (active) uiBlockSetCol(block, TH_BUT_ACTION);
                        rb_col= (active)?-20:20;
-                       uiDefBut(block, ROUNDBOX, B_DIFF, "", *xco-8, *yco-2, 
width, 24, NULL, 5.0, 0.0, 15 , rb_col-20, ""); 
+                       uiDefBut(block, ROUNDBOX, B_REDR, "", *xco-8, *yco-2, 
width, 24, NULL, 5.0, 0.0, 15 , rb_col-20, ""); 
                if (active) uiBlockSetCol(block, TH_AUTO);
                
                /* lock toggle */
@@ -249,8 +256,14 @@
                        
                        /* options */
                        uiBlockBeginAlign(block);
-                               but= uiDefBut(block, BUT, B_REDR, "Del Active 
Frame", *xco+160, *yco-75, 140, 20, NULL, 0, 0, 0, 0, "Erases the the active 
frame for this layer (Hotkey = Alt-XKEY/DEL)");
-                               uiButSetFunc(but, gp_ui_delframe_cb, gpd, gpl);
+                               if (curarea->spacetype == SPACE_VIEW3D) {
+                                       but= uiDefBut(block, BUT, B_REDR, 
"Convert to...", *xco+160, *yco-75, 140, 20, NULL, 0, 0, 0, 0, "Converts this 
layer's strokes to geometry (Hotkey = Alt-Shift-C)");
+                                       uiButSetFunc(but, 
gp_ui_convertlayer_cb, gpd, gpl);
+                               }
+                               else {
+                                       but= uiDefBut(block, BUT, B_REDR, "Del 
Active Frame", *xco+160, *yco-75, 140, 20, NULL, 0, 0, 0, 0, "Erases the the 
active frame for this layer (Hotkey = Alt-XKEY/DEL)");
+                                       uiButSetFunc(but, gp_ui_delframe_cb, 
gpd, gpl);
+                               }
                                
                                but= uiDefBut(block, BUT, B_REDR, "Del Last 
Stroke", *xco+160, *yco-95, 140, 20, NULL, 0, 0, 0, 0, "Erases the last stroke 
from the active frame (Hotkey = Alt-XKEY/DEL)");
                                uiButSetFunc(but, gp_ui_delstroke_cb, gpd, gpl);

Modified: branches/apricot/source/blender/src/editarmature.c
===================================================================
--- branches/apricot/source/blender/src/editarmature.c  2008-09-01 06:25:13 UTC 
(rev 16327)
+++ branches/apricot/source/blender/src/editarmature.c  2008-09-01 07:03:09 UTC 
(rev 16328)
@@ -440,9 +440,23 @@
 }
 
 /* helper for apply_armature_pose2bones - fixes parenting of objects that are 
bone-parented to armature */
-static void applyarmature_fix_boneparents (Object *ob)
+static void applyarmature_fix_boneparents (Object *armob)
 {
+       Object *ob;
        
+       /* go through all objects in database */
+       for (ob= G.main->object.first; ob; ob= ob->id.next) {
+               /* if parent is bone in this armature, apply corrections */
+               if ((ob->parent == armob) && (ob->partype == PARBONE)) {
+                       /* apply current transform from parent (not yet 
destroyed), 
+                        * then calculate new parent inverse matrix
+                        */
+                       apply_obmat(ob);
+                       
+                       what_does_parent(ob);
+                       Mat4Invert(ob->parentinv, workob.obmat);
+               }
+       }
 }
 
 /* set the current pose as the restpose */
@@ -463,6 +477,9 @@
        }
        arm= get_armature(ob); 
        
+       /* helpful warnings... */
+       // TODO: add warnings to be careful about actions, applying deforms 
first, etc.
+       
        /* Get editbones of active armature to alter */
        if (G.edbo.first) BLI_freelistN(&G.edbo);
        make_boneList(&G.edbo, &arm->bonebase, NULL);
@@ -485,9 +502,9 @@
                        float premat[3][3], imat[3][3],pmat[3][3], tmat[3][3];
                        float delta[3], eul[3];
                        
-                       /* obtain new auto-yrotation */
+                       /* obtain new auto y-rotation */
                        VecSubf(delta, curbone->tail, curbone->head);
-                       vec_roll_to_mat3(delta, curbone->roll, premat);
+                       vec_roll_to_mat3(delta, 0.0, premat);
                        Mat3Inv(imat, premat);
                        
                        /* get pchan 'visual' matrix */
@@ -503,9 +520,11 @@
                
                /* clear transform values for pchan */
                pchan->loc[0]= pchan->loc[1]= pchan->loc[2]= 0;
-               pchan->size[0]= pchan->size[1]= pchan->size[2]= 1;
                pchan->quat[1]= pchan->quat[2]= pchan->quat[3]= 0;
-               pchan->quat[0]= 1;
+               pchan->quat[0]= pchan->size[0]= pchan->size[1]= pchan->size[2]= 
1;
+               
+               /* set anim lock */
+               curbone->flag |= BONE_UNKEYED;
        }
        
        /* convert editbones back to bones */

Modified: branches/apricot/source/blender/src/editnode.c
===================================================================
--- branches/apricot/source/blender/src/editnode.c      2008-09-01 06:25:13 UTC 
(rev 16327)
+++ branches/apricot/source/blender/src/editnode.c      2008-09-01 07:03:09 UTC 
(rev 16328)
@@ -2001,7 +2001,10 @@
 void node_insert_key(SpaceNode *snode)
 {
        bNode *node= editnode_get_active(snode->edittree);
-
+       
+       if(node == NULL)
+               return;
+       
        if(node->type==CMP_NODE_TIME) {
                if(node->custom1<node->custom2) {
 

Modified: branches/apricot/source/blender/src/editobject.c
===================================================================
--- branches/apricot/source/blender/src/editobject.c    2008-09-01 06:25:13 UTC 
(rev 16327)
+++ branches/apricot/source/blender/src/editobject.c    2008-09-01 07:03:09 UTC 
(rev 16328)
@@ -2828,6 +2828,7 @@
        if(G.scene->id.lib) return;
 
        obact= OBACT;
+       if (obact == NULL) return;
        if(!obact->flag & SELECT) return;
        if(G.obedit) return;
        

Modified: branches/apricot/source/blender/src/gpencil.c
===================================================================
--- branches/apricot/source/blender/src/gpencil.c       2008-09-01 06:25:13 UTC 
(rev 16327)
+++ branches/apricot/source/blender/src/gpencil.c       2008-09-01 07:03:09 UTC 
(rev 16328)
@@ -46,6 +46,7 @@
 #include "BLI_blenlib.h"
 
 #include "DNA_listBase.h"

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to