Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/depsgraph.cc
| Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | : time_source(NULL), | ||||
| need_update_time(false), | need_update_time(false), | ||||
| bmain(bmain), | bmain(bmain), | ||||
| scene(scene), | scene(scene), | ||||
| view_layer(view_layer), | view_layer(view_layer), | ||||
| mode(mode), | mode(mode), | ||||
| ctime(BKE_scene_frame_get(scene)), | ctime(BKE_scene_frame_get(scene)), | ||||
| scene_cow(NULL), | scene_cow(NULL), | ||||
| is_active(false), | is_active(false), | ||||
| debug_is_evaluating(false), | is_evaluating(false), | ||||
| is_render_pipeline_depsgraph(false) | is_render_pipeline_depsgraph(false) | ||||
| { | { | ||||
| BLI_spin_init(&lock); | BLI_spin_init(&lock); | ||||
| id_hash = BLI_ghash_ptr_new("Depsgraph id hash"); | id_hash = BLI_ghash_ptr_new("Depsgraph id hash"); | ||||
| entry_tags = BLI_gset_ptr_new("Depsgraph entry_tags"); | entry_tags = BLI_gset_ptr_new("Depsgraph entry_tags"); | ||||
| debug_flags = G.debug; | debug_flags = G.debug; | ||||
| memset(id_type_updated, 0, sizeof(id_type_updated)); | memset(id_type_updated, 0, sizeof(id_type_updated)); | ||||
| memset(id_type_exist, 0, sizeof(id_type_exist)); | memset(id_type_exist, 0, sizeof(id_type_exist)); | ||||
| ▲ Show 20 Lines • Show All 241 Lines • ▼ Show 20 Lines | if (graph == NULL) { | ||||
| return; | return; | ||||
| } | } | ||||
| using DEG::Depsgraph; | using DEG::Depsgraph; | ||||
| DEG::Depsgraph *deg_depsgraph = reinterpret_cast<DEG::Depsgraph *>(graph); | DEG::Depsgraph *deg_depsgraph = reinterpret_cast<DEG::Depsgraph *>(graph); | ||||
| DEG::unregister_graph(deg_depsgraph); | DEG::unregister_graph(deg_depsgraph); | ||||
| OBJECT_GUARDED_DELETE(deg_depsgraph, Depsgraph); | OBJECT_GUARDED_DELETE(deg_depsgraph, Depsgraph); | ||||
| } | } | ||||
| bool DEG_is_evaluating(struct Depsgraph *depsgraph) | |||||
| { | |||||
| DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(depsgraph); | |||||
| return deg_graph->is_evaluating; | |||||
| } | |||||
| bool DEG_is_active(const struct Depsgraph *depsgraph) | bool DEG_is_active(const struct Depsgraph *depsgraph) | ||||
| { | { | ||||
| if (depsgraph == NULL) { | if (depsgraph == NULL) { | ||||
| /* Happens for such cases as work object in what_does_obaction(), | /* Happens for such cases as work object in what_does_obaction(), | ||||
| * and sine render pipeline parts. Shouldn't really be accepting | * and sine render pipeline parts. Shouldn't really be accepting | ||||
| * NULL depsgraph, but is quite hard to get proper one in those | * NULL depsgraph, but is quite hard to get proper one in those | ||||
| * cases. */ | * cases. */ | ||||
| return false; | return false; | ||||
| Show All 17 Lines | |||||