Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-07-10 15:14:55 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-07-10 16:31:34 +0300
commit873d7f7e14e080f75e75ed7c6c07f326e588cecb (patch)
treeb0147308da930199bbdfea7a2cc4a5c17938b10f /source/blender/makesdna
parentdfd192ce41f7e4923db0642f22a587862656bbdd (diff)
DrawData: Change drawdata to a generic struct shared accross ID types
This makes tagging much more generic and make the world updates more in line with the new tagging system (Depsgraph).
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h21
-rw-r--r--source/blender/makesdna/DNA_object_types.h18
-rw-r--r--source/blender/makesdna/DNA_world_types.h4
3 files changed, 24 insertions, 19 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index fa97fd53f32..ec71f28cb23 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -45,6 +45,27 @@ struct ID;
struct PackedFile;
struct GPUTexture;
+/* Runtime display data */
+struct DrawData;
+typedef void (*DrawDataInitCb)(struct DrawData *engine_data);
+typedef void (*DrawDataFreeCb)(struct DrawData *engine_data);
+
+#
+#
+typedef struct DrawData {
+ struct DrawData *next, *prev;
+ struct DrawEngineType *engine_type;
+ /* Only nested data, NOT the engine data itself. */
+ DrawDataFreeCb free;
+ /* Accumulated recalc flags, which corresponds to ID->recalc flags. */
+ int recalc;
+} DrawData;
+
+typedef struct DrawDataList {
+ struct DrawData *first, *last;
+} DrawDataList;
+
+
typedef struct IDPropertyData {
void *pointer;
ListBase group;
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 3bcc0fb6dcc..999ebe0ccc3 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -76,22 +76,6 @@ typedef struct bFaceMap {
char pad[7];
} bFaceMap;
-/* Object Runtime display data */
-struct ObjectEngineData;
-typedef void (*ObjectEngineDataInitCb)(struct ObjectEngineData *engine_data);
-typedef void (*ObjectEngineDataFreeCb)(struct ObjectEngineData *engine_data);
-
-#
-#
-typedef struct ObjectEngineData {
- struct ObjectEngineData *next, *prev;
- struct DrawEngineType *engine_type;
- /* Only nested data, NOT the engine data itself. */
- ObjectEngineDataFreeCb free;
- /* Accumulated recalc flags, which corresponds to ID->recalc flags. */
- int recalc;
-} ObjectEngineData;
-
#define MAX_VGROUP_NAME 64
/* bDeformGroup->flag */
@@ -163,6 +147,7 @@ typedef struct Object_Runtime {
typedef struct Object {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
+ struct DrawDataList drawdata; /* runtime (must be immediately after id for utilities to use it). */
struct SculptSession *sculpt;
@@ -312,7 +297,6 @@ typedef struct Object {
struct PreviewImage *preview;
- ListBase drawdata; /* runtime, ObjectEngineData */
int pad6;
int select_color;
diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h
index 2e38a402abb..7769833a835 100644
--- a/source/blender/makesdna/DNA_world_types.h
+++ b/source/blender/makesdna/DNA_world_types.h
@@ -51,6 +51,7 @@ struct MTex;
typedef struct World {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
+ DrawDataList drawdata; /* runtime (must be immediately after id for utilities to use it). */
char _pad0[4];
short texact, mistype;
@@ -81,8 +82,7 @@ typedef struct World {
short flag, pad3[3];
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
- short pr_texture, use_nodes, pad;
- short update_flag; /* XXX temporary flag waiting for depsgraph proper tagging */
+ short pr_texture, use_nodes, pad[2];
/* previews */
struct PreviewImage *preview;