[Bf-blender-cvs] [d8d49be] temp_remove_particles: Removed particle system and particle instance modifiers.

Lukas Tönne noreply at git.blender.org
Wed Apr 13 11:45:38 CEST 2016


Commit: d8d49befa084b545fd390af61b130093b2fd4337
Author: Lukas Tönne
Date:   Wed Apr 13 11:45:15 2016 +0200
Branches: temp_remove_particles
https://developer.blender.org/rBd8d49befa084b545fd390af61b130093b2fd4337

Removed particle system and particle instance modifiers.

===================================================================

M	source/blender/blenkernel/BKE_modifier.h
M	source/blender/blenkernel/intern/modifier.c
M	source/blender/blenloader/intern/readfile.c
M	source/blender/blenloader/intern/versioning_270.c
M	source/blender/editors/interface/interface_templates.c
M	source/blender/editors/space_outliner/outliner_draw.c
M	source/blender/makesdna/DNA_modifier_types.h
M	source/blender/makesrna/intern/rna_scene.c
M	source/blender/modifiers/CMakeLists.txt
M	source/blender/modifiers/MOD_modifiertypes.h
D	source/blender/modifiers/intern/MOD_particleinstance.c
D	source/blender/modifiers/intern/MOD_particlesystem.c
M	source/blender/modifiers/intern/MOD_util.c
M	source/blender/render/intern/source/voxeldata.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index 455912a..c6f8bef 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -373,7 +373,6 @@ int           modifiers_getCageIndex(struct Scene *scene, struct Object *ob,
 bool          modifiers_isModifierEnabled(struct Object *ob, int modifierType);
 bool          modifiers_isSoftbodyEnabled(struct Object *ob);
 bool          modifiers_isClothEnabled(struct Object *ob);
-bool          modifiers_isParticleEnabled(struct Object *ob);
 
 struct Object *modifiers_isDeformedByArmature(struct Object *ob);
 struct Object *modifiers_isDeformedByLattice(struct Object *ob);
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 716da14..59eeb5d 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -401,13 +401,6 @@ bool modifiers_isModifierEnabled(Object *ob, int modifierType)
 	return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render));
 }
 
-bool modifiers_isParticleEnabled(Object *ob)
-{
-	ModifierData *md = modifiers_findByType(ob, eModifierType_ParticleSystem);
-
-	return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render));
-}
-
 bool modifier_isEnabled(struct Scene *scene, ModifierData *md, int required_mode)
 {
 	const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 6667ae9..f990640 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4992,15 +4992,6 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
 				direct_link_curvemapping(fd, hmd->curfalloff);
 			}
 		}
-		else if (md->type == eModifierType_ParticleSystem) {
-			ParticleSystemModifierData *psmd = (ParticleSystemModifierData *)md;
-			
-			psmd->dm_final = NULL;
-			psmd->dm_deformed = NULL;
-			psmd->psys= newdataadr(fd, psmd->psys);
-			psmd->flag &= ~eParticleSystemFlag_psys_updated;
-			psmd->flag |= eParticleSystemFlag_file_loaded;
-		}
 		else if (md->type == eModifierType_Explode) {
 			ExplodeModifierData *psmd = (ExplodeModifierData *)md;
 			
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index b9191d5..ffc1391 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -389,22 +389,6 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
 		}
 	}
 
-	if (!MAIN_VERSION_ATLEAST(main, 271, 6)) {
-		Object *ob;
-		for (ob = main->object.first; ob; ob = ob->id.next) {
-			ModifierData *md;
-
-			for (md = ob->modifiers.first; md; md = md->next) {
-				if (md->type == eModifierType_ParticleSystem) {
-					ParticleSystemModifierData *pmd = (ParticleSystemModifierData *)md;
-					if (pmd->psys && pmd->psys->clmd) {
-						pmd->psys->clmd->sim_parms->vel_damping = 1.0f;
-					}
-				}
-			}
-		}
-	}
-
 	if (!MAIN_VERSION_ATLEAST(main, 272, 0)) {
 		if (!DNA_struct_elem_find(fd->filesdna, "RenderData", "int", "preview_start_resolution")) {
 			Scene *scene;
@@ -505,12 +489,6 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
 						ClothModifierData *clmd = (ClothModifierData *)md;
 						clmd->sim_parms->bending_damping = 0.5f;
 					}
-					else if (md->type == eModifierType_ParticleSystem) {
-						ParticleSystemModifierData *pmd = (ParticleSystemModifierData *)md;
-						if (pmd->psys->clmd) {
-							pmd->psys->clmd->sim_parms->bending_damping = 0.5f;
-						}
-					}
 				}
 			}
 		}
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 3b9692e..ace70d6 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -792,10 +792,6 @@ static int modifier_is_simulation(ModifierData *md)
 	{
 		return 1;
 	}
-	/* Particle Tab */
-	else if (md->type == eModifierType_ParticleSystem) {
-		return 2;
-	}
 	else {
 		return 0;
 	}
@@ -918,9 +914,6 @@ static uiLayout *draw_modifier(
 		else if (modifier_is_simulation(md) == 1) {
 			uiItemStringO(row, "", ICON_BUTS, "WM_OT_properties_context_change", "context", "PHYSICS");
 		}
-		else if (modifier_is_simulation(md) == 2) {
-			uiItemStringO(row, "", ICON_BUTS, "WM_OT_properties_context_change", "context", "PARTICLES");
-		}
 		UI_block_emboss_set(block, UI_EMBOSS);
 	}
 
@@ -948,7 +941,7 @@ static uiLayout *draw_modifier(
 			UI_block_lock_clear(block);
 			UI_block_lock_set(block, ob && ob->id.lib, ERROR_LIBDATA_MESSAGE);
 			
-			if (!ELEM(md->type, eModifierType_Fluidsim, eModifierType_Softbody, eModifierType_ParticleSystem,
+			if (!ELEM(md->type, eModifierType_Fluidsim, eModifierType_Softbody,
 			           eModifierType_Cloth, eModifierType_Smoke))
 			{
 				uiItemO(row, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy"), ICON_NONE,
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index b624c7c..eb3e300 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -1103,10 +1103,6 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
 						UI_icon_draw(x, y, ICON_MOD_SOFT); break;
 					case eModifierType_Boolean: 
 						UI_icon_draw(x, y, ICON_MOD_BOOLEAN); break;
-					case eModifierType_ParticleSystem: 
-						UI_icon_draw(x, y, ICON_MOD_PARTICLES); break;
-					case eModifierType_ParticleInstance:
-						UI_icon_draw(x, y, ICON_MOD_PARTICLES); break;
 					case eModifierType_EdgeSplit:
 						UI_icon_draw(x, y, ICON_MOD_EDGESPLIT); break;
 					case eModifierType_Array:
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 457db70..9215606 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -52,8 +52,8 @@ typedef enum ModifierType {
 	eModifierType_Smooth            = 16,
 	eModifierType_Cast              = 17,
 	eModifierType_MeshDeform        = 18,
-	eModifierType_ParticleSystem    = 19,
-	eModifierType_ParticleInstance  = 20,
+	/*eModifierType_ParticleSystem    = 19,*/ /* DEPRECATED */
+	/*eModifierType_ParticleInstance  = 20,*/ /* DEPRECATED */
 	eModifierType_Explode           = 21,
 	eModifierType_Cloth             = 22,
 	eModifierType_Collision         = 23,
@@ -712,41 +712,6 @@ enum {
 	MOD_MDEF_SURFACE  = 1,
 };
 
-typedef struct ParticleSystemModifierData {
-	ModifierData modifier;
-
-	struct ParticleSystem *psys;
-	struct DerivedMesh *dm_final;  /* Final DM - its topology may differ from orig mesh. */
-	struct DerivedMesh *dm_deformed;  /* Deformed-onle DM - its topology is same as orig mesh one. */
-	int totdmvert, totdmedge, totdmface;
-	short flag, pad;
-} ParticleSystemModifierData;
-
-typedef enum {
-	eParticleSystemFlag_Pars         = (1 << 0),
-	eParticleSystemFlag_psys_updated = (1 << 1),
-	eParticleSystemFlag_file_loaded  = (1 << 2),
-} ParticleSystemModifierFlag;
-
-typedef enum {
-	eParticleInstanceFlag_Parents   = (1 << 0),
-	eParticleInstanceFlag_Children  = (1 << 1),
-	eParticleInstanceFlag_Path      = (1 << 2),
-	eParticleInstanceFlag_Unborn    = (1 << 3),
-	eParticleInstanceFlag_Alive     = (1 << 4),
-	eParticleInstanceFlag_Dead      = (1 << 5),
-	eParticleInstanceFlag_KeepShape = (1 << 6),
-	eParticleInstanceFlag_UseSize   = (1 << 7),
-} ParticleInstanceModifierFlag;
-
-typedef struct ParticleInstanceModifierData {
-	ModifierData modifier;
-
-	struct Object *ob;
-	short psys, flag, axis, pad;
-	float position, random_position;
-} ParticleInstanceModifierData;
-
 typedef enum {
 	eExplodeFlag_CalcFaces = (1 << 0),
 	eExplodeFlag_PaSize    = (1 << 1),
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 373e41d..6fa95db 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1565,7 +1565,7 @@ static void object_simplify_update(Object *ob)
 	ob->id.tag &= ~LIB_TAG_DOIT;
 
 	for (md = ob->modifiers.first; md; md = md->next) {
-		if (ELEM(md->type, eModifierType_Subsurf, eModifierType_Multires, eModifierType_ParticleSystem)) {
+		if (ELEM(md->type, eModifierType_Subsurf, eModifierType_Multires)) {
 			DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
 		}
 	}
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt
index 0de7676..a82c88d 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -78,8 +78,6 @@ set(SRC
 	intern/MOD_none.c
 	intern/MOD_normal_edit.c
 	intern/MOD_ocean.c
-	intern/MOD_particleinstance.c
-	intern/MOD_particlesystem.c
 	intern/MOD_remesh.c
 	intern/MOD_screw.c
 	intern/MOD_shapekey.c
diff --git a/source/blender/modifiers/MOD_modifiertypes.h b/source/blender/modifiers/MOD_modifiertypes.h
index a5d9675..ee8a03f 100644
--- a/source/blender/modifiers/MOD_modifiertypes.h
+++ b/source/blender/modifiers/MOD_modifiertypes.h
@@ -50,8 +50,6 @@ extern ModifierTypeInfo modifierType_UVProject;
 extern ModifierTypeInfo modifierType_Smooth;
 extern ModifierTypeInfo modifierType_Cast;
 extern ModifierTypeInfo modifierType_MeshDeform;
-extern ModifierTypeInfo modifierType_ParticleSystem;
-extern ModifierTypeInfo modifierType_ParticleInstance;
 extern ModifierTypeInfo modifierType_Explode;
 extern ModifierTypeInfo modifierType_Cloth;
 extern ModifierTypeInfo modifierType_Collision;
diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c
deleted file mode 100644
index 3c560ae..0000000
--- a/source/blender/modifiers/intern/MOD_particleinstance.c
+++ /dev/null
@@ -1,155 +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 

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list