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

Campbell Barton ideasman42 at gmail.com
Thu Jun 12 17:06:06 CEST 2008


Revision: 15209
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15209
Author:   campbellbarton
Date:     2008-06-12 17:05:52 +0200 (Thu, 12 Jun 2008)

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

Modified Paths:
--------------
    branches/apricot/extern/libopenjpeg/opj_malloc.h
    branches/apricot/source/blender/blenkernel/intern/library.c
    branches/apricot/source/blender/blenkernel/intern/particle_system.c
    branches/apricot/source/blender/blenlib/intern/util.c
    branches/apricot/source/blender/include/BDR_editcurve.h
    branches/apricot/source/blender/include/BSE_view.h
    branches/apricot/source/blender/python/BPY_interface.c
    branches/apricot/source/blender/src/buttons_object.c
    branches/apricot/source/blender/src/editcurve.c
    branches/apricot/source/blender/src/editobject.c
    branches/apricot/source/blender/src/space.c
    branches/apricot/source/blender/src/transform.c
    branches/apricot/source/blender/src/view.c
    branches/apricot/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp

Added Paths:
-----------
    branches/apricot/extern/libopenjpeg/patches/
    branches/apricot/extern/libopenjpeg/patches/osx.patch

Removed Paths:
-------------
    branches/apricot/extern/libopenjpeg/patches/osx.patch

Modified: branches/apricot/extern/libopenjpeg/opj_malloc.h
===================================================================
--- branches/apricot/extern/libopenjpeg/opj_malloc.h	2008-06-12 15:00:07 UTC (rev 15208)
+++ branches/apricot/extern/libopenjpeg/opj_malloc.h	2008-06-12 15:05:52 UTC (rev 15209)
@@ -76,8 +76,10 @@
 	#if defined(__sun)
 			#define HAVE_MEMALIGN
 		#elif defined(__GNUC__)
-			#define HAVE_MEMALIGN
-			#include <malloc.h>		
+                        #ifndef __APPLE__
+			    #define HAVE_MEMALIGN
+			    #include <malloc.h>
+                        #endif
 		/* Linux x86_64 and OSX always align allocations to 16 bytes */
 		#elif !defined(__amd64__) && !defined(__APPLE__)	
 			/* FIXME: Yes, this is a big assumption */

Copied: branches/apricot/extern/libopenjpeg/patches (from rev 15207, trunk/blender/extern/libopenjpeg/patches)

Deleted: branches/apricot/extern/libopenjpeg/patches/osx.patch
===================================================================
--- trunk/blender/extern/libopenjpeg/patches/osx.patch	2008-06-12 14:46:32 UTC (rev 15207)
+++ branches/apricot/extern/libopenjpeg/patches/osx.patch	2008-06-12 15:05:52 UTC (rev 15209)
@@ -1,17 +0,0 @@
-Index: opj_malloc.h
-===================================================================
---- opj_malloc.h	(revision 15089)
-+++ opj_malloc.h	(working copy)
-@@ -76,8 +76,10 @@
- 	#if defined(__sun)
- 			#define HAVE_MEMALIGN
- 		#elif defined(__GNUC__)
--			#define HAVE_MEMALIGN
--			#include <malloc.h>		
-+                        #ifndef __APPLE__
-+			    #define HAVE_MEMALIGN
-+			    #include <malloc.h>
-+                        #endif
- 		/* Linux x86_64 and OSX always align allocations to 16 bytes */
- 		#elif !defined(__amd64__) && !defined(__APPLE__)	
- 			/* FIXME: Yes, this is a big assumption */

Copied: branches/apricot/extern/libopenjpeg/patches/osx.patch (from rev 15207, trunk/blender/extern/libopenjpeg/patches/osx.patch)
===================================================================
--- branches/apricot/extern/libopenjpeg/patches/osx.patch	                        (rev 0)
+++ branches/apricot/extern/libopenjpeg/patches/osx.patch	2008-06-12 15:05:52 UTC (rev 15209)
@@ -0,0 +1,17 @@
+Index: opj_malloc.h
+===================================================================
+--- opj_malloc.h	(revision 15089)
++++ opj_malloc.h	(working copy)
+@@ -76,8 +76,10 @@
+ 	#if defined(__sun)
+ 			#define HAVE_MEMALIGN
+ 		#elif defined(__GNUC__)
+-			#define HAVE_MEMALIGN
+-			#include <malloc.h>		
++                        #ifndef __APPLE__
++			    #define HAVE_MEMALIGN
++			    #include <malloc.h>
++                        #endif
+ 		/* Linux x86_64 and OSX always align allocations to 16 bytes */
+ 		#elif !defined(__amd64__) && !defined(__APPLE__)	
+ 			/* FIXME: Yes, this is a big assumption */

Modified: branches/apricot/source/blender/blenkernel/intern/library.c
===================================================================
--- branches/apricot/source/blender/blenkernel/intern/library.c	2008-06-12 15:00:07 UTC (rev 15208)
+++ branches/apricot/source/blender/blenkernel/intern/library.c	2008-06-12 15:05:52 UTC (rev 15209)
@@ -939,7 +939,7 @@
 	}
 
 	/* if result > 21, strncpy don't put the final '\0' to name. */
-	if( result > 21 ) name[21]= 0;
+	if( result >= 21 ) name[21]= 0;
 
 	result = check_for_dupid( lb, id, name );
 	strcpy( id->name+2, name );

Modified: branches/apricot/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- branches/apricot/source/blender/blenkernel/intern/particle_system.c	2008-06-12 15:00:07 UTC (rev 15208)
+++ branches/apricot/source/blender/blenkernel/intern/particle_system.c	2008-06-12 15:05:52 UTC (rev 15209)
@@ -4814,9 +4814,20 @@
 			pa->flag &= ~PARS_NO_DISP;
 	}
 
-	/* ok now we're all set so let's go */
-	if(psys->totpart)
-		dynamics_step(ob,psys,psmd,cfra,vg_vel,vg_tan,vg_rot,vg_size);
+	if(psys->totpart) {
+		int dframe, totframesback = 0;
+
+		/* handle negative frame start at the first frame by doing
+		 * all the steps before the first frame */
+		if(framenr == startframe && part->sta < startframe)
+			totframesback = (startframe - (int)part->sta);
+
+		for(dframe=-totframesback; dframe<=0; dframe++) {
+			/* ok now we're all set so let's go */
+			dynamics_step(ob,psys,psmd,cfra+dframe,vg_vel,vg_tan,vg_rot,vg_size);
+			psys->cfra = cfra+dframe;
+		}
+	}
 	
 	cache->simframe= framenr;
 	cache->flag |= PTCACHE_SIMULATION_VALID;

Modified: branches/apricot/source/blender/blenlib/intern/util.c
===================================================================
--- branches/apricot/source/blender/blenlib/intern/util.c	2008-06-12 15:00:07 UTC (rev 15208)
+++ branches/apricot/source/blender/blenlib/intern/util.c	2008-06-12 15:05:52 UTC (rev 15209)
@@ -883,6 +883,15 @@
 			dir = dir+2; /* skip the first // */
 		}
 	}
+	
+	/* Note
+	 *   memmove( start, eind, strlen(eind)+1 );
+	 * is the same as
+	 *   strcpy( start, eind ); 
+	 * except strcpy should not be used because there is overlap,
+	  * so use memmove's slightly more obscure syntax - Campbell
+	 */
+	
 #ifdef WIN32
 	if(dir[0]=='.') {	/* happens for example in FILE_MAIN */
 	   get_default_root(dir);
@@ -896,17 +905,18 @@
 			if (dir[a] == '\\') break;
 			a--;
 		}
-		strcpy(dir+a,eind);
+		memmove( dir+a, eind, strlen(eind)+1 );
+		
 	}
 
 	while ( (start = strstr(dir,"\\.\\")) ){
 		eind = start + strlen("\\.\\") - 1;
-		strcpy(start,eind);
+		memmove( start, eind, strlen(eind)+1 );
 	}
 
 	while ( (start = strstr(dir,"\\\\" )) ){
 		eind = start + strlen("\\\\") - 1;
-		strcpy(start,eind);
+		memmove( start, eind, strlen(eind)+1 );
 	}
 
 	if((a = strlen(dir))){				/* remove the '\\' at the end */
@@ -929,17 +939,17 @@
 			if (dir[a] == '/') break;
 			a--;
 		}
-		strcpy(dir+a,eind);
+		memmove( dir+a, eind, strlen(eind)+1 );
 	}
 
 	while ( (start = strstr(dir,"/./")) ){
 		eind = start + strlen("/./") - 1;
-		strcpy(start,eind);
+		memmove( start, eind, strlen(eind)+1 );
 	}
 
 	while ( (start = strstr(dir,"//" )) ){
 		eind = start + strlen("//") - 1;
-		strcpy(start,eind);
+		memmove( start, eind, strlen(eind)+1 );
 	}
 
 	if( (a = strlen(dir)) ){				/* remove all '/' at the end */

Modified: branches/apricot/source/blender/include/BDR_editcurve.h
===================================================================
--- branches/apricot/source/blender/include/BDR_editcurve.h	2008-06-12 15:00:07 UTC (rev 15208)
+++ branches/apricot/source/blender/include/BDR_editcurve.h	2008-06-12 15:05:52 UTC (rev 15209)
@@ -99,6 +99,7 @@
 void setweightNurb( void );
 void setradiusNurb( void );
 void smoothradiusNurb( void );
+void smoothNurb( void );
 
 extern void undo_push_curve(char *name);
 

Modified: branches/apricot/source/blender/include/BSE_view.h
===================================================================
--- branches/apricot/source/blender/include/BSE_view.h	2008-06-12 15:00:07 UTC (rev 15208)
+++ branches/apricot/source/blender/include/BSE_view.h	2008-06-12 15:05:52 UTC (rev 15209)
@@ -66,6 +66,8 @@
 void project_float(float *vec, float *adr);
 void viewray(short mval[2], float ray_start[3], float ray_normal[3]);
 void viewline(short mval[2], float ray_start[3], float ray_end[3]);
+void viewray(short mval[2], float ray_start[3], float ray_normal[3]);
+void viewline(short mval[2], float ray_start[3], float ray_end[3]);
 
 int boundbox_clip(float obmat[][4], struct BoundBox *bb);
 void fdrawline(float x1, float y1, float x2, float y2);

Modified: branches/apricot/source/blender/python/BPY_interface.c
===================================================================
--- branches/apricot/source/blender/python/BPY_interface.c	2008-06-12 15:00:07 UTC (rev 15208)
+++ branches/apricot/source/blender/python/BPY_interface.c	2008-06-12 15:05:52 UTC (rev 15209)
@@ -1113,14 +1113,18 @@
 				if( sl->spacetype == SPACE_SCRIPT ) {
 					SpaceScript *sc = ( SpaceScript * ) sl;
 
-					if( sc->script == script ) {
+					if( sc->script == script ) {					
 						sc->script = NULL;
 
-						if( sc ==
-						    area->spacedata.first ) {
-							scrarea_queue_redraw
-								( area );
+						if( sc == area->spacedata.first ) {
+							scrarea_queue_redraw( area );
 						}
+						
+						if (sc->but_refs) {
+							BPy_Set_DrawButtonsList(sc->but_refs);
+							BPy_Free_DrawButtonsList();
+							sc->but_refs = NULL;
+						}
 					}
 				}
 			}

Modified: branches/apricot/source/blender/src/buttons_object.c
===================================================================
--- branches/apricot/source/blender/src/buttons_object.c	2008-06-12 15:00:07 UTC (rev 15208)
+++ branches/apricot/source/blender/src/buttons_object.c	2008-06-12 15:05:52 UTC (rev 15209)
@@ -4845,7 +4845,7 @@
 		uiDefButS(block, NUM, B_PART_RECALC, "Segments:",	butx,(buty-=buth),butw,buth, &part->hair_step, 2.0, 50.0, 0, 0, "Amount of hair segments");
 	}
 	else {
-		uiDefButF(block, NUM, B_PART_INIT, "Sta:",		butx,(buty-=buth),butw,buth, &part->sta, 1.0, part->end, 100, 1, "Frame # to start emitting particles");
+		uiDefButF(block, NUM, B_PART_INIT, "Sta:",		butx,(buty-=buth),butw,buth, &part->sta, -MAXFRAMEF, part->end, 100, 1, "Frame # to start emitting particles");
 		uiDefButF(block, NUM, B_PART_INIT, "End:",		butx,(buty-=buth),butw,buth, &part->end, part->sta, MAXFRAMEF, 100, 1, "Frame # to stop emitting particles");
 	}
 

Modified: branches/apricot/source/blender/src/editcurve.c
===================================================================
--- branches/apricot/source/blender/src/editcurve.c	2008-06-12 15:00:07 UTC (rev 15208)
+++ branches/apricot/source/blender/src/editcurve.c	2008-06-12 15:05:52 UTC (rev 15209)
@@ -1158,7 +1158,63 @@
 	allqueue(REDRAWINFO, 1); 	/* 1, because header->win==0! */
 }
 
+void smoothNurb( void )
+{
 
+	extern ListBase editNurb;
+	Nurb *nu;
+	BezTriple *bezt, *beztOrig;
+	BPoint *bp, *bpOrig;
+	int a, i, change = 0;
+	
+	/* floats for smoothing */
+	float val, newval, offset;
+	
+	for(nu= editNurb.first; nu; nu= nu->next) {
+		if(nu->bezt) {
+			change = 0;
+			beztOrig = MEM_dupallocN( nu->bezt );
+			for(bezt=nu->bezt+1, a=1; a<nu->pntsu-1; a++, bezt++) {
+				if(bezt->f2 & SELECT) {
+					for(i=0; i<3; i++) {
+						val = bezt->vec[1][i];
+						newval = ((beztOrig+(a-1))->vec[1][i] * 0.5) + ((beztOrig+(a+1))->vec[1][i] * 0.5);
+						offset = (val*((1.0/6.0)*5)) + (newval*(1.0/6.0)) - val;
+						/* offset handles */
+						bezt->vec[1][i] += offset;

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list