[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15730] trunk/blender/source/blender/src/ outliner.c: * Added the ability to toggle visibility/ renderability for bones in edit mode or pose mode, in

2008-07-23 Thread Matt Ebb
Revision: 15730
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15730
Author:   broken
Date: 2008-07-24 08:21:33 +0200 (Thu, 24 Jul 2008)

Log Message:
---
* Added the ability to toggle visibility/renderability for bones in edit mode 
or pose mode, in the outliner

Modified Paths:
--
trunk/blender/source/blender/src/outliner.c

Modified: trunk/blender/source/blender/src/outliner.c
===
--- trunk/blender/source/blender/src/outliner.c 2008-07-24 06:04:03 UTC (rev 
15729)
+++ trunk/blender/source/blender/src/outliner.c 2008-07-24 06:21:33 UTC (rev 
15730)
@@ -3539,6 +3539,13 @@
allqueue(REDRAWBUTSOBJECT, 0);
 }
 
+static void restrictbutton_bone_cb(void *poin, void *poin2)
+{
+   allqueue(REDRAWOOPS, 0);
+   allqueue(REDRAWVIEW3D, 0);
+   allqueue(REDRAWBUTSEDIT, 0);
+}
+
 static void namebutton_cb(void *tep, void *oldnamep)
 {
SpaceOops *soops= curarea->spacedata.first;
@@ -3723,6 +3730,25 @@
uiButSetFunc(bt, restrictbutton_modifier_cb, 
ob, NULL);
uiButSetFlag(bt, UI_NO_HILITE);
}
+   else if(tselem->type==TSE_POSE_CHANNEL)  {
+   bPoseChannel *pchan= (bPoseChannel 
*)te->directdata;
+   Bone *bone = pchan->bone;
+   
+   uiBlockSetEmboss(block, UI_EMBOSSN);
+   bt= uiDefIconButBitI(block, ICONTOG, 
BONE_HIDDEN_P, REDRAWALL, ICON_RESTRICT_VIEW_OFF, 
+   
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, 
&(bone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+   uiButSetFunc(bt, restrictbutton_bone_cb, ob, 
NULL);
+   uiButSetFlag(bt, UI_NO_HILITE);
+   }
+   else if(tselem->type==TSE_EBONE)  {
+   EditBone *ebone= (EditBone *)te->directdata;
+   
+   uiBlockSetEmboss(block, UI_EMBOSSN);
+   bt= uiDefIconButBitI(block, ICONTOG, 
BONE_HIDDEN_A, REDRAWALL, ICON_RESTRICT_VIEW_OFF, 
+   
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, 
&(ebone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+   uiButSetFunc(bt, restrictbutton_bone_cb, ob, 
NULL);
+   uiButSetFlag(bt, UI_NO_HILITE);
+   }
}

if((tselem->flag & TSE_CLOSED)==0) 
outliner_draw_restrictbuts(block, soops, &te->subtree);


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


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15729] trunk/blender/source/blender/src/ outliner.c: * Added the ability to toggle visibility/ renderability for modifiers, from the outliner

2008-07-23 Thread Matt Ebb
Revision: 15729
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15729
Author:   broken
Date: 2008-07-24 08:04:03 +0200 (Thu, 24 Jul 2008)

Log Message:
---
* Added the ability to toggle visibility/renderability for modifiers, from the 
outliner

Modified Paths:
--
trunk/blender/source/blender/src/outliner.c

Modified: trunk/blender/source/blender/src/outliner.c
===
--- trunk/blender/source/blender/src/outliner.c 2008-07-24 04:52:37 UTC (rev 
15728)
+++ trunk/blender/source/blender/src/outliner.c 2008-07-24 06:04:03 UTC (rev 
15729)
@@ -68,6 +68,7 @@
 #include "BKE_main.h"
 #include "BKE_material.h"
 #include "BKE_modifier.h"
+#include "BKE_object.h"
 #include "BKE_screen.h"
 #include "BKE_scene.h"
 #include "BKE_utildefines.h"
@@ -698,6 +699,7 @@
for (index=0,md=ob->modifiers.first; 
md; index++,md=md->next) {
TreeElement *te = 
outliner_add_element(soops, &temod->subtree, ob, temod, TSE_MODIFIER, index);
te->name= md->name;
+   te->directdata = md;
 
if 
(md->type==eModifierType_Lattice) {

outliner_add_element(soops, &te->subtree, ((LatticeModifierData*) md)->object, 
te, TSE_LINKED_OB, 0);
@@ -3523,6 +3525,20 @@
allqueue(REDRAWBUTSSCENE, 0);
 }
 
+static void restrictbutton_modifier_cb(void *poin, void *poin2)
+{
+   Object *ob = (Object *)poin;
+   
+   DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
+   object_handle_update(ob);
+   countall();
+
+   allqueue(REDRAWOOPS, 0);
+   allqueue(REDRAWVIEW3D, 0);
+   allqueue(REDRAWBUTSEDIT, 0);
+   allqueue(REDRAWBUTSOBJECT, 0);
+}
+
 static void namebutton_cb(void *tep, void *oldnamep)
 {
SpaceOops *soops= curarea->spacedata.first;
@@ -3685,6 +3701,28 @@

uiBlockSetEmboss(block, UI_EMBOSS);
}
+   else if(tselem->type==TSE_MODIFIER)  {
+   ModifierData *md= (ModifierData 
*)te->directdata;
+   ob = (Object *)tselem->id;
+   
+   uiBlockSetEmboss(block, UI_EMBOSSN);
+   bt= uiDefIconButBitI(block, ICONTOGN, 
eModifierMode_Realtime, REDRAWALL, ICON_RESTRICT_VIEW_OFF, 
+   
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, te->ys, 17, OL_H-1, 
&(md->mode), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+   uiButSetFunc(bt, restrictbutton_modifier_cb, 
ob, NULL);
+   uiButSetFlag(bt, UI_NO_HILITE);
+   
+   /*
+   bt= uiDefIconButBitI(block, ICONTOGN, 
eModifierMode_Editmode, REDRAWALL, VICON_EDIT, 
+   
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, te->ys, 17, OL_H-1, 
&(md->mode), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
+   uiButSetFunc(bt, restrictbutton_modifier_cb, 
ob, NULL);
+   uiButSetFlag(bt, UI_NO_HILITE);
+   */
+   
+   bt= uiDefIconButBitI(block, ICONTOGN, 
eModifierMode_Render, REDRAWALL, ICON_RESTRICT_RENDER_OFF, 
+   
(int)soops->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, te->ys, 17, OL_H-1, 
&(md->mode), 0, 0, 0, 0, "Restrict/Allow renderability");
+   uiButSetFunc(bt, restrictbutton_modifier_cb, 
ob, NULL);
+   uiButSetFlag(bt, UI_NO_HILITE);
+   }
}

if((tselem->flag & TSE_CLOSED)==0) 
outliner_draw_restrictbuts(block, soops, &te->subtree);


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


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15728] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/python/ViewEdgeIterator/: soc-2008-mxcurioni: removed useless iterator directory.

2008-07-23 Thread Maxime Curioni
Revision: 15728
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15728
Author:   mxcurioni
Date: 2008-07-24 06:52:37 +0200 (Thu, 24 Jul 2008)

Log Message:
---
soc-2008-mxcurioni: removed useless iterator directory.

Removed Paths:
-

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/ViewEdgeIterator/


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


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15727] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/python: soc-2008-mxcurioni: Added first batch of Iterators: AdjacencyIterator, In

2008-07-23 Thread Maxime Curioni
Revision: 15727
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15727
Author:   mxcurioni
Date: 2008-07-24 06:48:34 +0200 (Thu, 24 Jul 2008)

Log Message:
---
soc-2008-mxcurioni: Added first batch of Iterators: AdjacencyIterator,  
Interface0DIterator, CurvePointIterator, StrokeVertexIterator,  
SVertexIterator, orientedViewEdgeIterator.

Modified Paths:
--

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.h

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Iterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp

Added Paths:
---
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.h

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_ChainingIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_ChainingPredicateIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_ChainingSilhouetteIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.h

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_Interface0DIterator.h

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_SVertexIterator.h

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_StrokeVertexIterator.h

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_ViewEdgeIterator.h

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/Iterator/BPy_orientedViewEdgeIterator.h

Removed Paths:
-

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_CurvePointIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Interface0DIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_StrokeVertexIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_ViewEdgeIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_orientedViewEdgeIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/ViewEdgeIterator/BPy_ChainingIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/BPy_ChainPredicateIterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/ViewEdgeIterator/ChainingIterator/BPy_ChainSilhouetteIterator.cpp

Modified: 
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp
===
--- 
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp
  2008-07-24 02:09:44 UTC (rev 15726)
+++ 
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.cpp
  2008-07-24 04:48:34 UTC (rev 15727)
@@ -12,6 +12,9 @@
return PyBool_FromLong( b ? 1 : 0);
 }
 
+bool bool_from_PyBool( PyObject *b ) {
+   return b == Py_True;
+}
 
 PyObject * Vector_from_Vec2f( Vec2f& vec ) {
float vec_data[2]; // because vec->_coord is protected

Modified: 
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.h
===
--- 
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.h
2008-07-24 02:09:44 UTC (rev 15726)
+++ 
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Convert.h
2008-07-24 04:48:34 UTC (rev 15727)
@@ -25,6 +25,7 @@
 #include "api2_2x/gen_utils.h"
 
 PyObject * PyBool_from_bool( bool b );
+bool bool_from_PyBool( PyObject *b );
 
 PyObject * Vector_f

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15726] trunk/blender/source/blender/src/ buttons_editing.c: * A bit more precision in the bevel mod 'width' field

2008-07-23 Thread Matt Ebb
Revision: 15726
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15726
Author:   broken
Date: 2008-07-24 04:09:44 +0200 (Thu, 24 Jul 2008)

Log Message:
---
* A bit more precision in the bevel mod 'width' field

Modified Paths:
--
trunk/blender/source/blender/src/buttons_editing.c

Modified: trunk/blender/source/blender/src/buttons_editing.c
===
--- trunk/blender/source/blender/src/buttons_editing.c  2008-07-24 00:44:12 UTC 
(rev 15725)
+++ trunk/blender/source/blender/src/buttons_editing.c  2008-07-24 02:09:44 UTC 
(rev 15726)
@@ -1929,7 +1929,7 @@
uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_MODIFIER_RECALC, "Width: ",
  lx, (cy -= 19), buttonWidth, 19, 
&bmd->value,
- 0.0, 0.5, 5, 2,
+ 0.0, 0.5, 5, 4,
  "Bevel value/amount");
/*uiDefButI(block, NUM, B_MODIFIER_RECALC, "Recurs",
  lx, (cy -= 19), buttonWidth, 19, 
&bmd->res,


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


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15725] branches/soc-2007-joeedh/source/ blender: strands work again

2008-07-23 Thread Joseph Eagar
Revision: 15725
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15725
Author:   joeedh
Date: 2008-07-24 02:44:12 +0200 (Thu, 24 Jul 2008)

Log Message:
---
strands work again

Modified Paths:
--
branches/soc-2007-joeedh/source/blender/makesdna/DNA_material_types.h
branches/soc-2007-joeedh/source/blender/makesdna/DNA_texture_types.h
branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c
branches/soc-2007-joeedh/source/blender/render/intern/source/texture.c
branches/soc-2007-joeedh/source/blender/src/buttons_shading.c

Modified: branches/soc-2007-joeedh/source/blender/makesdna/DNA_material_types.h
===
--- branches/soc-2007-joeedh/source/blender/makesdna/DNA_material_types.h   
2008-07-23 22:23:28 UTC (rev 15724)
+++ branches/soc-2007-joeedh/source/blender/makesdna/DNA_material_types.h   
2008-07-24 00:44:12 UTC (rev 15725)
@@ -281,6 +281,10 @@
 #define MAP_DISPLACE   4096
 #define MAP_WARP   8192
 #define MAP_LAYER  16384
+/*interval mapping displacement, similar
+  to relief mapping, steeped parallax maps,
+  occlusion parallax maps, etc.*/
+#define MAP_IDISP  (16384*2)
 
 /* mapto for halo */
 //#define MAP_HA_COL   1

Modified: branches/soc-2007-joeedh/source/blender/makesdna/DNA_texture_types.h
===
--- branches/soc-2007-joeedh/source/blender/makesdna/DNA_texture_types.h
2008-07-23 22:23:28 UTC (rev 15724)
+++ branches/soc-2007-joeedh/source/blender/makesdna/DNA_texture_types.h
2008-07-24 00:44:12 UTC (rev 15725)
@@ -194,6 +194,11 @@
 
 /*  TEX * */
 
+/*turn this on to enable a root-finding texture displacement
+  method, similar to e.g. steeped parallax maps, relief mapping,
+  occlusion parallax maps, iterative parallax maps, etc.*/
+//#define INTERVAL_MAPPING
+
 /* type */
 #define TEX_CLOUDS 1
 #define TEX_WOOD   2

Modified: branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c
===
--- branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c  
2008-07-23 22:23:28 UTC (rev 15724)
+++ branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c  
2008-07-24 00:44:12 UTC (rev 15725)
@@ -204,9 +204,11 @@
 {
VlakRen *vlak;
VertRen *vert;
+   StrandRen *strand= NULL;
+   StrandVert *svert;
ObjectRen *obr;
float imat[3][3], mat[3][3], viewinv[4][4];
-   int i, j;
+   int i, j, a;

if (mode == 0) {
Mat4SwapMat4((float*)newview, (float*)oldview);
@@ -225,6 +227,19 @@
MTC_Mat3MulVecfl(imat, vert->n);
MTC_Mat3MulVecfl(mat, vert->n);
}
+   
+   /*do strands*/
+   for (j=0; jtotstrand; j++) {
+   if((j & 255)==0) strand= obr->strandnodes[j>>8].strand;
+   else strand++;  
+   
+   svert= strand->vert;
+   for (a=0; a < strand->totvert; a++, svert++) {
+   MTC_Mat4MulVecfl(viewinv, svert->co);
+   MTC_Mat4MulVecfl(newview, svert->co);
+   }
+   
+   }
 
for (j=0; jtotvlak; j++) {
vlak = RE_findOrAddVlak(obr, j);
@@ -512,6 +527,8 @@
done += 1;
}
}
+
+   printf("done: %d, lastdone: %d\n", done, lastdone);
if (done != lastdone) {
printf("bleh!\n");
sprintf(rendertitle, "Shadow tiles %d out of %d 
completed", done, dbuf->tilex*dbuf->tiley);

Modified: branches/soc-2007-joeedh/source/blender/render/intern/source/texture.c
===
--- branches/soc-2007-joeedh/source/blender/render/intern/source/texture.c  
2008-07-23 22:23:28 UTC (rev 15724)
+++ branches/soc-2007-joeedh/source/blender/render/intern/source/texture.c  
2008-07-24 00:44:12 UTC (rev 15725)
@@ -1451,7 +1451,235 @@
return in;
 }
 
+/*clips ray where ray[axis] == pos */
+static void VecClipLine3f(float *v1, float *v2, int axis, float pos)
+{
+   float vec[3], t;
 
+   vec[0] = v2[0] - v1[0];
+   vec[1] = v2[1] - v1[1];
+   vec[2] = v2[2] - v1[2];
+   
+   if (vec[axis] == 0.0f) {
+   printf("bad value for VecClipLine3f!\n");
+   return;
+   }
+
+   t = (pos-v1[axis])/vec[axis];
+   v2[0] = v1[0] + vec[0]*t;
+   v2[1] = v1[1] + vec[1]*t;
+   v2[2] = v

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15724] branches/apricot/source/blender/ blenkernel/intern/DerivedMesh.c: Apricot Branch: fix for typo, no idea how this compiled with gcc..

2008-07-23 Thread Brecht Van Lommel
Revision: 15724
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15724
Author:   blendix
Date: 2008-07-24 00:23:28 +0200 (Thu, 24 Jul 2008)

Log Message:
---
Apricot Branch: fix for typo, no idea how this compiled with gcc..

Modified Paths:
--
branches/apricot/source/blender/blenkernel/intern/DerivedMesh.c

Modified: branches/apricot/source/blender/blenkernel/intern/DerivedMesh.c
===
--- branches/apricot/source/blender/blenkernel/intern/DerivedMesh.c 
2008-07-23 21:37:37 UTC (rev 15723)
+++ branches/apricot/source/blender/blenkernel/intern/DerivedMesh.c 
2008-07-23 22:23:28 UTC (rev 15724)
@@ -1898,7 +1898,7 @@
void *userData)
 {
/* not supported yet */
-   vDM_drawFacesText(dm, NULL);
+   vDM_drawFacesTex(dm, NULL);
 }
 
 /**/


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


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15723] trunk/blender/source: BGE patch: Add PyDoc for new logic bricks, set exception message on Py error, remove args on Py functions that don't tak

2008-07-23 Thread Benoit Bolsee
Revision: 15723
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15723
Author:   ben2610
Date: 2008-07-23 23:37:37 +0200 (Wed, 23 Jul 2008)

Log Message:
---
BGE patch: Add PyDoc for new logic bricks, set exception message on Py error, 
remove args on Py functions that don't take any to save CPU time

Modified Paths:
--
trunk/blender/source/blender/makesdna/DNA_actuator_types.h
trunk/blender/source/blender/src/buttons_logic.c
trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp
trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.h
trunk/blender/source/gameengine/Converter/KX_ConvertActuators.cpp
trunk/blender/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
trunk/blender/source/gameengine/GameLogic/SCA_ActuatorSensor.h
trunk/blender/source/gameengine/GameLogic/SCA_ISensor.cpp
trunk/blender/source/gameengine/GameLogic/SCA_ISensor.h
trunk/blender/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_ConstraintActuator.h
trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp
trunk/blender/source/gameengine/Ketsji/KX_IpoActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_IpoActuator.h
trunk/blender/source/gameengine/Ketsji/KX_ObjectActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_ObjectActuator.h
trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp
trunk/blender/source/gameengine/PyDoc/KX_ConstraintActuator.py
trunk/blender/source/gameengine/PyDoc/KX_IpoActuator.py
trunk/blender/source/gameengine/PyDoc/KX_ObjectActuator.py
trunk/blender/source/gameengine/PyDoc/SCA_ISensor.py

Added Paths:
---
trunk/blender/source/gameengine/PyDoc/BL_ShapeActionActuator.py
trunk/blender/source/gameengine/PyDoc/KX_ActuatorSensor.py
trunk/blender/source/gameengine/PyDoc/KX_StateActuator.py

Modified: trunk/blender/source/blender/makesdna/DNA_actuator_types.h
===
--- trunk/blender/source/blender/makesdna/DNA_actuator_types.h  2008-07-23 
21:28:48 UTC (rev 15722)
+++ trunk/blender/source/blender/makesdna/DNA_actuator_types.h  2008-07-23 
21:37:37 UTC (rev 15723)
@@ -368,9 +368,9 @@
 #define ACT_CONST_DIRPX1
 #define ACT_CONST_DIRPY2
 #define ACT_CONST_DIRPZ4
-#define ACT_CONST_DIRMX8
-#define ACT_CONST_DIRMY16
-#define ACT_CONST_DIRMZ32
+#define ACT_CONST_DIRNX8
+#define ACT_CONST_DIRNY16
+#define ACT_CONST_DIRNZ32
 
 /* constraint type */
 #define ACT_CONST_TYPE_LOC 0

Modified: trunk/blender/source/blender/src/buttons_logic.c
===
--- trunk/blender/source/blender/src/buttons_logic.c2008-07-23 21:28:48 UTC 
(rev 15722)
+++ trunk/blender/source/blender/src/buttons_logic.c2008-07-23 21:37:37 UTC 
(rev 15723)
@@ -2088,8 +2088,8 @@
uiDefBut(block, LABEL,  0, "Range", 
xco+80, yco-45, (width-115)/2, 19, NULL, 0.0, 0.0, 0, 0, "Set the maximum 
length of ray");
uiDefButBitS(block, TOG, ACT_CONST_DISTANCE, B_REDR, 
"Dist",xco+80+(width-115)/2, yco-45, (width-115)/2, 19, &coa->flag, 0.0, 
0.0, 0, 0, "Force distance of object to point of impact of ray");
 
-   if(coa->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRMX)) fp= 
coa->minloc;
-   else if(coa->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRMY)) 
fp= coa->minloc+1;
+   if(coa->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= 
coa->minloc;
+   else if(coa->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) 
fp= coa->minloc+1;
else fp= coa->minloc+2;
 
uiDefButF(block, NUM, 0, "",xco+80, yco-65, 
(width-115)/2, 19, fp+3, 0.0, 2000.0, 10, 0, "Maximum length of ray");

Modified: trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp
===
--- trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp
2008-07-23 21:28:48 UTC (rev 15722)
+++ trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp
2008-07-23 21:37:37 UTC (rev 15723)
@@ -442,15 +442,15 @@
{"setProperty", (PyCFunction) BL_ShapeActionActuator::sPySetProperty, 
METH_VARARGS, SetProperty_doc},
{"setBlendtime", (PyCFunction) BL_ShapeActionActuator::sPySetBlendtime, 
METH_VARARGS, SetBlendtime_doc},
 
-   {"getAction", (PyCFunction) BL_ShapeActionActuator::sPyGetAction, 
METH_VARARGS, GetAction_doc},
-   {"getStart", (PyCFunction) BL_ShapeActionActuator::sPyGetStart, 
METH_VARARGS, GetStart_doc},
-   {"getEnd", (PyCFunction) BL_ShapeActionActuator::sPyGetEnd, 
METH_VARARGS, G

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15722] branches/soc-2008-quorn/source/ blender: Refactor: Renamed text tool methods (suggestions and docs) for clarity and consistency.

2008-07-23 Thread Ian Thompson
Revision: 15722
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15722
Author:   quorn
Date: 2008-07-23 23:28:48 +0200 (Wed, 23 Jul 2008)

Log Message:
---
Refactor: Renamed text tool methods (suggestions and docs) for clarity and 
consistency.

Modified Paths:
--
branches/soc-2008-quorn/source/blender/blenkernel/BKE_suggestions.h
branches/soc-2008-quorn/source/blender/blenkernel/intern/suggestions.c
branches/soc-2008-quorn/source/blender/python/api2_2x/Text.c
branches/soc-2008-quorn/source/blender/src/drawtext.c
branches/soc-2008-quorn/source/blender/src/usiblender.c

Modified: branches/soc-2008-quorn/source/blender/blenkernel/BKE_suggestions.h
===
--- branches/soc-2008-quorn/source/blender/blenkernel/BKE_suggestions.h 
2008-07-23 19:35:13 UTC (rev 15721)
+++ branches/soc-2008-quorn/source/blender/blenkernel/BKE_suggestions.h 
2008-07-23 21:28:48 UTC (rev 15722)
@@ -62,27 +62,28 @@
SuggItem *selected;
 } SuggList;
 
-/* Free all suggestion related memory */
-void free_suggestions();
+/* Free all text tool memory */
+void free_texttools();
 
 /* Used to identify which Text object the current tools should appear against 
*/
-void suggest_set_active(Text *text);
-void suggest_clear_active();
-short suggest_is_active(Text *text);
+void texttool_text_set_active(Text *text);
+void texttool_text_clear();
+short texttool_text_is_active(Text *text);
 
-void suggest_add(const char *name, char type);
-void suggest_prefix(const char *prefix);
-void suggest_clear_list();
-SuggItem *suggest_first();
-SuggItem *suggest_last();
+/* Suggestions */
+void texttool_suggest_add(const char *name, char type);
+void texttool_suggest_prefix(const char *prefix);
+void texttool_suggest_clear();
+SuggItem *texttool_suggest_first();
+SuggItem *texttool_suggest_last();
+void texttool_suggest_select(SuggItem *sel);
+SuggItem *texttool_suggest_selected();
 
-void suggest_set_selected(SuggItem *sel);
-SuggItem *suggest_get_selected();
+/* Documentation */
+void texttool_docs_show(const char *docs);
+char *texttool_docs_get();
+void texttool_docs_clear();
 
-void suggest_documentation(const char *docs);
-char *suggest_get_docs();
-void suggest_clear_docs();
-
 #ifdef __cplusplus
 }
 #endif

Modified: branches/soc-2008-quorn/source/blender/blenkernel/intern/suggestions.c
===
--- branches/soc-2008-quorn/source/blender/blenkernel/intern/suggestions.c  
2008-07-23 19:35:13 UTC (rev 15721)
+++ branches/soc-2008-quorn/source/blender/blenkernel/intern/suggestions.c  
2008-07-23 21:28:48 UTC (rev 15722)
@@ -41,13 +41,12 @@
 /* Static definitions */
 /**/
 
+static Text *activeToolText = NULL;
 static SuggList suggestions = {NULL, NULL, NULL, NULL, NULL};
-static Text *suggText = NULL;
-static SuggItem *lastInsert = NULL;
 static char *documentation = NULL;
 static int doc_lines = 0;
 
-static int suggest_cmp(const char *first, const char *second, int len) {   
+static int txttl_cmp(const char *first, const char *second, int len) { 
int cmp, i;
for (cmp=0, i=0; iprev;
@@ -68,7 +67,7 @@
suggestions.selected = NULL;
 }
 
-static void docs_free() {
+static void txttl_free_docs() {
if (documentation) {
MEM_freeN(documentation);
documentation = NULL;
@@ -79,31 +78,31 @@
 /* General tool functions */
 /**/
 
-void free_suggestions() {
-   sugg_free();
-   docs_free();
+void free_texttools() {
+   txttl_free_suggest();
+   txttl_free_docs();
 }
 
-void suggest_set_active(Text *text) {
-   if (suggText == text) return;
-   suggest_clear_active();
-   suggText = text;
+void texttool_text_set_active(Text *text) {
+   if (activeToolText == text) return;
+   texttool_text_clear();
+   activeToolText = text;
 }
 
-void suggest_clear_active() {
-   free_suggestions();
-   suggText = NULL;
+void texttool_text_clear() {
+   free_texttools();
+   activeToolText = NULL;
 }
 
-short suggest_is_active(Text *text) {
-   return suggText==text ? 1 : 0;
+short texttool_text_is_active(Text *text) {
+   return activeToolText==text ? 1 : 0;
 }
 
 /***/
 /* Suggestion list methods */
 /***/
 
-void suggest_add(const char *name, char type) {
+void texttool_suggest_add(const char *name, char type) {
SuggItem *newitem, *item;
int len, cmp;
 
@@ -126,7 +125,7 @@
} else {
cmp = -1;
for (item=suggestions.last; item; item=item->prev) {
-   cmp = suggest_cmp(name, item->name, len);
+   cmp = txttl_cmp(name, item->name, len);
 
/* Newitem comes after this item, insert here */
if (cmp >= 0

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15721] branches/soc-2008-quorn/source/ blender: Improvements to text find (and replace):

2008-07-23 Thread Ian Thompson
Revision: 15721
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15721
Author:   quorn
Date: 2008-07-23 21:35:13 +0200 (Wed, 23 Jul 2008)

Log Message:
---
Improvements to text find (and replace):
 - Added GUI panel
 - Selected text is copied to "find" field
 - Option to search "all texts"
 - Option to replace text
 - Alt+F finds, Ctrl+Alt+F finds again (without UI)
 - Alt+H replaces (UI), Ctrl+Alt+H replaces again (and undo works)
 - Fixed: Find didn't push undos so cursor position was wrong

Modified Paths:
--
branches/soc-2008-quorn/source/blender/blenkernel/BKE_text.h
branches/soc-2008-quorn/source/blender/blenkernel/intern/text.c
branches/soc-2008-quorn/source/blender/src/drawtext.c
branches/soc-2008-quorn/source/blender/src/header_text.c

Modified: branches/soc-2008-quorn/source/blender/blenkernel/BKE_text.h
===
--- branches/soc-2008-quorn/source/blender/blenkernel/BKE_text.h
2008-07-23 18:50:00 UTC (rev 15720)
+++ branches/soc-2008-quorn/source/blender/blenkernel/BKE_text.h
2008-07-23 19:35:13 UTC (rev 15721)
@@ -52,7 +52,7 @@
 char*  txt_to_buf  (struct Text *text);
 void   txt_clean_text  (struct Text *text);
 void   txt_order_cursors   (struct Text *text);
-inttxt_find_string (struct Text *text, char *findstr);
+inttxt_find_string (struct Text *text, char *findstr, int 
wrap);
 inttxt_has_sel (struct Text *text);
 inttxt_get_span(struct TextLine *from, struct TextLine 
*to);
 void   txt_move_up (struct Text *text, short sel);
@@ -87,7 +87,7 @@
 void   txt_backspace_word  (struct Text *text);
 inttxt_add_char(struct Text *text, char add);
 inttxt_replace_char(struct Text *text, char add);
-void   txt_find_panel  (struct SpaceText *st, int again);
+void   txt_find_panel  (struct SpaceText *st, int again, int flags);
 void   run_python_script   (struct SpaceText *st);
 intjumptoline_interactive  (struct SpaceText *st);
 void   txt_export_to_object(struct Text *text);
@@ -141,6 +141,11 @@
 #define UNDO_COMMENT   034
 #define UNDO_UNCOMMENT 035
 
+/* Find and replace flags */
+#define TXT_FIND_REPLACE 0x01
+#define TXT_FIND_ALLTEXTS 0x02
+#define TXT_FIND_WRAP 0x04
+
 #ifdef __cplusplus
 }
 #endif

Modified: branches/soc-2008-quorn/source/blender/blenkernel/intern/text.c
===
--- branches/soc-2008-quorn/source/blender/blenkernel/intern/text.c 
2008-07-23 18:50:00 UTC (rev 15720)
+++ branches/soc-2008-quorn/source/blender/blenkernel/intern/text.c 
2008-07-23 19:35:13 UTC (rev 15721)
@@ -1080,22 +1080,31 @@
return buf;
 }
 
-int txt_find_string(Text *text, char *findstr)
+int txt_find_string(Text *text, char *findstr, int wrap)
 {
TextLine *tl, *startl;
char *s= NULL;
+   int oldcl, oldsl, oldcc, oldsc;
 
if (!text || !text->curl || !text->sell) return 0;

txt_order_cursors(text);
 
+   oldcl= txt_get_span(text->lines.first, text->curl);
+   oldsl= txt_get_span(text->lines.first, text->sell);
tl= startl= text->sell;
+   oldcc= text->curc;
+   oldsc= text->selc;

s= strstr(&tl->line[text->selc], findstr);
while (!s) {
tl= tl->next;
-   if (!tl)
-   tl= text->lines.first;
+   if (!tl) {
+   if (wrap)
+   tl= text->lines.first;
+   else
+   break;
+   }
 
s= strstr(tl->line, findstr);
if (tl==startl)
@@ -1103,10 +1112,10 @@
}

if (s) {
-   text->curl= text->sell= tl;
-   text->curc= (int) (s-tl->line);
-   text->selc= text->curc + strlen(findstr);
-   
+   int newl= txt_get_span(text->lines.first, tl);
+   int newc= (int)(s-tl->line);
+   txt_move_to(text, newl, newc, 0);
+   txt_move_to(text, newl, newc + strlen(findstr), 1);
return 1;   
} else
return 0;

Modified: branches/soc-2008-quorn/source/blender/src/drawtext.c
===
--- branches/soc-2008-quorn/source/blender/src/drawtext.c   2008-07-23 
18:50:00 UTC (rev 15720)
+++ branches/soc-2008-quorn/source/blender/src/drawtext.c   2008-07-23 
19:35:13 UTC (rev 15721)
@@ -115,7 +115,10 @@
 static void get_suggest_prefix(Text *text);
 static void confirm_suggestion(Text *text, int skipleft);
 
+static int last_txt_find_flags= 0;
 static vo

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15720] branches/soc-2007-joeedh/source/ blender/render/intern/source: forgot even more files, heh

2008-07-23 Thread Joseph Eagar
Revision: 15720
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15720
Author:   joeedh
Date: 2008-07-23 20:50:00 +0200 (Wed, 23 Jul 2008)

Log Message:
---
forgot even more files, heh

Added Paths:
---
branches/soc-2007-joeedh/source/blender/render/intern/source/dsm_func.c
branches/soc-2007-joeedh/source/blender/render/intern/source/dsm_soft.c

Added: branches/soc-2007-joeedh/source/blender/render/intern/source/dsm_func.c
===
--- branches/soc-2007-joeedh/source/blender/render/intern/source/dsm_func.c 
(rev 0)
+++ branches/soc-2007-joeedh/source/blender/render/intern/source/dsm_func.c 
2008-07-23 18:50:00 UTC (rev 15720)
@@ -0,0 +1,574 @@
+/**
+ * $Id: 
+ *
+ * * BEGIN GPL LICENSE BLOCK *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2007 by the Blender Foundation.
+ * All rights reserved.  Copyright is specifically transferred to
+ * the blender foundation by Joseph Eagar.
+ *
+ * Contributors: Joseph Eagar
+  *
+ * * END GPL LICENSE BLOCK *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "BLI_arithb.h"
+#include "MTC_matrixops.h"
+#include "BLI_blenlib.h"
+#include "BLI_threads.h"
+#include "BLI_jitter.h"
+#include "BLI_memarena.h"
+
+#include "BKE_tile.h"
+#include "BKE_dsm.h"
+#include "BKE_bucketbuffer.h"
+#include "BKE_global.h"
+#include "BKE_main.h"
+
+#include "DNA_material_types.h"
+#include "DNA_object_types.h"
+#include "DNA_lamp_types.h"
+#include "DNA_curve_types.h"
+#include "DNA_group_types.h"
+
+#include "RE_render_ext.h"
+#include "RE_shader_ext.h"
+
+#include "gammaCorrectionTables.h"
+#include "pixelblending.h"
+#include "render_types.h"
+#include "renderpipeline.h"
+#include "renderdatabase.h"
+#include "rendercore.h"
+#include "shadbuf.h"
+#include "shading.h"
+#include "sss.h"
+#include "zbuf.h"
+#include "qmc.h"
+#include "dsm.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BIF_space.h"
+#include "BIF_editview.h"
+
+#include "PIL_time.h"
+
+#include "IMB_imbuf_types.h"
+#include "IMB_imbuf.h"
+
+extern Render R;
+static TCS_TilePool *deepbuffer_pool = NULL;
+
+/*The Loop of Doom.
+  One loop to merge them all, One loop to find them;
+  One loop to compress them all, and in the darkness, bind them!*/
+#define COMPSTATE_PROCESSING   0
+#define COMPSTATE_PROCESSING2  1
+#define COMPSTATE_COMPRESSING  2
+#define COMPSTATE_DONE 3
+
+void DSM_MergeLayerListNew(DSMTile *tile, int x, int y, _ClrEntry *row, 
ListBase (*transfuncs)[3],
+  int totface, 
void *scratchmem1, void *scratchmem2, void *scratchmem3,
+  int 
scratchlen, float *weight, int samplewid, float error)
+{
+   DSMFunction *func[3];
+   DSMLayerSample *cursamp[3]={NULL, NULL, NULL}, *samp;
+   DSMLayerSample *sout[3] = {scratchmem1, scratchmem2, scratchmem3};
+   _ClrEntry *csamp, *lastcsamp[3]={NULL, NULL, NULL};
+   double slope[3]={0.0, 0.0, 0.0}, accum[3] = {1.0, 1.0, 1.0}, s1, s2;
+   double start[3], end[3], ostartpoint[3], oendpoint[3];
+   double startpoint[3] = {-1.0, -1.0, -1.0}, endpoint[3] = {-1.0, -1.0, 
-1.0}, err=error; // /2.0;
+   int i, ci, totfaces[3] = {0, 0, 0}, cursor[3]={0, 0, 0};
+   int state[3] = {COMPSTATE_PROCESSING, COMPSTATE_PROCESSING, 
COMPSTATE_PROCESSING};
+   int totface2[3] = {0, 0, 0}, count[3]={0, 0, 0};
+
+   /*first alloc, then assign, as internally the function
+ array may be reallocated to increase its size (thus invalidating
+ existing pointers).*/
+   for (i=0; i<3; i++) {
+   switch (i) {
+   case 0:
+   dsm_function_alloc(tile, 
&tile->r_rect[y*tile->sizex+x]);
+   break;
+   case 1:
+   dsm_function_alloc(tile, 
&tile->g_rect[y*tile->sizex+x]);
+   break;
+   case 2:
+   dsm_function_alloc(tile, 
&tile->b_rect[y*tile->sizex+x]);
+  

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15719] branches/soc-2007-joeedh/source/ blender/render/intern/include/dsm.h: forgot this file

2008-07-23 Thread Joseph Eagar
Revision: 15719
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15719
Author:   joeedh
Date: 2008-07-23 20:36:23 +0200 (Wed, 23 Jul 2008)

Log Message:
---
forgot this file

Added Paths:
---
branches/soc-2007-joeedh/source/blender/render/intern/include/dsm.h

Added: branches/soc-2007-joeedh/source/blender/render/intern/include/dsm.h
===
--- branches/soc-2007-joeedh/source/blender/render/intern/include/dsm.h 
(rev 0)
+++ branches/soc-2007-joeedh/source/blender/render/intern/include/dsm.h 
2008-07-23 18:36:23 UTC (rev 15719)
@@ -0,0 +1,97 @@
+/*
+ * $Id: 
+ * * BEGIN GPL LICENSE BLOCK *
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Joseph Eagar (joeedh).
+ *
+ * * END GPL LICENSE BLOCK *
+ */
+#ifndef _DSM_H
+#define _DSM_H
+
+#include "BLI_memarena.h"
+
+#include "BKE_tile.h"
+#include "BKE_dsm.h"
+#include "BKE_bucketbuffer.h"
+
+#include "render_types.h"
+#include "zbuf.h"
+#include "shadbuf.h"
+
+struct _ClrEntry;
+
+typedef struct _ClrEntry {
+   struct _ClrEntry *next, *prev;
+   ListBase *srclist;
+   int depth;
+   int p;
+   int mask;
+   int obi;
+   int type;
+   int samplenr;
+   float value;
+   int index; /* color component index */
+} _ClrEntry;
+
+
+void DSM_getSoftShadow(ShadBuf *shb, struct ShadeInput *shi, LampRen *lar, 
float *rco, float *dxco, float *dyco, float inp, float *shadowclr);
+float DSM_getShadow(ShadBuf *buf, float *rco, float *dxco, float *dyco, float 
inp, int component);
+float DSM_getBilinearShadow(ShadBuf *shb, float *rco, float *dxco, float 
*dyco, float inp, int component);
+float DSM_sampleMap(ShadBuf *shb, int xs, int ys, int zs, int bias, float inp, 
int component);
+
+/*the various functions needed to build the piecewise-linear visibility 
functions*/
+void DSM_MergeLayerListNew(DSMTile *tile, int x, int y, struct _ClrEntry *row, 
ListBase (*transfuncs)[3],
+  int totface, 
void *scratchmem1, void *scratchmem2, void *scratchmem3,
+  int 
scratchlen, float *weight, int samplewid, float error);
+
+void DSM_CompressFunction(MemArena *arena, DSMFunction *func, float error);
+DSMFunction *DSM_MergeLayerList(MemArena *arena, struct _ClrEntry *row, 
ListBase (*transfuncs)[3], 
+   int 
totface,char *scratchmem, int scratchlen, float *weight, 
+   int 
samplewid,float error, int cindex, DSMTile *tile, short *offset);
+
+void DSM_DoTile(Render *re, float projmat[4][4], ShadBuf *shb, DSMTile *tile, 
+   DSMBuffer *dbuf, RE_BucketTile *btile, int 
threadnr, float viewinv[4][4]);
+
+int zbuffer_dsm(Render *re, RenderPart *pa, float winmat[4][4], APixstr 
**lastbuf, 
+   APixstr **lastbufstrand, APixstr *APixbuf, 
APixstr *APixbufstrand, 
+   ListBase *apsmbase, unsigned int lay, ShadBuf 
*shb, 
+   RE_BucketTile *buckettile);
+
+
+/* Modified zbufclipwire from zbuf.c
+  v1 and v2 are in homogenous coordinates.  returns true if 
+  drawing should happen.  v1 and v2 are modified (clipped).*/
+int DSM_zbufclipwire(float clipsta, float clipend, int rectx, int recty, float 
*v1, float *v2);
+
+APixstr *dsm_addpsmainA(ListBase *lb);
+void dsm_freepsA(ListBase *lb);
+APixstr *dsm_addpsA(ZSpan *zspan);
+
+#define DSM_NONE   0
+#define DSM_FACE   1
+#define DSM_FACE_STEP  2
+#define DSM_STRAND 3
+#define DSM_STRAND_STEP4
+#define DSM_VOLUME_SAMPLE  5
+
+#endif /* _DSM_H */


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


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15718] branches/soc-2008-quorn/source/ blender/makesdna/DNA_text_types.h: time_t isn't supported in SDNA so we' ll use double instead.

2008-07-23 Thread Ian Thompson
Revision: 15718
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15718
Author:   quorn
Date: 2008-07-23 20:19:56 +0200 (Wed, 23 Jul 2008)

Log Message:
---
time_t isn't supported in SDNA so we'll use double instead. 56bit precision is 
plenty for storing seconds (for a billion years at least)

Modified Paths:
--
branches/soc-2008-quorn/source/blender/makesdna/DNA_text_types.h

Modified: branches/soc-2008-quorn/source/blender/makesdna/DNA_text_types.h
===
--- branches/soc-2008-quorn/source/blender/makesdna/DNA_text_types.h
2008-07-23 17:31:00 UTC (rev 15717)
+++ branches/soc-2008-quorn/source/blender/makesdna/DNA_text_types.h
2008-07-23 18:19:56 UTC (rev 15718)
@@ -31,8 +31,6 @@
 #ifndef DNA_TEXT_TYPES_H
 #define DNA_TEXT_TYPES_H
 
-#include "time.h"
-
 #include "DNA_listBase.h"
 #include "DNA_ID.h"
 
@@ -59,8 +57,8 @@
int undo_pos, undo_len;

void *compiled;
-   
-   time_t mtime;
+
+   double mtime;
 } Text;
 
 


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


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15717] branches/soc-2008-unclezeiv: svn merge -r 15630:15714 https://svn.blender.org/svnroot/bf-blender/trunk/ blender

2008-07-23 Thread Davide Vercelli
Revision: 15717
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15717
Author:   unclezeiv
Date: 2008-07-23 19:31:00 +0200 (Wed, 23 Jul 2008)

Log Message:
---
svn merge -r 15630:15714 
https://svn.blender.org/svnroot/bf-blender/trunk/blender

Modified Paths:
--

branches/soc-2008-unclezeiv/projectfiles_vc7/blender/makesdna/DNA_makesdna.vcproj
branches/soc-2008-unclezeiv/projectfiles_vc7/blender/src/BL_src.vcproj
branches/soc-2008-unclezeiv/source/blender/blenkernel/BKE_global.h
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/collision.c
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/lattice.c

branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/particle_system.c
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/scene.c
branches/soc-2008-unclezeiv/source/blender/blenloader/intern/readfile.c
branches/soc-2008-unclezeiv/source/blender/blenloader/intern/writefile.c
branches/soc-2008-unclezeiv/source/blender/include/BDR_drawaction.h
branches/soc-2008-unclezeiv/source/blender/include/BIF_editaction.h
branches/soc-2008-unclezeiv/source/blender/include/BIF_space.h
branches/soc-2008-unclezeiv/source/blender/include/BSE_drawview.h
branches/soc-2008-unclezeiv/source/blender/include/BSE_editaction_types.h
branches/soc-2008-unclezeiv/source/blender/include/transform.h
branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_action_types.h
branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_sequence_types.h
branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_space_types.h
branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_view3d_types.h
branches/soc-2008-unclezeiv/source/blender/makesdna/intern/makesdna.c
branches/soc-2008-unclezeiv/source/blender/python/api2_2x/Blender.c
branches/soc-2008-unclezeiv/source/blender/python/api2_2x/Library.c
branches/soc-2008-unclezeiv/source/blender/python/api2_2x/Particle.c
branches/soc-2008-unclezeiv/source/blender/python/api2_2x/doc/Ipo.py
branches/soc-2008-unclezeiv/source/blender/python/api2_2x/doc/LibData.py
branches/soc-2008-unclezeiv/source/blender/python/api2_2x/doc/Particle.py

branches/soc-2008-unclezeiv/source/blender/render/intern/source/shadeoutput.c
branches/soc-2008-unclezeiv/source/blender/src/buttons_logic.c
branches/soc-2008-unclezeiv/source/blender/src/drawaction.c
branches/soc-2008-unclezeiv/source/blender/src/drawnode.c
branches/soc-2008-unclezeiv/source/blender/src/drawobject.c
branches/soc-2008-unclezeiv/source/blender/src/drawseq.c
branches/soc-2008-unclezeiv/source/blender/src/drawview.c
branches/soc-2008-unclezeiv/source/blender/src/editaction.c
branches/soc-2008-unclezeiv/source/blender/src/editnode.c
branches/soc-2008-unclezeiv/source/blender/src/editseq.c
branches/soc-2008-unclezeiv/source/blender/src/header_action.c
branches/soc-2008-unclezeiv/source/blender/src/header_node.c
branches/soc-2008-unclezeiv/source/blender/src/header_seq.c
branches/soc-2008-unclezeiv/source/blender/src/header_view3d.c
branches/soc-2008-unclezeiv/source/blender/src/interface.c
branches/soc-2008-unclezeiv/source/blender/src/interface_draw.c
branches/soc-2008-unclezeiv/source/blender/src/space.c
branches/soc-2008-unclezeiv/source/blender/src/transform_conversions.c
branches/soc-2008-unclezeiv/source/blender/src/transform_generics.c
branches/soc-2008-unclezeiv/source/blender/src/usiblender.c

branches/soc-2008-unclezeiv/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp

branches/soc-2008-unclezeiv/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h

branches/soc-2008-unclezeiv/source/gameengine/Converter/BL_DeformableGameObject.h

branches/soc-2008-unclezeiv/source/gameengine/Converter/KX_ConvertActuators.cpp
branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_ILogicBrick.h

branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_PropertyActuator.cpp

branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_PropertyActuator.h
branches/soc-2008-unclezeiv/source/gameengine/GamePlayer/common/GPC_Canvas.h

branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp

branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_BulletPhysicsController.h
branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_CameraActuator.cpp
branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_CameraActuator.h

branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_ConstraintActuator.h
branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_GameObject.cpp
branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_GameObject.h
br

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15716] branches/soc-2008-unclezeiv/source /blender/render/intern/source/shadeoutput.c: - readability enhancements for diffuse and specular shaders (

2008-07-23 Thread Davide Vercelli
Revision: 15716
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15716
Author:   unclezeiv
Date: 2008-07-23 19:23:56 +0200 (Wed, 23 Jul 2008)

Log Message:
---
- readability enhancements for diffuse and specular shaders (mostly used macros 
where possible, leading to clearer and more compact code)
- a couple of slight optimizations (pre-computing parameters being used squared 
in many places, and anticipating a early out)
- a potential fix (parameter g in Blinn specularity could stay uncorrectly at 
0.0 in some extreme corner cases)

Modified Paths:
--

branches/soc-2008-unclezeiv/source/blender/render/intern/source/shadeoutput.c

Modified: 
branches/soc-2008-unclezeiv/source/blender/render/intern/source/shadeoutput.c
===
--- 
branches/soc-2008-unclezeiv/source/blender/render/intern/source/shadeoutput.c   
2008-07-23 16:59:54 UTC (rev 15715)
+++ 
branches/soc-2008-unclezeiv/source/blender/render/intern/source/shadeoutput.c   
2008-07-23 17:23:56 UTC (rev 15716)
@@ -404,15 +404,13 @@

if(fac==0.0f) return 1.0f;

-   t1= (view[0]*vn[0] + view[1]*vn[1] + view[2]*vn[2]);
-   if(t1>0.0f)  t2= 1.0f+t1;
+   t1= INPR(view, vn);
+   if(t1>0.0f) t2= 1.0f+t1;
else t2= 1.0f-t1;

t2= grad + (1.0f-grad)*pow(t2, fac);

-   if(t2<0.0f) return 0.0f;
-   else if(t2>1.0f) return 1.0f;
-   return t2;
+   return CLAMPIS(t2, 0.0f, 1.0f);
 }
 
 static double saacos_d(double fac)
@@ -549,12 +547,10 @@
float h[3];
float rslt;

-   h[0] = l[0] + v[0];
-   h[1] = l[1] + v[1];
-   h[2] = l[2] + v[2];
+   VECADD(h, v, l);
Normalize(h);

-   rslt = h[0]*n[0] + h[1]*n[1] + h[2]*n[2];
+   rslt = INPR(h, n);
if(tangent) rslt= sasqrt(1.0f - rslt*rslt);

if( rslt > 0.0f ) rslt= spec(rslt, hard);
@@ -567,25 +563,20 @@
 /* reduced cook torrance spec (for off-specular peak) */
 static float CookTorr_Spec(float *n, float *l, float *v, int hard, int tangent)
 {
-   float i, nh, nv, h[3];
+   float nh, nv, h[3];
 
-   h[0]= v[0]+l[0];
-   h[1]= v[1]+l[1];
-   h[2]= v[2]+l[2];
+   VECADD(h, v, l);
Normalize(h);
 
-   nh= n[0]*h[0]+n[1]*h[1]+n[2]*h[2];
+   nh= INPR(n, h);
if(tangent) nh= sasqrt(1.0f - nh*nh);
else if(nh<0.0f) return 0.0f;

-   nv= n[0]*v[0]+n[1]*v[1]+n[2]*v[2];
+   nv= INPR(n, v);
if(tangent) nv= sasqrt(1.0f - nv*nv);
else if(nv<0.0f) nv= 0.0f;
 
-   i= spec(nh, hard);
-
-   i= i/(0.1+nv);
-   return i;
+   return spec(nh, hard)/(0.1+nv);
 }
 
 /* Blinn spec */
@@ -593,6 +584,7 @@
 {
float i, nh, nv, nl, vh, h[3];
float a, b, c, g=0.0f, p, f, ang;
+   float num, den, pm, pp;
 
if(refrac < 1.0f) return 0.0f;
if(spec_power == 0.0f) return 0.0f;
@@ -602,38 +594,44 @@
spec_power= sqrt(1.0f/spec_power);
else spec_power= 10.0f/spec_power;

-   h[0]= v[0]+l[0];
-   h[1]= v[1]+l[1];
-   h[2]= v[2]+l[2];
+   VECADD(h, v, l);
Normalize(h);
 
-   nh= n[0]*h[0]+n[1]*h[1]+n[2]*h[2]; /* Dot product between surface 
normal and half-way vector */
+   /* Dot product between surface normal and half-way vector */
+   nh= INPR(n, h);
if(tangent) nh= sasqrt(1.0f - nh*nh);
else if(nh<0.0f) return 0.0f;
 
-   nv= n[0]*v[0]+n[1]*v[1]+n[2]*v[2]; /* Dot product between surface 
normal and view vector */
+   /* Dot product between surface normal and view vector */
+   nv= INPR(n, v);
if(tangent) nv= sasqrt(1.0f - nv*nv);
if(nv<=0.01f) nv= 0.01f;/* hrms... */
 
-   nl= n[0]*l[0]+n[1]*l[1]+n[2]*l[2]; /* Dot product between surface 
normal and light vector */
+   /* Dot product between surface normal and light vector */
+   nl= INPR(n, l);
if(tangent) nl= sasqrt(1.0f - nl*nl);
if(nl<=0.01f) {
return 0.0f;
}
 
-   vh= v[0]*h[0]+v[1]*h[1]+v[2]*h[2]; /* Dot product between view vector 
and half-way vector */
+   /* Dot product between view vector and half-way vector */
+   vh= INPR(v, h); 
if(vh<=0.0f) vh= 0.01f;
 
a = 1.0f;
b = (2.0f*nh*nv)/vh;
c = (2.0f*nh*nl)/vh;
+   
+   g= MIN3(a, b, c);
 
-   if( a < b && a < c ) g = a;
-   else if( b < a && b < c ) g = b;
-   else if( c < a && c < b ) g = c;
-
p = sqrt( (double)((refrac * refrac)+(vh*vh)-1.0f) );
-   f = 
(((p-vh)*(p-vh))/((p+vh)*(p+vh)))*(1+vh*(p+vh))-1.0f)*((vh*(p+vh))-1.0f))/(((vh*(p-vh))+1.0f)*((vh*(p-vh))+1.0f;
+   pm= p-vh;
+   pp= p+vh;
+   num= (vh*pp)-1.0f;
+   num*= num;
+   den= (vh*pm)+1.0f;
+   den*= den;
+   f = (pm*pm/(pp*pp

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15714] trunk/blender/source/gameengine/ Ketsji/KX_GameObject.cpp: Added NodeUpdateGS so GameObject Python api alignAxisToVect function,

2008-07-23 Thread Campbell Barton
Revision: 15714
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15714
Author:   campbellbarton
Date: 2008-07-23 17:45:23 +0200 (Wed, 23 Jul 2008)

Log Message:
---
Added NodeUpdateGS so GameObject Python api alignAxisToVect function,
Otherwise the rotation isn't applied.

Modified Paths:
--
trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp

Modified: trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp
===
--- trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp2008-07-23 
12:59:05 UTC (rev 15713)
+++ trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp2008-07-23 
15:45:23 UTC (rev 15714)
@@ -1470,6 +1470,7 @@
if (PyVecTo(pyvect, vect))
{
AlignAxisToVect(vect,axis,fac);
+   NodeUpdateGS(0.f,true);
Py_RETURN_NONE;
}
}


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


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15713] branches/soc-2008-quorn/source/ blender/blenkernel/intern/text.c: Bugfix: Deleting backward selected text was getting stuck on redo.

2008-07-23 Thread Ian Thompson
Revision: 15713
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15713
Author:   quorn
Date: 2008-07-23 14:59:05 +0200 (Wed, 23 Jul 2008)

Log Message:
---
Bugfix: Deleting backward selected text was getting stuck on redo.

Selections were not correctly preserved through undo/redo operations causing 
unexpected behaviour.

Modified Paths:
--
branches/soc-2008-quorn/source/blender/blenkernel/intern/text.c

Modified: branches/soc-2008-quorn/source/blender/blenkernel/intern/text.c
===
--- branches/soc-2008-quorn/source/blender/blenkernel/intern/text.c 
2008-07-23 12:27:08 UTC (rev 15712)
+++ branches/soc-2008-quorn/source/blender/blenkernel/intern/text.c 
2008-07-23 12:59:05 UTC (rev 15713)
@@ -1821,6 +1821,12 @@

break;
}
+
+   /* next undo step may need evaluating */
+   if (text->undo_pos>=0 && text->undo_buf[text->undo_pos] == UNDO_STO) {
+   txt_do_undo(text);
+   txt_do_redo(text); /* selections need restoring */
+   }

undoing= 0; 
 }
@@ -1895,7 +1901,7 @@
 
case UNDO_SWAP:
txt_curs_swap(text);
-   txt_do_undo(text); /* swaps should appear transparent 
a*/
+   txt_do_redo(text); /* swaps should appear transparent 
a*/
break;

case UNDO_CTO:


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


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15712] trunk/blender/source/blender: == Grease Pencil - UI Improvements ==

2008-07-23 Thread Joshua Leung
Revision: 15712
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15712
Author:   aligorith
Date: 2008-07-23 14:27:08 +0200 (Wed, 23 Jul 2008)

Log Message:
---
== Grease Pencil - UI Improvements ==

Based on user feedback, I've made some changes to the Grease Pencil UI (most 
notably in 'Time Editing' facilities). 
* 'Edit Timing' button gone
* Pin button and 'gpd);
}
}
-   else if(sl->spacetype==SPACE_ACTION) {
-   SpaceAction *sact= (SpaceAction *)sl;
-   
-   /* WARNING: action-editor doesn't have it's own 
gpencil data! 
-* so only adjust pointer, but DON'T LINK
-*/
-   if (sact->gpd) 
-   sact->gpd= newdataadr(fd, sact->gpd);
-   }
}
 
sa->v1= newdataadr(fd, sa->v1);

Modified: trunk/blender/source/blender/include/BDR_gpencil.h
===
--- trunk/blender/source/blender/include/BDR_gpencil.h  2008-07-23 11:50:51 UTC 
(rev 15711)
+++ trunk/blender/source/blender/include/BDR_gpencil.h  2008-07-23 12:27:08 UTC 
(rev 15712)
@@ -53,8 +53,6 @@
 
 struct bGPdata *gpencil_data_getactive(struct ScrArea *sa);
 short gpencil_data_setactive(struct ScrArea *sa, struct bGPdata *gpd);
-struct bGPdata *gpencil_data_getetime(struct bScreen *sc);
-void gpencil_data_setetime(struct bScreen *sc, struct bGPdata *gpd);
 
 void gpencil_frame_delete_laststroke(struct bGPDframe *gpf);
 

Modified: trunk/blender/source/blender/include/BIF_editaction.h
===
--- trunk/blender/source/blender/include/BIF_editaction.h   2008-07-23 
11:50:51 UTC (rev 15711)
+++ trunk/blender/source/blender/include/BIF_editaction.h   2008-07-23 
12:27:08 UTC (rev 15712)
@@ -49,7 +49,9 @@
ACTTYPE_FILLCON,
ACTTYPE_IPO,
ACTTYPE_SHAPEKEY,
-   ACTTYPE_GPLAYER
+   ACTTYPE_GPDATABLOCK,
+   ACTTYPE_GPLAYER,
+   ACTTYPE_SPECIALDATA
 };
 
 /* Macros for easier/more consistant state testing */
@@ -70,6 +72,8 @@
 #define EDITABLE_ICU(icu) ((icu->flag & IPO_PROTECT)==0)
 #define SEL_ICU(icu) (icu->flag & IPO_SELECT)
 
+#define EXPANDED_GPD(gpd) (gpd->flag & GP_DATA_EXPAND) 
+
 #define EDITABLE_GPL(gpl) ((gpl->flag & GP_LAYER_LOCKED)==0)
 #define SEL_GPL(gpl) ((gpl->flag & GP_LAYER_ACTIVE) || (gpl->flag & 
GP_LAYER_SELECT))
 
@@ -185,7 +189,7 @@
 /* Grease-Pencil Data */
 void gplayer_make_cfra_list(struct bGPDlayer *gpl, ListBase *elems, short 
onlysel);
 
-void deselect_gpencil_layers(struct bGPdata *gpd, short select_mode);
+void deselect_gpencil_layers(void *data, short select_mode);
 
 short is_gplayer_frame_selected(struct bGPDlayer *gpl);
 void set_gplayer_frame_selection(struct bGPDlayer *gpl, short mode);
@@ -204,7 +208,7 @@
 struct Key *get_action_mesh_key(void);
 int get_nearest_key_num(struct Key *key, short *mval, float *x);
 
-void *get_nearest_act_channel(short mval[], short *ret_type);
+void *get_nearest_act_channel(short mval[], short *ret_type, void **owner);
 
 /* Action */
 struct bActionChannel *get_hilighted_action_channel(struct bAction* action);

Modified: trunk/blender/source/blender/include/BSE_drawview.h
===
--- trunk/blender/source/blender/include/BSE_drawview.h 2008-07-23 11:50:51 UTC 
(rev 15711)
+++ trunk/blender/source/blender/include/BSE_drawview.h 2008-07-23 12:27:08 UTC 
(rev 15712)
@@ -76,6 +76,7 @@
 int play_anim(int mode);
 
 void make_axis_color(char *col, char *col2, char axis);
+char *view3d_get_name(struct View3D *v3d);
 
 /* SMOOTHVIEW */
 void smooth_view(struct View3D *v3d, float *ofs, float *quat, float *dist, 
float *lens);

Modified: trunk/blender/source/blender/makesdna/DNA_action_types.h
===
--- trunk/blender/source/blender/makesdna/DNA_action_types.h2008-07-23 
11:50:51 UTC (rev 15711)
+++ trunk/blender/source/blender/makesdna/DNA_action_types.h2008-07-23 
12:27:08 UTC (rev 15712)
@@ -184,7 +184,6 @@
View2D v2d; 

bAction *action;/* the currently active action 
*/
-   bGPdata *gpd;   /* the currently active gpencil block 
(for editing) */

char  mode, autosnap;   /* mode: editing context; autosnap: 
automatic keyframe snapping mode   */
short flag, actnr;  /* flag: bitmapped settings; */

Modified: trunk/blender/source/blender/makesdna/DNA_gpencil_types.h
===
--- trunk/blender/source/blender/makesdna/DNA_gpencil_types.h   2008-07-23 
1

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15711] branches/soc-2007-joeedh/source/ blender: update, ui fixes, speedup in dsm lookup

2008-07-23 Thread Joseph Eagar
Revision: 15711
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15711
Author:   joeedh
Date: 2008-07-23 13:50:51 +0200 (Wed, 23 Jul 2008)

Log Message:
---
update, ui fixes, speedup in dsm lookup

Modified Paths:
--
branches/soc-2007-joeedh/source/blender/blenkernel/BKE_blender.h
branches/soc-2007-joeedh/source/blender/render/intern/include/qmc.h
branches/soc-2007-joeedh/source/blender/render/intern/include/shadbuf.h
branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c
branches/soc-2007-joeedh/source/blender/render/intern/source/rendercore.c
branches/soc-2007-joeedh/source/blender/render/intern/source/shadbuf.c
branches/soc-2007-joeedh/source/blender/render/intern/source/shadeoutput.c
branches/soc-2007-joeedh/source/blender/render/intern/source/zbuf.c
branches/soc-2007-joeedh/source/blender/src/buttons_shading.c
branches/soc-2007-joeedh/source/blender/src/usiblender.c

Modified: branches/soc-2007-joeedh/source/blender/blenkernel/BKE_blender.h
===
--- branches/soc-2007-joeedh/source/blender/blenkernel/BKE_blender.h
2008-07-23 10:19:08 UTC (rev 15710)
+++ branches/soc-2007-joeedh/source/blender/blenkernel/BKE_blender.h
2008-07-23 11:50:51 UTC (rev 15711)
@@ -41,7 +41,7 @@
 struct MemFile;
 
 #define BLENDER_VERSION246
-#define BLENDER_SUBVERSION 0
+#define BLENDER_SUBVERSION 20
 
 #define BLENDER_MINVERSION 245
 #define BLENDER_MINSUBVERSION  15

Modified: branches/soc-2007-joeedh/source/blender/render/intern/include/qmc.h
===
--- branches/soc-2007-joeedh/source/blender/render/intern/include/qmc.h 
2008-07-23 10:19:08 UTC (rev 15710)
+++ branches/soc-2007-joeedh/source/blender/render/intern/include/qmc.h 
2008-07-23 11:50:51 UTC (rev 15711)
@@ -72,5 +72,6 @@
 QMCINLINE int adaptive_sample_contrast_val(int samples, float prev, float val, 
float thresh);
 QMCINLINE float get_avg_speed(struct ShadeInput *shi);
 QMCINLINE int adaptive_sample_variance(int samples, float *col, float *colsq, 
float thresh);
+QMCSampler *get_thread_qmcsampler(Render *re, int thread, int type, int tot);
 
 #endif /* QMC_H */

Modified: 
branches/soc-2007-joeedh/source/blender/render/intern/include/shadbuf.h
===
--- branches/soc-2007-joeedh/source/blender/render/intern/include/shadbuf.h 
2008-07-23 10:19:08 UTC (rev 15710)
+++ branches/soc-2007-joeedh/source/blender/render/intern/include/shadbuf.h 
2008-07-23 11:50:51 UTC (rev 15711)
@@ -33,7 +33,6 @@
 #define SHADBUF_EXT_H
 
 #include "render_types.h"
-#include "BKE_dsm.h"
 
 struct ObjectRen;
 
@@ -67,16 +66,7 @@
 struct MemArena;
 struct APixstr;
 
-/**
- * Deep Shadow Buffer
- */
 
-void DSM_getSoftShadow(ShadBuf *shb, struct ShadeInput *shi, LampRen *lar, 
float *rco, float *dxco, float *dyco, float inp, float *shadowclr);
-float DSM_getShadow(ShadBuf *buf, float *rco, float *dxco, float *dyco, float 
inp, int component);
-float DSM_getBilinearShadow(ShadBuf *shb, float *rco, float *dxco, float 
*dyco, float inp, int component);
-float DSM_sampleMap(ShadBuf *shb, int xs, int ys, int zs, int bias, float inp, 
int component);
-
-
 /**
  * Irregular shadowbuffer
  */

Modified: branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c
===
--- branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c  
2008-07-23 10:19:08 UTC (rev 15710)
+++ branches/soc-2007-joeedh/source/blender/render/intern/source/dsm.c  
2008-07-23 11:50:51 UTC (rev 15711)
@@ -65,6 +65,7 @@
 #include "sss.h"
 #include "zbuf.h"
 #include "qmc.h"
+#include "dsm.h"
 
 #include "MEM_guardedalloc.h"
 
@@ -79,46 +80,6 @@
 extern Render R;
 static TCS_TilePool *deepbuffer_pool = NULL;
 
-/* prototypes */
-struct _ClrEntry;
-void DSM_DoTile(Render *re, float projmat[4][4], ShadBuf *shb, DSMTile *tile, 
-   DSMBuffer *dbuf, RE_BucketTile *btile, int 
threadnr, float viewinv[4][4]);
-
-int zbuffer_dsm(Render *re, RenderPart *pa, float winmat[4][4], APixstr 
**lastbuf, 
-   APixstr **lastbufstrand, APixstr *APixbuf, 
APixstr *APixbufstrand, 
-   ListBase *apsmbase, unsigned int lay, ShadBuf 
*shb, 
-   RE_BucketTile *buckettile);
-
-static APixstr *addpsmainA(ListBase *lb);
-static void freepsA(ListBase *lb);
-static APixstr *addpsA(ZSpan *zspan);
-
-/* Modified zbufclipwire from zbuf.c
-  v1 and v2 are in homogenous coordinates.  returns true if 
-  drawing should happen.  v1 and v2 are modified (clipped).*/
-int DSM_zbufclipwire(float clipsta, float clipend, int rectx, int recty, float 
*v1, float *v2);
-
-#define DSM_NONE  

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15710] branches/soc-2008-mxcurioni/source /blender/freestyle: soc-2008-mxcurioni: added Iterator class, base class for all iterators in Freestyle (on

2008-07-23 Thread Maxime Curioni
Revision: 15710
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15710
Author:   mxcurioni
Date: 2008-07-23 12:19:08 +0200 (Wed, 23 Jul 2008)

Log Message:
---
soc-2008-mxcurioni: added Iterator class, base class for all iterators in 
Freestyle (on the C++ side). Created the equivalent in Python BPy_Iterator with 
the simple interface:
- getExactTypeName()
- increment()
- decrement()
- isBegin()
- isEnd()

Contrary to previously stated, I am reverting back to implementing iterators in 
the (Python) API, for different reasons:
- it will make testing quicker to achieve, as I won't have to recode a big 
chunk of the original Python files
- it will be a base for API refactoring
- it won't prevent the use a list-based approach later (it is simple to get it 
from the Iterator)

Modified Paths:
--
branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Freestyle.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/ChainingIterators.h

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/swig/ModuleWrapper.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/swig/ModuleWrapper.h

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/Interface0D.h

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/view_map/ViewMapIterators.h
branches/soc-2008-mxcurioni/source/blender/freestyle/python/Freestyle.py

Added Paths:
---

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Iterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Iterator.h

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/Iterator.cpp

branches/soc-2008-mxcurioni/source/blender/freestyle/intern/system/Iterator.h

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript
===
--- branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript 
2008-07-23 07:56:08 UTC (rev 15709)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/SConscript 
2008-07-23 10:19:08 UTC (rev 15710)
@@ -74,6 +74,7 @@
prefix + '/BPy_Interface1D.cpp',
prefix + '/Interface1D/BPy_FEdge.cpp',
prefix + '/Interface1D/BPy_Stroke.cpp',
+   prefix + '/BPy_Iterator.cpp',
prefix + '/BPy_MediumType.cpp',
prefix + '/BPy_Nature.cpp',
prefix + '/BPy_StrokeAttribute.cpp',

Modified: 
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
===
--- 
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
2008-07-23 07:56:08 UTC (rev 15709)
+++ 
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
2008-07-23 10:19:08 UTC (rev 15710)
@@ -5,6 +5,7 @@
 #include "BPy_Id.h"
 #include "BPy_IntegrationType.h"
 #include "BPy_Interface0D.h"
+#include "BPy_Iterator.h"
 #include "Interface0D/BPy_CurvePoint.h"
 #include "BPy_Interface1D.h"
 #include "BPy_MediumType.h"
@@ -142,6 +143,7 @@
IntegrationType_Init( module );
Interface0D_Init( module );
Interface1D_Init( module );
+   Iterator_Init( module );
StrokeAttribute_Init( module );
StrokeShader_Init( module );
UnaryFunction0D_Init( module );

Added: 
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Iterator.cpp
===
--- 
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Iterator.cpp
 (rev 0)
+++ 
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Iterator.cpp
 2008-07-23 10:19:08 UTC (rev 15710)
@@ -0,0 +1,176 @@
+#include "BPy_Iterator.h"
+
+#include "BPy_Convert.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+///
+
+/*---  Python API function prototypes for Iterator instance  
---*/
+static void Iterator___dealloc__(BPy_Iterator *self);
+static PyObject * Iterator___repr__(BPy_Iterator* self);
+
+static PyObject * Iterator_getExactTypeName(BPy_Iterator* self);
+static PyObject * Iterator_increment(BPy_Iterator* self);
+static PyObject * Iterator_decrement(BPy_Iterator* self);
+static PyObject * Iterator_isBegin(BPy_Iterator* self);
+static PyObject * Iterator_isEnd(BPy_Iterator* self);
+
+/*

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15708] branches/apricot: svn merge -r15698:HEAD https://svn.blender.org/svnroot/bf-blender/trunk/ blender

2008-07-23 Thread Campbell Barton
Revision: 15708
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15708
Author:   campbellbarton
Date: 2008-07-23 09:17:20 +0200 (Wed, 23 Jul 2008)

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

Modified Paths:
--
branches/apricot/projectfiles_vc7/blender/makesdna/DNA_makesdna.vcproj
branches/apricot/projectfiles_vc7/blender/src/BL_src.vcproj
branches/apricot/source/blender/blenkernel/intern/scene.c
branches/apricot/source/blender/makesdna/DNA_sequence_types.h
branches/apricot/source/blender/python/api2_2x/doc/Ipo.py
branches/apricot/source/blender/src/buttons_logic.c
branches/apricot/source/blender/src/editseq.c
branches/apricot/source/gameengine/Converter/KX_ConvertActuators.cpp
branches/apricot/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
branches/apricot/source/gameengine/Ketsji/KX_ConstraintActuator.h

Modified: branches/apricot/projectfiles_vc7/blender/makesdna/DNA_makesdna.vcproj
===
--- branches/apricot/projectfiles_vc7/blender/makesdna/DNA_makesdna.vcproj  
2008-07-23 07:11:23 UTC (rev 15707)
+++ branches/apricot/projectfiles_vc7/blender/makesdna/DNA_makesdna.vcproj  
2008-07-23 07:17:20 UTC (rev 15708)
@@ -472,6 +472,9 @@

RelativePath="..\..\..\source\blender\makesdna\DNA_fileglobal_types.h">


+   
+   




+   
+   




+   
+   




+   
+   




+   
+   




+   
+   

time = 0;
uiDefButS(block, MENU, 1, str,  xco+10, yco-65, 
70, 19, &coa->flag, 0.0, 0.0, 0, 0, "");

-   uiDefButS(block, NUM,   0, "Damp:", xco+10, 
yco-45, 70, 19, &coa->damp, 0.0, 100.0, 0, 0, "");
+   uiDefButS(block, NUM,   0, "damp",  xco+10, 
yco-45, 70, 19, &coa->damp, 0.0, 100.0, 0, 0, "Damping factor: time constant 
(in frame) of low pass filter");
uiDefBut(block, LABEL,  0, "Min",   
xco+80, yco-45, (width-90)/2, 19, NULL, 0.0, 0.0, 0, 0, "");
uiDefBut(block, LABEL,  0, "Max",   
xco+80+(width-90)/2, yco-45, (width-90)/2, 19, NULL, 0.0, 0.0, 0, 0, "");
 
@@ -2084,7 +2084,7 @@
str= "Direction %t|None %x0|X axis %x1|Y axis %x2|Z 
axis %x4|-X axis %x8|-Y axis %x16|-Z axis %x32";
uiDefButS(block, MENU, B_REDR, str, xco+10, 
yco-65, 70, 19, &coa->mode, 0.0, 0.0, 0, 0, "Set the direction of the ray");

-   uiDefButS(block, NUM,   0, "Damp:", xco+10, 
yco-45, 70, 19, &coa->damp, 0.0, 100.0, 0, 0, "");
+   uiDefButS(block, NUM,   0, "damp",  xco+10, 
yco-45, 70, 19, &coa->damp, 0.0, 100.0, 0, 0, "Damping factor: time constant 
(in frame) of low pass filter");
uiDefBut(block, LABEL,  0, "Range", 
xco+80, yco-45, (width-115)/2, 19, NULL, 0.0, 0.0, 0, 0, "Set the maximum 
length of ray");
uiDefButBitS(block, TOG, ACT_CONST_DISTANCE, B_REDR, 
"Dist",xco+80+(width-115)/2, yco-45, (width-115)/2, 19, &coa->flag, 0.0, 
0.0, 0, 0, "Force distance of object to point of impact of ray");
 
@@ -2124,7 +2124,7 @@
str= "Direction %t|None %x0|X axis %x1|Y axis %x2|Z 
axis %x4";
uiDefButS(block, MENU, B_REDR, str, xco+10, 
yco-65, 70, 19, &coa->mode, 0.0, 0.0, 0, 0, "Select the axis to be aligned 
along the reference direction");

-   uiDefButS(block, NUM,   0, "Damp:", xco+10, 
yco-45, 70, 19, &coa->damp, 0.0, 100.0, 0, 0, "");
+   uiDefButS(block, NUM,   0, "damp",  xco+10, 
yco-45, 70, 19, &coa->damp, 0.0, 100.0, 0, 0, "Damping factor: time constant 
(in frame) of low pass filter");
uiDefBut(block, LABEL,  0, "X", xco+80, 
yco-45, (width-115)/3, 19, NULL, 0.0, 0.0, 0, 0, "");
 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15707] trunk/blender/source/blender: == Sequencer ==

2008-07-23 Thread Peter Schlaile
Revision: 15707
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15707
Author:   schlaile
Date: 2008-07-23 09:11:23 +0200 (Wed, 23 Jul 2008)

Log Message:
---
== Sequencer ==

Fixes: [#17315] Sequencer: after undo there's no active object
closes: [#17357] fix for bug #17315 - Sequencer: after undo there's no active 
object
(kiemdoder: thanks for the patch, had to do it in a little bit different way,
since sort_seq will kill your sort order idea...)

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/scene.c
trunk/blender/source/blender/makesdna/DNA_sequence_types.h
trunk/blender/source/blender/src/editseq.c

Modified: trunk/blender/source/blender/blenkernel/intern/scene.c
===
--- trunk/blender/source/blender/blenkernel/intern/scene.c  2008-07-23 
06:02:18 UTC (rev 15706)
+++ trunk/blender/source/blender/blenkernel/intern/scene.c  2008-07-23 
07:11:23 UTC (rev 15707)
@@ -303,7 +303,7 @@
int flag;

// Note: this here is defined in editseq.c (BIF_editseq.h), NOT in 
blenkernel! 
-   set_last_seq(NULL);
+   clear_last_seq();

G.scene= sce;


Modified: trunk/blender/source/blender/makesdna/DNA_sequence_types.h
===
--- trunk/blender/source/blender/makesdna/DNA_sequence_types.h  2008-07-23 
06:02:18 UTC (rev 15706)
+++ trunk/blender/source/blender/makesdna/DNA_sequence_types.h  2008-07-23 
07:11:23 UTC (rev 15707)
@@ -257,6 +257,7 @@
 #define SEQ_USE_CROP   131072
 #define SEQ_USE_COLOR_BALANCE  262144
 #define SEQ_USE_PROXY_CUSTOM_DIR   524288
+#define SEQ_ACTIVE1048576
 
 #define SEQ_COLOR_BALANCE_INVERSE_GAIN 1
 #define SEQ_COLOR_BALANCE_INVERSE_GAMMA 2

Modified: trunk/blender/source/blender/src/editseq.c
===
--- trunk/blender/source/blender/src/editseq.c  2008-07-23 06:02:18 UTC (rev 
15706)
+++ trunk/blender/source/blender/src/editseq.c  2008-07-23 07:11:23 UTC (rev 
15707)
@@ -122,14 +122,29 @@
if(!_last_seq_init) {
Editing *ed;
Sequence *seq;
+   Sequence *l_sel = NULL;
+   Sequence *l_act = NULL;
 
ed= G.scene->ed;
if(!ed) return NULL;
 
-   for(seq= ed->seqbasep->first; seq; seq=seq->next)
+   for(seq= ed->seqbasep->first; seq; seq=seq->next) {
+   if(seq->flag & SEQ_ACTIVE)
+   l_act = seq;
if(seq->flag & SELECT)
-   _last_seq= seq;
+   l_sel = seq;
+   }
 
+   if (l_act) {
+   _last_seq = l_act;
+   } else {
+   _last_seq = l_sel;
+   }
+
+   if (_last_seq) {
+   _last_seq->flag |= SEQ_ACTIVE;
+   }
+
_last_seq_init = 1;
}
 
@@ -138,12 +153,23 @@
 
 void set_last_seq(Sequence *seq)
 {
+   if (_last_seq_init && _last_seq) {
+   _last_seq->flag &= ~SEQ_ACTIVE;
+   }
+
_last_seq = seq;
_last_seq_init = 1;
+
+   if (_last_seq) {
+   _last_seq->flag |= SEQ_ACTIVE;
+   }
 }
 
-void clear_last_seq(Sequence *seq)
+void clear_last_seq()
 {
+   if (_last_seq_init && _last_seq) {
+   _last_seq->flag &= ~SEQ_ACTIVE;
+   }
_last_seq = NULL;
_last_seq_init = 0;
 }
@@ -2261,6 +2287,8 @@
"handled in duplicate!\nExpect a crash"
" now...\n");
}
+
+   seqn->flag &= ~SEQ_ACTIVE;

return seqn;
 }


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