Revision: 15528
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15528
Author:   campbellbarton
Date:     2008-07-11 13:10:32 +0200 (Fri, 11 Jul 2008)

Log Message:
-----------
svn merge -r15518:HEAD https://svn.blender.org/svnroot/bf-blender/trunk/blender
Also made shadow mesh draw in texture paint (venomGFX request)

Modified Paths:
--------------
    branches/apricot/source/blender/makesdna/DNA_actuator_types.h
    branches/apricot/source/blender/render/intern/source/convertblender.c
    branches/apricot/source/blender/src/buttons_logic.c
    branches/apricot/source/blender/src/buttons_shading.c
    branches/apricot/source/blender/src/drawimage.c
    branches/apricot/source/blender/src/space.c
    branches/apricot/source/blender/src/vpaint.c
    branches/apricot/source/gameengine/Converter/BL_ActionActuator.cpp
    branches/apricot/source/gameengine/Converter/BL_ActionActuator.h
    branches/apricot/source/gameengine/Converter/KX_ConvertActuators.cpp
    branches/apricot/source/gameengine/PyDoc/BL_ActionActuator.py

Modified: branches/apricot/source/blender/makesdna/DNA_actuator_types.h
===================================================================
--- branches/apricot/source/blender/makesdna/DNA_actuator_types.h       
2008-07-11 00:36:38 UTC (rev 15527)
+++ branches/apricot/source/blender/makesdna/DNA_actuator_types.h       
2008-07-11 11:10:32 UTC (rev 15528)
@@ -51,8 +51,9 @@
        int     sta, end;               /* Start & End frames */                
        
        char    name[32];               /* For property-driven playback */      
        char    frameProp[32];  /* Set this property to the actions current 
frame */
-       int     blendin;                /* Number of frames of blending */      
-       short   priority;               /* Execution priority */                
        
+       short   blendin;                /* Number of frames of blending */
+       short   priority;               /* Execution priority */
+       short   end_reset;      /* Ending the actuator (negative pulse) wont 
reset the the action to its starting frame */
        short   strideaxis;             /* Displacement axis */
        float   stridelength;   /* Displacement incurred by cycle */
 } bActionActuator;                                                             
                                

Modified: branches/apricot/source/blender/render/intern/source/convertblender.c
===================================================================
--- branches/apricot/source/blender/render/intern/source/convertblender.c       
2008-07-11 00:36:38 UTC (rev 15527)
+++ branches/apricot/source/blender/render/intern/source/convertblender.c       
2008-07-11 11:10:32 UTC (rev 15528)
@@ -204,6 +204,7 @@
        else stargrid *= 1.0;                           /* then it draws fewer 
*/
        
        if(re) MTC_Mat4Invert(mat, re->viewmat);
+       else MTC_Mat4One(mat);
        
        /* BOUNDING BOX CALCULATION
                * bbox goes from z = loc_near_var | loc_far_var,

Modified: branches/apricot/source/blender/src/buttons_logic.c
===================================================================
--- branches/apricot/source/blender/src/buttons_logic.c 2008-07-11 00:36:38 UTC 
(rev 15527)
+++ branches/apricot/source/blender/src/buttons_logic.c 2008-07-11 11:10:32 UTC 
(rev 15528)
@@ -1769,23 +1769,27 @@
 #else
                        str= "Action types   %t|Play %x0|Flipper %x2|Loop Stop 
%x3|Loop End %x4|Property %x6";
 #endif
-                       uiDefButS(block, MENU, B_REDR, str, xco+30, yco-24, 
(width-60)/2, 19, &aa->type, 0.0, 0.0, 0.0, 0.0, "Action playback type");
-                       uiDefIDPoinBut(block, test_actionpoin_but, ID_AC, 1, 
"AC: ", xco+30 + ((width-60)/2), yco-24, (width-60)/2, 19, &aa->act, "Action 
name");
+                       uiDefButS(block, MENU, B_REDR, str, xco+10, yco-24, 
width/3, 19, &aa->type, 0.0, 0.0, 0.0, 0.0, "Action playback type");
+                       uiDefIDPoinBut(block, test_actionpoin_but, ID_AC, 1, 
"AC: ", xco+10+ (width/3), yco-24, ((width/3)*2) - (20 + 60), 19, &aa->act, 
"Action name");
                        
+                       uiDefButBitS(block, TOGN, 1, 0, "Continue", 
xco+((width/3)*2)+20, yco-24, 60, 19,
+                                        &aa->end_reset, 0.0, 0.0, 0, 0, 
"Restore last frame when switching on/off, otherwise play from the start each 
time");
+                       
+                       
                        if(aa->type == ACT_ACTION_FROM_PROP)
                        {
-                               uiDefBut(block, TEX, 0, "Prop: ",xco+30, 
yco-44, width-60, 19, aa->name, 0.0, 31.0, 0, 0, "Use this property to define 
the Action position");
+                               uiDefBut(block, TEX, 0, "Prop: ",xco+10, 
yco-44, width-20, 19, aa->name, 0.0, 31.0, 0, 0, "Use this property to define 
the Action position");
                        }
                        else
                        {
-                               uiDefButI(block, NUM, 0, "Sta: ",xco+30, 
yco-44, (width-60)/2, 19, &aa->sta, 0.0, MAXFRAMEF, 0, 0, "Start frame");
-                               uiDefButI(block, NUM, 0, "End: 
",xco+30+(width-60)/2, yco-44, (width-60)/2, 19, &aa->end, 0.0, MAXFRAMEF, 0, 
0, "End frame");
+                               uiDefButI(block, NUM, 0, "Sta: ",xco+10, 
yco-44, (width-20)/2, 19, &aa->sta, 0.0, MAXFRAMEF, 0, 0, "Start frame");
+                               uiDefButI(block, NUM, 0, "End: 
",xco+10+(width-20)/2, yco-44, (width-20)/2, 19, &aa->end, 0.0, MAXFRAMEF, 0, 
0, "End frame");
                        }
                                                
-                       uiDefButI(block, NUM, 0, "Blendin: ", xco+30, yco-64, 
(width-60)/2, 19, &aa->blendin, 0.0, MAXFRAMEF, 0.0, 0.0, "Number of frames of 
motion blending");
-                       uiDefButS(block, NUM, 0, "Priority: ", 
xco+30+(width-60)/2, yco-64, (width-60)/2, 19, &aa->priority, 0.0, 100.0, 0.0, 
0.0, "Execution priority - lower numbers will override actions with higher 
numbers, With 2 or more actions at once, the overriding channels must be lower 
in the stack");
+                       uiDefButS(block, NUM, 0, "Blendin: ", xco+10, yco-64, 
(width-20)/2, 19, &aa->blendin, 0.0, 32767, 0.0, 0.0, "Number of frames of 
motion blending");
+                       uiDefButS(block, NUM, 0, "Priority: ", 
xco+10+(width-20)/2, yco-64, (width-20)/2, 19, &aa->priority, 0.0, 100.0, 0.0, 
0.0, "Execution priority - lower numbers will override actions with higher 
numbers, With 2 or more actions at once, the overriding channels must be lower 
in the stack");
                        
-                       uiDefBut(block, TEX, 0, "FrameProp: ",xco+30, yco-84, 
width-60, 19, aa->frameProp, 0.0, 31.0, 0, 0, "Assign this property this 
actions current frame number");                  
+                       uiDefBut(block, TEX, 0, "FrameProp: ",xco+10, yco-84, 
width-20, 19, aa->frameProp, 0.0, 31.0, 0, 0, "Assign this property this 
actions current frame number");                  
 
                        
 #ifdef __NLA_ACTION_BY_MOTION_ACTUATOR

Modified: branches/apricot/source/blender/src/buttons_shading.c
===================================================================
--- branches/apricot/source/blender/src/buttons_shading.c       2008-07-11 
00:36:38 UTC (rev 15527)
+++ branches/apricot/source/blender/src/buttons_shading.c       2008-07-11 
11:10:32 UTC (rev 15528)
@@ -2933,12 +2933,12 @@
                uiBlockSetCol(block, TH_BUT_SETTING1);
                uiDefButS(block, MENU, B_LAMPREDRAW,  "Falloff %t|Constant 
%x0|Inverse Linear %x1|Inverse Square %x2|Custom Curve %x3|Lin/Quad Weighted 
%x4|",
                        10,150,100,19, &la->falloff_type, 0,0,0,0, "Lamp 
falloff - intensity decay with distance");     
-               uiDefButBitI(block, TOG, LA_SPHERE, REDRAWVIEW3D,"Sphere",      
10,130,100,19,&la->mode, 0, 0, 0, 0, "Sets light intensity to zero for objects 
beyond the distance value");
+               uiDefButBitI(block, TOG, LA_SPHERE, B_LAMPPRV,"Sphere", 
10,130,100,19,&la->mode, 0, 0, 0, 0, "Sets light intensity to zero for objects 
beyond the distance value");
        }
 
        uiBlockBeginAlign(block);
        uiBlockSetCol(block, TH_BUT_SETTING1);
-       uiDefButBitI(block, TOG, LA_LAYER, B_LAMPPRV,"Layer",                   
        10,70,100,19,&la->mode, 0, 0, 0, 0, "Illuminates objects in the same 
layer as the lamp only");
+       uiDefButBitI(block, TOG, LA_LAYER, 0,"Layer",                           
10,70,100,19,&la->mode, 0, 0, 0, 0, "Illuminates objects in the same layer as 
the lamp only");
        uiDefButBitI(block, TOG, LA_NEG, B_LAMPPRV,"Negative",  
10,50,100,19,&la->mode, 0, 0, 0, 0, "Sets lamp to cast negative light");
        uiDefButBitI(block, TOG, LA_NO_DIFF, B_LAMPPRV,"No Diffuse",            
10,30,100,19,&la->mode, 0, 0, 0, 0, "Disables diffuse shading of material 
illuminated by this lamp");
        uiDefButBitI(block, TOG, LA_NO_SPEC, B_LAMPPRV,"No Specular",           
10,10,100,19,&la->mode, 0, 0, 0, 0, "Disables specular shading of material 
illuminated by this lamp");

Modified: branches/apricot/source/blender/src/drawimage.c
===================================================================
--- branches/apricot/source/blender/src/drawimage.c     2008-07-11 00:36:38 UTC 
(rev 15527)
+++ branches/apricot/source/blender/src/drawimage.c     2008-07-11 11:10:32 UTC 
(rev 15528)
@@ -465,6 +465,19 @@
        int drawface;
        int lastsel, sel;
        
+       /* APRICOT HACK - useful when texture painting */
+       if (!G.obedit && (G.sima->flag & SI_DRAWSHADOW) && (G.f & 
G_TEXTUREPAINT) && OBACT) {
+       
+               calc_image_view(G.sima, 'f');   /* float */
+               myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, 
G.v2d->cur.ymax);
+               glLoadIdentity();
+       
+               glColor3ub(112, 112, 112);
+               DerivedMesh *dm = mesh_get_derived_final(OBACT, 
CD_MASK_BAREMESH|CD_MASK_MTFACE);
+               dm->drawUVEdges(dm);
+               return;
+       }
+       
        if (!G.obedit || !CustomData_has_layer(&em->fdata, CD_MTFACE))
                return;
        

Modified: branches/apricot/source/blender/src/space.c
===================================================================
--- branches/apricot/source/blender/src/space.c 2008-07-11 00:36:38 UTC (rev 
15527)
+++ branches/apricot/source/blender/src/space.c 2008-07-11 11:10:32 UTC (rev 
15528)
@@ -4458,7 +4458,10 @@
 
                switch(event) {
                case UI_BUT_EVENT:
-                       if(val==REDRAWTIME) allqueue(REDRAWTIME, 0);
+                       if(val==REDRAWTIME) {
+                               allqueue(REDRAWTIME, 0);
+                               addqueue(sa->win, REDRAW, 1);
+                       }
                        else if(val==B_ADD_THEME) {
                                bTheme *btheme, *new;
                                

Modified: branches/apricot/source/blender/src/vpaint.c
===================================================================
--- branches/apricot/source/blender/src/vpaint.c        2008-07-11 00:36:38 UTC 
(rev 15527)
+++ branches/apricot/source/blender/src/vpaint.c        2008-07-11 11:10:32 UTC 
(rev 15528)
@@ -567,9 +567,9 @@
        cp=  (char *)&col;
        
        cp[0]= 255;
-       cp[1]= (mfac*cp1[1]+fac*cp2[1])>>8;
-       cp[2]= (mfac*cp1[2]+fac*cp2[2])>>8;
-       cp[3]= (mfac*cp1[3]+fac*cp2[3])>>8;
+       cp[1]= (mfac*cp1[1]+fac*cp2[1])/255;
+       cp[2]= (mfac*cp1[2]+fac*cp2[2])/255;
+       cp[3]= (mfac*cp1[3]+fac*cp2[3])/255;
        
        return col;
 }
@@ -587,11 +587,11 @@
        cp=  (char *)&col;
        
        cp[0]= 255;
-       temp= cp1[1] + ((fac*cp2[1])>>8);
+       temp= cp1[1] + ((fac*cp2[1])/255);
        if(temp>254) cp[1]= 255; else cp[1]= temp;
-       temp= cp1[2] + ((fac*cp2[2])>>8);
+       temp= cp1[2] + ((fac*cp2[2])/255);
        if(temp>254) cp[2]= 255; else cp[2]= temp;
-       temp= cp1[3] + ((fac*cp2[3])>>8);
+       temp= cp1[3] + ((fac*cp2[3])/255);
        if(temp>254) cp[3]= 255; else cp[3]= temp;
        
        return col;
@@ -610,11 +610,11 @@
        cp=  (char *)&col;
        
        cp[0]= 255;
-       temp= cp1[1] - ((fac*cp2[1])>>8);
+       temp= cp1[1] - ((fac*cp2[1])/255);
        if(temp<0) cp[1]= 0; else cp[1]= temp;
-       temp= cp1[2] - ((fac*cp2[2])>>8);
+       temp= cp1[2] - ((fac*cp2[2])/255);
        if(temp<0) cp[2]= 0; else cp[2]= temp;
-       temp= cp1[3] - ((fac*cp2[3])>>8);
+       temp= cp1[3] - ((fac*cp2[3])/255);
        if(temp<0) cp[3]= 0; else cp[3]= temp;
        
        return col;
@@ -636,9 +636,9 @@
        
        /* first mul, then blend the fac */
        cp[0]= 255;
-       cp[1]= (mfac*cp1[1] + fac*((cp2[1]*cp1[1])>>8)  )>>8;
-       cp[2]= (mfac*cp1[2] + fac*((cp2[2]*cp1[2])>>8)  )>>8;
-       cp[3]= (mfac*cp1[3] + fac*((cp2[3]*cp1[3])>>8)  )>>8;
+       cp[1]= (mfac*cp1[1] + fac*((cp2[1]*cp1[1])/255)  )/255;
+       cp[2]= (mfac*cp1[2] + fac*((cp2[2]*cp1[2])/255)  )/255;
+       cp[3]= (mfac*cp1[3] + fac*((cp2[3]*cp1[3])/255)  )/255;
 
        
        return col;
@@ -665,9 +665,9 @@
                return col1;
        
        cp[0]= 255;
-       cp[1]= (mfac*cp1[1]+fac*cp2[1])>>8;
-       cp[2]= (mfac*cp1[2]+fac*cp2[2])>>8;
-       cp[3]= (mfac*cp1[3]+fac*cp2[3])>>8;
+       cp[1]= (mfac*cp1[1]+fac*cp2[1])/255;
+       cp[2]= (mfac*cp1[2]+fac*cp2[2])/255;
+       cp[3]= (mfac*cp1[3]+fac*cp2[3])/255;
        
        return col;
 }
@@ -693,9 +693,9 @@

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