2
* $Id: BKE_depsgraph.h,v 1.2 2005/04/30 23:29:10 stiv Exp $
4
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version. The Blender
10
* Foundation also sells licenses for use in proprietary software under
11
* the Blender License. See http://www.blender.org/BL/ for information
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software Foundation,
21
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
* The Original Code is Copyright (C) 2004 Blender Foundation.
24
* All rights reserved.
26
* Contributor(s): none yet.
28
* ***** END GPL/BL DUAL LICENSE BLOCK *****
49
DAG_RL_CONSTRAINT = 32,
51
DAG_RL_DATA_CONSTRAINT = 128,
57
DAG_RL_SCENE_MASK = 1,
59
DAG_RL_PARENT_MASK = 4,
60
DAG_RL_TRACK_MASK = 8,
61
DAG_RL_PATH_MASK = 16,
62
DAG_RL_CONSTRAINT_MASK = 32,
63
DAG_RL_HOOK_MASK = 64,
64
DAG_RL_DATA_CONSTRAINT_MASK = 128,
65
DAG_RL_ALL_BUT_DATA_MASK = 253,
69
typedef void (*graph_action_func)(void * ob, void **data);
71
// queues are returned by all BFS & DFS queries
73
void *pop_ob_queue(struct DagNodeQueue *queue);
74
int queue_count(struct DagNodeQueue *queue);
75
void queue_delete(struct DagNodeQueue *queue);
78
struct DagForest *build_dag(struct Scene *sce, short mask);
79
void free_forest(struct DagForest *Dag);
82
// the meanings of the 2 returning values is a bit different :
83
// BFS return 1 for cross-edges and back-edges. the latter are considered harmfull, not the former
84
// DFS return 1 only for back-edges
85
int pre_and_post_BFS(struct DagForest *dag, short mask, graph_action_func pre_func, graph_action_func post_func, void **data);
86
int pre_and_post_DFS(struct DagForest *dag, short mask, graph_action_func pre_func, graph_action_func post_func, void **data);
88
int pre_and_post_source_BFS(struct DagForest *dag, short mask, struct DagNode *source, graph_action_func pre_func, graph_action_func post_func, void **data);
89
int pre_and_post_source_DFS(struct DagForest *dag, short mask, struct DagNode *source, graph_action_func pre_func, graph_action_func post_func, void **data);
91
struct DagNodeQueue *get_obparents(struct DagForest *dag, void *ob);
92
struct DagNodeQueue *get_first_ancestors(struct DagForest *dag, void *ob);
93
struct DagNodeQueue *get_all_childs(struct DagForest *dag, void *ob); //
94
dag_rel_type are_obs_related(struct DagForest *dag, void *ob1, void *ob2);
95
int is_acyclic(struct DagForest *dag); //
96
//int get_cycles(struct DagForest *dag, struct DagNodeQueue **queues, int *count); //
97
void topo_sort_baselist(struct Scene *sce);
99
void boundbox_deps(void);
100
void draw_all_deps(void);