Commit: 5b6cb2de9afb958bec0cec8058a4ef5292141001
Author: Campbell Barton
Date: Thu Dec 13 23:15:15 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB5b6cb2de9afb958bec0cec8058a4ef5292141001
RNA: revert recent rename 'updated' -> 'dirty'
Partially reverts 45fdf41be87f & 6d38d824377c,
added comment why term 'updated' is used in this case.
===================================================================
M intern/cycles/blender/blender_sync.cpp
M source/blender/makesrna/intern/rna_depsgraph.c
===================================================================
diff --git a/intern/cycles/blender/blender_sync.cpp
b/intern/cycles/blender/blender_sync.cpp
index fd45bac645d..7ac44a3ec9e 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -123,9 +123,9 @@ void BlenderSync::sync_recalc(BL::Depsgraph& b_depsgraph)
/* Object */
else if(b_id.is_a(&RNA_Object)) {
BL::Object b_ob(b_id);
- const bool updated_geometry =
!b_update->is_dirty_geometry();
+ const bool updated_geometry =
b_update->is_updated_geometry();
- if(!b_update->is_dirty_transform()) {
+ if(b_update->is_updated_transform()) {
object_map.set_recalc(b_ob);
light_map.set_recalc(b_ob);
}
diff --git a/source/blender/makesrna/intern/rna_depsgraph.c
b/source/blender/makesrna/intern/rna_depsgraph.c
index 4c455915361..1103e5c1f92 100644
--- a/source/blender/makesrna/intern/rna_depsgraph.c
+++ b/source/blender/makesrna/intern/rna_depsgraph.c
@@ -177,27 +177,27 @@ static PointerRNA rna_DepsgraphUpdate_id_get(PointerRNA
*ptr)
return rna_pointer_inherit_refine(ptr, &RNA_ID, ptr->data);
}
-static bool rna_DepsgraphUpdate_is_dirty_transform_get(PointerRNA *ptr)
+static bool rna_DepsgraphUpdate_is_updated_transform_get(PointerRNA *ptr)
{
ID *id = ptr->data;
- return ((id->recalc & ID_RECALC_TRANSFORM) == 0);
+ return ((id->recalc & ID_RECALC_TRANSFORM) != 0);
}
-static bool rna_DepsgraphUpdate_is_dirty_geometry_get(PointerRNA *ptr)
+static bool rna_DepsgraphUpdate_is_updated_geometry_get(PointerRNA *ptr)
{
ID *id = ptr->data;
if (id->recalc & ID_RECALC_GEOMETRY) {
- return false;
+ return true;
}
if (GS(id->name) != ID_OB) {
- return true;
+ return false;
}
Object *object = (Object *)id;
ID *data = object->data;
if (data == NULL) {
- return true;
+ return false;
}
- return ((data->recalc & ID_RECALC_ALL) == 0);
+ return ((data->recalc & ID_RECALC_ALL) != 0);
}
/* **************** Depsgraph **************** */
@@ -513,15 +513,18 @@ static void rna_def_depsgraph_update(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_DepsgraphUpdate_id_get",
NULL, NULL, NULL);
- prop = RNA_def_property(srna, "is_dirty_transform", PROP_BOOLEAN,
PROP_NONE);
+ /* Use term 'is_updated' instead of 'is_dirty' here because this is a
signal
+ * that users of the depsgraph may want to update their data (render
engines for eg). */
+
+ prop = RNA_def_property(srna, "is_updated_transform", PROP_BOOLEAN,
PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Transform", "Object transformation is
not updated");
- RNA_def_property_boolean_funcs(prop,
"rna_DepsgraphUpdate_is_dirty_transform_get", NULL);
+ RNA_def_property_ui_text(prop, "Transform", "Object transformation is
updated");
+ RNA_def_property_boolean_funcs(prop,
"rna_DepsgraphUpdate_is_updated_transform_get", NULL);
- prop = RNA_def_property(srna, "is_dirty_geometry", PROP_BOOLEAN,
PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated_geometry", PROP_BOOLEAN,
PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Geometry", "Object geometry is not
updated");
- RNA_def_property_boolean_funcs(prop,
"rna_DepsgraphUpdate_is_dirty_geometry_get", NULL);
+ RNA_def_property_ui_text(prop, "Geometry", "Object geometry is
updated");
+ RNA_def_property_boolean_funcs(prop,
"rna_DepsgraphUpdate_is_updated_geometry_get", NULL);
}
static void rna_def_depsgraph(BlenderRNA *brna)
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs