[Bf-blender-cvs] [d341b623519] temp-dynamic-overrides: Merge remote-tracking branch 'origin/blender2.8' into temp-dynamic-overrides
Dalai Felinto
noreply at git.blender.org
Thu May 31 00:05:51 CEST 2018
Commit: d341b623519902df645626dc73febe01984ff269
Author: Dalai Felinto
Date: Thu May 31 00:01:48 2018 +0200
Branches: temp-dynamic-overrides
https://developer.blender.org/rBd341b623519902df645626dc73febe01984ff269
Merge remote-tracking branch 'origin/blender2.8' into temp-dynamic-overrides
===================================================================
===================================================================
diff --cc source/blender/depsgraph/DEG_depsgraph.h
index 2c213b8d3cb,d79ee9aa86b..6c33057fc99
--- a/source/blender/depsgraph/DEG_depsgraph.h
+++ b/source/blender/depsgraph/DEG_depsgraph.h
@@@ -173,12 -173,7 +173,12 @@@ void DEG_graph_id_tag_update(struct Mai
*/
void DEG_id_type_tag(struct Main *bmain, short id_type);
+void DEG_graph_id_type_tag_update(struct Main *bmain,
+ struct Depsgraph *depsgraph,
+ short id_type,
+ int flag);
+
- void DEG_ids_clear_recalc(struct Main *bmain);
+ void DEG_ids_clear_recalc(struct Main *bmain, Depsgraph *depsgraph);
/* Update Flushing ------------------------------- */
diff --cc source/blender/depsgraph/intern/depsgraph_tag.cc
index b8f6fcc6ae7,8e63bc85499..86e9397a218
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@@ -589,17 -622,22 +622,30 @@@ void DEG_id_type_tag(Main *bmain, shor
DEG_id_type_tag(bmain, ID_SCE);
}
- bmain->id_tag_update[BKE_idcode_to_index(id_type)] = 1;
+ int id_type_index = BKE_idcode_to_index(id_type);
+
+ LISTBASE_FOREACH (Scene *, scene, &bmain->scene) {
+ LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) {
+ Depsgraph *depsgraph =
+ (Depsgraph *)BKE_scene_get_depsgraph(scene,
+ view_layer,
+ false);
+ if (depsgraph != NULL) {
+ DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(depsgraph);
+ deg_graph->id_type_updated[id_type_index] = 1;
+ }
+ }
+ }
}
+void DEG_graph_id_type_tag_update(Main *bmain, Depsgraph *depsgraph, short id_type, int flag)
+{
+ ListBase *data = BKE_idtype_to_main_data(bmain, id_type);
+ LISTBASE_FOREACH (ID *, id, data) {
+ DEG_graph_id_tag_update(bmain, depsgraph, id, flag);
+ }
+}
+
void DEG_graph_flush_update(Main *bmain, Depsgraph *depsgraph)
{
if (depsgraph == NULL) {
diff --cc source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index c6722135a05,edae5fb002d..35d0eb64042
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@@ -790,30 -830,8 +830,11 @@@ ID *deg_update_copy_on_write_datablock(
*gpumaterial_ptr = gpumaterial_backup;
}
if (id_type == ID_OB) {
- Object *object = (Object *)id_cow;
- if (mesh_evaluated != NULL) {
- object->mesh_evaluated = mesh_evaluated;
- /* Do same thing as object update: override actual object data
- * pointer with evaluated datablock.
- */
- if (object->type == OB_MESH) {
- object->data = mesh_evaluated;
- /* Evaluated mesh simply copied edit_btmesh pointer from
- * original mesh during update, need to make sure no dead
- * pointers are left behind.
- */
- mesh_evaluated->edit_btmesh =
- ((Mesh *)mesh_evaluated->id.orig_id)->edit_btmesh;
- }
- }
- if (curve_cache != NULL) {
- object->curve_cache = curve_cache;
- }
- object->base_flag = base_flag;
+ deg_restore_object_runtime((Object *)id_cow, &object_runtime_backup);
}
+
+ const ::Depsgraph *graph = reinterpret_cast<const ::Depsgraph *>(depsgraph);
+ BKE_dynamic_override_apply(graph, id_cow);
return id_cow;
}
diff --cc source/blender/makesrna/RNA_access.h
index b3e5b90923c,4b88cace319..7821795b290
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@@ -226,8 -226,6 +227,7 @@@ extern StructRNA RNA_DopeSheet
extern StructRNA RNA_Driver;
extern StructRNA RNA_DriverTarget;
extern StructRNA RNA_DriverVariable;
- extern StructRNA RNA_DupliObject;
+extern StructRNA RNA_DynamicOverrideProperty;
extern StructRNA RNA_DynamicPaintBrushSettings;
extern StructRNA RNA_DynamicPaintCanvasSettings;
extern StructRNA RNA_DynamicPaintModifier;
More information about the Bf-blender-cvs
mailing list