[Bf-blender-cvs] [2f1554c] alembic_pointcache: Added a new DNA file DNA_pointcache_types.h for all point cache related structs and enum values. DNA_object_force.h was use previously, this is a badly named file with a hodgepodge of different areas.

Lukas Tönne noreply at git.blender.org
Thu Oct 16 16:52:58 CEST 2014


Commit: 2f1554c17641f5ebcc3bb28b7cabe579cfbf3e1b
Author: Lukas Tönne
Date:   Sun Nov 24 12:07:40 2013 +0100
Branches: alembic_pointcache
https://developer.blender.org/rB2f1554c17641f5ebcc3bb28b7cabe579cfbf3e1b

Added a new DNA file DNA_pointcache_types.h for all point cache related
structs and enum values. DNA_object_force.h was use previously, this is
a badly named file with a hodgepodge of different areas.

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

M	source/blender/CMakeLists.txt
M	source/blender/blenkernel/BKE_pointcache.h
M	source/blender/blenkernel/intern/bpath.c
M	source/blender/blenkernel/intern/depsgraph.c
M	source/blender/blenkernel/intern/dynamicpaint.c
M	source/blender/blenkernel/intern/object.c
M	source/blender/blenkernel/intern/particle.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_legacy.c
M	source/blender/editors/space_view3d/drawobject.c
M	source/blender/makesdna/DNA_object_force.h
A	source/blender/makesdna/DNA_pointcache_types.h
M	source/blender/makesdna/intern/makesdna.c
M	source/blender/makesrna/intern/rna_pointcache.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/pointcache/PTC_api.cpp
M	source/blender/render/intern/source/voxeldata.c

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

diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
index 26c5008..e2bf593 100644
--- a/source/blender/CMakeLists.txt
+++ b/source/blender/CMakeLists.txt
@@ -67,6 +67,7 @@ set(SRC_DNA_INC
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_outliner_types.h
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_packedFile_types.h
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_particle_types.h
+	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_pointcache_types.h
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_property_types.h
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_rigidbody_types.h
 	${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_scene_types.h
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index ea2f753..a7bb976 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -34,7 +34,7 @@
 
 #include "DNA_ID.h"
 #include "DNA_dynamicpaint_types.h"
-#include "DNA_object_force.h"
+#include "DNA_pointcache_types.h"
 #include "DNA_boid_types.h"
 #include <stdio.h> /* for FILE */
 
diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c
index b7a6cf4..a939b17d 100644
--- a/source/blender/blenkernel/intern/bpath.c
+++ b/source/blender/blenkernel/intern/bpath.c
@@ -55,6 +55,7 @@
 #include "DNA_object_fluidsim.h"
 #include "DNA_object_force.h"
 #include "DNA_object_types.h"
+#include "DNA_pointcache_types.h"
 #include "DNA_particle_types.h"
 #include "DNA_sequence_types.h"
 #include "DNA_sound_types.h"
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 6ef20ec..0a28053 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -52,6 +52,8 @@
 #include "DNA_material_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_node_types.h"
+#include "DNA_object_force.h"
+#include "DNA_pointcache_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_screen_types.h"
 #include "DNA_windowmanager_types.h"
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index fe9a96d..835b822 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -47,6 +47,8 @@
 #include "DNA_meshdata_types.h"
 #include "DNA_modifier_types.h"
 #include "DNA_object_types.h"
+#include "DNA_object_force.h"
+#include "DNA_pointcache_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_space_types.h"
 #include "DNA_texture_types.h"
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 24e4b17..d6587ac 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -48,6 +48,7 @@
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
 #include "DNA_movieclip_types.h"
+#include "DNA_object_force.h"
 #include "DNA_scene_types.h"
 #include "DNA_screen_types.h"
 #include "DNA_sequence_types.h"
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index a76b60f..6177f4a 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -42,7 +42,9 @@
 #include "DNA_material_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
+#include "DNA_object_force.h"
 #include "DNA_particle_types.h"
+#include "DNA_pointcache_types.h"
 #include "DNA_smoke_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_dynamicpaint_types.h"
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 23f7dd6..15d10d4 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -63,8 +63,10 @@
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
 #include "DNA_modifier_types.h"
+#include "DNA_object_force.h"
 #include "DNA_object_types.h"
 #include "DNA_particle_types.h"
+#include "DNA_pointcache_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_smoke_types.h"
 
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 4e2f708..e80fb74 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -63,6 +63,8 @@ variables on the UI for now
 #include "DNA_curve_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
+#include "DNA_object_force.h"
+#include "DNA_pointcache_types.h"
 
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 047dc36..ccdc3c6 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -80,9 +80,11 @@
 #include "DNA_nla_types.h"
 #include "DNA_node_types.h"
 #include "DNA_object_fluidsim.h" // NT
+#include "DNA_object_force.h"
 #include "DNA_object_types.h"
 #include "DNA_packedFile_types.h"
 #include "DNA_particle_types.h"
+#include "DNA_pointcache_types.h"
 #include "DNA_property_types.h"
 #include "DNA_rigidbody_types.h"
 #include "DNA_text_types.h"
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index 62e3955..a3b71cc 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -54,7 +54,9 @@
 #include "DNA_meshdata_types.h"
 #include "DNA_node_types.h"
 #include "DNA_object_fluidsim.h" // NT
+#include "DNA_object_force.h"
 #include "DNA_object_types.h"
+#include "DNA_pointcache_types.h"
 #include "DNA_view3d_types.h"
 #include "DNA_screen_types.h"
 #include "DNA_sdna_types.h"
diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c
index 067a862..9adc6aa 100644
--- a/source/blender/blenloader/intern/versioning_legacy.c
+++ b/source/blender/blenloader/intern/versioning_legacy.c
@@ -60,7 +60,9 @@
 #include "DNA_nla_types.h"
 #include "DNA_node_types.h"
 #include "DNA_object_fluidsim.h" // NT
+#include "DNA_object_force.h"
 #include "DNA_object_types.h"
+#include "DNA_pointcache_types.h"
 #include "DNA_property_types.h"
 #include "DNA_view3d_types.h"
 #include "DNA_screen_types.h"
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index b4b8bd2..bb129ab 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -37,6 +37,7 @@
 #include "DNA_material_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_meta_types.h"
+#include "DNA_object_force.h"
 #include "DNA_rigidbody_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_smoke_types.h"
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index e8f100e..e80ddf2 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -127,90 +127,6 @@ typedef struct EffectorWeights {
 /* EffectorWeights->flag */
 #define EFF_WEIGHT_DO_HAIR		1
 
-/* Point cache file data types:
- * - used as (1<<flag) so poke jahka if you reach the limit of 15
- * - to add new data types update:
- *		* BKE_ptcache_data_size()
- *		* ptcache_file_init_pointers()
- */
-#define BPHYS_DATA_INDEX		0
-#define BPHYS_DATA_LOCATION		1
-#define BPHYS_DATA_SMOKE_LOW	1
-#define BPHYS_DATA_VELOCITY		2
-#define BPHYS_DATA_SMOKE_HIGH	2
-#define BPHYS_DATA_ROTATION		3
-#define BPHYS_DATA_DYNAMICPAINT 3
-#define BPHYS_DATA_AVELOCITY	4	/* used for particles */
-#define BPHYS_DATA_XCONST		4	/* used for cloth */
-#define BPHYS_DATA_SIZE			5
-#define BPHYS_DATA_TIMES		6
-#define BPHYS_DATA_BOIDS		7
-
-#define BPHYS_TOT_DATA			8
-
-#define BPHYS_EXTRA_FLUID_SPRINGS	1
-
-typedef struct PTCacheExtra {
-	struct PTCacheExtra *next, *prev;
-	unsigned int type, totdata;
-	void *data;
-} PTCacheExtra;
-
-typedef struct PTCacheMem {
-	struct PTCacheMem *next, *prev;
-	unsigned int frame, totpoint;
-	unsigned int data_types, flag;
-
-	void *data[8]; /* BPHYS_TOT_DATA */
-	void *cur[8]; /* BPHYS_TOT_DATA */
-
-	struct ListBase extradata;
-} PTCacheMem;
-
-typedef struct PointCache {
-	struct PointCache *next, *prev;
-	int flag;		/* generic flag */
-	
-	int step;		/* The number of frames between cached frames.
-					 * This should probably be an upper bound for a per point adaptive step in the future,
-					 * buf for now it's the same for all points. Without adaptivity this can effect the perceived
-					 * simulation quite a bit though. If for example particles are colliding with a horizontal
-					 * plane (with high damping) they quickly come to a stop on the plane, however there are still
-					 * forces acting on the particle (gravity and collisions), so the particle velocity isn't necessarily
-					 * zero for the whole duration of the frame even if the particle seems stationary. If all simulation
-					 * frames aren't cached (step > 1) these velocities are interpolated into movement for the non-cached
-					 * frames. The result will look like the point is oscillating around the collision location. So for
-					 * now cache step should be set to 1 for accurate reproduction of collisions.
-					 */
-
-	int simframe;	/* current frame of simulation (only if SIMULATION_VALID) */
-	int startframe;	/* simulation start frame */
-	int endframe;	/* simulation end frame */
-	int editframe;	/* frame being edited (runtime only) */
-	int last_exact; /* last exact frame that's cached */
-	int last_valid; /* used for editing cache - what is the last baked frame */
-	int pad;
-
-	/* for external cache files */
-	int totpoint;   /* number of cached points */
-	int index;	/* modifier stack index */
-	short compression, rt;
-	
-	char name[64];
-	char prev_name[64];
-	char info[64];
-	char path[1024]; /* file path, 1024 = FILE_MAX */
-	char *cached_frames;	/* array of length endframe-startframe+1 with flags to indicate cached frames */
-							/* can be later used for other per frame flags too if needed */
-	struct ListBase mem_cache;
-
-	struct PTCacheEdit *edit;
-	void (*free_edit)(struct PTCacheEdit *ed

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list