Blender  V3.3
deg_builder_nodes_scene.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2013 Blender Foundation. All rights reserved. */
3 
9 
10 #include "DNA_scene_types.h"
11 
12 namespace blender::deg {
13 
15 {
16  scene_ = scene;
17  view_layer_ = view_layer;
18  const bool build_compositor = (scene->r.scemode & R_DOCOMP);
19  const bool build_sequencer = (scene->r.scemode & R_DOSEQ);
21  id_node->linked_state = DEG_ID_LINKED_DIRECTLY;
26  if (build_compositor) {
28  }
29  if (build_sequencer) {
31  build_scene_speakers(scene, view_layer);
32  }
33  if (scene->camera != nullptr) {
35  }
36 }
37 
39 {
41  return;
42  }
46  /* NOTE: This is a bit overkill and can potentially pull a bit too much into the graph, but:
47  *
48  * - We definitely need an ID node for the scene's compositor, otherwise re-mapping will no
49  * happen correct and we will risk remapping pointers in the main database.
50  * - Alternatively, we should discard compositor tree, but this might cause other headache like
51  * drivers which are coming from the tree.
52  *
53  * Would be nice to find some reliable way of ignoring compositor here, but it's already pulled
54  * in when building scene from view layer, so this particular case does not make things
55  * marginally worse. */
57 
58  LISTBASE_FOREACH (TimeMarker *, marker, &scene->markers) {
59  build_idproperties(marker->prop);
60  }
61 }
62 
64 {
66  return;
67  }
68  if (scene->nodetree == nullptr) {
69  return;
70  }
72 }
73 
74 } // namespace blender::deg
#define LISTBASE_FOREACH(type, var, list)
Definition: BLI_listbase.h:336
#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:29
IDProperty * properties
Definition: DNA_ID.h:409
struct bNodeTree * nodetree
struct RenderData r
struct Object * camera
ListBase markers