55#undef INVALIDATE_ON_FLUSH
74void flush_init_id_node_func(
void *__restrict data_v,
86inline void flush_prepare(
Depsgraph *graph)
89 node->scheduled =
false;
93 const int num_id_nodes = graph->id_nodes.size();
96 settings.min_iter_per_thread = 1024;
104 queue->push_back(op_node);
105 op_node->scheduled =
true;
108 "Operation is entry point for update: %s\n",
109 op_node->identifier().c_str());
194 if (result !=
nullptr) {
195 queue->push_front(to_node);
205void flush_engine_data_update(
ID *
id)
208 if (draw_data_list ==
nullptr) {
212 draw_data->recalc |=
id->recalc;
238 "Accumulated recalc bits for %s: %u\n",
253 flush_engine_data_update(id_cow);
258#ifdef INVALIDATE_ON_FLUSH
259void invalidate_tagged_evaluated_transform(
ID *
id)
265 copy_vn_fl((
float *)object->object_to_world().ptr(), 16, NAN);
273void invalidate_tagged_evaluated_geometry(
ID *
id)
288void invalidate_tagged_evaluated_data(
Depsgraph *graph)
290#ifdef INVALIDATE_ON_FLUSH
303 switch (comp_node->
type) {
305 invalidate_tagged_evaluated_transform(id_cow);
308 invalidate_tagged_evaluated_geometry(id_cow);
326 Main *bmain = graph->bmain;
328 graph->time_source->flush_update_tag(graph);
331 if (graph->entry_tags.is_empty()) {
335 flush_prepare(graph);
338 flush_schedule_entrypoints(graph, &queue);
341 update_ctx.
bmain = bmain;
342 update_ctx.
depsgraph = (::Depsgraph *)graph;
343 update_ctx.
scene = graph->scene;
346 while (!queue.empty()) {
349 while (op_node !=
nullptr) {
356 flush_handle_component_node(
id_node, comp_node, &queue);
358 op_node = flush_schedule_children(op_node, &queue);
362 flush_editors_id_update(graph, &update_ctx);
365 invalidate_tagged_evaluated_data(graph);
371 graph->entry_tags.clear();
373 graph->time_source->tagged_for_update =
false;
General operations, lookup, etc. for blender objects.
void BKE_object_free_derived_caches(Object *ob)
#define LISTBASE_FOREACH(type, var, list)
void copy_vn_fl(float *array_tar, int size, float val)
void BLI_task_parallel_range(int start, int stop, void *userdata, TaskParallelRangeFunc func, const TaskParallelSettings *settings)
BLI_INLINE void BLI_parallel_range_settings_defaults(TaskParallelSettings *settings)
void DEG_graph_id_type_tag(Depsgraph *depsgraph, short id_type)
Object is a sort of wrapper for general info.
DrawDataList * DRW_drawdatalist_from_id(ID *id)
#define DEG_DEBUG_PRINTF(depsgraph, type,...)
@ RELATION_FLAG_FLUSH_USER_EDIT_ONLY
void deg_editors_id_update(const DEGEditorUpdateContext *update_ctx, ID *id)
deque< OperationNode * > FlushQueue
bool deg_eval_copy_is_expanded(const ID *id_cow)
void deg_graph_clear_tags(Depsgraph *graph)
@ COMPONENT_STATE_SCHEDULED
DepsNodeFactory * type_get_factory(const NodeType type)
void deg_graph_flush_updates(Depsgraph *graph)
@ DEPSOP_FLAG_NEEDS_UPDATE
@ DEPSOP_FLAG_USER_MODIFIED
virtual OperationNode * get_entry_operation() override
Vector< OperationNode * > operations
virtual int id_recalc_tag() const =0
Map< ComponentIDKey, ComponentNode * > components
ComponentNode * find_component(NodeType type, const char *name="") const