Blender  V2.93
deg_builder.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2016 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 struct Base;
27 struct ID;
28 struct Main;
29 struct Object;
30 struct bPoseChannel;
31 
32 namespace blender {
33 namespace deg {
34 
35 struct Depsgraph;
36 class DepsgraphBuilderCache;
37 
39  public:
40  virtual ~DepsgraphBuilder() = default;
41 
42  virtual bool need_pull_base_into_graph(Base *base);
43 
44  virtual bool check_pchan_has_bbone(Object *object, const bPoseChannel *pchan);
45  virtual bool check_pchan_has_bbone_segments(Object *object, const bPoseChannel *pchan);
46  virtual bool check_pchan_has_bbone_segments(Object *object, const char *bone_name);
47 
48  protected:
49  /* NOTE: The builder does NOT take ownership over any of those resources. */
51 
52  /* State which never changes, same for the whole builder time. */
56 };
57 
58 bool deg_check_id_in_depsgraph(const Depsgraph *graph, ID *id_orig);
61 
62 } // namespace deg
63 } // namespace blender
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
DepsgraphBuilderCache * cache_
Definition: deg_builder.h:55
virtual bool check_pchan_has_bbone(Object *object, const bPoseChannel *pchan)
Definition: deg_builder.cc:106
virtual bool check_pchan_has_bbone_segments(Object *object, const bPoseChannel *pchan)
Definition: deg_builder.cc:126
virtual bool need_pull_base_into_graph(Base *base)
Definition: deg_builder.cc:80
virtual ~DepsgraphBuilder()=default
DepsgraphBuilder(Main *bmain, Depsgraph *graph, DepsgraphBuilderCache *cache)
Definition: deg_builder.cc:75
Depsgraph * graph
bool deg_check_base_in_depsgraph(const Depsgraph *graph, Base *base)
Definition: deg_builder.cc:61
void deg_graph_build_finalize(Main *bmain, Depsgraph *graph)
Definition: deg_builder.cc:202
bool deg_check_id_in_depsgraph(const Depsgraph *graph, ID *id_orig)
Definition: deg_builder.cc:55
Definition: DNA_ID.h:273
Definition: BKE_main.h:116