[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16991] trunk/blender/source/gameengine/ Ketsji/KX_SoundActuator.cpp: Fix a crash on null pointer in previous commit .

2008-10-08 Thread Benoit Bolsee
Revision: 16991
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16991
Author:   ben2610
Date: 2008-10-09 08:20:16 +0200 (Thu, 09 Oct 2008)

Log Message:
---
Fix a crash on null pointer in previous commit.

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

Modified: trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp
===
--- trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp 2008-10-09 
06:06:11 UTC (rev 16990)
+++ trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp 2008-10-09 
06:20:16 UTC (rev 16991)
@@ -101,7 +101,6 @@
if (!frame)
return true;
bool result = false;
-   bool isplaying = (m_soundObject->GetPlaystate() != SND_STOPPED) ? true 
: false;
 
// do nothing on negative events, otherwise sounds are played twice!
bool bNegativeEvent = IsNegativeEvent();
@@ -111,6 +110,9 @@
if (!m_soundObject)
return false;
 
+   // actual audio device playing state
+   bool isplaying = (m_soundObject->GetPlaystate() != SND_STOPPED) ? true 
: false;
+
if (m_pino)
{
bNegativeEvent = true;


___
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 [16990] trunk/blender: BGE bug fix: fix several bugs and inconsistencies in sound actuator:

2008-10-08 Thread Benoit Bolsee
Revision: 16990
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16990
Author:   ben2610
Date: 2008-10-09 08:06:11 +0200 (Thu, 09 Oct 2008)

Log Message:
---
BGE bug fix: fix several bugs and inconsistencies in sound actuator:

- support stopping of loop sound
- support stopping by python
- keep state of actuator in sync with audio device. 
  The lack of state sync was causing several other problems:
  - actuator stop playing the sound
  - sound chopped before the end
  - not possible to pause sound
  

Modified Paths:
--
trunk/blender/intern/SoundSystem/intern/SND_Scene.cpp
trunk/blender/intern/SoundSystem/intern/SND_SoundObject.cpp
trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp

Modified: trunk/blender/intern/SoundSystem/intern/SND_Scene.cpp
===
--- trunk/blender/intern/SoundSystem/intern/SND_Scene.cpp   2008-10-09 
04:11:33 UTC (rev 16989)
+++ trunk/blender/intern/SoundSystem/intern/SND_Scene.cpp   2008-10-09 
06:06:11 UTC (rev 16990)
@@ -388,11 +388,18 @@
 #endif
 #ifdef USE_OPENAL
// ok, properties Set. now see if it must play
-   if (pObject->GetPlaystate() == SND_MUST_PLAY)
-   {
+   switch (pObject->GetPlaystate()){
+   case SND_MUST_PLAY:
m_audiodevice->PlayObject(id);
pObject->SetPlaystate(SND_PLAYING);
-   //break;
+   break;
+   case SND_MUST_STOP:
+   RemoveActiveObject(pObject);
+   break;
+   case SND_MUST_PAUSE:
+   m_audiodevice->PauseObject(id);
+   pObject->SetPlaystate(SND_PAUSED);
+   break;
}
 #endif
 

Modified: trunk/blender/intern/SoundSystem/intern/SND_SoundObject.cpp
===
--- trunk/blender/intern/SoundSystem/intern/SND_SoundObject.cpp 2008-10-09 
04:11:33 UTC (rev 16989)
+++ trunk/blender/intern/SoundSystem/intern/SND_SoundObject.cpp 2008-10-09 
06:06:11 UTC (rev 16990)
@@ -91,21 +91,24 @@
 
 void SND_SoundObject::StartSound()
 {
-   m_playstate = SND_MUST_PLAY;
+   if (m_id >= 0)
+   m_playstate = SND_MUST_PLAY;
 }
 
 
 
 void SND_SoundObject::StopSound()
 {
-   m_playstate = SND_MUST_STOP;
+   if (m_id >= 0)
+   m_playstate = SND_MUST_STOP;
 }
 
 
 
 void SND_SoundObject::PauseSound()
 {
-   m_playstate = SND_MUST_PAUSE;
+   if (m_id >= 0)
+   m_playstate = SND_MUST_PAUSE;
 }
 
 

Modified: trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp
===
--- trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp 2008-10-09 
04:11:33 UTC (rev 16989)
+++ trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp 2008-10-09 
06:06:11 UTC (rev 16990)
@@ -101,6 +101,7 @@
if (!frame)
return true;
bool result = false;
+   bool isplaying = (m_soundObject->GetPlaystate() != SND_STOPPED) ? true 
: false;
 
// do nothing on negative events, otherwise sounds are played twice!
bool bNegativeEvent = IsNegativeEvent();
@@ -119,30 +120,40 @@
if (bNegativeEvent)
{   
// here must be a check if it is still playing
-   m_isplaying = false;
-
-   switch (m_type)
+   if (m_isplaying && isplaying) 
{
-   case KX_SOUNDACT_PLAYSTOP:
-   case KX_SOUNDACT_LOOPSTOP:
-   case KX_SOUNDACT_LOOPBIDIRECTIONAL_STOP:
+   switch (m_type)
{
-   m_soundScene->RemoveActiveObject(m_soundObject);
+   case KX_SOUNDACT_PLAYSTOP:
+   case KX_SOUNDACT_LOOPSTOP:
+   case KX_SOUNDACT_LOOPBIDIRECTIONAL_STOP:
+   {
+   
m_soundScene->RemoveActiveObject(m_soundObject);
+   break;
+   }
+   case KX_SOUNDACT_PLAYEND:
+   {
+   
m_soundObject->SetPlaystate(SND_MUST_STOP_WHEN_FINISHED);
+   break;
+   }
+   case KX_SOUNDACT_LOOPEND:
+   case KX_SOUNDACT_LOOPBIDIRECTIONAL:
+   {
+   
m_soundObject->SetLoopMode(SND_LOOP_OFF);
+   
m_soundObject-

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16989] trunk/blender/source/blender/src/ sequence.c: This is patch [#17773] seq plugin crash -> use not converted to float with ibuf1 & ibuf2

2008-10-08 Thread Kent Mein
Revision: 16989
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16989
Author:   sirdude
Date: 2008-10-09 06:11:33 +0200 (Thu, 09 Oct 2008)

Log Message:
---
This is patch [#17773] seq plugin crash -> use not converted to float with 
ibuf1 & ibuf2

Submitted by Rob Hausauer (paprmh) 

See the link for details:
https://projects.blender.org/tracker/index.php?func=detail&aid=17773&group_id=9&atid=127

Kent

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

Modified: trunk/blender/source/blender/src/sequence.c
===
--- trunk/blender/source/blender/src/sequence.c 2008-10-09 01:15:54 UTC (rev 
16988)
+++ trunk/blender/source/blender/src/sequence.c 2008-10-09 04:11:33 UTC (rev 
16989)
@@ -803,13 +803,19 @@
if (!se2->ibuf->rect_float && se->ibuf->rect_float) {
IMB_float_from_rect(se2->ibuf);
}
-
+   if (!se3->ibuf->rect_float && se->ibuf->rect_float) {
+   IMB_float_from_rect(se3->ibuf);
+   }
+   
if (!se1->ibuf->rect && !se->ibuf->rect_float) {
IMB_rect_from_float(se1->ibuf);
}
if (!se2->ibuf->rect && !se->ibuf->rect_float) {
IMB_rect_from_float(se2->ibuf);
}
+   if (!se3->ibuf->rect && !se->ibuf->rect_float) {
+   IMB_rect_from_float(se3->ibuf);
+   }
 
sh.execute(seq, cfra, fac, facf, x, y, se1->ibuf, se2->ibuf, se3->ibuf,
   se->ibuf);
@@ -1731,9 +1737,10 @@
}
 
if(se->ibuf == 0) {
-   /* if one of two first inputs are rectfloat, output is 
float too */
+   /* if any inputs are rectfloat, output is float too */
if((se->se1 && se->se1->ibuf && 
se->se1->ibuf->rect_float) ||
-  (se->se2 && se->se2->ibuf && 
se->se2->ibuf->rect_float))
+  (se->se2 && se->se2->ibuf && 
se->se2->ibuf->rect_float) ||
+  (se->se3 && se->se3->ibuf && 
se->se3->ibuf->rect_float))
se->ibuf= IMB_allocImBuf((short)seqrectx, 
(short)seqrecty, 32, IB_rectfloat, 0);
else
se->ibuf= IMB_allocImBuf((short)seqrectx, 
(short)seqrecty, 32, IB_rect, 0);


___
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 [16988] branches/sim_physics/source/ blender/render/intern/source/pointdensity.c: * fix for silly bug in point density with no object in the object fi

2008-10-08 Thread Matt Ebb
Revision: 16988
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16988
Author:   broken
Date: 2008-10-09 03:15:54 +0200 (Thu, 09 Oct 2008)

Log Message:
---
* fix for silly bug in point density with no object in the object field

Modified Paths:
--
branches/sim_physics/source/blender/render/intern/source/pointdensity.c

Modified: 
branches/sim_physics/source/blender/render/intern/source/pointdensity.c
===
--- branches/sim_physics/source/blender/render/intern/source/pointdensity.c 
2008-10-08 23:42:00 UTC (rev 16987)
+++ branches/sim_physics/source/blender/render/intern/source/pointdensity.c 
2008-10-09 01:15:54 UTC (rev 16988)
@@ -168,10 +168,12 @@
Object *ob = pd->object;
int i;

+   if (!ob) return;
+   
for(psys=ob->particlesystem.first, i=0; i< pd->psysindex-1; i++)
psys= psys->next;

-   if (!ob || !psys) return;
+   if (!psys) return;

pointdensity_cache_psys(re, pd, ob, psys);
}


___
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 [16987] trunk/blender/source/blender: Grease Pencil:

2008-10-08 Thread Joshua Leung
Revision: 16987
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16987
Author:   aligorith
Date: 2008-10-09 01:42:00 +0200 (Thu, 09 Oct 2008)

Log Message:
---
Grease Pencil:

Added comments a few + stroke simplification code (hidden behind rt and 
userpref, adapted from theeth's etch-a-ton code). This shouldn't have any other 
adverse effects.

Modified Paths:
--
trunk/blender/source/blender/makesdna/DNA_userdef_types.h
trunk/blender/source/blender/src/gpencil.c
trunk/blender/source/blender/src/space.c

Modified: trunk/blender/source/blender/makesdna/DNA_userdef_types.h
===
--- trunk/blender/source/blender/makesdna/DNA_userdef_types.h   2008-10-08 
23:17:02 UTC (rev 16986)
+++ trunk/blender/source/blender/makesdna/DNA_userdef_types.h   2008-10-08 
23:42:00 UTC (rev 16987)
@@ -327,7 +327,8 @@
 /* tw_flag (transform widget) */
 
 /* gp_settings (Grease Pencil Settings) */
-#define GP_PAINT_DOSMOOTH  (1<<0)
+#define GP_PAINT_DOSMOOTH  (1<<0)
+#define GP_PAINT_DOSIMPLIFY(1<<1)
 
 
 #endif

Modified: trunk/blender/source/blender/src/gpencil.c
===
--- trunk/blender/source/blender/src/gpencil.c  2008-10-08 23:17:02 UTC (rev 
16986)
+++ trunk/blender/source/blender/src/gpencil.c  2008-10-08 23:42:00 UTC (rev 
16987)
@@ -1186,6 +1186,16 @@
float *fp= give_cursor();
float dvec[3];

+   /* Current method just converts each point in 
screen-coordinates to 
+* 3D-coordinates using the 3D-cursor as reference. In general, 
this 
+* works OK, but it could of course be improved.
+*
+* TODO:
+*  - investigate using nearest point(s) on a previous 
stroke as
+*reference point instead or as offset, for easier 
stroke matching
+*  - investigate projection onto geometry (ala retopo)
+*/
+   
/* method taken from editview.c - mouse_cursor() */
project_short_noclip(fp, mval);
window_to_3d(dvec, mval[0]-mx, mval[1]-my);
@@ -1203,8 +1213,7 @@
}

/* 2d - on image 'canvas' (assume that p->v2d is set) */
-   else if ( (gpd->sbuffer_sflag & GP_STROKE_2DIMAGE) && (p->v2d) ) 
-   {
+   else if ((gpd->sbuffer_sflag & GP_STROKE_2DIMAGE) && (p->v2d)) {
/* for now - space specific */
switch (p->sa->spacetype) {
case SPACE_SEQ: /* sequencer */
@@ -1285,7 +1294,7 @@
int i=0, cmx=gpd->sbuffer_size;

/* only smooth if smoothing is enabled, and we're not doing a straight 
line */
-   if ( !(U.gp_settings & GP_PAINT_DOSMOOTH) || GP_BUFFER2STROKE_ENDPOINTS)
+   if (!(U.gp_settings & GP_PAINT_DOSMOOTH) || GP_BUFFER2STROKE_ENDPOINTS)
return;

/* don't try if less than 2 points in buffer */
@@ -1305,7 +1314,78 @@
}
 }
 
+/* simplify a stroke (in buffer) before storing it 
+ * - applies a reverse Chaikin filter
+ * - code adapted from etch-a-ton branch (editarmature_sketch.c)
+ */
+static void gp_stroke_simplify (tGPsdata *p)
+{
+   bGPdata *gpd= p->gpd;
+   tGPspoint *old_points= (tGPspoint *)gpd->sbuffer;
+   short num_points= gpd->sbuffer_size;
+   short flag= gpd->sbuffer_sflag;
+   short i, j;
+   
+   /* only simplify if simlification is enabled, and we're not doing a 
straight line */
+   if (!(U.gp_settings & GP_PAINT_DOSIMPLIFY) || 
GP_BUFFER2STROKE_ENDPOINTS)
+   return;
+   
+   /* don't simplify if less than 4 points in buffer */
+   if ((num_points <= 2) || (old_points == NULL))
+   return;
+   
+   /* clear buffer (but don't free mem yet) so that we can write to it 
+*  - firstly set sbuffer to NULL, so a new one is allocated
+*  - secondly, reset flag after, as it gets cleared auto
+*/
+   gpd->sbuffer= NULL;
+   gp_session_validatebuffer(p);
+   gpd->sbuffer_sflag = flag;
+   
+/* macro used in loop to get position of new point
+ * - used due to the mixture of datatypes in use here
+ */
+#define GP_SIMPLIFY_AVPOINT(offs, sfac) \
+   { \
+   co[0] += (float)(old_points[offs].x * sfac); \
+   co[1] += (float)(old_points[offs].y * sfac); \
+   pressure += old_points[offs].pressure * sfac; \
+   }
+   
+   for (i = 0, j = 0; i < num_points; i++)
+   {
+   if (i - j == 3)
+   {
+   float co[2], pressure;
+   short mco[2];
+   
+   /* initialise values */
+   co[0]= 

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

2008-10-08 Thread Davide Vercelli
Revision: 16986
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16986
Author:   unclezeiv
Date: 2008-10-09 01:17:02 +0200 (Thu, 09 Oct 2008)

Log Message:
---
svn merge -r 16911:16985 
https://svn.blender.org/svnroot/bf-blender/trunk/blender

Modified Paths:
--
branches/soc-2008-unclezeiv/CMakeLists.txt
branches/soc-2008-unclezeiv/bin/.blender/locale/ar/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/bg/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/ca/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/cs/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/de/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/el/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/es/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/fi/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/fr/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/hr/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/it/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/ja/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/ko/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/nl/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/pl/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/pt_BR/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/ro/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/ru/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/sr/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/[EMAIL 
PROTECTED]/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/sv/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/uk/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/bin/.blender/locale/zh_CN/LC_MESSAGES/blender.mo
branches/soc-2008-unclezeiv/config/linux2-config.py
branches/soc-2008-unclezeiv/doc/blender-scons.txt
branches/soc-2008-unclezeiv/extern/ffmpeg/SConscript
branches/soc-2008-unclezeiv/intern/SoundSystem/sdl/SND_SDLCDDevice.cpp
branches/soc-2008-unclezeiv/intern/elbeem/intern/Makefile
branches/soc-2008-unclezeiv/po/ar.po
branches/soc-2008-unclezeiv/po/bg.po
branches/soc-2008-unclezeiv/po/ca.po
branches/soc-2008-unclezeiv/po/cs.po
branches/soc-2008-unclezeiv/po/de.po
branches/soc-2008-unclezeiv/po/el.po
branches/soc-2008-unclezeiv/po/es.po
branches/soc-2008-unclezeiv/po/fi.po
branches/soc-2008-unclezeiv/po/fr.po
branches/soc-2008-unclezeiv/po/hr.po
branches/soc-2008-unclezeiv/po/it.po
branches/soc-2008-unclezeiv/po/ja.po
branches/soc-2008-unclezeiv/po/ko.po
branches/soc-2008-unclezeiv/po/nl.po
branches/soc-2008-unclezeiv/po/pl.po
branches/soc-2008-unclezeiv/po/pt_BR.po
branches/soc-2008-unclezeiv/po/ro.po
branches/soc-2008-unclezeiv/po/ru.po
branches/soc-2008-unclezeiv/po/sr.po
branches/soc-2008-unclezeiv/po/[EMAIL PROTECTED]
branches/soc-2008-unclezeiv/po/sv.po
branches/soc-2008-unclezeiv/po/uk.po
branches/soc-2008-unclezeiv/po/zh_CN.po
branches/soc-2008-unclezeiv/release/scripts/bvh_import.py
branches/soc-2008-unclezeiv/release/scripts/export_dxf.py
branches/soc-2008-unclezeiv/release/scripts/vrml97_export.py
branches/soc-2008-unclezeiv/source/blender/blenkernel/BKE_displist.h
branches/soc-2008-unclezeiv/source/blender/blenkernel/BKE_writeffmpeg.h
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/curve.c
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/displist.c
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/exotic.c
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/idprop.c
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/image.c
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/library.c
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/modifier.c
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/multires.c

branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/particle_system.c
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/pointcache.c
branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/writeffmpeg.c
branches/soc-2008-unclezeiv/source/blender/blenlib/intern/util.c
branches/soc-2008-unclezeiv/source/blender/gpu/intern/gpu_codegen.c
branches/soc-2008-unclezeiv/source/blender/gpu/intern/gpu_material.c
branches/soc-2008-unclezeiv/source/blender/imbuf/intern/cineon/cineon_dpx.c
branches/soc-2008-unclezeiv/source/blender/imbuf/intern/cin

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16985] branches/soc-2008-unclezeiv/source /blender/render/intern/source/lightcuts.c: Refactored some redundant code for "multiple representatives"; a

2008-10-08 Thread Davide Vercelli
Revision: 16985
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16985
Author:   unclezeiv
Date: 2008-10-09 00:50:43 +0200 (Thu, 09 Oct 2008)

Log Message:
---
Refactored some redundant code for "multiple representatives"; also fixed a bug 
that would make "noisy" images brighter than the original ones.

Modified Paths:
--
branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c

Modified: 
branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c
===
--- branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c 
2008-10-08 20:54:19 UTC (rev 16984)
+++ branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c 
2008-10-08 22:50:43 UTC (rev 16985)
@@ -131,6 +131,7 @@
 {
LampRen *lar;
float intensity;
+   
 } ClusRep;
 
 /* node of the lightcuts tree */
@@ -141,15 +142,12 @@
int id; /* must be able to accommodate millions of lights */
int child1;
int child2;
-   float intensity;
float min[3];
float max[3];
-   float col[3];
/* cone_* variables only for oriented lights */
float cone_dir[3]; /* store normalized */
float cone_angle;
float luminance;
-   LampRen * lar;
short falloff_type, sphere;
float falloff_dist;
float sphere_dist;
@@ -368,25 +366,7 @@
/* if LA_SPOT, compute new bounding cone */
if (one->type == CLUSTER_SPOT)
dest->cone_angle= get_bounding_cone(one, two, dest->cone_dir);
-
-   if (lcd->options & LC_OPT_NO_RAND_CLS)
-   use_one_as_repr= one->luminance > two->luminance;
-   else
-   use_one_as_repr= BLI_frand() * (one->luminance + 
two->luminance) < one->luminance;

-   /* the representative light is chosen randomly among children */
-   if (use_one_as_repr) {
-   dest->lar= one->lar;
-   VECCOPY(dest->col, one->col);
-   rep= 0;
-   }
-   else {
-   dest->lar= two->lar;
-   VECCOPY(dest->col, two->col);
-   rep= 1;
-   }
-   dest->intensity= dest->luminance / INPR(lcd->colw, dest->col);
-   
/* worst case falloff type/dist for conservative error estimation */
dest->falloff_type= falloff_merge[one->falloff_type][two->falloff_type];
dest->falloff_dist= MAX2(one->falloff_dist, two->falloff_dist);
@@ -425,7 +405,7 @@
for (j= 0; j< one->mrep_len; j++) {
if (used[j])
continue;
-   lum= one->mrep_list[j].intensity;
+   lum= one->mrep_list[j].intensity * 
dest->luminance / one->luminance;
if (x <= lum) {
dest->mrep_list[i].lar= 
one->mrep_list[j].lar;
dest->mrep_list[i].intensity= lum;
@@ -444,7 +424,7 @@
for (j= 0; j< two->mrep_len; j++) {
if (used[one->mrep_len + j])
continue;
-   lum= two->mrep_list[j].intensity;
+   lum= two->mrep_list[j].intensity * 
dest->luminance / two->luminance;
if (x <= lum) {
dest->mrep_list[i].lar= 
two->mrep_list[j].lar;
dest->mrep_list[i].intensity= lum;
@@ -464,6 +444,27 @@
/* sort list and allocate list */
qsort(dest->mrep_list, dest->mrep_len, sizeof(ClusRep), 
cmp_clusrep);
}
+   else {
+   if (lcd->options & LC_OPT_NO_RAND_CLS)
+   use_one_as_repr= one->luminance > two->luminance;
+   else
+   use_one_as_repr= BLI_frand() * (one->luminance + 
two->luminance) < one->luminance;
+   
+   dest->mrep_list= MEM_callocN(sizeof(ClusRep), "lc mrep single");
+   dest->mrep_len= 1;
+   
+   /* the representative light is chosen randomly among children */
+   if (use_one_as_repr) {
+   dest->mrep_list[0].lar= one->mrep_list[0].lar;
+   dest->mrep_intensity= dest->mrep_list[0].intensity= 
dest->luminance / one->mrep_list[0].lar->energy;
+   rep= 0;
+   }
+   else {
+   dest->mrep_list[0].lar= two->mrep_list[0].lar;
+   dest->mrep_intensity= dest->mrep_list[0].intensity= 
dest->luminance / two->mrep_list[0].lar->energy;
+   rep= 1;
+   }
+   }
 
(*root)++;

@@ -538,7 +539,7 @@
 #ifde

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16984] branches/etch-a-ton/source/blender /src/editarmature_sketch.c: Sketching snapping.

2008-10-08 Thread Martin Poirier
Revision: 16984
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16984
Author:   theeth
Date: 2008-10-08 22:54:19 +0200 (Wed, 08 Oct 2008)

Log Message:
---
Sketching snapping.

Hold Ctrl to snap to an exact point (black dots). Continuous strokes are 
extrapolated between the depth difference of both end points when snapping.

Modified Paths:
--
branches/etch-a-ton/source/blender/src/editarmature_sketch.c

Modified: branches/etch-a-ton/source/blender/src/editarmature_sketch.c
===
--- branches/etch-a-ton/source/blender/src/editarmature_sketch.c
2008-10-08 19:58:57 UTC (rev 16983)
+++ branches/etch-a-ton/source/blender/src/editarmature_sketch.c
2008-10-08 20:54:19 UTC (rev 16984)
@@ -26,11 +26,13 @@
 
 #include "DNA_listBase.h"
 #include "DNA_scene_types.h"
+#include "DNA_view3d_types.h"
 
 #include "BLI_blenlib.h"
 #include "BLI_arithb.h"
 
 #include "BKE_utildefines.h"
+#include "BKE_global.h"
 
 #include "BSE_view.h"
 
@@ -80,8 +82,27 @@
 
 SK_Sketch *GLOBAL_sketch = NULL;
 
+/ PROTOTYPES **/
+
+void sk_freeStroke(SK_Stroke *stk);
+void sk_freeSketch(SK_Sketch *sketch);
+
 /**/
 
+void sk_freeSketch(SK_Sketch *sketch)
+{
+   SK_Stroke *stk, *next;
+   
+   for (stk = sketch->strokes.first; stk; stk = next)
+   {
+   next = stk->next;
+   
+   sk_freeStroke(stk);
+   }
+   
+   MEM_freeN(sketch);
+}
+
 SK_Sketch* sk_createSketch()
 {
SK_Sketch *sketch;
@@ -101,6 +122,12 @@
stk->points = MEM_callocN(sizeof(SK_Point) * stk->buf_size, "SK_Point 
buffer");
 }
 
+void sk_freeStroke(SK_Stroke *stk)
+{
+   MEM_freeN(stk->points);
+   MEM_freeN(stk);
+}
+
 SK_Stroke* sk_createStroke()
 {
SK_Stroke *stk;
@@ -251,18 +278,65 @@
 
glEnd();
 
-   glColor3f(1, 1, 1);
-   glBegin(GL_POINTS);
+// glColor3f(1, 1, 1);
+// glBegin(GL_POINTS);
+//
+// for (i = 0; i < stk->nb_points; i++)
+// {
+// if (stk->points[i].type == PT_CONTINUOUS)
+// {
+// glVertex3fv(stk->points[i].p);
+// }
+// }
+//
+// glEnd();
+}
 
+SK_Point *sk_snapPointStroke(SK_Stroke *stk, short mval[2], int *dist)
+{
+   SK_Point *pt = NULL;
+   int i;
+   
for (i = 0; i < stk->nb_points; i++)
{
-   if (stk->points[i].type == PT_CONTINUOUS)
+   if (stk->points[i].type == PT_EXACT)
{
-   glVertex3fv(stk->points[i].p);
+   short pval[2];
+   int pdist;
+   
+   project_short_noclip(stk->points[i].p, pval);
+   
+   pdist = ABS(pval[0] - mval[0]) + ABS(pval[1] - mval[1]);
+   
+   if (pdist < *dist)
+   {
+   *dist = pdist;
+   pt = stk->points + i;
+   }
}
}
+   
+   return pt;
+}
 
-   glEnd();
+
+SK_Point *sk_snapPoint(SK_Sketch *sketch, short mval[2], int min_dist)
+{
+   SK_Point *pt = NULL;
+   SK_Stroke *stk;
+   int dist = min_dist;
+   
+   for (stk = sketch->strokes.first; stk; stk = stk->next)
+   {
+   SK_Point *spt = sk_snapPointStroke(stk, mval, &dist);
+   
+   if (spt != NULL)
+   {
+   pt = spt;
+   }
+   }
+   
+   return pt;
 }
 
 void sk_startStroke(SK_Sketch *sketch)
@@ -293,28 +367,103 @@
VECCOPY(fp, last->p);
}

+   initgrabz(fp[0], fp[1], fp[2]);
+   
/* method taken from editview.c - mouse_cursor() */
project_short_noclip(fp, cval);
window_to_3d(dvec, cval[0] - dd->mval[0], cval[1] - dd->mval[1]);
VecSubf(vec, fp, dvec);
 }
 
-void sk_addStrokePoint(SK_Stroke *stk, SK_DrawData *dd)
+void sk_updateDrawData(SK_DrawData *dd)
 {
+   dd->type = PT_CONTINUOUS;
+   
+   dd->previous_mval[0] = dd->mval[0];
+   dd->previous_mval[1] = dd->mval[1];
+}
+
+float sk_distanceDepth(float p1[3], float p2[3])
+{
+   float vec[3];
+   float distance;
+   
+   VecSubf(vec, p1, p2);
+   
+   Projf(vec, vec, G.vd->viewinv[2]);
+   
+   distance = VecLength(vec);
+   
+   if (Inpf(G.vd->viewinv[2], vec) > 0)
+   {
+   distance *= -1;
+   }
+   
+   return distance; 
+}
+
+void sk_addStrokeSnapPoint(SK_Stroke *stk, SK_DrawData *dd, SK_Point *snap_pt)
+{
SK_Point pt;
+   float distance;
+   float length;
+   int i, j, total;

-   pt.type =

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16983] trunk/blender/source/creator/ CMakeLists.txt: Patch #7065, from Stephane SOPPERA, part two: improvements when using

2008-10-08 Thread Chris Want
Revision: 16983
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16983
Author:   hos
Date: 2008-10-08 21:58:57 +0200 (Wed, 08 Oct 2008)

Log Message:
---
Patch #7065, from Stephane SOPPERA, part two: improvements when using
the commandline 'nmake' to build blender on windows -- please test!

Modified Paths:
--
trunk/blender/source/creator/CMakeLists.txt

Modified: trunk/blender/source/creator/CMakeLists.txt
===
--- trunk/blender/source/creator/CMakeLists.txt 2008-10-08 19:56:41 UTC (rev 
16982)
+++ trunk/blender/source/creator/CMakeLists.txt 2008-10-08 19:58:57 UTC (rev 
16983)
@@ -133,16 +133,16 @@
   ADD_CUSTOM_COMMAND(TARGET blender
 POST_BUILD
 MAIN_DEPENDENCY blender
-COMMAND if not exist \"$\(TargetDir\)\\.blender\" mkdir 
\"$\(TargetDir\)\\.blender\"
-COMMAND if not exist \"$\(TargetDir\)\\.blender\\locale\" mkdir 
\"$\(TargetDir\)\\.blender\\locale\"
-COMMAND if not exist \"$\(TargetDir\)\\.blender\\scripts\" mkdir 
\"$\(TargetDir\)\\.blender\\scripts\"
-COMMAND if not exist \"$\(TargetDir\)\\plugins\" mkdir 
\"$\(TargetDir\)\\plugins\"
-COMMAND copy /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\.Blanguages\" 
\"$\(TargetDir\)\\.blender\\\"
-COMMAND copy /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\.bfont.ttf\" 
\"$\(TargetDir\)\\.blender\\\"
-COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\locale\\*.*\" 
\"$\(TargetDir\)\\.blender\\locale\"
-COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\scripts\\*.*\" 
\"$\(TargetDir\)\\.blender\\scripts\"
-COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\plugins\\*.*\" 
\"$\(TargetDir\)\\plugins\"
-COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\text\\*.*\" 
\"$\(TargetDir\)\"
+COMMAND if not exist \"${TARGETDIR}\\.blender\" mkdir 
\"${TARGETDIR}\\.blender\"
+COMMAND if not exist \"${TARGETDIR}\\.blender\\locale\" mkdir 
\"${TARGETDIR}\\.blender\\locale\"
+COMMAND if not exist \"${TARGETDIR}\\.blender\\scripts\" mkdir 
\"${TARGETDIR}\\.blender\\scripts\"
+COMMAND if not exist \"${TARGETDIR}\\plugins\" mkdir 
\"${TARGETDIR}\\plugins\"
+COMMAND copy /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\.Blanguages\" 
\"${TARGETDIR}\\.blender\\\" 
+COMMAND copy /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\.bfont.ttf\" 
\"${TARGETDIR}\\.blender\\\"
+COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\bin\\.blender\\locale\\*.*\" 
\"${TARGETDIR}\\.blender\\locale\"
+COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\scripts\\*.*\" 
\"${TARGETDIR}\\.blender\\scripts\"
+COMMAND xcopy /E /Y \"${WIN_SOURCE_DIR}\\release\\plugins\\*.*\" 
\"${TARGETDIR}\\plugins\"
+COMMAND copy /Y \"${WIN_SOURCE_DIR}\\release\\text\\*.*\" \"${TARGETDIR}\"
   )
   
   FILE(TO_NATIVE_PATH "${LIBDIR}" WIN_LIBDIR)
@@ -150,22 +150,20 @@
   ADD_CUSTOM_COMMAND(TARGET blender
 POST_BUILD
 MAIN_DEPENDENCY blender
-COMMAND copy /Y \"${WIN_LIBDIR}\\gettext\\lib\\gnu_gettext.dll\" 
\"$\(TargetDir\)\\\"
-COMMAND copy /Y \"${WIN_LIBDIR}\\png\\lib\\libpng.dll\" 
\"$\(TargetDir\)\\\"
-COMMAND copy /Y \"${WIN_LIBDIR}\\sdl\\lib\\SDL.dll\" \"$\(TargetDir\)\\\"
-COMMAND copy /Y \"${WIN_LIBDIR}\\zlib\\lib\\zlib.dll\" \"$\(TargetDir\)\\\"
-COMMAND copy /Y \"${WIN_LIBDIR}\\tiff\\lib\\libtiff.dll\" 
\"$\(TargetDir\)\\\"
-COMMAND if $\(ConfigurationName\)==Debug copy /Y 
\"${WIN_LIBDIR}\\python\\lib\\python25_D.dll\" \"$\(TargetDir\)\\\"
-COMMAND if $\(ConfigurationName\)==Debug copy /Y 
\"${WIN_LIBDIR}\\CRTL\\lib\\msvcrtd.dll\" \"$\(TargetDir\)\\\"
-COMMAND if NOT $\(ConfigurationName\)==Debug copy /Y 
\"${WIN_LIBDIR}\\python\\lib\\python25.dll\" \"$\(TargetDir\)\\\"
-COMMAND copy /Y \"${WIN_LIBDIR}\\pthreads\\lib\\pthreadVC2.dll\" 
\"$\(TargetDir\)\\\"
+COMMAND copy /Y \"${WIN_LIBDIR}\\gettext\\lib\\gnu_gettext.dll\" 
\"${TARGETDIR}\\\"
+COMMAND copy /Y \"${WIN_LIBDIR}\\png\\lib\\libpng.dll\" \"${TARGETDIR}\\\"
+COMMAND copy /Y \"${WIN_LIBDIR}\\sdl\\lib\\SDL.dll\" \"${TARGETDIR}\\\"
+COMMAND copy /Y \"${WIN_LIBDIR}\\zlib\\lib\\zlib.dll\" \"${TARGETDIR}\\\"
+COMMAND copy /Y \"${WIN_LIBDIR}\\tiff\\lib\\libtiff.dll\" 
\"${TARGETDIR}\\\"
+COMMAND copy /Y \"${WIN_LIBDIR}\\python\\lib\\python25.dll\" 
\"${TARGETDIR}\\\"
+COMMAND copy /Y \"${WIN_LIBDIR}\\pthreads\\lib\\pthreadVC2.dll\" 
\"${TARGETDIR}\\\"
   )
 
   IF(WITH_INTERNATIONAL)
 ADD_CUSTOM_COMMAND(TARGET blender
   POST_BUILD
   MAIN_DEPENDENCY blender
-  COMMAND copy /Y \"${WIN_LIBDIR}\\iconv\\lib\\iconv.dll\" 
\"$\(TargetDir\)\\\"
+  COMMAND copy /Y \"${WIN_LIBDIR}\\iconv\\lib\\iconv.dll\" 
\"${TARGETDIR}\\\"
 )
   ENDIF(WITH_INTERNATIONAL)
 
@@ -173,16 +171,16 @@
 ADD_CUSTOM_COMMAND(TARGET blender
   POST_BUILD
   MAIN_DEPENDENCY blender
-  COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\avcodec-51.dll\" 
\"$\(TargetDir\)\\\"
-  COMMAND copy /Y \"${WIN_

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16982] trunk/blender/source/creator/ CMakeLists.txt: Patch #7065, from Stephane SOPPERA, part one: define macro WITH_OPENEXR

2008-10-08 Thread Chris Want
Revision: 16982
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16982
Author:   hos
Date: 2008-10-08 21:56:41 +0200 (Wed, 08 Oct 2008)

Log Message:
---
Patch #7065, from Stephane SOPPERA, part one: define macro WITH_OPENEXR
when the sources are configured with OpenEXR support.

Modified Paths:
--
trunk/blender/source/creator/CMakeLists.txt

Modified: trunk/blender/source/creator/CMakeLists.txt
===
--- trunk/blender/source/creator/CMakeLists.txt 2008-10-08 19:15:19 UTC (rev 
16981)
+++ trunk/blender/source/creator/CMakeLists.txt 2008-10-08 19:56:41 UTC (rev 
16982)
@@ -49,6 +49,10 @@
   ADD_DEFINITIONS(-DWITH_QUICKTIME)
 ENDIF(WITH_QUICKTIME)
 
+IF(WITH_OPENEXR)
+  ADD_DEFINITIONS(-DWITH_OPENEXR)
+ENDIF(WITH_OPENEXR)
+
 IF(LINUX)
   ADD_DEFINITIONS(-DWITH_BINRELOC)
   INCLUDE_DIRECTORIES(${BINRELOC_INC})


___
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 [16981] trunk/blender/source/blender/src/ playanim.c: Fixing typo in last commit

2008-10-08 Thread Daniel Genrich
Revision: 16981
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16981
Author:   genscher
Date: 2008-10-08 21:15:19 +0200 (Wed, 08 Oct 2008)

Log Message:
---
Fixing typo in last commit

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

Modified: trunk/blender/source/blender/src/playanim.c
===
--- trunk/blender/source/blender/src/playanim.c 2008-10-08 18:35:41 UTC (rev 
16980)
+++ trunk/blender/source/blender/src/playanim.c 2008-10-08 19:15:19 UTC (rev 
16981)
@@ -196,7 +196,7 @@
imb_freerectfloatImBuf(ibuf);
}
if (ibuf->rect==NULL)
-   break;
+   return;
 
glRasterPos2f(0.0f, 0.0f);
 


___
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 [16980] trunk/blender/source/blender: Bugfix #17784

2008-10-08 Thread Ton Roosendaal
Revision: 16980
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16980
Author:   ton
Date: 2008-10-08 20:35:41 +0200 (Wed, 08 Oct 2008)

Log Message:
---
Bugfix #17784

Playanim now works for:

- tiff, cineon, dpx, hdr, exr

Only multilayer not, that's too much for a bugfix. Multilayer is a totally
different image format, handled separately.

ALso removed redundant printing for dpx/cineon.
And fixed crash in cineon when G.scene doesnt exist. Bad bad, should
not be there!

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/multires.c
trunk/blender/source/blender/imbuf/intern/cineon/cineon_dpx.c
trunk/blender/source/blender/imbuf/intern/cineon/cineonlib.c
trunk/blender/source/blender/imbuf/intern/cineon/dpxlib.c
trunk/blender/source/blender/src/playanim.c

Modified: trunk/blender/source/blender/blenkernel/intern/multires.c
===
--- trunk/blender/source/blender/blenkernel/intern/multires.c   2008-10-08 
18:15:19 UTC (rev 16979)
+++ trunk/blender/source/blender/blenkernel/intern/multires.c   2008-10-08 
18:35:41 UTC (rev 16980)
@@ -642,6 +642,10 @@
MultiApplyData data;
int i, j;
 
+   /* XXX added this to prevent crash, but if it works? (ton) */
+   if(me->mr->verts==NULL)
+   return;
+   
/* Prepare deltas */
pr_deltas= MEM_callocN(sizeof(vec3f)*last_lvl->totvert, "multires 
deltas 1");
cr_deltas= MEM_callocN(sizeof(vec3f)*last_lvl->totvert, "multires 
deltas 2");

Modified: trunk/blender/source/blender/imbuf/intern/cineon/cineon_dpx.c
===
--- trunk/blender/source/blender/imbuf/intern/cineon/cineon_dpx.c   
2008-10-08 18:15:19 UTC (rev 16979)
+++ trunk/blender/source/blender/imbuf/intern/cineon/cineon_dpx.c   
2008-10-08 18:35:41 UTC (rev 16980)
@@ -48,10 +48,10 @@
 
 static void cineon_conversion_parameters(LogImageByteConversionParameters 
*params)
 {
-   params->blackPoint = G.scene->r.cineonblack;
-   params->whitePoint = G.scene->r.cineonwhite;
-   params->gamma = G.scene->r.cineongamma;
-   params->doLogarithm = G.scene->r.subimtype & R_CINEON_LOG;
+   params->blackPoint = G.scene?G.scene->r.cineonblack:95;
+   params->whitePoint = G.scene?G.scene->r.cineonwhite:685;
+   params->gamma = G.scene?G.scene->r.cineongamma:1.7f;
+   params->doLogarithm = G.scene?G.scene->r.subimtype & R_CINEON_LOG:0;
 }
 
 static struct ImBuf *imb_load_dpx_cineon(unsigned char *mem, int use_cineon, 
int size, int flags)

Modified: trunk/blender/source/blender/imbuf/intern/cineon/cineonlib.c
===
--- trunk/blender/source/blender/imbuf/intern/cineon/cineonlib.c
2008-10-08 18:15:19 UTC (rev 16979)
+++ trunk/blender/source/blender/imbuf/intern/cineon/cineonlib.c
2008-10-08 18:35:41 UTC (rev 16980)
@@ -617,7 +617,7 @@

cineon->file = 0;
cineon->reading = 1;
-   verbose = 1;
+   verbose = 0;
if (size < sizeof(CineonGenericHeader)) {
if (verbose) d_printf("Not enough data for header!\n");
cineonClose(cineon);

Modified: trunk/blender/source/blender/imbuf/intern/cineon/dpxlib.c
===
--- trunk/blender/source/blender/imbuf/intern/cineon/dpxlib.c   2008-10-08 
18:15:19 UTC (rev 16979)
+++ trunk/blender/source/blender/imbuf/intern/cineon/dpxlib.c   2008-10-08 
18:35:41 UTC (rev 16980)
@@ -199,7 +199,7 @@
 #endif
 }
 
-static int verbose = 1;
+static int verbose = 0;
 void
 dpxSetVerbose(int verbosity) {
verbose = verbosity;

Modified: trunk/blender/source/blender/src/playanim.c
===
--- trunk/blender/source/blender/src/playanim.c 2008-10-08 18:15:19 UTC (rev 
16979)
+++ trunk/blender/source/blender/src/playanim.c 2008-10-08 18:35:41 UTC (rev 
16980)
@@ -191,6 +191,12 @@
printf("no ibuf !\n");
return;
}
+   if (ibuf->rect==NULL && ibuf->rect_float) {
+   IMB_rect_from_float(ibuf);
+   imb_freerectfloatImBuf(ibuf);
+   }
+   if (ibuf->rect==NULL)
+   break;
 
glRasterPos2f(0.0f, 0.0f);
 


___
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 [16979] trunk/blender/source/creator/ creator.c: Bugfix #17784

2008-10-08 Thread Ton Roosendaal
Revision: 16979
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16979
Author:   ton
Date: 2008-10-08 20:15:19 +0200 (Wed, 08 Oct 2008)

Log Message:
---
Bugfix #17784

libtiff init was missing on "Play anim", causing it to not read tiffs.

Modified Paths:
--
trunk/blender/source/creator/creator.c

Modified: trunk/blender/source/creator/creator.c
===
--- trunk/blender/source/creator/creator.c  2008-10-08 18:07:56 UTC (rev 
16978)
+++ trunk/blender/source/creator/creator.c  2008-10-08 18:15:19 UTC (rev 
16979)
@@ -379,6 +379,10 @@
else if(argv[a][0] == '-') {
switch(argv[a][1]) {
case 'a': /* -b was not given, play an animation */
+   
+   /* exception here, see below, it probably needs 
happens after qt init? */
+   libtiff_init();
+
playanim(argc-1, argv+1);
exit(0);
break;


___
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 [16978] branches/blender2.5/blender/source /blender/editors: 2.5 Branch: use themes for drawing the time space, and make

2008-10-08 Thread Brecht Van Lommel
Revision: 16978
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16978
Author:   blendix
Date: 2008-10-08 20:07:56 +0200 (Wed, 08 Oct 2008)

Log Message:
---
2.5 Branch: use themes for drawing the time space, and make
view2d grid code a bit nicer.

Modified Paths:
--
branches/blender2.5/blender/source/blender/editors/include/BIF_view2d.h
branches/blender2.5/blender/source/blender/editors/interface/view2d.c
branches/blender2.5/blender/source/blender/editors/screen/area.c
branches/blender2.5/blender/source/blender/editors/space_time/space_time.c

Modified: 
branches/blender2.5/blender/source/blender/editors/include/BIF_view2d.h
===
--- branches/blender2.5/blender/source/blender/editors/include/BIF_view2d.h 
2008-10-08 17:34:26 UTC (rev 16977)
+++ branches/blender2.5/blender/source/blender/editors/include/BIF_view2d.h 
2008-10-08 18:07:56 UTC (rev 16978)
@@ -46,13 +46,18 @@
 #define V2D_VERTICAL_AXIS  8
 
 struct View2D;
+struct View2DGrid;
 struct bContext;
 
+typedef struct View2DGrid View2DGrid;
+
+/* opengl drawing setup */
 void BIF_view2d_ortho(const struct bContext *C, struct View2D *v2d);
 
 /* grid drawing */
-void BIF_view2d_calc_grid(const struct bContext *C, struct View2D *v2d, int 
unit, int type, int winx, int winy);
-void BIF_view2d_draw_grid(const struct bContext *C, struct View2D *v2d, int 
flag);
+View2DGrid *BIF_view2d_calc_grid(const struct bContext *C, struct View2D *v2d, 
int unit, int type, int winx, int winy);
+void BIF_view2d_draw_grid(const struct bContext *C, struct View2D *v2d, 
View2DGrid *grid, int flag);
+void BIF_view2d_free_grid(View2DGrid *grid);
 
 /* coordinate conversion */
 void BIF_view2d_region_to_view(struct View2D *v2d, short x, short y, float 
*viewx, float *viewy);

Modified: branches/blender2.5/blender/source/blender/editors/interface/view2d.c
===
--- branches/blender2.5/blender/source/blender/editors/interface/view2d.c   
2008-10-08 17:34:26 UTC (rev 16977)
+++ branches/blender2.5/blender/source/blender/editors/interface/view2d.c   
2008-10-08 18:07:56 UTC (rev 16978)
@@ -1,6 +1,8 @@
 
 #include 
 
+#include "MEM_guardedalloc.h"
+
 #include "DNA_scene_types.h"
 #include "DNA_screen_types.h"
 #include "DNA_space_types.h"
@@ -17,16 +19,20 @@
 /* minimum pixels per gridstep */
 #define IPOSTEP 35
 
-static float ipogrid_dx, ipogrid_dy, ipogrid_startx, ipogrid_starty;
-static int ipomachtx, ipomachty;
+struct View2DGrid {
+   float dx, dy, startx, starty;
+   int machtx, machty;
+};
 
-static int vertymin, vertymax, horxmin, horxmax;/* globals to test 
LEFTMOUSE for scrollbar */
+/* OpenGL setup */
 
 void BIF_view2d_ortho(const bContext *C, View2D *v2d)
 {
wmOrtho2(C->window, v2d->cur.xmin, v2d->cur.xmax, v2d->cur.ymin, 
v2d->cur.ymax);
 }
 
+/* Grid */
+
 static void step_to_grid(float *step, int *macht, int unit)
 {
float loga, rem;
@@ -65,11 +71,14 @@
}
 }
 
-void BIF_view2d_calc_grid(const bContext *C, View2D *v2d, int unit, int clamp, 
int winx, int winy)
+View2DGrid *BIF_view2d_calc_grid(const bContext *C, View2D *v2d, int unit, int 
clamp, int winx, int winy)
 {
+   View2DGrid *grid;
float space, pixels, seconddiv;
int secondgrid;
 
+   grid= MEM_callocN(sizeof(View2DGrid), "View2DGrid");
+
/* rule: gridstep is minimal IPOSTEP pixels */
/* how large is IPOSTEP pixels? */

@@ -85,42 +94,44 @@
space= v2d->cur.xmax - v2d->cur.xmin;
pixels= v2d->mask.xmax - v2d->mask.xmin;

-   ipogrid_dx= IPOSTEP*space/(seconddiv*pixels);
-   step_to_grid(&ipogrid_dx, &ipomachtx, unit);
-   ipogrid_dx*= seconddiv;
+   grid->dx= IPOSTEP*space/(seconddiv*pixels);
+   step_to_grid(&grid->dx, &grid->machtx, unit);
+   grid->dx*= seconddiv;

if(clamp == V2D_GRID_CLAMP) {
-   if(ipogrid_dx < 0.1) ipogrid_dx= 0.1;
-   ipomachtx-= 2;
-   if(ipomachtx<-2) ipomachtx= -2;
+   if(grid->dx < 0.1) grid->dx= 0.1;
+   grid->machtx-= 2;
+   if(grid->machtx<-2) grid->machtx= -2;
}

space= (v2d->cur.ymax - v2d->cur.ymin);
pixels= winy;
-   ipogrid_dy= IPOSTEP*space/pixels;
-   step_to_grid(&ipogrid_dy, &ipomachty, unit);
+   grid->dy= IPOSTEP*space/pixels;
+   step_to_grid(&grid->dy, &grid->machty, unit);

if(clamp == V2D_GRID_CLAMP) {
-   if(ipogrid_dy < 1.0) ipogrid_dy= 1.0;
-   if(ipomachty<1) ipomachty= 1;
+   if(grid->dy < 1.0) grid->dy= 1.0;
+   if(grid->machty<1) grid->machty= 1;
}

-   ipogrid_startx= seconddiv*(v2d->cur.xmin/seconddiv - 
fmod(v2d->cur.xmin/seconddiv, ipogrid_dx/seconddiv));
-   if(

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16977] trunk/blender/source/blender/src/ buttons_editing.c: Bugfix #17785

2008-10-08 Thread Ton Roosendaal
Revision: 16977
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16977
Author:   ton
Date: 2008-10-08 19:34:26 +0200 (Wed, 08 Oct 2008)

Log Message:
---
Bugfix #17785

Fixed tooltip for "double sided" so it clearly denotes it's about light. :)

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-10-08 17:07:32 UTC 
(rev 16976)
+++ trunk/blender/source/blender/src/buttons_editing.c  2008-10-08 17:34:26 UTC 
(rev 16977)
@@ -884,7 +884,7 @@
uiBlockEndAlign(block);
 
uiBlockBeginAlign(block);
-   uiDefButBitS(block, TOG, ME_TWOSIDED, REDRAWVIEW3D, "Double Sided", 
10,30,170,19, &me->flag, 0, 0, 0, 0, "Render/display the mesh as double or 
single sided");
+   uiDefButBitS(block, TOG, ME_TWOSIDED, REDRAWVIEW3D, "Double Sided", 
10,30,170,19, &me->flag, 0, 0, 0, 0, "Render/display the mesh with double or 
single sided lighting");
uiDefButBitS(block, TOG, ME_NOPUNOFLIP, REDRAWVIEW3D, "No V.Normal 
Flip", 10,10,170,19, &me->flag, 0, 0, 0, 0, "Disables flipping of vertexnormals 
during render");
uiBlockEndAlign(block);
 


___
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 [16976] trunk/blender/release/scripts/ bvh_import.py: own error, bvh import would always miss the last frame.

2008-10-08 Thread Campbell Barton
Revision: 16976
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16976
Author:   campbellbarton
Date: 2008-10-08 19:07:32 +0200 (Wed, 08 Oct 2008)

Log Message:
---
own error, bvh import would always miss the last frame.
thanks ppClarity for picking up on this.

Modified Paths:
--
trunk/blender/release/scripts/bvh_import.py

Modified: trunk/blender/release/scripts/bvh_import.py
===
--- trunk/blender/release/scripts/bvh_import.py 2008-10-08 16:50:06 UTC (rev 
16975)
+++ trunk/blender/release/scripts/bvh_import.py 2008-10-08 17:07:32 UTC (rev 
16976)
@@ -231,7 +231,7 @@

bvh_nodes_list= bvh_nodes.values()

-   while lineIdx < len(file_lines) -1:
+   while lineIdx < len(file_lines):
line= file_lines[lineIdx]
for bvh_node in bvh_nodes_list:
#for bvh_node in bvh_nodes_serial:
@@ -726,7 +726,7 @@
Blender.Window.WaitCursor(1)
# Get the BVH data and act on it.
t1= Blender.sys.time()
-   print '\tpassing bvh...',
+   print '\tparsing bvh...',
bvh_nodes= read_bvh(file, IMPORT_SCALE)
print '%.4f' % (Blender.sys.time()-t1)
t1= Blender.sys.time()


___
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 [16975] trunk/blender/source/blender/ blenkernel/intern/image.c: Bugfix #17778

2008-10-08 Thread Ton Roosendaal
Revision: 16975
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16975
Author:   ton
Date: 2008-10-08 18:50:06 +0200 (Wed, 08 Oct 2008)

Log Message:
---
Bugfix #17778

COmpositor: Multilayer images in Image input node could crash on 
making icon previews for the browse menu.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/image.c

Modified: trunk/blender/source/blender/blenkernel/intern/image.c
===
--- trunk/blender/source/blender/blenkernel/intern/image.c  2008-10-08 
16:37:33 UTC (rev 16974)
+++ trunk/blender/source/blender/blenkernel/intern/image.c  2008-10-08 
16:50:06 UTC (rev 16975)
@@ -1571,7 +1571,7 @@
ibuf->channels= rpass->channels;

image_initialize_after_load(ima, ibuf);
-   image_assign_ibuf(ima, ibuf, iuser->multi_index, frame);
+   image_assign_ibuf(ima, ibuf, 
iuser?iuser->multi_index:0, frame);

}
// else printf("pass not found\n");


___
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 [16974] trunk/blender/source/blender/ python/api2_2x: Python API

2008-10-08 Thread Ken Hughes
Revision: 16974
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16974
Author:   khughes
Date: 2008-10-08 18:37:33 +0200 (Wed, 08 Oct 2008)

Log Message:
---
Python API
--
Add optional string argument to Object.newParticleSystem() method, so that
objects can link to existing particle systems (if the name of the particle
system is known).  Also cleans up some code in Object.c which accesses the
particle sys listbase.

Modified Paths:
--
trunk/blender/source/blender/python/api2_2x/Object.c
trunk/blender/source/blender/python/api2_2x/Particle.c
trunk/blender/source/blender/python/api2_2x/doc/Object.py

Modified: trunk/blender/source/blender/python/api2_2x/Object.c
===
--- trunk/blender/source/blender/python/api2_2x/Object.c2008-10-08 
16:29:09 UTC (rev 16973)
+++ trunk/blender/source/blender/python/api2_2x/Object.c2008-10-08 
16:37:33 UTC (rev 16974)
@@ -342,9 +342,8 @@
 static int setupPI(Object* ob);
 
 static PyObject *Object_getParticleSys( BPy_Object * self );
-/* fixme Object_newParticleSys( self, default-partsys-name ) */
 static PyObject *Object_addVertexGroupsFromArmature( BPy_Object * self, 
PyObject * args);
-static PyObject *Object_newParticleSys( BPy_Object * self );
+static PyObject *Object_newParticleSys( BPy_Object * self, PyObject * args );
 static PyObject *Object_buildParts( BPy_Object * self );
 static PyObject *Object_clearIpo( BPy_Object * self );
 static PyObject *Object_clrParent( BPy_Object * self, PyObject * args );
@@ -478,7 +477,7 @@
/* name, method, flags, doc */
{"getParticleSystems", ( PyCFunction ) Object_getParticleSys, 
METH_NOARGS,
 "Return a list of particle systems"},
-   {"newParticleSystem", ( PyCFunction ) Object_newParticleSys, 
METH_NOARGS,
+   {"newParticleSystem", ( PyCFunction ) Object_newParticleSys, 
METH_VARARGS,
 "Create and link a new particle system"},
{"addVertexGroupsFromArmature" , ( PyCFunction ) 
Object_addVertexGroupsFromArmature, METH_VARARGS,
 "Add vertex groups from armature using the bone heat method"},
@@ -1044,43 +1043,49 @@
 /*/
 
 PyObject *Object_getParticleSys( BPy_Object * self ){
-   ParticleSystem *blparticlesys = 0;
+   PyObject *list;
+   ParticleSystem *psys= NULL;
Object *ob = self->object;
-   PyObject *partsyslist,*current;
+   int i= 0;
 
-   blparticlesys = ob->particlesystem.first;
+   list = PyList_New( BLI_countlist( &ob->particlesystem ) );
+   if( !list )
+   return EXPP_ReturnPyObjError( PyExc_MemoryError,
+   "PyList_New() failed" );
 
-   partsyslist = PyList_New( 0 );
+   for( psys=ob->particlesystem.first; psys; psys=psys->next )
+   PyList_SET_ITEM( list, i++, ParticleSys_CreatePyObject( psys, 
ob ) );
 
-   if (!blparticlesys)
-   return partsyslist;
-
-/* fixme:  for(;;) */
-   current = ParticleSys_CreatePyObject( blparticlesys, ob );
-   PyList_Append(partsyslist,current);
-   Py_DECREF(current);
-
-   while((blparticlesys = blparticlesys->next)){
-   current = ParticleSys_CreatePyObject( blparticlesys, ob );
-   PyList_Append(partsyslist,current);
-   Py_DECREF(current);
-   }
-
-   return partsyslist;
+   return list;
 }
 
-PyObject *Object_newParticleSys( BPy_Object * self ){
+PyObject *Object_newParticleSys( BPy_Object * self, PyObject * args ) {
ParticleSystem *psys = 0;
ParticleSystem *rpsys = 0;
ModifierData *md;
ParticleSystemModifierData *psmd;
Object *ob = self->object;
-/* char *name = NULL;  optional name param */
+   char *name = NULL;
ID *id;
-   int nr;
+   int nr; 
 
-   id = (ID *)psys_new_settings("PSys", G.main);
+   if( !PyArg_ParseTuple( args, "|s", &name ) )
+   return EXPP_ReturnPyObjError( PyExc_TypeError,
+   "expected a string or nothing" );
 
+   if( name ) {
+   for( id= G.main->particle.first; id; id= id->next ) {
+   if( !strcmp( name, id->name + 2 ) )
+   break;
+   }
+   if( !id )
+   return EXPP_ReturnPyObjError( PyExc_AttributeError,
+   "specified particle system not found" );
+   else
+   id->us++;
+   } else
+   id = (ID *)psys_new_settings("PSys", G.main);
+
psys = MEM_callocN(sizeof(ParticleSystem), "particle_system");
psys->pointcache = BKE_ptcache_add();
psys->flag |= PSYS_ENABLED;

Modified: trunk/blender/source/blender/python/api2_2x/Particle.c

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16973] trunk/blender/source/blender/ blenkernel/intern/particle_system.c: Bugfix #17767

2008-10-08 Thread Ton Roosendaal
Revision: 16973
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16973
Author:   ton
Date: 2008-10-08 18:29:09 +0200 (Wed, 08 Oct 2008)

Log Message:
---
Bugfix #17767

NULL check missing in particle bvhtree testing.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/particle_system.c

Modified: trunk/blender/source/blender/blenkernel/intern/particle_system.c
===
--- trunk/blender/source/blender/blenkernel/intern/particle_system.c
2008-10-08 15:42:49 UTC (rev 16972)
+++ trunk/blender/source/blender/blenkernel/intern/particle_system.c
2008-10-08 16:29:09 UTC (rev 16973)
@@ -3101,7 +3101,7 @@
col.md = ( CollisionModifierData * ) ( 
modifiers_findByType ( ec->ob, eModifierType_Collision ) );
col.ob_t = ob;
 
-   if(col.md->bvhtree)
+   if(col.md && col.md->bvhtree)
BLI_bvhtree_ray_cast(col.md->bvhtree, 
col.co1, ray_dir, radius, &hit, particle_intersect_face, &col);
}
}


___
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 [16972] trunk/blender/source/blender/ blenkernel/intern/library.c: Bugfix #17769

2008-10-08 Thread Ton Roosendaal
Revision: 16972
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16972
Author:   ton
Date: 2008-10-08 17:42:49 +0200 (Wed, 08 Oct 2008)

Log Message:
---
Bugfix #17769

Someone managed to write over the protected part of ID name (python???).
This crashes blender in unexpted place, added error print for this.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/library.c

Modified: trunk/blender/source/blender/blenkernel/intern/library.c
===
--- trunk/blender/source/blender/blenkernel/intern/library.c2008-10-08 
11:40:39 UTC (rev 16971)
+++ trunk/blender/source/blender/blenkernel/intern/library.c2008-10-08 
15:42:49 UTC (rev 16972)
@@ -407,6 +407,10 @@
lb= wich_libbase(G.main, GS(id->name));
idn= alloc_libblock(lb, GS(id->name), id->name+2);

+   if(idn==NULL) {
+   printf("ERROR: Illegal ID name for %s (Crashing now)\n", 
id->name);
+   }
+   
idn_len= MEM_allocN_len(idn);
if(idn_len - sizeof(ID) > 0) {
cp= (char *)id;


___
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 [16971] trunk/blender/source/gameengine/ GameLogic/SCA_JoystickSensor.cpp: my changes broke the "level" option for joystick keys being held between st

2008-10-08 Thread Campbell Barton
Revision: 16971
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16971
Author:   campbellbarton
Date: 2008-10-08 13:40:39 +0200 (Wed, 08 Oct 2008)

Log Message:
---
my changes broke the "level" option for joystick keys being held between states

Modified Paths:
--
trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp

Modified: trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
===
--- trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
2008-10-08 09:27:26 UTC (rev 16970)
+++ trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
2008-10-08 11:40:39 UTC (rev 16971)
@@ -123,8 +123,8 @@
numberof== m_axis  -- max 2
*/

-   if (!js->IsTrigAxis()) /* No events from SDL? - dont 
bother */
-   return reset ? true : false;
+   if (!js->IsTrigAxis() && !reset) /* No events from SDL? 
- dont bother */
+   return false;

js->cSetPrecision(m_precision);
if (m_bAllEvents) {
@@ -189,8 +189,8 @@
/* what is what!
m_button = the actual button in question
*/
-   if (!js->IsTrigButton()) /* No events from SDL? - dont 
bother */
-   return reset ? true : false;
+   if (!js->IsTrigButton() && !reset) /* No events from 
SDL? - dont bother */
+   return false;

if(( m_bAllEvents && js->aAnyButtonPressIsPositive()) 
|| (!m_bAllEvents && js->aButtonPressIsPositive(m_button))) {
m_istrig = 1;
@@ -210,8 +210,8 @@
direction= m_hatf -- max 12
*/

-   if (!js->IsTrigHat()) /* No events from SDL? - dont 
bother */
-   return reset ? true : false;
+   if (!js->IsTrigHat() && !reset) /* No events from SDL? 
- dont bother */
+   return false;

if(m_hat == 1){
if(js->aHatIsPositive(m_hatf)){


___
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 [16970] trunk/blender/source/blender/ blenkernel/intern/idprop.c: fix for a bug where getting ID props would rename the datablock ( including its type

2008-10-08 Thread Campbell Barton
Revision: 16970
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16970
Author:   campbellbarton
Date: 2008-10-08 11:27:26 +0200 (Wed, 08 Oct 2008)

Log Message:
---
fix for a bug where getting ID props would rename the datablock (including its 
type), then crash.
http://blenderartists.org/forum/showthread.php?p=1228670#post1228670

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/idprop.c

Modified: trunk/blender/source/blender/blenkernel/intern/idprop.c
===
--- trunk/blender/source/blender/blenkernel/intern/idprop.c 2008-10-08 
09:15:16 UTC (rev 16969)
+++ trunk/blender/source/blender/blenkernel/intern/idprop.c 2008-10-08 
09:27:26 UTC (rev 16970)
@@ -352,7 +352,10 @@
if (create_if_needed) {
id->properties = MEM_callocN(sizeof(IDProperty), 
"IDProperty");
id->properties->type = IDP_GROUP;
-   strcpy(id->name, "top_level_group");
+   /* dont overwite the data's name and type
+* some functions might need this if they
+* dont have a real ID, should be named elsewhere - 
Campbell */
+   /* strcpy(id->name, "top_level_group");*/
}
return id->properties;
}


___
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 [16969] trunk/blender/source/blender/src/ drawimage.c: Fixed a tooltip typo

2008-10-08 Thread Kent Mein
Revision: 16969
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16969
Author:   sirdude
Date: 2008-10-08 11:15:16 +0200 (Wed, 08 Oct 2008)

Log Message:
---
Fixed a tooltip typo

Kent

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

Modified: trunk/blender/source/blender/src/drawimage.c
===
--- trunk/blender/source/blender/src/drawimage.c2008-10-08 08:08:58 UTC 
(rev 16968)
+++ trunk/blender/source/blender/src/drawimage.c2008-10-08 09:15:16 UTC 
(rev 16969)
@@ -1465,7 +1465,7 @@


uiDefButBitI(block, TOG, G_DRAWFACES, B_REDR, "Faces",  
10,30,60,19,  &G.f, 0, 0, 0, 0, "Displays all faces as shades in the 3d view 
and UV editor");
-   uiDefButBitI(block, TOG, G_DRAWEDGES, B_REDR, "Edges", 70, 
30,60,19, &G.f, 0, 0, 0, 0, "Displays selected edges using hilights and UV 
editor");
+   uiDefButBitI(block, TOG, G_DRAWEDGES, B_REDR, "Edges", 70, 
30,60,19, &G.f, 0, 0, 0, 0, "Displays selected edges using hilights in the 3d 
view and UV editor");

uiDefButBitI(block, TOG, SI_DRAWSHADOW, B_REDR, "Final Shadow", 
130, 30,110,19, &G.sima->flag, 0, 0, 0, 0, "Draw the final result from the 
objects modifiers");



___
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 [16968] trunk/blender/source/blender/src/ space.c: Error about "max open floating panels" used wrong math.

2008-10-08 Thread Ton Roosendaal
Revision: 16968
  
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16968
Author:   ton
Date: 2008-10-08 10:08:58 +0200 (Wed, 08 Oct 2008)

Log Message:
---
Error about "max open floating panels" used wrong math.

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

Modified: trunk/blender/source/blender/src/space.c
===
--- trunk/blender/source/blender/src/space.c2008-10-08 03:16:19 UTC (rev 
16967)
+++ trunk/blender/source/blender/src/space.c2008-10-08 08:08:58 UTC (rev 
16968)
@@ -224,7 +224,7 @@
}
}
if(a==SPACE_MAXHANDLER) {
-   error("Only %i floating panels allowed", SPACE_MAXHANDLER-1);
+   error("Only %i floating panels allowed", SPACE_MAXHANDLER/2);
}

 }


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