[Bf-blender-cvs] [ac30a04] temp_remove_pointcache: Removed point cache blenkernel code.

Lukas Tönne noreply at git.blender.org
Fri Apr 29 15:04:32 CEST 2016


Commit: ac30a04b2721e0c088f31486047372754cc40930
Author: Lukas Tönne
Date:   Fri Apr 29 15:03:58 2016 +0200
Branches: temp_remove_pointcache
https://developer.blender.org/rBac30a04b2721e0c088f31486047372754cc40930

Removed point cache blenkernel code.

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

M	source/blender/blenkernel/BKE_cloth.h
M	source/blender/blenkernel/BKE_dynamicpaint.h
D	source/blender/blenkernel/BKE_pointcache.h
M	source/blender/blenkernel/CMakeLists.txt
M	source/blender/blenkernel/intern/cloth.c
M	source/blender/blenkernel/intern/depsgraph.c
M	source/blender/blenkernel/intern/dynamicpaint.c
M	source/blender/blenkernel/intern/object.c
D	source/blender/blenkernel/intern/pointcache.c
M	source/blender/blenkernel/intern/rigidbody.c
M	source/blender/blenkernel/intern/smoke.c
M	source/blender/blenkernel/intern/softbody.c
M	source/blender/blenloader/intern/readfile.c
M	source/blender/blenloader/intern/versioning_250.c
M	source/blender/blenloader/intern/versioning_260.c
M	source/blender/blenloader/intern/versioning_legacy.c
M	source/blender/blenloader/intern/writefile.c
M	source/blender/editors/object/object_edit.c
M	source/blender/editors/space_time/space_time.c
M	source/blender/editors/space_view3d/drawobject.c
M	source/blender/editors/transform/transform_conversions.c
M	source/blender/editors/transform/transform_manipulator.c
M	source/blender/makesrna/intern/rna_dynamicpaint.c
M	source/blender/makesrna/intern/rna_fluidsim.c
M	source/blender/makesrna/intern/rna_object_force.c
M	source/blender/makesrna/intern/rna_scene.c
M	source/blender/makesrna/intern/rna_smoke.c
M	source/blender/modifiers/intern/MOD_cloth.c
M	source/blender/modifiers/intern/MOD_collision.c
M	source/blender/render/intern/source/pipeline.c

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

diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h
index 28de270..38ee690 100644
--- a/source/blender/blenkernel/BKE_cloth.h
+++ b/source/blender/blenkernel/BKE_cloth.h
@@ -236,9 +236,6 @@ int cloth_uses_vgroup(struct ClothModifierData *clmd);
 void bvhtree_update_from_cloth(struct ClothModifierData *clmd, bool moving);
 void bvhselftree_update_from_cloth(struct ClothModifierData *clmd, bool moving);
 
-// needed for button_object.c
-void cloth_clear_cache (struct Object *ob, struct ClothModifierData *clmd, float framenr );
-
 // needed for cloth.c
 int cloth_add_spring (struct ClothModifierData *clmd, unsigned int indexA, unsigned int indexB, float restlength, int spring_type);
 
diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h
index 0025617..142ef18 100644
--- a/source/blender/blenkernel/BKE_dynamicpaint.h
+++ b/source/blender/blenkernel/BKE_dynamicpaint.h
@@ -73,7 +73,6 @@ void dynamicPaint_freeCanvas(struct DynamicPaintModifierData *pmd);
 void dynamicPaint_freeBrush(struct DynamicPaintModifierData *pmd);
 void dynamicPaint_freeSurfaceData(struct DynamicPaintSurface *surface);
 
-void dynamicPaint_cacheUpdateFrames(struct DynamicPaintSurface *surface);
 bool  dynamicPaint_surfaceHasColorPreview(struct DynamicPaintSurface *surface);
 bool dynamicPaint_outputLayerExists(struct DynamicPaintSurface *surface, struct Object *ob, int output);
 void dynamicPaintSurface_updateType(struct DynamicPaintSurface *surface);
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
deleted file mode 100644
index c0ddfa3..0000000
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ /dev/null
@@ -1,341 +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.
- *
- * The Original Code is Copyright (C) 2006 Blender Foundation.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): Campbell Barton <ideasman42 at gmail.com>
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef __BKE_POINTCACHE_H__
-#define __BKE_POINTCACHE_H__
-
-/** \file BKE_pointcache.h
- *  \ingroup bke
- */
-
-#include "DNA_ID.h"
-#include "DNA_dynamicpaint_types.h"
-#include "DNA_object_force.h"
-#include <stdio.h> /* for FILE */
-
-/* Point cache clearing option, for BKE_ptcache_id_clear, before
- * and after are non inclusive (they wont remove the cfra) */
-#define PTCACHE_CLEAR_ALL       0
-#define PTCACHE_CLEAR_FRAME     1
-#define PTCACHE_CLEAR_BEFORE    2
-#define PTCACHE_CLEAR_AFTER     3
-
-/* Point cache reset options */
-#define PTCACHE_RESET_DEPSGRAPH     0
-#define PTCACHE_RESET_BAKED         1
-#define PTCACHE_RESET_OUTDATED      2
-/* #define PTCACHE_RESET_FREE			3 */ /*UNUSED*/
-
-/* Add the blendfile name after blendcache_ */
-#define PTCACHE_EXT ".bphys"
-#define PTCACHE_PATH "blendcache_"
-
-/* File open options, for BKE_ptcache_file_open */
-#define PTCACHE_FILE_READ   0
-#define PTCACHE_FILE_WRITE  1
-#define PTCACHE_FILE_UPDATE 2
-
-/* PTCacheID types */
-#define PTCACHE_TYPE_SOFTBODY           0
-#define PTCACHE_TYPE_CLOTH              1
-#define PTCACHE_TYPE_SMOKE_DOMAIN       2
-#define PTCACHE_TYPE_SMOKE_HIGHRES      3
-#define PTCACHE_TYPE_DYNAMICPAINT       4
-#define PTCACHE_TYPE_RIGIDBODY          5
-
-/* high bits reserved for flags that need to be stored in file */
-#define PTCACHE_TYPEFLAG_COMPRESS       (1 << 16)
-#define PTCACHE_TYPEFLAG_EXTRADATA      (1 << 17)
-
-#define PTCACHE_TYPEFLAG_TYPEMASK           0x0000FFFF
-#define PTCACHE_TYPEFLAG_FLAGMASK           0xFFFF0000
-
-/* PTCache read return code */
-#define PTCACHE_READ_EXACT              1
-#define PTCACHE_READ_INTERPOLATED       2
-#define PTCACHE_READ_OLD                3
-
-/* Structs */
-struct ClothModifierData;
-struct ListBase;
-struct Main;
-struct Object;
-struct PointCacheKey;
-struct PointCache;
-struct Scene;
-struct SmokeModifierData;
-struct SoftBody;
-struct RigidBodyWorld;
-
-struct OpenVDBReader;
-struct OpenVDBWriter;
-
-/* temp structure for read/write */
-typedef struct PTCacheData {
-	unsigned int index;
-	float loc[3];
-	float vel[3];
-	float rot[4];
-	float ave[3];
-	float size;
-	float times[3];
-} PTCacheData;
-
-typedef struct PTCacheFile {
-	FILE *fp;
-
-	int frame, old_format;
-	unsigned int totpoint, type;
-	unsigned int data_types, flag;
-
-	struct PTCacheData data;
-	void *cur[BPHYS_TOT_DATA];
-} PTCacheFile;
-
-#define PTCACHE_VEL_PER_SEC     1
-
-enum {
-	PTCACHE_FILE_PTCACHE = 0,
-	PTCACHE_FILE_OPENVDB = 1,
-};
-
-typedef struct PTCacheID {
-	struct PTCacheID *next, *prev;
-
-	struct Scene *scene;
-	struct Object *ob;
-	void *calldata;
-	unsigned int type, file_type;
-	unsigned int stack_index;
-	unsigned int flag;
-
-	unsigned int default_step;
-	unsigned int max_step;
-
-	/* flags defined in DNA_object_force.h */
-	unsigned int data_types, info_types;
-
-	/* copies point data to cache data */
-	int (*write_point)(int index, void *calldata, void **data, int cfra);
-	/* copies cache cata to point data */
-	void (*read_point)(int index, void *calldata, void **data, float cfra, float *old_data);
-	/* interpolated between previously read point data and cache data */
-	void (*interpolate_point)(int index, void *calldata, void **data, float cfra, float cfra1, float cfra2, float *old_data);
-
-	/* copies point data to cache data */
-	int (*write_stream)(PTCacheFile *pf, void *calldata);
-	/* copies cache cata to point data */
-	int (*read_stream)(PTCacheFile *pf, void *calldata);
-
-	/* copies point data to cache data */
-	int (*write_openvdb_stream)(struct OpenVDBWriter *writer, void *calldata);
-	/* copies cache cata to point data */
-	int (*read_openvdb_stream)(struct OpenVDBReader *reader, void *calldata);
-
-	/* copies custom extradata to cache data */
-	void (*write_extra_data)(void *calldata, struct PTCacheMem *pm, int cfra);
-	/* copies custom extradata to cache data */
-	void (*read_extra_data)(void *calldata, struct PTCacheMem *pm, float cfra);
-	/* copies custom extradata to cache data */
-	void (*interpolate_extra_data)(void *calldata, struct PTCacheMem *pm, float cfra, float cfra1, float cfra2);
-
-	/* total number of simulated points (the cfra parameter is just for using same function pointer with totwrite) */
-	int (*totpoint)(void *calldata, int cfra);
-	/* report error if number of points does not match */
-	void (*error)(void *calldata, const char *message);
-	/* number of points written for current cache frame */
-	int (*totwrite)(void *calldata, int cfra);
-
-	int (*write_header)(PTCacheFile *pf);
-	int (*read_header)(PTCacheFile *pf);
-
-	struct PointCache *cache;
-	/* used for setting the current cache from ptcaches list */
-	struct PointCache **cache_ptr;
-	struct ListBase *ptcaches;
-} PTCacheID;
-
-typedef struct PTCacheBaker {
-	struct Main *main;
-	struct Scene *scene;
-	int bake;
-	int render;
-	int anim_init;
-	int quick_step;
-	struct PTCacheID pid;
-
-	void (*update_progress)(void *data, float progress, int *cancel);
-	void *bake_job;
-} PTCacheBaker;
-
-/* PTCacheEditKey->flag */
-#define PEK_SELECT      1
-#define PEK_TAG         2
-#define PEK_HIDE        4
-#define PEK_USE_WCO     8
-
-typedef struct PTCacheEditKey {
-	float *co;
-	float *vel;
-	float *rot;
-	float *time;
-
-	float world_co[3];
-	float ftime;
-	float length;
-	short flag;
-} PTCacheEditKey;
-
-/* PTCacheEditPoint->flag */
-#define PEP_TAG             1
-#define PEP_EDIT_RECALC     2
-#define PEP_TRANSFORM       4
-#define PEP_HIDE            8
-
-typedef struct PTCacheEditPoint {
-	struct PTCacheEditKey *keys;
-	int totkey;
-	short flag;
-} PTCacheEditPoint;
-
-typedef struct PTCacheUndo {
-	struct PTCacheUndo *next, *prev;
-	struct PTCacheEditPoint *points;
-
-	/* particles stuff */
-	struct ParticleData *particles;
-	struct KDTree *emitter_field;
-	float *emitter_cosnos;
-	int psys_flag;
-
-	/* cache stuff */
-	struct ListBase mem_cache;
-
-	int totpoint;
-	char name[64];
-} PTCacheUndo;
-
-typedef struct PTCacheEdit {
-	ListBase undo;
-	struct PTCacheUndo *curundo;
-	PTCacheEditPoint *points;
-
-	struct PTCacheID pid;
-
-	int totpoint, totframes, totcached, edited;
-
-	unsigned char sel_col[3];
-	unsigned char nosel_col[3];
-} PTCacheEdit;
-
-typedef struct PointCacheKey {
-	float co[3];	/* location */
-	float vel[3];	/* velocity */
-	float rot[4];	/* rotation quaternion */
-	float ave[3];	/* angular velocity */
-	float time;		/* when this key happens */
-} PointCacheKey;
-
-void BKE_ptcache_make_key(struct PointCacheKey *key, int index, void **data, float time);
-
-/**************** Creating ID's ****************************/
-void BKE_ptcache_id_from_softbody(PTCacheID *pid, struct Object *ob, struct SoftBody *sb);
-void BKE_ptcache_id_from_cloth(PTCacheID *pid, struct Object *ob, struct ClothModifierData *clmd);
-void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct SmokeModifierData *smd);
-void BKE_ptcache_id_from_dynamicpaint(PTCacheID *pid, struct Object *ob, struct DynamicPaintSurface *surface);
-void BKE_ptcache_id_from_rigidbody(PTCacheID *pid, struct Object *ob, struct RigidBodyWorld *rbw);
-
-void BKE_ptcache_ids_from_object(struct ListBase *lb, struct Object *ob, struct Scene *scene, int duplis);
-
-/***************** Global funcs ****************************/
-void BKE_ptcache_remove(void);
-
-/************ ID specific functions ************************/
-void    BKE_ptcache_id_clear(PTCacheID *id, int mode, unsigned int cfra);
-int     

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list