Blender  V2.93
depsgraph_update.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 "DEG_depsgraph.h"
27 
28 #include "intern/depsgraph_type.h"
29 
30 namespace deg = blender::deg;
31 
32 namespace blender::deg {
33 
36 
37 void deg_editors_id_update(const DEGEditorUpdateContext *update_ctx, ID *id)
38 {
39  if (deg_editor_update_id_cb != nullptr) {
40  deg_editor_update_id_cb(update_ctx, id);
41  }
42 }
43 
44 void deg_editors_scene_update(const DEGEditorUpdateContext *update_ctx, bool updated)
45 {
46  if (deg_editor_update_scene_cb != nullptr) {
47  deg_editor_update_scene_cb(update_ctx, updated);
48  }
49 }
50 
51 } // namespace blender::deg
52 
53 /* Set callbacks which are being called when depsgraph changes. */
55 {
58 }
void(* DEG_EditorUpdateSceneCb)(const DEGEditorUpdateContext *update_ctx, const bool updated)
void(* DEG_EditorUpdateIDCb)(const DEGEditorUpdateContext *update_ctx, struct ID *id)
void DEG_editors_set_update_cb(DEG_EditorUpdateIDCb id_func, DEG_EditorUpdateSceneCb scene_func)
static DEG_EditorUpdateIDCb deg_editor_update_id_cb
void deg_editors_id_update(const DEGEditorUpdateContext *update_ctx, ID *id)
void deg_editors_scene_update(const DEGEditorUpdateContext *update_ctx, bool updated)
static DEG_EditorUpdateSceneCb deg_editor_update_scene_cb
Definition: DNA_ID.h:273