[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

Davide Vercelli davide.vercelli at gmail.com
Wed Jul 23 19:31:01 CEST 2008


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
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_IPhysicsController.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_OdePhysicsController.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_OdePhysicsController.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_ParentActuator.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_ParentActuator.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_RadarSensor.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_Scene.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_SceneActuator.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_SceneActuator.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_SumoPhysicsController.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_SumoPhysicsController.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_TrackToActuator.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_TrackToActuator.h
    branches/soc-2008-unclezeiv/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Physics/Bullet/CcdPhysicsController.h
    branches/soc-2008-unclezeiv/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
    branches/soc-2008-unclezeiv/source/gameengine/PyDoc/KX_GameObject.py
    branches/soc-2008-unclezeiv/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Rasterizer/RAS_2DFilterManager.h
    branches/soc-2008-unclezeiv/source/gameengine/Rasterizer/RAS_ICanvas.h

Added Paths:
-----------
    branches/soc-2008-unclezeiv/source/blender/include/BDR_gpencil.h
    branches/soc-2008-unclezeiv/source/blender/include/BIF_drawgpencil.h
    branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_gpencil_types.h
    branches/soc-2008-unclezeiv/source/blender/src/drawgpencil.c
    branches/soc-2008-unclezeiv/source/blender/src/editaction_gpencil.c
    branches/soc-2008-unclezeiv/source/blender/src/gpencil.c

Modified: branches/soc-2008-unclezeiv/projectfiles_vc7/blender/makesdna/DNA_makesdna.vcproj
===================================================================
--- branches/soc-2008-unclezeiv/projectfiles_vc7/blender/makesdna/DNA_makesdna.vcproj	2008-07-23 17:23:56 UTC (rev 15716)
+++ branches/soc-2008-unclezeiv/projectfiles_vc7/blender/makesdna/DNA_makesdna.vcproj	2008-07-23 17:31:00 UTC (rev 15717)
@@ -472,6 +472,9 @@
 				RelativePath="..\..\..\source\blender\makesdna\DNA_fileglobal_types.h">
 			</File>
 			<File
+				RelativePath="..\..\..\source\blender\makesdna\DNA_gpencil_types.h">
+			</File>
+			<File
 				RelativePath="..\..\..\source\blender\makesdna\DNA_group_types.h">
 			</File>
 			<File

Modified: branches/soc-2008-unclezeiv/projectfiles_vc7/blender/src/BL_src.vcproj
===================================================================
--- branches/soc-2008-unclezeiv/projectfiles_vc7/blender/src/BL_src.vcproj	2008-07-23 17:23:56 UTC (rev 15716)
+++ branches/soc-2008-unclezeiv/projectfiles_vc7/blender/src/BL_src.vcproj	2008-07-23 17:31:00 UTC (rev 15717)
@@ -182,6 +182,9 @@
 				RelativePath="..\..\..\source\blender\src\drawdeps.c">
 			</File>
 			<File
+				RelativePath="..\..\..\source\blender\src\drawgpencil.c">
+			</File>
+			<File
 				RelativePath="..\..\..\source\blender\src\drawimage.c">
 			</File>
 			<File
@@ -233,6 +236,9 @@
 				RelativePath="..\..\..\source\blender\src\editaction.c">
 			</File>
 			<File
+				RelativePath="..\..\..\source\blender\src\editaction_gpencil.c">
+			</File>
+			<File
 				RelativePath="..\..\..\source\blender\src\editarmature.c">
 			</File>
 			<File
@@ -350,6 +356,9 @@
 				RelativePath="..\..\..\source\blender\src\glutil.c">
 			</File>
 			<File
+				RelativePath="..\..\..\source\blender\src\gpencil.c">
+			</File>
+			<File
 				RelativePath="..\..\..\source\blender\src\hddaudio.c">
 			</File>
 			<File
@@ -618,6 +627,9 @@
 				RelativePath="..\..\..\source\blender\include\BDR_editobject.h">
 			</File>
 			<File
+				RelativePath="..\..\..\source\blender\include\BDR_gpencil.h">
+			</File>
+			<File
 				RelativePath="..\..\..\source\blender\include\BDR_imagepaint.h">
 			</File>
 			<File
@@ -636,6 +648,9 @@
 				RelativePath="..\..\..\source\blender\include\BIF_cursors.h">
 			</File>
 			<File
+				RelativePath="..\..\..\source\blender\include\BIF_drawgpencil.h">
+			</File>
+			<File
 				RelativePath="..\..\..\source\blender\include\BIF_drawimage.h">
 			</File>
 			<File

Modified: branches/soc-2008-unclezeiv/source/blender/blenkernel/BKE_global.h
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenkernel/BKE_global.h	2008-07-23 17:23:56 UTC (rev 15716)
+++ branches/soc-2008-unclezeiv/source/blender/blenkernel/BKE_global.h	2008-07-23 17:31:00 UTC (rev 15717)
@@ -175,6 +175,7 @@
 #define G_WEIGHTPAINT	(1 << 15)	
 #define G_TEXTUREPAINT	(1 << 16)
 /* #define G_NOFROZEN	(1 << 17) also removed */
+#define G_GREASEPENCIL 	(1 << 17)
 #define G_DRAWEDGES		(1 << 18)
 #define G_DRAWCREASES	(1 << 19)
 #define G_DRAWSEAMS     (1 << 20)
@@ -265,3 +266,4 @@
 	
 #endif
 
+

Modified: branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/collision.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/collision.c	2008-07-23 17:23:56 UTC (rev 15716)
+++ branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/collision.c	2008-07-23 17:31:00 UTC (rev 15717)
@@ -1437,6 +1437,9 @@
 
 					if(coll_ob == self)
 						continue;
+					
+					if( !collmd->bvhtree)
+						continue;
 
 					if(numobj >= maxobj)
 					{

Modified: branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/lattice.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/lattice.c	2008-07-23 17:23:56 UTC (rev 15716)
+++ branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/lattice.c	2008-07-23 17:31:00 UTC (rev 15717)
@@ -915,7 +915,10 @@
 		mti->deformVerts(md, ob, NULL, vertexCos, numVerts);
 	}
 
-	if (vertexCos) {
+	/* always displist to make this work like derivedmesh */
+	if (!vertexCos) vertexCos = lattice_getVertexCos(ob, &numVerts);
+	
+	{
 		DispList *dl = MEM_callocN(sizeof(*dl), "lt_dl");
 		dl->type = DL_VERTS;
 		dl->parts = 1;

Modified: branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/particle_system.c	2008-07-23 17:23:56 UTC (rev 15716)
+++ branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/particle_system.c	2008-07-23 17:31:00 UTC (rev 15717)
@@ -2797,7 +2797,10 @@
 				epart= epsys->part;
 				pd= epart->pd;
 				totepart= epsys->totpart;
-
+				
+				if(totepart <= 0)
+					continue;
+				
 				if(pd->forcefield==PFIELD_HARMONIC){
 					/* every particle is mapped to only one harmonic effector particle */
 					p= pa_no%epsys->totpart;

Modified: branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/scene.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/scene.c	2008-07-23 17:23:56 UTC (rev 15716)
+++ branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/scene.c	2008-07-23 17:31:00 UTC (rev 15717)
@@ -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: branches/soc-2008-unclezeiv/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenloader/intern/readfile.c	2008-07-23 17:23:56 UTC (rev 15716)
+++ branches/soc-2008-unclezeiv/source/blender/blenloader/intern/readfile.c	2008-07-23 17:31:00 UTC (rev 15717)
@@ -69,6 +69,7 @@
 #include "DNA_effect_types.h"
 #include "DNA_fileglobal_types.h"
 #include "DNA_group_types.h"
+#include "DNA_gpencil_types.h"
 #include "DNA_ipo_types.h"
 #include "DNA_image_types.h"
 #include "DNA_key_types.h"
@@ -3698,6 +3699,32 @@
 
 /* ************ READ SCREEN ***************** */
 
+/* relinks grease-pencil data for 3d-view(s) - used for direct_link */
+static void link_gpencil(FileData *fd, bGPdata *gpd)
+{
+	bGPDlayer *gpl;
+	bGPDframe *gpf;
+	bGPDstroke *gps;
+	
+	/* relink layers */
+	link_list(fd, &gpd->layers);
+	
+	for (gpl= gpd->layers.first; gpl; gpl= gpl->next) {
+		/* relink frames */
+		link_list(fd, &gpl->frames);
+		gpl->actframe= newdataadr(fd, gpl->actframe);
+		
+		for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
+			/* relink strokes (and their points) */
+			link_list(fd, &gpf->strokes);
+			
+			for (gps= gpf->strokes.first; gps; gps= gps->next) {
+				gps->points= newdataadr(fd, gps->points);
+			}
+		}
+	}
+}
+
 /* note: file read without screens option G_FILE_NO_UI; 
    check lib pointers in call below */
 static void lib_link_screen(FileData *fd, Main *main)
@@ -3709,23 +3736,23 @@
 		if(sc->id.flag & LIB_NEEDLINK) {
 			sc->id.us= 1;
 			sc->scene= newlibadr(fd, sc->id.lib, sc->scene);
-
+			
 			sa= sc->areabase.first;
 			while(sa) {
 				SpaceLink *sl;
-
+				
 				sa->full= newlibadr(fd, sc->id.lib, sa->full);
-
+				
 				/* space handler scriptlinks */
 				lib_link_scriptlink(fd, &sc->id, &sa->scriptlink);
-
+				
 				for (sl= sa->spacedata.first; sl; sl= sl->next) {
 					if(sl->spacetype==SPACE_VIEW3D) {
 						View3D *v3d= (View3D*) sl;
-
+						
 						v3d->camera= newlibadr(fd, sc->id.lib, v3d->camera);
 						v3d->ob_centre= newlibadr(fd, sc->id.lib, v3d->ob_centre);
-
+						
 						if(v3d->bgpic) {
 							v3d->bgpic->ima= newlibadr_us(fd, sc->id.lib, v3d->bgpic->ima);
 						}
@@ -4081,6 +4108,10 @@
 				v3d->bgpic= newdataadr(fd, v3d->bgpic);
 				if(v3d->bgpic)
 					v3d->bgpic->iuser.ok= 1;
+				if(v3d->gpd) {
+					v3d->gpd= newdataadr(fd, v3d->gpd);
+					link_gpencil(fd, v3d->gpd);
+				}
 				v3d->localvd= newdataadr(fd, v3d->localvd);
 				v3d->afterdraw.first= v3d->afterdraw.last= NULL;
 				v3d->clipbb= newdataadr(fd, v3d->clipbb);
@@ -4115,9 +4146,21 @@
 			}
 			else if(sl->spacetype==SPACE_NODE) {
 				SpaceNode *snode= (SpaceNode *)sl;
+				
+				if(snode->gpd) {
+					snode->gpd= newdataadr(fd, snode->gpd);
+					link_gpencil(fd, snode->gpd);
+				}
 				snode->nodetree= snode->edittree= NULL;
 				snode->flag |= SNODE_DO_PREVIEW;
 			}
+			else if(sl->spacetype==SPACE_SEQ) {
+				SpaceSeq *sseq= (SpaceSeq *)sl;
+				if(sseq->gpd) {
+					sseq->gpd= newdataadr(fd, sseq->gpd);
+					link_gpencil(fd, sseq->gpd);
+				}
+			}
 		}
 
 		sa->v1= newdataadr(fd, sa->v1);

Modified: branches/soc-2008-unclezeiv/source/blender/blenloader/intern/writefile.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/blenloader/intern/writefile.c	2008-07-23 17:23:56 UTC (rev 15716)
+++ branches/soc-2008-unclezeiv/source/blender/blenloader/intern/writefile.c	2008-07-23 17:31:00 UTC (rev 15717)
@@ -112,6 +112,7 @@
 #include "DNA_customdata_types.h"
 #include "DNA_effect_types.h"
 #include "DNA_group_types.h"
+#include "DNA_gpencil_types.h"
 #include "DNA_image_types.h"
 #include "DNA_ipo_types.h"
 #include "DNA_fileglobal_types.h"
@@ -1565,6 +1566,32 @@
 	mywrite(wd, MYWRITE_FLUSH, 0);
 }
 
+static void write_gpencil(WriteData *wd, bGPdata *gpd)
+{
+	bGPDlayer *gpl;
+	bGPDframe *gpf;
+	bGPDstroke *gps;
+	
+	/* write gpd data block to file */
+	writestruct(wd, DATA, "bGPdata", 1, gpd);
+	
+	/* write grease-pencil layers to file */
+	for (gpl= gpd->layers.first; gpl; gpl= gpl->next) {
+		writestruct(wd, DATA, "bGPDlayer", 1, gpl);
+		
+		/* write this layer's frames to file */
+		for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
+			writestruct(wd, DATA, "bGPDframe", 1, gpf);
+			
+			/* write strokes */
+			for (gps= gpf->strokes.first; gps; gps= gps->next) {
+				writestruct(wd, DATA, "bGPDstroke", 1, gps);
+				writestruct(wd, DATA, "bGPDspoint", gps->totpoints, gps->points);				
+			}
+		}
+	}
+}
+
 static void write_screens(WriteData *wd, ListBase *scrbase)
 {
 	bScreen *sc;
@@ -1610,11 +1637,12 @@
 			sl= sa->spacedata.first;
 			while(sl) {
 				if(sl->spacetype==SPACE_VIEW3D) {
-					View3D *v3d= (View3D*) sl;
+					View3D *v3d= (View3D *) sl;
 					writestruct(wd, DATA, "View3D", 1, v3d);

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list