[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30103] branches/particles-2010/source/ blender: Renamed the particles node tree to simulation node tree.

Lukas Toenne lukas.toenne at googlemail.com
Thu Jul 8 09:49:42 CEST 2010


Revision: 30103
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30103
Author:   lukastoenne
Date:     2010-07-08 09:49:42 +0200 (Thu, 08 Jul 2010)

Log Message:
-----------
Renamed the particles node tree to simulation node tree.
This is because the node tree itself only defines a framework for timestepping rules. The concrete use for particle simulation (only at the moment) just comes from the execution context and the set of node types.

Modified Paths:
--------------
    branches/particles-2010/source/blender/blenkernel/intern/node.c
    branches/particles-2010/source/blender/editors/space_node/drawnode.c
    branches/particles-2010/source/blender/editors/space_node/node_draw.c
    branches/particles-2010/source/blender/editors/space_node/node_edit.c
    branches/particles-2010/source/blender/editors/space_node/node_header.c
    branches/particles-2010/source/blender/editors/space_node/space_node.c
    branches/particles-2010/source/blender/makesdna/DNA_node_types.h
    branches/particles-2010/source/blender/makesrna/intern/rna_space.c
    branches/particles-2010/source/blender/nodes/CMakeLists.txt
    branches/particles-2010/source/blender/nodes/intern/node_tree_composite.c
    branches/particles-2010/source/blender/nodes/intern/node_tree_shader.c
    branches/particles-2010/source/blender/nodes/intern/node_tree_texture.c

Added Paths:
-----------
    branches/particles-2010/source/blender/nodes/SIM_node.h
    branches/particles-2010/source/blender/nodes/intern/SIM_nodes/
    branches/particles-2010/source/blender/nodes/intern/SIM_util.c
    branches/particles-2010/source/blender/nodes/intern/SIM_util.h
    branches/particles-2010/source/blender/nodes/intern/node_tree_simulation.c

Removed Paths:
-------------
    branches/particles-2010/source/blender/nodes/PAR_node.h
    branches/particles-2010/source/blender/nodes/intern/PAR_nodes/
    branches/particles-2010/source/blender/nodes/intern/PAR_util.c
    branches/particles-2010/source/blender/nodes/intern/PAR_util.h
    branches/particles-2010/source/blender/nodes/intern/node_tree_particles.c

Modified: branches/particles-2010/source/blender/blenkernel/intern/node.c
===================================================================
--- branches/particles-2010/source/blender/blenkernel/intern/node.c	2010-07-08 06:49:08 UTC (rev 30102)
+++ branches/particles-2010/source/blender/blenkernel/intern/node.c	2010-07-08 07:49:42 UTC (rev 30103)
@@ -53,8 +53,8 @@
 #include "intern/SHD_util.h"
 #include "TEX_node.h"
 #include "intern/TEX_util.h"
-#include "PAR_node.h"
-#include "intern/PAR_util.h"
+#include "SIM_node.h"
+#include "intern/SIM_util.h"
 
 #include "GPU_material.h"
 
@@ -67,7 +67,7 @@
 		types[NTREE_SHADER] = &ntreeType_Shader;
 		types[NTREE_COMPOSIT] = &ntreeType_Composite;
 		types[NTREE_TEXTURE] = &ntreeType_Texture;
-		types[NTREE_PARTICLES] = &ntreeType_Particles;
+		types[NTREE_SIMULATION] = &ntreeType_Simulation;
 		types_init = 0;
 	}
 	
@@ -2874,7 +2874,7 @@
 	registerCompositNodes(&ntreeGetTypeInfo(NTREE_COMPOSIT)->node_types);
 	registerShaderNodes(&ntreeGetTypeInfo(NTREE_SHADER)->node_types);
 	registerTextureNodes(&ntreeGetTypeInfo(NTREE_TEXTURE)->node_types);
-	registerParticleNodes(&ntreeGetTypeInfo(NTREE_PARTICLES)->node_types);
+	registerParticleNodes(&ntreeGetTypeInfo(NTREE_SIMULATION)->node_types);
 }
 
 void free_nodesystem(void) 
@@ -2884,7 +2884,7 @@
 	remove_dynamic_typeinfos(&ntreeGetTypeInfo(NTREE_SHADER)->node_types);
 	BLI_freelistN(&ntreeGetTypeInfo(NTREE_SHADER)->node_types);
 	BLI_freelistN(&ntreeGetTypeInfo(NTREE_TEXTURE)->node_types);
-	BLI_freelistN(&ntreeGetTypeInfo(NTREE_PARTICLES)->node_types);
+	BLI_freelistN(&ntreeGetTypeInfo(NTREE_SIMULATION)->node_types);
 }
 
 /* called from unlink_scene, when deleting a scene goes over all scenes

Modified: branches/particles-2010/source/blender/editors/space_node/drawnode.c
===================================================================
--- branches/particles-2010/source/blender/editors/space_node/drawnode.c	2010-07-08 06:49:08 UTC (rev 30102)
+++ branches/particles-2010/source/blender/editors/space_node/drawnode.c	2010-07-08 07:49:42 UTC (rev 30103)
@@ -1261,6 +1261,7 @@
 	}
 }
 
+#if 0
 static void node_particles_buts_emitter(uiLayout *layout, bContext *C, PointerRNA *ptr)
 {
 	bNode *node= ptr->data;
@@ -1278,18 +1279,21 @@
 	
 	if(!node->id) return;
 }
+#endif
 
 /* only once called */
-static void node_particles_set_butfunc(bNodeType *ntype)
+static void node_simulation_set_butfunc(bNodeType *ntype)
 {
 	switch(ntype->type) {
-	case PAR_NODE_EMITTER:
-		ntype->uifunc = node_particles_buts_emitter;
+	#if 0
+	case SIM_NODE_EMITTER:
+		ntype->uifunc = node_simulation_buts_emitter;
 		break;
 		
-	case PAR_NODE_OBJECT:
+	case SIM_NODE_OBJECT:
 		ntype->uifunc = node_particles_buts_object;
 		break;
+	#endif
 		
 	default:
 		ntype->uifunc= NULL;
@@ -1328,11 +1332,11 @@
 		ntype= ntype->next;
 	}
 	
-	treetype= ntreeGetTypeInfo(NTREE_PARTICLES);
+	treetype= ntreeGetTypeInfo(NTREE_SIMULATION);
 	/* texture nodes */
 	ntype= treetype->node_types.first;
 	while(ntype) {
-		node_particles_set_butfunc(ntype);
+		node_simulation_set_butfunc(ntype);
 		ntype= ntype->next;
 	}
 }

Modified: branches/particles-2010/source/blender/editors/space_node/node_draw.c
===================================================================
--- branches/particles-2010/source/blender/editors/space_node/node_draw.c	2010-07-08 06:49:08 UTC (rev 30102)
+++ branches/particles-2010/source/blender/editors/space_node/node_draw.c	2010-07-08 07:49:42 UTC (rev 30103)
@@ -105,7 +105,7 @@
 		DAG_id_flush_update(id, 0);
 		WM_main_add_notifier(NC_TEXTURE|ND_NODES, id);
 	}
-	else if(treetype==NTREE_PARTICLES) {
+	else if(treetype==NTREE_SIMULATION) {
 		DAG_id_flush_update(id, 0);
 		WM_main_add_notifier(NC_OBJECT|ND_NODES, id);
 	}

Modified: branches/particles-2010/source/blender/editors/space_node/node_edit.c
===================================================================
--- branches/particles-2010/source/blender/editors/space_node/node_edit.c	2010-07-08 06:49:08 UTC (rev 30102)
+++ branches/particles-2010/source/blender/editors/space_node/node_edit.c	2010-07-08 07:49:42 UTC (rev 30103)
@@ -223,7 +223,7 @@
 		WM_event_add_notifier(C, NC_SCENE|ND_NODES, snode->id);
 	else if(snode->treetype==NTREE_TEXTURE)
 		WM_event_add_notifier(C, NC_TEXTURE|ND_NODES, snode->id);
-	else if(snode->treetype==NTREE_PARTICLES)
+	else if(snode->treetype==NTREE_SIMULATION)
 		WM_event_add_notifier(C, NC_OBJECT|ND_NODES, snode->id);
 }
 
@@ -348,7 +348,7 @@
 		return;
 	}
 	
-	part->nodetree= ntreeAddTree(NTREE_PARTICLES);
+	part->nodetree= ntreeAddTree(NTREE_SIMULATION);
 	
 	prog= nodeAddNodeType(part->nodetree, PAR_NODE_PROGRAM, NULL, NULL);
 	prog->locx= 300.0f; prog->locy= 300.0f;
@@ -380,7 +380,7 @@
 	else if(idtype == ID_PA) {
 		#if 0
 		*ntree= ((ParticleSettings*)id)->nodetree;
-		if(treetype) *treetype= NTREE_PARTICLES;
+		if(treetype) *treetype= NTREE_SIMULATION;
 		#endif
 	}
 
@@ -461,7 +461,7 @@
 			}
 		}
 	}
-	else if(snode->treetype==NTREE_PARTICLES) {
+	else if(snode->treetype==NTREE_SIMULATION) {
 		#if 0
 		/* TODO psys should be stored in the context (needed for data link resolution, etc) - phonybone */
 		if(ob) {
@@ -542,7 +542,7 @@
 			// allqueue(REDRAWIPO, 0);
 #endif
 		}
-		else if(snode->treetype==NTREE_PARTICLES) {
+		else if(snode->treetype==NTREE_SIMULATION) {
 			/* anything TODO? */
 		}
 	}

Modified: branches/particles-2010/source/blender/editors/space_node/node_header.c
===================================================================
--- branches/particles-2010/source/blender/editors/space_node/node_header.c	2010-07-08 06:49:08 UTC (rev 30102)
+++ branches/particles-2010/source/blender/editors/space_node/node_header.c	2010-07-08 07:49:42 UTC (rev 30103)
@@ -190,7 +190,7 @@
 		uiItemMenuF(layout, "Distort", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT));
 		uiItemMenuF(layout, "Group", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
 	}
-	else if(snode->treetype==NTREE_PARTICLES) {
+	else if(snode->treetype==NTREE_SIMULATION) {
 		uiItemMenuF(layout, "Input", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
 		uiItemMenuF(layout, "Output", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
 		uiItemMenuF(layout, "Simulation", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_SIMULATION));

Modified: branches/particles-2010/source/blender/editors/space_node/space_node.c
===================================================================
--- branches/particles-2010/source/blender/editors/space_node/space_node.c	2010-07-08 06:49:08 UTC (rev 30102)
+++ branches/particles-2010/source/blender/editors/space_node/space_node.c	2010-07-08 07:49:42 UTC (rev 30103)
@@ -234,8 +234,7 @@
 				ED_preview_shader_job(C, sa, snode->id, NULL, NULL, 100, 100, PR_NODE_RENDER);
 			}
 		}
-		else if(snode->treetype==NTREE_PARTICLES) {
-//			ParticleSettings *part= (ParticleSettings *)snode->id;
+		else if(snode->treetype==NTREE_SIMULATION) {
 			/* TODO */
 		}
 	}

Modified: branches/particles-2010/source/blender/makesdna/DNA_node_types.h
===================================================================
--- branches/particles-2010/source/blender/makesdna/DNA_node_types.h	2010-07-08 06:49:08 UTC (rev 30102)
+++ branches/particles-2010/source/blender/makesdna/DNA_node_types.h	2010-07-08 07:49:42 UTC (rev 30103)
@@ -199,11 +199,11 @@
 } bNodeTree;
 
 /* ntree->type, index */
-#define NTREE_SHADER	0
-#define NTREE_COMPOSIT	1
-#define NTREE_TEXTURE   2
-#define NTREE_PARTICLES	3
-#define NUM_NTREE_TYPES	4
+#define NTREE_SHADER		0
+#define NTREE_COMPOSIT		1
+#define NTREE_TEXTURE		2
+#define NTREE_SIMULATION	3
+#define NUM_NTREE_TYPES		4
 
 /* ntree->init, flag */
 #define NTREE_TYPE_INIT	1

Modified: branches/particles-2010/source/blender/makesrna/intern/rna_space.c
===================================================================
--- branches/particles-2010/source/blender/makesrna/intern/rna_space.c	2010-07-08 06:49:08 UTC (rev 30102)
+++ branches/particles-2010/source/blender/makesrna/intern/rna_space.c	2010-07-08 07:49:42 UTC (rev 30103)
@@ -2159,7 +2159,7 @@
 		{NTREE_SHADER, "MATERIAL", ICON_MATERIAL, "Material", "Material nodes"},
 		{NTREE_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture nodes"},
 		{NTREE_COMPOSIT, "COMPOSITING", ICON_RENDERLAYERS, "Compositing", "Compositing nodes"},
-		{NTREE_PARTICLES, "PARTICLES", ICON_PARTICLES, "Particles", "Particle nodes"},
+		{NTREE_SIMULATION, "PARTICLES", ICON_PHYSICS, "Simulation", "Simulation nodes"},
 		{0, NULL, 0, NULL, NULL}};
 
 	static EnumPropertyItem texture_type_items[] = {

Modified: branches/particles-2010/source/blender/nodes/CMakeLists.txt
===================================================================
--- branches/particles-2010/source/blender/nodes/CMakeLists.txt	2010-07-08 06:49:08 UTC (rev 30102)
+++ branches/particles-2010/source/blender/nodes/CMakeLists.txt	2010-07-08 07:49:42 UTC (rev 30103)
@@ -23,7 +23,7 @@
 #
 # ***** END GPL LICENSE BLOCK *****
 
-FILE(GLOB SRC intern/*.c intern/CMP_nodes/*.c intern/SHD_nodes/*.c intern/TEX_nodes/*.c intern/PAR_nodes/*.c)
+FILE(GLOB SRC intern/*.c intern/CMP_nodes/*.c intern/SHD_nodes/*.c intern/TEX_nodes/*.c intern/SIM_nodes/*.c)
 
 SET(INC 
 	. ../../../intern/guardedalloc ../editors/include ../blenlib ../makesdna

Deleted: branches/particles-2010/source/blender/nodes/PAR_node.h
===================================================================
--- branches/particles-2010/source/blender/nodes/PAR_node.h	2010-07-08 06:49:08 UTC (rev 30102)
+++ branches/particles-2010/source/blender/nodes/PAR_node.h	2010-07-08 07:49:42 UTC (rev 30103)
@@ -1,46 +0,0 @@
-/**
- *
- * ***** 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. The Blender
- * Foundation also sells licenses for use in proprietary software under
- * the Blender License.  See http://www.blender.org/BL/ for information
- * about this.
- *
- * 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

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list