forked from bartvdbraak/blender
DEG: Add per object update flag for Depsgraph.
This is in order to communicate what portion of this object has changed. For now it's just a bool, but it will be extended later.
This commit is contained in:
parent
46fc0bb87e
commit
071315e21b
@ -464,6 +464,8 @@ void BKE_object_free(Object *ob)
|
|||||||
}
|
}
|
||||||
BLI_freelistN(&ob->drawdata);
|
BLI_freelistN(&ob->drawdata);
|
||||||
|
|
||||||
|
ob->deg_update_flag = 0;
|
||||||
|
|
||||||
BKE_sculptsession_free(ob);
|
BKE_sculptsession_free(ob);
|
||||||
|
|
||||||
BLI_freelistN(&ob->pc_ids);
|
BLI_freelistN(&ob->pc_ids);
|
||||||
|
@ -191,6 +191,9 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
|
|||||||
object->recalc |= OB_RECALC_DATA;
|
object->recalc |= OB_RECALC_DATA;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO : replace with more granular flags */
|
||||||
|
object->deg_update_flag |= DEG_RUNTIME_DATA_UPDATE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2869,6 +2869,8 @@ void DRW_draw_render_loop(
|
|||||||
DEG_OBJECT_ITER(graph, ob);
|
DEG_OBJECT_ITER(graph, ob);
|
||||||
{
|
{
|
||||||
DRW_engines_cache_populate(ob);
|
DRW_engines_cache_populate(ob);
|
||||||
|
/* XXX find a better place for this. maybe Depsgraph? */
|
||||||
|
ob->deg_update_flag = 0;
|
||||||
}
|
}
|
||||||
DEG_OBJECT_ITER_END
|
DEG_OBJECT_ITER_END
|
||||||
|
|
||||||
|
@ -324,8 +324,9 @@ typedef struct Object {
|
|||||||
struct IDProperty *base_collection_properties; /* used by depsgraph, flushed from base */
|
struct IDProperty *base_collection_properties; /* used by depsgraph, flushed from base */
|
||||||
|
|
||||||
ListBase drawdata; /* runtime, ObjectEngineData */
|
ListBase drawdata; /* runtime, ObjectEngineData */
|
||||||
|
int deg_update_flag; /* what has been updated in this object */
|
||||||
int base_selection_color; /* flushed by depsgraph only */
|
int base_selection_color; /* flushed by depsgraph only */
|
||||||
int pad3[3];
|
int pad3[2];
|
||||||
} Object;
|
} Object;
|
||||||
|
|
||||||
/* Warning, this is not used anymore because hooks are now modifiers */
|
/* Warning, this is not used anymore because hooks are now modifiers */
|
||||||
@ -626,6 +627,11 @@ enum {
|
|||||||
OB_DEPS_EXTRA_DATA_RECALC = 1 << 1,
|
OB_DEPS_EXTRA_DATA_RECALC = 1 << 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* ob->deg_update_flag */
|
||||||
|
enum {
|
||||||
|
DEG_RUNTIME_DATA_UPDATE = 1 << 0,
|
||||||
|
};
|
||||||
|
|
||||||
/* ob->scavisflag */
|
/* ob->scavisflag */
|
||||||
enum {
|
enum {
|
||||||
OB_VIS_SENS = 1 << 0,
|
OB_VIS_SENS = 1 << 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user