Revision: 16412
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16412
Author:   genscher
Date:     2008-09-07 21:47:15 +0200 (Sun, 07 Sep 2008)

Log Message:
-----------
svn merge -r 16396:16411 
https://svn.blender.org/svnroot/bf-blender/trunk/blender

Modified Paths:
--------------
    branches/sim_physics/release/datafiles/blenderbuttons
    branches/sim_physics/release/scripts/object_find.py
    branches/sim_physics/source/blender/blenkernel/intern/constraint.c
    branches/sim_physics/source/blender/blenkernel/intern/object.c
    branches/sim_physics/source/blender/include/BIF_drawseq.h
    branches/sim_physics/source/blender/include/BIF_resources.h
    branches/sim_physics/source/blender/makesdna/DNA_view3d_types.h
    branches/sim_physics/source/blender/python/api2_2x/sceneSequence.c
    branches/sim_physics/source/blender/render/intern/source/convertblender.c
    branches/sim_physics/source/blender/render/intern/source/pipeline.c
    branches/sim_physics/source/blender/render/intern/source/rendercore.c
    branches/sim_physics/source/blender/src/blenderbuttons.c
    branches/sim_physics/source/blender/src/drawgpencil.c
    branches/sim_physics/source/blender/src/drawseq.c
    branches/sim_physics/source/blender/src/drawview.c
    branches/sim_physics/source/blender/src/gpencil.c
    branches/sim_physics/source/blender/src/header_node.c
    branches/sim_physics/source/blender/src/header_view3d.c
    
branches/sim_physics/source/gameengine/Converter/BL_BlenderDataConversion.cpp
    
branches/sim_physics/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
    branches/sim_physics/source/gameengine/Ketsji/KX_PythonInit.cpp

Modified: branches/sim_physics/release/datafiles/blenderbuttons
===================================================================
(Binary files differ)

Modified: branches/sim_physics/release/scripts/object_find.py
===================================================================
--- branches/sim_physics/release/scripts/object_find.py 2008-09-07 18:18:50 UTC 
(rev 16411)
+++ branches/sim_physics/release/scripts/object_find.py 2008-09-07 19:47:15 UTC 
(rev 16412)
@@ -61,8 +61,20 @@
        
        me.activeUVLayer = orig_uvlayer
        
+       
+       # Now get material images
+       for mat in me.materials:
+               if mat:
+                       for mtex in mat.getTextures():
+                               if mtex:
+                                       tex = mtex.tex
+                                       i = tex.getImage()
+                                       if i: unique_images[i.name] = i
+       
        return unique_images.values()
        
+       
+       
        # Todo, support other object types, materials
        return []
        
@@ -118,7 +130,7 @@
        def activate(ob, scn):
                bpy.data.scenes.active = scn
                scn.objects.selected = []
-               scn.Layers = ob.Layers
+               scn.Layers = ob.Layers & (1<<20)-1
                ob.sel = 1
        
        def name_cmp(name_search, name_found):

Modified: branches/sim_physics/source/blender/blenkernel/intern/constraint.c
===================================================================
--- branches/sim_physics/source/blender/blenkernel/intern/constraint.c  
2008-09-07 18:18:50 UTC (rev 16411)
+++ branches/sim_physics/source/blender/blenkernel/intern/constraint.c  
2008-09-07 19:47:15 UTC (rev 16412)
@@ -367,22 +367,15 @@
                        case CONSTRAINT_SPACE_WORLD: /* ---------- FROM 
WORLDSPACE ---------- */
                        {
                                /* world to pose */
-                               if (to==CONSTRAINT_SPACE_POSE || 
to==CONSTRAINT_SPACE_LOCAL || to==CONSTRAINT_SPACE_PARLOCAL) {
-                                       Mat4Invert(imat, ob->obmat);
-                                       Mat4CpyMat4(tempmat, mat);
-                                       Mat4MulMat4(mat, tempmat, imat);
-                               }
+                               Mat4Invert(imat, ob->obmat);
+                               Mat4CpyMat4(tempmat, mat);
+                               Mat4MulMat4(mat, tempmat, imat);
                                
-                               /* pose to local */
-                               if (to == CONSTRAINT_SPACE_LOCAL) {
+                               /* use pose-space as stepping stone for other 
spaces... */
+                               if (ELEM(to, CONSTRAINT_SPACE_LOCAL, 
CONSTRAINT_SPACE_PARLOCAL)) {
                                        /* call self with slightly different 
values */
                                        constraint_mat_convertspace(ob, pchan, 
mat, CONSTRAINT_SPACE_POSE, to);
                                }
-                               /* pose to local + parent */
-                               else if (to == CONSTRAINT_SPACE_PARLOCAL) {
-                                       /* call self with slightly different 
values */
-                                       constraint_mat_convertspace(ob, pchan, 
mat, CONSTRAINT_SPACE_POSE, to);
-                               }
                        }
                                break;
                        case CONSTRAINT_SPACE_POSE:     /* ---------- FROM 
POSESPACE ---------- */
@@ -445,69 +438,66 @@
                                break;
                        case CONSTRAINT_SPACE_LOCAL: /* ------------ FROM 
LOCALSPACE --------- */
                        {
-                               /* local to pose */
-                               if (to==CONSTRAINT_SPACE_POSE || 
to==CONSTRAINT_SPACE_WORLD) {
-                                       /* do inverse procedure that was done 
for pose to local */
-                                       if (pchan->bone) {
-                                               /* we need the posespace_matrix 
= local_matrix + (parent_posespace_matrix + restpos) */                         
                
-                                               if (pchan->parent) {
-                                                       float offs_bone[4][4];
+                               /* local to pose - do inverse procedure that 
was done for pose to local */
+                               if (pchan->bone) {
+                                       /* we need the posespace_matrix = 
local_matrix + (parent_posespace_matrix + restpos) */                           
              
+                                       if (pchan->parent) {
+                                               float offs_bone[4][4];
+                                               
+                                               /* construct offs_bone the same 
way it is done in armature.c */
+                                               Mat4CpyMat3(offs_bone, 
pchan->bone->bone_mat);
+                                               VECCOPY(offs_bone[3], 
pchan->bone->head);
+                                               offs_bone[3][1]+= 
pchan->bone->parent->length;
+                                               
+                                               if (pchan->bone->flag & 
BONE_HINGE) {
+                                                       /* pose_mat = 
par_pose-space_location * chan_mat */
+                                                       float tmat[4][4];
                                                        
-                                                       /* construct offs_bone 
the same way it is done in armature.c */
-                                                       Mat4CpyMat3(offs_bone, 
pchan->bone->bone_mat);
-                                                       VECCOPY(offs_bone[3], 
pchan->bone->head);
-                                                       offs_bone[3][1]+= 
pchan->bone->parent->length;
+                                                       /* the rotation of the 
parent restposition */
+                                                       Mat4CpyMat4(tmat, 
pchan->bone->parent->arm_mat);
                                                        
-                                                       if (pchan->bone->flag & 
BONE_HINGE) {
-                                                               /* pose_mat = 
par_pose-space_location * chan_mat */
-                                                               float 
tmat[4][4];
-                                                               
-                                                               /* the rotation 
of the parent restposition */
-                                                               
Mat4CpyMat4(tmat, pchan->bone->parent->arm_mat);
-                                                               
-                                                               /* the location 
of actual parent transform */
-                                                               
VECCOPY(tmat[3], offs_bone[3]);
-                                                               
offs_bone[3][0]= offs_bone[3][1]= offs_bone[3][2]= 0.0f;
-                                                               
Mat4MulVecfl(pchan->parent->pose_mat, tmat[3]);
-                                                               
-                                                               
Mat4MulMat4(diff_mat, offs_bone, tmat);
-                                                               
Mat4CpyMat4(tempmat, mat);
-                                                               
Mat4MulMat4(mat, tempmat, diff_mat);
-                                                       }
-                                                       else {
-                                                               /* pose_mat = 
par_pose_mat * bone_mat * chan_mat */
-                                                               
Mat4MulMat4(diff_mat, offs_bone, pchan->parent->pose_mat);
-                                                               
Mat4CpyMat4(tempmat, mat);
-                                                               
Mat4MulMat4(mat, tempmat, diff_mat);
-                                                       }
+                                                       /* the location of 
actual parent transform */
+                                                       VECCOPY(tmat[3], 
offs_bone[3]);
+                                                       offs_bone[3][0]= 
offs_bone[3][1]= offs_bone[3][2]= 0.0f;
+                                                       
Mat4MulVecfl(pchan->parent->pose_mat, tmat[3]);
+                                                       
+                                                       Mat4MulMat4(diff_mat, 
offs_bone, tmat);
+                                                       Mat4CpyMat4(tempmat, 
mat);
+                                                       Mat4MulMat4(mat, 
tempmat, diff_mat);
                                                }
                                                else {
-                                                       Mat4CpyMat4(diff_mat, 
pchan->bone->arm_mat);
-                                                       
+                                                       /* pose_mat = 
par_pose_mat * bone_mat * chan_mat */
+                                                       Mat4MulMat4(diff_mat, 
offs_bone, pchan->parent->pose_mat);
                                                        Mat4CpyMat4(tempmat, 
mat);
                                                        Mat4MulMat4(mat, 
tempmat, diff_mat);
                                                }
                                        }
+                                       else {
+                                               Mat4CpyMat4(diff_mat, 
pchan->bone->arm_mat);
+                                               
+                                               Mat4CpyMat4(tempmat, mat);
+                                               Mat4MulMat4(mat, tempmat, 
diff_mat);
+                                       }
                                }
-                               /* local to world */
-                               if (to == CONSTRAINT_SPACE_WORLD) {
+                               
+                               /* use pose-space as stepping stone for other 
spaces */
+                               if (ELEM(to, CONSTRAINT_SPACE_WORLD, 
CONSTRAINT_SPACE_PARLOCAL)) {
                                        /* call self with slightly different 
values */
                                        constraint_mat_convertspace(ob, pchan, 
mat, CONSTRAINT_SPACE_POSE, to);
-                               }
+                               }                               
                        }
                                break;
                        case CONSTRAINT_SPACE_PARLOCAL: /* -------------- FROM 
LOCAL WITH PARENT ---------- */
                        {
-                               /* local to pose */
-                               if (to==CONSTRAINT_SPACE_POSE || 
to==CONSTRAINT_SPACE_WORLD) {
-                                       if (pchan->bone) {                      
                
-                                               Mat4CpyMat4(diff_mat, 
pchan->bone->arm_mat);
-                                               Mat4CpyMat4(tempmat, mat);
-                                               Mat4MulMat4(mat, diff_mat, 
tempmat);
-                                       }
+                               /* local + parent to pose */
+                               if (pchan->bone) {                              
        
+                                       Mat4CpyMat4(diff_mat, 
pchan->bone->arm_mat);
+                                       Mat4CpyMat4(tempmat, mat);
+                                       Mat4MulMat4(mat, diff_mat, tempmat);
                                }
-                               /* local to world */
-                               if (to == CONSTRAINT_SPACE_WORLD) {
+                               
+                               /* use pose-space as stepping stone for other 
spaces */
+                               if (ELEM(to, CONSTRAINT_SPACE_WORLD, 
CONSTRAINT_SPACE_LOCAL)) {
                                        /* call self with slightly different 
values */
                                        constraint_mat_convertspace(ob, pchan, 
mat, CONSTRAINT_SPACE_POSE, to);
                                }

Modified: branches/sim_physics/source/blender/blenkernel/intern/object.c
===================================================================
--- branches/sim_physics/source/blender/blenkernel/intern/object.c      
2008-09-07 18:18:50 UTC (rev 16411)
+++ branches/sim_physics/source/blender/blenkernel/intern/object.c      
2008-09-07 19:47:15 UTC (rev 16412)
@@ -697,9 +697,11 @@
        if (cam->dof_ob) {      
                /* too simple, better to return the distance on the view axis 
only
                 * return VecLenf(ob->obmat[3], cam->dof_ob->obmat[3]); */
+               float mat[4][4], obmat[4][4];
                
-               float mat[4][4];
-               Mat4Invert(ob->imat, ob->obmat);
+               Mat4CpyMat4(obmat, ob->obmat);
+               Mat4Ortho(obmat);
+               Mat4Invert(ob->imat, obmat);
                Mat4MulMat4(mat, cam->dof_ob->obmat, ob->imat);
                return fabs(mat[3][2]);
        }

Modified: branches/sim_physics/source/blender/include/BIF_drawseq.h
===================================================================
--- branches/sim_physics/source/blender/include/BIF_drawseq.h   2008-09-07 
18:18:50 UTC (rev 16411)
+++ branches/sim_physics/source/blender/include/BIF_drawseq.h   2008-09-07 
19:47:15 UTC (rev 16412)
@@ -33,6 +33,8 @@
 struct ScrArea;
 struct Sequence;
 
+#define SEQ_ZOOM_FAC(szoom) (szoom > 0)? (szoom) : (szoom == 0)? (1.0) : 
(-1.0/szoom)
+
 void drawprefetchseqspace(struct ScrArea *sa, void *spacedata);
 void drawseqspace(struct ScrArea *sa, void *spacedata);
 void set_special_seq_update(int val);

Modified: branches/sim_physics/source/blender/include/BIF_resources.h
===================================================================
--- branches/sim_physics/source/blender/include/BIF_resources.h 2008-09-07 
18:18:50 UTC (rev 16411)
+++ branches/sim_physics/source/blender/include/BIF_resources.h 2008-09-07 
19:47:15 UTC (rev 16412)
@@ -266,8 +266,8 @@
        ICON_WINDOW_WINDOW,
        ICON_PANEL_CLOSE,
        ICON_PHYSICS,
-       ICON_BLANK36,
-       ICON_BLANK37,
+       ICON_LAYER_USED,
+       ICON_LAYER_ACTIVE,
        ICON_BLANK38,
        
        ICON_BLENDER,

Modified: branches/sim_physics/source/blender/makesdna/DNA_view3d_types.h
===================================================================
--- branches/sim_physics/source/blender/makesdna/DNA_view3d_types.h     
2008-09-07 18:18:50 UTC (rev 16411)
+++ branches/sim_physics/source/blender/makesdna/DNA_view3d_types.h     
2008-09-07 19:47:15 UTC (rev 16412)
@@ -86,7 +86,8 @@
        float winmat1[4][4];  // persp(1) storage, for swap matrices
        float viewmat1[4][4];
        
-       float viewquat[4], dist, zfac, pad0;    /* zfac is initgrabz() result */
+       float viewquat[4], dist, zfac;  /* zfac is initgrabz() result */
+       int lay_used; /* used while drawing */
 
        short persp;
        short view;

Modified: branches/sim_physics/source/blender/python/api2_2x/sceneSequence.c
===================================================================
--- branches/sim_physics/source/blender/python/api2_2x/sceneSequence.c  
2008-09-07 18:18:50 UTC (rev 16411)
+++ branches/sim_physics/source/blender/python/api2_2x/sceneSequence.c  
2008-09-07 19:47:15 UTC (rev 16412)
@@ -33,12 +33,14 @@
 #include "DNA_scene_types.h" /* for Base */
 
 #include "BKE_mesh.h"
+#include "BKE_image.h" // RFS: openanim
 #include "BKE_library.h"
 #include "BKE_global.h"
 #include "BKE_main.h"
 #include "BKE_scene.h"
 
 #include "BIF_editseq.h" /* get_last_seq */
+#include "BIF_editsound.h" // RFS: sound_open_hdaudio
 #include "BLI_blenlib.h"
 #include "BSE_sequence.h"
 #include "Ipo.h"
@@ -48,6 +50,9 @@
 #include "Sound.h"
 #include "gen_utils.h"
 
+#include "IMB_imbuf_types.h" // RFS: IB_rect
+#include "IMB_imbuf.h" // RFS: IMB_anim_get_duration
+

@@ 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