Blender  V2.93
deg_builder_nodes_scene.cc
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) 2013 Blender Foundation.
17  * All rights reserved.
18  */
19 
25 
26 #include "DNA_scene_types.h"
27 
28 namespace blender::deg {
29 
31 {
32  scene_ = scene;
33  view_layer_ = view_layer;
34  const bool build_compositor = (scene->r.scemode & R_DOCOMP);
35  const bool build_sequencer = (scene->r.scemode & R_DOSEQ);
37  id_node->linked_state = DEG_ID_LINKED_DIRECTLY;
42  if (build_compositor) {
44  }
45  if (build_sequencer) {
47  build_scene_speakers(scene, view_layer);
48  }
49  if (scene->camera != nullptr) {
51  }
52 }
53 
55 {
57  return;
58  }
62  /* NOTE: This is a bit overkill and can potentially pull a bit too much into the graph, but:
63  *
64  * - We definitely need an ID node for the scene's compositor, otherwise re-mapping will no
65  * happen correct and we will risk remapping pointers in the main database.
66  * - Alternatively, we should discard compositor tree, but this might cause other headache like
67  * drivers which are coming from the tree.
68  *
69  * Would be nice to find some reliable way of ignoring compositor here, but it's already pulled
70  * in when building scene from view layer, so this particular case does not make things
71  * marginally worse. */
73 
74  LISTBASE_FOREACH (TimeMarker *, marker, &scene->markers) {
75  build_idproperties(marker->prop);
76  }
77 }
78 
80 {
82  return;
83  }
84  if (scene->nodetree == nullptr) {
85  return;
86  }
88 }
89 
90 } // namespace blender::deg
#define LISTBASE_FOREACH(type, var, list)
Definition: BLI_listbase.h:172
#define R_DOCOMP
#define R_DOSEQ
bool checkIsBuiltAndTag(ID *id, int tag=TAG_COMPLETE)
virtual void build_scene_parameters(Scene *scene)
virtual void build_scene_sequencer(Scene *scene)
virtual void build_object(int base_index, Object *object, eDepsNode_LinkedState_Type linked_state, bool is_visible)
virtual void build_scene_speakers(Scene *scene, ViewLayer *view_layer)
OperationNode * add_operation_node(ComponentNode *comp_node, OperationCode opcode, const DepsEvalOperationCb &op=nullptr, const char *name="", int name_tag=-1)
virtual void build_scene_audio(Scene *scene)
virtual void build_scene_render(Scene *scene, ViewLayer *view_layer)
virtual void build_nodetree(bNodeTree *ntree)
virtual void build_idproperties(IDProperty *id_property)
virtual void build_scene_compositor(Scene *scene)
const IDNode * id_node
Scene scene
@ DEG_ID_LINKED_DIRECTLY
Definition: deg_node_id.h:46
IDProperty * properties
Definition: DNA_ID.h:314
struct bNodeTree * nodetree
struct RenderData r
struct Object * camera
ListBase markers