[Bf-blender-cvs] [5b386270a5c] blender2.8: Cleanup: Get rid of legacy depsgraph header file

Sergey Sharybin noreply at git.blender.org
Wed Apr 5 16:02:11 CEST 2017


Commit: 5b386270a5cc395611f56cdf4bf544be63a96913
Author: Sergey Sharybin
Date:   Wed Apr 5 15:50:45 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB5b386270a5cc395611f56cdf4bf544be63a96913

Cleanup: Get rid of legacy depsgraph header file

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

M	source/blender/blenkernel/CMakeLists.txt
D	source/blender/blenkernel/depsgraph_private.h
M	source/blender/blenkernel/intern/depsgraph.c
M	source/blender/depsgraph/DEG_depsgraph_build.h

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

diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index b665183a37b..2d595e0e3c5 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -302,7 +302,6 @@ set(SRC
 	BKE_writeavi.h
 	BKE_writeframeserver.h
 
-	depsgraph_private.h
 	nla_private.h
 	tracking_private.h
 	intern/CCGSubSurf.h
diff --git a/source/blender/blenkernel/depsgraph_private.h b/source/blender/blenkernel/depsgraph_private.h
deleted file mode 100644
index 69ca75836d9..00000000000
--- a/source/blender/blenkernel/depsgraph_private.h
+++ /dev/null
@@ -1,169 +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) 2004 Blender Foundation.
- * All rights reserved.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file blender/blenkernel/depsgraph_private.h
- *  \ingroup bke
- */
-
-#ifndef __DEPSGRAPH_PRIVATE_H__
-#define __DEPSGRAPH_PRIVATE_H__
-
-#include "BKE_depsgraph.h"
-#include "DNA_constraint_types.h"
-#include "BKE_constraint.h"
-
-struct Scene;
-struct Group;
-struct EffectorWeights;
-struct ModifierData;
-
-/* **** DAG relation types *** */
-
-/* scene link to object */
-#define DAG_RL_SCENE        (1 << 0)
-/* object link to data */
-#define DAG_RL_DATA         (1 << 1)
-
-/* object changes object (parent, track, constraints) */
-#define DAG_RL_OB_OB        (1 << 2)
-/* object changes obdata (hooks, constraints) */
-#define DAG_RL_OB_DATA      (1 << 3)
-/* data changes object (vertex parent) */
-#define DAG_RL_DATA_OB      (1 << 4)
-/* data changes data (deformers) */
-#define DAG_RL_DATA_DATA    (1 << 5)
-
-#define DAG_NO_RELATION     (1 << 6)
-
-#define DAG_RL_ALL_BUT_DATA (DAG_RL_SCENE | DAG_RL_OB_OB | DAG_RL_OB_DATA | DAG_RL_DATA_OB | DAG_RL_DATA_DATA)
-#define DAG_RL_ALL          (DAG_RL_ALL_BUT_DATA | DAG_RL_DATA)
-
-
-#define DAGQUEUEALLOC 50
-
-enum {
-	DAG_WHITE = 0,
-	DAG_GRAY = 1,
-	DAG_BLACK = 2
-};
-
-typedef struct DagAdjList {
-	struct DagNode *node;
-	short type;
-	int count;  /* number of identical arcs */
-	unsigned int lay;   // for flushing redraw/rebuild events
-	const char *name;
-	struct DagAdjList *next;
-} DagAdjList;
-
-
-typedef struct DagNode {
-	int color;
-	short type;
-	float x, y, k;
-	void *ob;
-	void *first_ancestor;
-	int ancestor_count;
-	unsigned int lay;               /* accumulated layers of its relations + itself */
-	unsigned int scelay;            /* layers due to being in scene */
-	uint64_t customdata_mask;       /* customdata mask */
-	int lasttime;       /* if lasttime != DagForest->time, this node was not evaluated yet for flushing */
-	int BFS_dist;       /* BFS distance */
-	int DFS_dist;       /* DFS distance */
-	int DFS_dvtm;       /* DFS discovery time */
-	int DFS_fntm;       /* DFS Finishing time */
-	struct DagAdjList *child;
-	struct DagAdjList *parent;
-	struct DagNode *next;
-
-	/* Threaded evaluation routines */
-	uint32_t num_pending_parents;  /* number of parents which are not updated yet
-	                                * this node has got.
-	                                * Used by threaded update for faster detect whether node could be
-	                                * updated aready.
-	                                */
-	bool scheduled;
-
-	/* Runtime flags mainly used to determine which extra data is to be evaluated
-	 * during object_handle_update(). Such an extra data is what depends on the
-	 * DAG topology, meaning this flags indicates the data evaluation of which
-	 * depends on the node dependencies.
-	 */
-	short eval_flags;
-} DagNode;
-
-typedef struct DagNodeQueueElem {
-	struct DagNode *node;
-	struct DagNodeQueueElem *next;
-} DagNodeQueueElem;
-
-typedef struct DagNodeQueue {
-	DagNodeQueueElem *first;
-	DagNodeQueueElem *last;
-	int count;
-	int maxlevel;
-	struct DagNodeQueue *freenodes;
-} DagNodeQueue;
-
-/* forest as we may have more than one DAG unconnected */
-typedef struct DagForest {
-	ListBase DagNode;
-	struct GHash *nodeHash;
-	int numNodes;
-	bool is_acyclic;
-	int time;  /* for flushing/tagging, compare with node->lasttime */
-	bool ugly_hack_sorry;  /* prevent type check */
-	bool need_update;
-} DagForest;
-
-// queue operations
-DagNodeQueue *queue_create(int slots);
-void queue_raz(DagNodeQueue *queue);
-void push_queue(DagNodeQueue *queue, DagNode *node);
-void push_stack(DagNodeQueue *queue, DagNode *node);
-DagNode *pop_queue(DagNodeQueue *queue);
-DagNode *get_top_node_queue(DagNodeQueue *queue);
-void queue_delete(DagNodeQueue *queue);
-
-// Dag management
-DagForest *dag_init(void);
-DagForest *build_dag(struct Main *bmain, struct Scene *sce, short mask);
-void free_forest(struct DagForest *Dag);
-DagNode *dag_find_node(DagForest *forest, void *fob);
-DagNode *dag_add_node(DagForest *forest, void *fob);
-DagNode *dag_get_node(DagForest *forest, void *fob);
-DagNode *dag_get_sub_node(DagForest *forest, void *fob);
-void dag_add_relation(DagForest *forest, DagNode *fob1, DagNode *fob2, short rel, const char *name);
-
-typedef bool (*DagCollobjFilterFunction)(struct Object *obj, struct ModifierData *md);
-
-void dag_add_collision_relations(DagForest *dag, struct Scene *scene, Object *ob, DagNode *node, struct Group *group, int layer, unsigned int modifier_type, DagCollobjFilterFunction fn, bool dupli, const char *name);
-void dag_add_forcefield_relations(DagForest *dag, struct Scene *scene, Object *ob, DagNode *node, struct EffectorWeights *eff, bool add_absorption, int skip_forcefield, const char *name);
-
-void graph_print_queue(DagNodeQueue *nqueue);
-void graph_print_queue_dist(DagNodeQueue *nqueue);
-void graph_print_adj_list(DagForest *dag);
-
-#endif /* __DEPSGRAPH_PRIVATE_H__ */
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index f0b1363e647..1995196666a 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -45,10 +45,9 @@
 #include "DNA_scene_types.h"
 
 #include "BKE_global.h"
+#include "BKE_depsgraph.h"
 #include "BKE_main.h"
 
-#include "depsgraph_private.h"
-
 #include "DEG_depsgraph.h"
 #include "DEG_depsgraph_build.h"
 #include "DEG_depsgraph_debug.h"
@@ -59,113 +58,6 @@
  * *********************************************************************
  */
 
-DagNodeQueue *queue_create(int UNUSED(slots))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-	return NULL;
-}
-
-void queue_raz(DagNodeQueue *UNUSED(queue))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-}
-
-void queue_delete(DagNodeQueue *UNUSED(queue))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-}
-
-void push_queue(DagNodeQueue *UNUSED(queue), DagNode *UNUSED(node))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-}
-
-void push_stack(DagNodeQueue *UNUSED(queue), DagNode *UNUSED(node))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-}
-
-DagNode *pop_queue(DagNodeQueue *UNUSED(queue))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-	return NULL;
-}
-
-DagNode *get_top_node_queue(DagNodeQueue *UNUSED(queue))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-	return NULL;
-}
-
-DagForest *dag_init(void)
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-	return NULL;
-}
-
-DagForest *build_dag(Main *UNUSED(bmain),
-                     Scene *UNUSED(sce),
-                     short UNUSED(mask))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-	return NULL;
-}
-
-void free_forest(DagForest *UNUSED(Dag))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-}
-
-DagNode *dag_find_node(DagForest *UNUSED(forest), void *UNUSED(fob))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-	return NULL;
-}
-
-DagNode *dag_add_node(DagForest *UNUSED(forest), void *UNUSED(fob))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-	return NULL;
-}
-
-DagNode *dag_get_node(DagForest *UNUSED(forest), void *UNUSED(fob))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-	return NULL;
-}
-
-DagNode *dag_get_sub_node(DagForest *UNUSED(forest), void *UNUSED(fob))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-	return NULL;
-}
-
-void dag_add_relation(DagForest *UNUSED(forest),
-                      DagNode *UNUSED(fob1),
-                      DagNode *UNUSED(fob2),
-                      short UNUSED(rel),
-                      const char *UNUSED(name))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-}
-
-/* debug test functions */
-
-void graph_print_queue(DagNodeQueue *UNUSED(nqueue))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-}
-
-void graph_print_queue_dist(DagNodeQueue *UNUSED(nqueue))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-}
-
-void graph_print_adj_list(DagForest *UNUSED(dag))
-{
-	BLI_assert(!"Should not be used with new dependnecy graph");
-}
-
 void DAG_scene_flush_update(Main *UNUSED(bmain),
                             Scene *UNUSED(sce),
                             unsigned int UNUSED(lay),
diff --git a/source/blender/depsgraph/DEG_depsgraph_build.h b/source/blender/depsgraph/DEG_depsgraph_build.h
index 82b63272ff2..17d325828d8 100644
--- a/source/blender/depsgraph/DEG_depsgraph_build.h
+++ b/source/blender/depsgraph/DEG_depsgraph_build.h
@@ -40,10 +40,13 @@ struct Depsgraph;
 
 /* ------

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list