Revision: 23546
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23546
Author:   campbellbarton
Date:     2009-09-28 21:40:50 +0200 (Mon, 28 Sep 2009)

Log Message:
-----------
merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r23504:23545

Modified Paths:
--------------
    branches/ge_dyn_load/SConstruct
    branches/ge_dyn_load/extern/ffmpeg/SConscript
    branches/ge_dyn_load/extern/x264/SConscript
    branches/ge_dyn_load/extern/xvidcore/SConscript
    branches/ge_dyn_load/intern/audaspace/intern/AUD_C-API.cpp
    branches/ge_dyn_load/release/Makefile
    branches/ge_dyn_load/source/blender/blenkernel/BKE_armature.h
    branches/ge_dyn_load/source/blender/blenkernel/intern/action.c
    branches/ge_dyn_load/source/blender/blenkernel/intern/armature.c
    branches/ge_dyn_load/source/blender/blenkernel/intern/constraint.c
    branches/ge_dyn_load/source/blender/blenkernel/intern/ipo.c
    branches/ge_dyn_load/source/blender/blenkernel/intern/object.c
    branches/ge_dyn_load/source/blender/blenlib/BLI_arithb.h
    branches/ge_dyn_load/source/blender/blenlib/intern/dynlib.c
    branches/ge_dyn_load/source/blender/blenlib/intern/util.c
    branches/ge_dyn_load/source/blender/blenloader/BLO_readfile.h
    branches/ge_dyn_load/source/blender/blenloader/intern/readfile.c
    branches/ge_dyn_load/source/blender/editors/animation/anim_markers.c
    branches/ge_dyn_load/source/blender/editors/animation/keyframing.c
    branches/ge_dyn_load/source/blender/editors/animation/keyingsets.c
    branches/ge_dyn_load/source/blender/editors/armature/armature_ops.c
    branches/ge_dyn_load/source/blender/editors/armature/editarmature.c
    branches/ge_dyn_load/source/blender/editors/armature/poseobject.c
    branches/ge_dyn_load/source/blender/editors/include/ED_fileselect.h
    branches/ge_dyn_load/source/blender/editors/include/ED_mesh.h
    branches/ge_dyn_load/source/blender/editors/include/ED_previewrender.h
    branches/ge_dyn_load/source/blender/editors/include/UI_interface.h
    branches/ge_dyn_load/source/blender/editors/interface/interface.c
    branches/ge_dyn_load/source/blender/editors/interface/interface_icons.c
    branches/ge_dyn_load/source/blender/editors/interface/interface_intern.h
    branches/ge_dyn_load/source/blender/editors/interface/interface_layout.c
    branches/ge_dyn_load/source/blender/editors/interface/interface_templates.c
    branches/ge_dyn_load/source/blender/editors/interface/interface_widgets.c
    branches/ge_dyn_load/source/blender/editors/interface/view2d.c
    branches/ge_dyn_load/source/blender/editors/mesh/editmesh_tools.c
    branches/ge_dyn_load/source/blender/editors/mesh/loopcut.c
    branches/ge_dyn_load/source/blender/editors/mesh/mesh_ops.c
    branches/ge_dyn_load/source/blender/editors/object/object_edit.c
    branches/ge_dyn_load/source/blender/editors/preview/previewrender.c
    branches/ge_dyn_load/source/blender/editors/space_file/file_draw.c
    branches/ge_dyn_load/source/blender/editors/space_file/file_ops.c
    branches/ge_dyn_load/source/blender/editors/space_file/filesel.c
    branches/ge_dyn_load/source/blender/editors/space_file/space_file.c
    branches/ge_dyn_load/source/blender/editors/space_graph/graph_edit.c
    branches/ge_dyn_load/source/blender/editors/space_image/space_image.c
    branches/ge_dyn_load/source/blender/editors/space_node/drawnode.c
    branches/ge_dyn_load/source/blender/editors/space_outliner/outliner.c
    branches/ge_dyn_load/source/blender/editors/space_view3d/view3d_buttons.c
    branches/ge_dyn_load/source/blender/editors/transform/transform.c
    branches/ge_dyn_load/source/blender/editors/transform/transform.h
    
branches/ge_dyn_load/source/blender/editors/transform/transform_conversions.c
    branches/ge_dyn_load/source/blender/editors/transform/transform_generics.c
    
branches/ge_dyn_load/source/blender/editors/transform/transform_manipulator.c
    branches/ge_dyn_load/source/blender/editors/transform/transform_ops.c
    branches/ge_dyn_load/source/blender/imbuf/intern/divers.c
    branches/ge_dyn_load/source/blender/makesdna/DNA_action_types.h
    branches/ge_dyn_load/source/blender/makesdna/DNA_anim_types.h
    branches/ge_dyn_load/source/blender/makesdna/DNA_object_types.h
    branches/ge_dyn_load/source/blender/makesrna/RNA_types.h
    branches/ge_dyn_load/source/blender/makesrna/intern/makesrna.c
    branches/ge_dyn_load/source/blender/makesrna/intern/rna_ID.c
    branches/ge_dyn_load/source/blender/makesrna/intern/rna_access.c
    branches/ge_dyn_load/source/blender/makesrna/intern/rna_armature.c
    branches/ge_dyn_load/source/blender/makesrna/intern/rna_mesh_api.c
    branches/ge_dyn_load/source/blender/makesrna/intern/rna_object.c
    branches/ge_dyn_load/source/blender/makesrna/intern/rna_pose.c
    branches/ge_dyn_load/source/blender/makesrna/intern/rna_scene.c
    branches/ge_dyn_load/source/blender/makesrna/intern/rna_sequence.c
    branches/ge_dyn_load/source/blender/python/intern/bpy_interface.c
    branches/ge_dyn_load/source/blender/windowmanager/intern/wm_event_system.c
    branches/ge_dyn_load/source/blender/windowmanager/intern/wm_files.c
    branches/ge_dyn_load/source/creator/CMakeLists.txt
    branches/ge_dyn_load/source/darwin/Makefile
    branches/ge_dyn_load/source/gameengine/Converter/SConscript

Added Paths:
-----------
    branches/ge_dyn_load/source/blender/editors/mesh/mesh_data.c

Removed Paths:
-------------
    branches/ge_dyn_load/release/io/
    branches/ge_dyn_load/source/blender/editors/mesh/mesh_layers.c

Modified: branches/ge_dyn_load/SConstruct
===================================================================
--- branches/ge_dyn_load/SConstruct     2009-09-28 18:33:45 UTC (rev 23545)
+++ branches/ge_dyn_load/SConstruct     2009-09-28 19:40:50 UTC (rev 23546)
@@ -476,8 +476,8 @@
                        dotblenderinstall.append(env.Install(dir=td, 
source=srcfile))
                
                if env['WITH_BF_PYTHON']:
-                       #-- .blender/scripts, .blender/ui, .blender/io
-                       scriptpaths=['release/scripts', 'release/ui', 
'release/io']
+                       #-- .blender/scripts
+                       scriptpaths=['release/scripts']
                        for scriptpath in scriptpaths:
                                for dp, dn, df in os.walk(scriptpath):
                                        if '.svn' in dn:
@@ -643,7 +643,6 @@
        except: epydoc = None
        
        if epydoc:
-               SConscript('source/blender/python/api2_2x/doc/SConscript')
                SConscript('source/gameengine/PyDoc/SConscript')
        else:
                print "No epydoc install detected, Python API and Gameengine 
API Docs will not be generated "

Modified: branches/ge_dyn_load/extern/ffmpeg/SConscript
===================================================================
--- branches/ge_dyn_load/extern/ffmpeg/SConscript       2009-09-28 18:33:45 UTC 
(rev 23545)
+++ branches/ge_dyn_load/extern/ffmpeg/SConscript       2009-09-28 19:40:50 UTC 
(rev 23546)
@@ -28,7 +28,7 @@
 
 from sets import Set
 
-ff_env = env.Copy();
+ff_env = env.Clone()
 ff_env.Replace(CCFLAGS = '')
 ff_env.Replace(BF_DEBUG_FLAGS = '')
 

Modified: branches/ge_dyn_load/extern/x264/SConscript
===================================================================
--- branches/ge_dyn_load/extern/x264/SConscript 2009-09-28 18:33:45 UTC (rev 
23545)
+++ branches/ge_dyn_load/extern/x264/SConscript 2009-09-28 19:40:50 UTC (rev 
23546)
@@ -11,7 +11,7 @@
 
 from sets import Set
 
-x264_env = env.Copy();
+x264_env = env.Clone()
 x264_env.Replace(CCFLAGS = '')
 x264_env.Replace(BF_DEBUG_FLAGS = '')
 

Modified: branches/ge_dyn_load/extern/xvidcore/SConscript
===================================================================
--- branches/ge_dyn_load/extern/xvidcore/SConscript     2009-09-28 18:33:45 UTC 
(rev 23545)
+++ branches/ge_dyn_load/extern/xvidcore/SConscript     2009-09-28 19:40:50 UTC 
(rev 23546)
@@ -16,7 +16,7 @@
 
 from sets import Set
 
-xvidcore_env = env.Copy();
+xvidcore_env = env.Clone()
 xvidcore_env.Replace(CCFLAGS = '')
 xvidcore_env.Replace(BF_DEBUG_FLAGS = '')
 

Modified: branches/ge_dyn_load/intern/audaspace/intern/AUD_C-API.cpp
===================================================================
--- branches/ge_dyn_load/intern/audaspace/intern/AUD_C-API.cpp  2009-09-28 
18:33:45 UTC (rev 23545)
+++ branches/ge_dyn_load/intern/audaspace/intern/AUD_C-API.cpp  2009-09-28 
19:40:50 UTC (rev 23546)
@@ -540,6 +540,8 @@
                return device->setCapability(AUD_CAPS_VOLUME, &volume);
        }
        catch(AUD_Exception) {}
+       
+       return false;
 }
 
 int AUD_setDeviceSoundVolume(AUD_Device* device, AUD_Handle* handle,

Modified: branches/ge_dyn_load/release/Makefile
===================================================================
--- branches/ge_dyn_load/release/Makefile       2009-09-28 18:33:45 UTC (rev 
23545)
+++ branches/ge_dyn_load/release/Makefile       2009-09-28 19:40:50 UTC (rev 
23546)
@@ -153,9 +153,6 @@
 
        @echo "----> Copy python infrastructure"
        @[ ! -d scripts ] || cp -r scripts $(CONFDIR)/scripts
-
-       @echo "----> Copy python UI files"
-       @[ ! -d ui ] || cp -r ui $(CONFDIR)/ui
        
     ifeq ($(OS),darwin)
        @echo "----> Copy python modules"

Modified: branches/ge_dyn_load/source/blender/blenkernel/BKE_armature.h
===================================================================
--- branches/ge_dyn_load/source/blender/blenkernel/BKE_armature.h       
2009-09-28 18:33:45 UTC (rev 23545)
+++ branches/ge_dyn_load/source/blender/blenkernel/BKE_armature.h       
2009-09-28 19:40:50 UTC (rev 23546)
@@ -103,6 +103,9 @@
 void armature_loc_pose_to_bone(struct bPoseChannel *pchan, float *inloc, float 
*outloc);
 void armature_mat_pose_to_delta(float delta_mat[][4], float pose_mat[][4], 
float arm_mat[][4]);
 
+/* Rotation Mode Conversions - Used for PoseChannels + Objects... */
+void BKE_rotMode_change_values(float quat[4], float eul[3], short oldMode, 
short newMode);
+
 /* B-Bone support */
 typedef struct Mat4 {
        float mat[4][4];

Modified: branches/ge_dyn_load/source/blender/blenkernel/intern/action.c
===================================================================
--- branches/ge_dyn_load/source/blender/blenkernel/intern/action.c      
2009-09-28 18:33:45 UTC (rev 23545)
+++ branches/ge_dyn_load/source/blender/blenkernel/intern/action.c      
2009-09-28 19:40:50 UTC (rev 23546)
@@ -1181,138 +1181,6 @@
        VecAddf(dst->cyclic_offset, dst->cyclic_offset, src->cyclic_offset);
 }
 
-typedef struct NlaIpoChannel {
-       struct NlaIpoChannel *next, *prev;
-       float val;
-       void *poin;
-       int type;
-} NlaIpoChannel;
-
-static void extract_ipochannels_from_action(ListBase *lb, ID *id, bAction 
*act, const char *name, float ctime)
-{
-       bActionChannel *achan= get_action_channel(act, name);
-       IpoCurve *icu;
-       NlaIpoChannel *nic;
-       
-       if(achan==NULL) return;
-       
-       if(achan->ipo) {
-               calc_ipo(achan->ipo, ctime);
-               
-               for(icu= achan->ipo->curve.first; icu; icu= icu->next) {
-                       /* skip IPO_BITS, is for layers and cannot be blended */
-                       if(icu->vartype != IPO_BITS) {
-                               nic= MEM_callocN(sizeof(NlaIpoChannel), 
"NlaIpoChannel");
-                               BLI_addtail(lb, nic);
-                               nic->val= icu->curval;
-                               nic->poin= get_ipo_poin(id, icu, &nic->type);
-                       }
-               }
-       }
-       
-       /* constraint channels only for objects */
-       if(GS(id->name)==ID_OB) {
-               Object *ob= (Object *)id;
-               bConstraint *con;
-               bConstraintChannel *conchan;
-               
-               for (con=ob->constraints.first; con; con=con->next) {
-                       conchan = 
get_constraint_channel(&achan->constraintChannels, con->name);
-                       
-                       if(conchan && conchan->ipo) {
-                               calc_ipo(conchan->ipo, ctime);
-                               
-                               icu= conchan->ipo->curve.first; // only one ipo 
now
-                               if(icu) {
-                                       nic= MEM_callocN(sizeof(NlaIpoChannel), 
"NlaIpoChannel constr");
-                                       BLI_addtail(lb, nic);
-                                       nic->val= icu->curval;
-                                       nic->poin= &con->enforce;
-                                       nic->type= IPO_FLOAT;
-                               }
-                       }
-               }
-       }
-}
-
-static NlaIpoChannel *find_nla_ipochannel(ListBase *lb, void *poin)
-{
-       NlaIpoChannel *nic;
-       
-       if(poin) {
-               for(nic= lb->first; nic; nic= nic->next) {
-                       if(nic->poin==poin)
-                               return nic;
-               }
-       }
-       return NULL;
-}
-
-
-static void blend_ipochannels(ListBase *dst, ListBase *src, float srcweight, 
int mode)
-{
-       NlaIpoChannel *snic, *dnic, *next;
-       float dstweight;
-       
-       switch (mode){
-               case ACTSTRIPMODE_BLEND:
-                       dstweight = 1.0F - srcweight;
-                       break;
-               case ACTSTRIPMODE_ADD:
-                       dstweight = 1.0F;
-                       break;
-               default :
-                       dstweight = 1.0F;
-       }
-       
-       for(snic= src->first; snic; snic= next) {
-               next= snic->next;
-               
-               dnic= find_nla_ipochannel(dst, snic->poin);
-               if(dnic==NULL) {
-                       /* remove from src list, and insert in dest */
-                       BLI_remlink(src, snic);
-                       BLI_addtail(dst, snic);
-               }
-               else {
-                       /* we do the blend */
-                       dnic->val= dstweight*dnic->val + srcweight*snic->val;
-               }
-       }
-}
-
-static int execute_ipochannels(ListBase *lb)
-{
-       NlaIpoChannel *nic;
-       int count = 0;
-       
-       for(nic= lb->first; nic; nic= nic->next) {
-               if(nic->poin) {
-                       write_ipo_poin(nic->poin, nic->type, nic->val);
-                       count++;
-               }
-       }
-       return count;
-}
-
-/* nla timing */
-
-/* this now only used for repeating cycles, to enable fields and blur. */
-/* the whole time control in blender needs serious thinking... */
-static float nla_time(Scene *scene, float cfra, float unit)
-{
-       extern float bluroffs;  // bad construct, borrowed from object.c for now
-       extern float fieldoffs;
-       
-       /* motion blur & fields */
-       cfra+= unit*(bluroffs+fieldoffs);
-       
-       /* global time */
-       cfra*= scene->r.framelen;       
-       
-       return cfra;
-}
-
 /* added "sizecorr" here, to allow armatures to be scaled and still have 
striding.
    Only works for uniform scaling. In general I'd advise against scaling 
armatures ever though! (ton)
 */

Modified: branches/ge_dyn_load/source/blender/blenkernel/intern/armature.c
===================================================================
--- branches/ge_dyn_load/source/blender/blenkernel/intern/armature.c    
2009-09-28 18:33:45 UTC (rev 23545)
+++ branches/ge_dyn_load/source/blender/blenkernel/intern/armature.c    
2009-09-28 19:40:50 UTC (rev 23546)
@@ -1279,7 +1279,66 @@
        Mat4MulMat4(delta_mat, pose_mat, imat);
 }
 
+/* **************** Rotation Mode Conversions ****************************** */
+/* Used for Objects and Pose Channels, since both can have multiple rotation 
representations */
 
+/* Called from RNA when rotation mode changes 
+ *     - the result should be that the rotations given in the provided 
pointers have had conversions 
+ *       applied (as appropriate), such that the rotation of the element 
hasn't 'visually' changed 
+ *
+ *     - as in SDNA data, quat is used to store quaternions AND axis-angle 
rotations...
+ */
+void BKE_rotMode_change_values (float quat[4], float eul[3], short oldMode, 
short newMode)
+{
+       /* check if any change - if so, need to convert data */
+       if (newMode > 0) { /* to euler */
+               if (oldMode == ROT_MODE_AXISANGLE) {
+                       /* axis-angle to euler */
+                       AxisAngleToEulO(&quat[1], quat[0], eul, newMode);
+               }
+               else if (oldMode == ROT_MODE_QUAT) {
+                       /* quat to euler */
+                       QuatToEulO(quat, eul, newMode);
+               }
+               /* else { no conversion needed } */
+       }
+       else if (newMode == ROT_MODE_QUAT) { /* to quat */
+               if (oldMode == ROT_MODE_AXISANGLE) {
+                       /* axis angle to quat */
+                       float q[4];
+                       
+                       /* copy to temp var first, since quats and axis-angle 
are stored in same place */
+                       QuatCopy(q, quat);
+                       AxisAngleToQuat(q, &quat[1], quat[0]);
+               }
+               else if (oldMode > 0) {
+                       /* euler to quat */
+                       EulOToQuat(eul, oldMode, quat);
+               }
+               /* else { no conversion needed } */
+       }
+       else { /* to axis-angle */
+               if (oldMode > 0) {
+                       /* euler to axis angle */
+                       EulOToAxisAngle(eul, oldMode, &quat[1], &quat[0]);
+               }
+               else if (oldMode == ROT_MODE_QUAT) {
+                       /* quat to axis angle */
+                       float q[4];
+                       
+                       /* copy to temp var first, since quats and axis-angle 
are stored in same place */
+                       QuatCopy(q, quat);
+                       QuatToAxisAngle(q, &quat[1], &quat[0]);
+               }
+               
+               /* when converting to axis-angle, we need a special exception 
for the case when there is no axis */
+               if (IS_EQ(quat[1], quat[2]) && IS_EQ(quat[2], quat[3])) {
+                       /* for now, rotate around y-axis then (so that it 
simply becomes the roll) */
+                       quat[2]= 1.0f;
+               }
+       }
+}
+
 /* **************** The new & simple (but OK!) armature evaluation ********* 
*/ 
 

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to