[Bf-blender-cvs] [866537d] alembic: Removed the Cache modifier because it is unused now and causes some merge conflicts with master.

Lukas Tönne noreply at git.blender.org
Tue Mar 31 17:45:45 CEST 2015


Commit: 866537d001c916ebb3e4dac7caefc5c13bf05d04
Author: Lukas Tönne
Date:   Tue Mar 31 17:44:05 2015 +0200
Branches: alembic
https://developer.blender.org/rB866537d001c916ebb3e4dac7caefc5c13bf05d04

Removed the Cache modifier because it is unused now and causes some
merge conflicts with master.

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

M	release/scripts/startup/bl_ui/properties_data_modifier.py
M	source/blender/blenloader/intern/readfile.c
M	source/blender/editors/space_outliner/outliner_draw.c
M	source/blender/makesdna/DNA_modifier_types.h
M	source/blender/makesrna/RNA_access.h
M	source/blender/makesrna/intern/rna_modifier.c
M	source/blender/modifiers/CMakeLists.txt
M	source/blender/modifiers/MOD_modifiertypes.h
D	source/blender/modifiers/intern/MOD_cache.c
M	source/blender/modifiers/intern/MOD_util.c
M	source/blender/pointcache/PTC_api.cpp
M	source/blender/pointcache/PTC_api.h
M	source/blender/pointcache/alembic/abc_mesh.cpp
M	source/blender/pointcache/alembic/abc_mesh.h
M	source/blender/pointcache/alembic/alembic.cpp
M	source/blender/pointcache/intern/ptc_types.h

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

diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index dc586d5..a3cf079 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -169,9 +169,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         sub.active = md.use_random_order
         sub.prop(md, "seed")
 
-    def CACHE(self, layout, ob, md):
-        pass
-
     def MESH_CACHE(self, layout, ob, md):
         layout.prop(md, "cache_format")
         layout.prop(md, "filepath")
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 04f108c..f539101 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5021,13 +5021,6 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
 			csmd->delta_cache = NULL;
 			csmd->delta_cache_num = 0;
 		}
-		else if (md->type == eModifierType_Cache) {
-			CacheModifierData *cmd = (CacheModifierData *)md;
-			
-			cmd->output_dm = NULL;
-			cmd->input_dm = NULL;
-			cmd->flag &= ~(MOD_CACHE_USE_OUTPUT_REALTIME | MOD_CACHE_USE_OUTPUT_RENDER);
-		}
 	}
 }
 
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 62a74ee..420b73c 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -1170,8 +1170,6 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
 						UI_icon_draw(x, y, ICON_MOD_DATA_TRANSFER); break;
 					case eModifierType_NormalEdit:
 						UI_icon_draw(x, y, ICON_MOD_NORMALEDIT); break;
-					case eModifierType_Cache:
-						UI_icon_draw(x, y, ICON_PHYSICS); break;
 					/* Default */
 					case eModifierType_None:
 					case eModifierType_ShapeKey:
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 7c232d1..f3c61f0 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -85,7 +85,6 @@ typedef enum ModifierType {
 	eModifierType_DataTransfer      = 49,
 	eModifierType_NormalEdit        = 50,
 	eModifierType_CorrectiveSmooth  = 51,
-	eModifierType_Cache             = 52,
 	NUM_MODIFIER_TYPES
 } ModifierType;
 
@@ -1488,25 +1487,6 @@ enum {
 	MOD_DATATRANSFER_USE_POLY         = 1 << 31,
 };
 
-/* point cache modifier */
-typedef struct CacheModifierData {
-	ModifierData modifier;
-	
-	int flag;
-	int pad;
-	
-	/* DM data for writing into the cache */
-	struct DerivedMesh *output_dm;
-	
-	/* DM data read from the cache for modifier input */
-	struct DerivedMesh *input_dm;
-} CacheModifierData;
-
-typedef enum eCacheModifier_Flag {
-	MOD_CACHE_USE_OUTPUT_REALTIME     = 1,
-	MOD_CACHE_USE_OUTPUT_RENDER       = 2,
-} eCacheModifier_Flag;
-
 /* Set Split Normals modifier */
 typedef struct NormalEditModifierData {
 	ModifierData modifier;
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index e2e1078..c43108a 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -455,7 +455,6 @@ extern StructRNA RNA_ParticleSystemModifier;
 extern StructRNA RNA_ParticleTarget;
 extern StructRNA RNA_PivotConstraint;
 extern StructRNA RNA_PointCache;
-extern StructRNA RNA_PointCacheModifier;
 extern StructRNA RNA_PointDensity;
 extern StructRNA RNA_PointDensityTexture;
 extern StructRNA RNA_PointLamp;
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index e11b07d..ce4058b 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -65,7 +65,6 @@ EnumPropertyItem modifier_type_items[] = {
 	{0, "", 0, N_("Modify"), ""},
 	{eModifierType_DataTransfer, "DATA_TRANSFER", ICON_MOD_DATA_TRANSFER, "Data Transfer", ""},
 	{eModifierType_MeshCache, "MESH_CACHE", ICON_MOD_MESHDEFORM, "Mesh Cache", ""},
-	{eModifierType_Cache, "CACHE", ICON_MOD_MESHDEFORM, "Cache", ""},
 	{eModifierType_NormalEdit, "NORMAL_EDIT", ICON_MOD_NORMALEDIT, "Normal Edit", ""},
 	{eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""},
 	{eModifierType_UVWarp, "UV_WARP", ICON_MOD_UVPROJECT, "UV Warp", ""},
@@ -381,8 +380,6 @@ static StructRNA *rna_Modifier_refine(struct PointerRNA *ptr)
 			return &RNA_NormalEditModifier;
 		case eModifierType_CorrectiveSmooth:
 			return &RNA_CorrectiveSmoothModifier;
-		case eModifierType_Cache:
-			return &RNA_CacheModifier;
 		/* Default */
 		case eModifierType_None:
 		case eModifierType_ShapeKey:
@@ -4556,16 +4553,6 @@ static void rna_def_modifier_normaledit(BlenderRNA *brna)
 	RNA_def_property_update(prop, 0, "rna_Modifier_update");
 }
 
-static void rna_def_modifier_cache(BlenderRNA *brna)
-{
-	StructRNA *srna;
-
-	srna = RNA_def_struct(brna, "CacheModifier", "Modifier");
-	RNA_def_struct_ui_text(srna, "Cache Modifier", "Write and Read mesh results to/from cache libraries");
-	RNA_def_struct_sdna(srna, "CacheModifierData");
-	RNA_def_struct_ui_icon(srna, ICON_MOD_MESHDEFORM);  /* XXX, needs own icon */
-}
-
 void RNA_def_modifier(BlenderRNA *brna)
 {
 	StructRNA *srna;
@@ -4682,7 +4669,6 @@ void RNA_def_modifier(BlenderRNA *brna)
 	rna_def_modifier_wireframe(brna);
 	rna_def_modifier_datatransfer(brna);
 	rna_def_modifier_normaledit(brna);
-	rna_def_modifier_cache(brna);
 }
 
 #endif
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt
index d271529..d7d3d77 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -79,7 +79,6 @@ set(SRC
 	intern/MOD_ocean.c
 	intern/MOD_particleinstance.c
 	intern/MOD_particlesystem.c
-	intern/MOD_cache.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 0fd9844..a5d9675 100644
--- a/source/blender/modifiers/MOD_modifiertypes.h
+++ b/source/blender/modifiers/MOD_modifiertypes.h
@@ -84,7 +84,6 @@ extern ModifierTypeInfo modifierType_Wireframe;
 extern ModifierTypeInfo modifierType_DataTransfer;
 extern ModifierTypeInfo modifierType_NormalEdit;
 extern ModifierTypeInfo modifierType_CorrectiveSmooth;
-extern ModifierTypeInfo modifierType_Cache;
 
 /* MOD_util.c */
 void modifier_type_init(ModifierTypeInfo *types[]);
diff --git a/source/blender/modifiers/intern/MOD_cache.c b/source/blender/modifiers/intern/MOD_cache.c
deleted file mode 100644
index a2650d0..0000000
--- a/source/blender/modifiers/intern/MOD_cache.c
+++ /dev/null
@@ -1,231 +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.
- *
- * 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
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Contributor(s): Lukas Toenne
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file blender/modifiers/intern/MOD_cache.c
- *  \ingroup modifiers
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "BLI_listbase.h"
-#include "BLI_utildefines.h"
-#include "BLI_string.h"
-
-#include "DNA_customdata_types.h"
-#include "DNA_scene_types.h"
-#include "DNA_object_types.h"
-#include "DNA_mesh_types.h"
-#include "DNA_meshdata_types.h"
-
-#include "BKE_cdderivedmesh.h"
-#include "BKE_customdata.h"
-#include "BKE_DerivedMesh.h"
-#include "BKE_scene.h"
-#include "BKE_global.h"
-#include "BKE_mesh.h"
-#include "BKE_main.h"
-
-#include "MEM_guardedalloc.h"
-
-#include "MOD_modifiertypes.h"
-
-#include "MOD_util.h"
-
-struct BMEditMesh;
-
-static void initData(ModifierData *UNUSED(md))
-{
-	/*CacheModifierData *pcmd = (CacheModifierData *)md;*/
-}
-
-static void copyData(ModifierData *md, ModifierData *target)
-{
-	/*CacheModifierData *pcmd = (CacheModifierData *)md;*/
-	CacheModifierData *tpcmd = (CacheModifierData *)target;
-	
-	modifier_copyData_generic(md, target);
-	
-	tpcmd->output_dm = NULL;
-	tpcmd->input_dm = NULL;
-	tpcmd->flag &= ~(MOD_CACHE_USE_OUTPUT_REALTIME | MOD_CACHE_USE_OUTPUT_RENDER);
-}
-
-static void freeData(ModifierData *md)
-{
-	CacheModifierData *pcmd = (CacheModifierData *)md;
-	
-	if (pcmd->output_dm) {
-		pcmd->output_dm->release(pcmd->output_dm);
-		pcmd->output_dm = NULL;
-	}
-	if (pcmd->input_dm) {
-		pcmd->input_dm->release(pcmd->input_dm);
-		pcmd->input_dm = NULL;
-	}
-}
-
-static bool *store_nocopy_flags(CustomData *cdata)
-{
-	if (cdata) {
-		int totlayer = cdata->totlayer;
-		bool *nocopy = MEM_mallocN(sizeof(bool) * totlayer, "customdata nocopy flags");
-		CustomDataLayer *layer;
-		int i;
-		
-		for (i = 0, layer = cdata->layers; i < totlayer; ++i, ++layer) {
-			nocopy[i] = layer->flag & CD_FLAG_NOCOPY;
-			layer->flag &= ~CD_FLAG_NOCOPY;
-		}
-		
-		return nocopy;
-	}
-	else
-		return NULL;
-}
-
-static void restore_nocopy_flags(CustomData *cdata, bool *nocopy)
-{
-	if (cdata && nocopy) {
-		int totlayer = cdata->totlayer;
-		CustomDataLayer *layer;
-		int i;
-		
-		for (i = 0, layer = cdata->layers; i < totlayer; ++i, ++layer) {
-			if (nocopy[i])
-				layer->flag |= CD_FLAG_NOCOPY;
-			else
-				layer->flag &= ~CD_FLAG_NOCOPY;
-		}
-	}
-	
-	if (nocopy)
-		MEM_freeN(nocopy);
-}
-
-static DerivedMesh *pointcache_do(CacheModifierData *pcmd, Object *UNUSED(ob), DerivedMesh *dm, ModifierApplyFlag flag)
-{
-	bool use_output;
-	
-	if (!(flag & MOD_APPLY_USECACHE))
-		return dm;
-	
-	use_output = (flag & MOD_APPLY_RENDER) ? (pcmd->flag & MOD_CACHE_USE_OUTPUT_RENDER) : (pcmd->flag & MOD_CACHE_USE

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list