Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-12-05 21:59:23 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-12-05 21:59:23 +0300
commitb110c7c8f2c5fafa6412e01d21d751a884bfe8b2 (patch)
treec414d8b62a65c8d633625498dd36740548605c4c /source/blender/makesrna
parent07692fc59b1837da7510e46c37d0deed85924a52 (diff)
Dependency graph: changed DAG_id_flush_update to DAG_id_tag_update. Now it
only tags the ID and does the actual flush/update delayed, before the next redraw. For objects the update was already delayed, just flushing wasn't yet. This should help performance in python and animation editors, by making calls to RNA property update quicker. Still need to add calls in a few places where this was previously avoided due to bad performance.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_access.c2
-rw-r--r--source/blender/makesrna/intern/rna_armature.c2
-rw-r--r--source/blender/makesrna/intern/rna_boid.c8
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c6
-rw-r--r--source/blender/makesrna/intern/rna_color.c4
-rw-r--r--source/blender/makesrna/intern/rna_curve.c2
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c2
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c2
-rw-r--r--source/blender/makesrna/intern/rna_image.c4
-rw-r--r--source/blender/makesrna/intern/rna_key.c2
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c6
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c2
-rw-r--r--source/blender/makesrna/intern/rna_material.c4
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c2
-rw-r--r--source/blender/makesrna/intern/rna_meta.c6
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c4
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c24
-rw-r--r--source/blender/makesrna/intern/rna_object.c6
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c22
-rw-r--r--source/blender/makesrna/intern/rna_particle.c8
-rw-r--r--source/blender/makesrna/intern/rna_pose.c8
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c4
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c2
-rw-r--r--source/blender/makesrna/intern/rna_space.c2
-rw-r--r--source/blender/makesrna/intern/rna_texture.c6
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c2
-rw-r--r--source/blender/makesrna/intern/rna_world.c8
29 files changed, 77 insertions, 77 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 77ff78fc9bf..44155a8c528 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1259,7 +1259,7 @@ static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerR
else {
/* WARNING! This is so property drivers update the display!
* not especially nice */
- DAG_id_flush_update(ptr->id.data, OB_RECALC_ALL);
+ DAG_id_tag_update(ptr->id.data, OB_RECALC_ALL);
WM_main_add_notifier(NC_WINDOW, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 44aafb6b993..8f436d9597d 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -51,7 +51,7 @@ static void rna_Armature_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
{
ID *id= ptr->id.data;
- DAG_id_flush_update(id, OB_RECALC_DATA);
+ DAG_id_tag_update(id, OB_RECALC_DATA);
WM_main_add_notifier(NC_GEOM|ND_DATA, id);
//WM_main_add_notifier(NC_OBJECT|ND_POSE, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c
index b77f40a31f3..757952bb956 100644
--- a/source/blender/makesrna/intern/rna_boid.c
+++ b/source/blender/makesrna/intern/rna_boid.c
@@ -78,10 +78,10 @@ static void rna_Boids_reset(Main *bmain, Scene *scene, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET;
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
+ DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
}
else
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET);
+ DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET);
WM_main_add_notifier(NC_OBJECT|ND_PARTICLE|NA_EDITED, NULL);
}
@@ -92,10 +92,10 @@ static void rna_Boids_reset_deps(Main *bmain, Scene *scene, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_RESET;
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
+ DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
}
else
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET);
+ DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET);
DAG_scene_sort(bmain, scene);
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index 759a4acc860..2d2c9ab8a5b 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -48,7 +48,7 @@ static void rna_cloth_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Object *ob= (Object*)ptr->id.data;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob);
}
@@ -60,7 +60,7 @@ static void rna_cloth_pinning_changed(Main *bmain, Scene *scene, PointerRNA *ptr
cloth_free_modifier(clmd);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob);
}
@@ -71,7 +71,7 @@ static void rna_cloth_reset(Main *bmain, Scene *scene, PointerRNA *ptr)
settings->reset = 1;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob);
}
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index cd588b598bd..01b5c3a9793 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -242,7 +242,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Material *ma= ptr->id.data;
- DAG_id_flush_update(&ma->id, 0);
+ DAG_id_tag_update(&ma->id, 0);
WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, ma);
}
break;
@@ -262,7 +262,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Tex *tex= ptr->id.data;
- DAG_id_flush_update(&tex->id, 0);
+ DAG_id_tag_update(&tex->id, 0);
WM_main_add_notifier(NC_TEXTURE, tex);
}
break;
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 1972abfd3ec..9b0b96b9058 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -278,7 +278,7 @@ static void rna_BPoint_array_begin(CollectionPropertyIterator *iter, PointerRNA
static void rna_Curve_update_data_id(Main *bmain, Scene *scene, ID *id)
{
- DAG_id_flush_update(id, OB_RECALC_DATA);
+ DAG_id_tag_update(id, OB_RECALC_DATA);
WM_main_add_notifier(NC_GEOM|ND_DATA, id);
}
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 23f37f8db8e..05ee9f9c216 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -111,7 +111,7 @@ static void rna_ChannelDriver_update_data(Main *bmain, Scene *scene, PointerRNA
// TODO: this really needs an update guard...
DAG_scene_sort(bmain, scene);
- DAG_id_flush_update(id, OB_RECALC_OB|OB_RECALC_DATA);
+ DAG_id_tag_update(id, OB_RECALC_OB|OB_RECALC_DATA);
WM_main_add_notifier(NC_SCENE|ND_FRAME, scene);
}
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index 025c3b81efc..8e606e7acea 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -76,7 +76,7 @@ static void rna_fluid_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Object *ob= ptr->id.data;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob);
}
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index 3874103ef7a..13c35f46e87 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -79,7 +79,7 @@ static void rna_Image_source_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Image *ima= ptr->id.data;
BKE_image_signal(ima, NULL, IMA_SIGNAL_SRC_CHANGE);
- DAG_id_flush_update(&ima->id, 0);
+ DAG_id_tag_update(&ima->id, 0);
}
static void rna_Image_fields_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -107,7 +107,7 @@ static void rna_Image_reload_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Image *ima= ptr->id.data;
BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD);
- DAG_id_flush_update(&ima->id, 0);
+ DAG_id_tag_update(&ima->id, 0);
}
static void rna_Image_generated_update(Main *bmain, Scene *scene, PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 970c825d30b..47a14c3dac7 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -318,7 +318,7 @@ static void rna_Key_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
for(ob=bmain->object.first; ob; ob= ob->id.next) {
if(ob_get_key(ob) == key) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob);
}
}
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index fb7bb4a9194..68ff80f83dc 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -105,7 +105,7 @@ static void rna_Lamp_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Lamp *la= ptr->id.data;
- DAG_id_flush_update(&la->id, 0);
+ DAG_id_tag_update(&la->id, 0);
if(scene->gm.matmode == GAME_MAT_GLSL)
WM_main_add_notifier(NC_LAMP|ND_LIGHTING_DRAW, la);
else
@@ -116,7 +116,7 @@ static void rna_Lamp_draw_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Lamp *la= ptr->id.data;
- DAG_id_flush_update(&la->id, 0);
+ DAG_id_tag_update(&la->id, 0);
WM_main_add_notifier(NC_LAMP|ND_LIGHTING_DRAW, la);
}
@@ -124,7 +124,7 @@ static void rna_Lamp_sky_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Lamp *la= ptr->id.data;
- DAG_id_flush_update(&la->id, 0);
+ DAG_id_tag_update(&la->id, 0);
WM_main_add_notifier(NC_LAMP|ND_SKY, la);
}
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index f27a1ef86c0..c9e7da414e5 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -91,7 +91,7 @@ static void rna_Lattice_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
{
ID *id= ptr->id.data;
- DAG_id_flush_update(id, OB_RECALC_DATA);
+ DAG_id_tag_update(id, OB_RECALC_DATA);
WM_main_add_notifier(NC_GEOM|ND_DATA, id);
}
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index ea079d9bdaa..ec2e34fa0b6 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -67,7 +67,7 @@ static void rna_Material_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Material *ma= ptr->id.data;
- DAG_id_flush_update(&ma->id, 0);
+ DAG_id_tag_update(&ma->id, 0);
if(scene->gm.matmode == GAME_MAT_GLSL)
WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, ma);
else
@@ -78,7 +78,7 @@ static void rna_Material_draw_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Material *ma= ptr->id.data;
- DAG_id_flush_update(&ma->id, 0);
+ DAG_id_tag_update(&ma->id, 0);
WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, ma);
}
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index dd989d05441..d9f6e0886bd 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -59,7 +59,7 @@ static void rna_Mesh_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
/* cheating way for importers to avoid slow updates */
if(id->us > 0) {
- DAG_id_flush_update(id, OB_RECALC_DATA);
+ DAG_id_tag_update(id, OB_RECALC_DATA);
WM_main_add_notifier(NC_GEOM|ND_DATA, id);
}
}
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index 6fb8f159758..e2e66b53513 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -98,7 +98,7 @@ static void rna_MetaBall_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
if(ob->data == mb)
copy_mball_properties(scene, ob);
- DAG_id_flush_update(&mb->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&mb->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_GEOM|ND_DATA, mb);
}
}
@@ -109,7 +109,7 @@ static MetaElem *rna_MetaBall_elements_new(MetaBall *mb, int type)
/* cheating way for importers to avoid slow updates */
if(mb->id.us > 0) {
- DAG_id_flush_update(&mb->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&mb->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_GEOM|ND_DATA, &mb->id);
}
@@ -132,7 +132,7 @@ static void rna_MetaBall_elements_remove(MetaBall *mb, ReportList *reports, Meta
/* cheating way for importers to avoid slow updates */
if(mb->id.us > 0) {
- DAG_id_flush_update(&mb->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&mb->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_GEOM|ND_DATA, &mb->id);
}
}
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 1b9cdc5a482..b846e0bd07f 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -208,7 +208,7 @@ static char *rna_Modifier_path(PointerRNA *ptr)
static void rna_Modifier_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
+ DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ptr->id.data);
}
@@ -255,7 +255,7 @@ static void rna_Smoke_set_type(Main *bmain, Scene *scene, PointerRNA *ptr)
part->ren_as = PART_DRAW_NOT;
sprintf(psys->name, "SmokeParticles");
psys->recalc |= (PSYS_RECALC_RESET|PSYS_RECALC_PHYS);
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
+ DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
}
}
if(smd->flow)
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 183b64fb808..5cb88c35b85 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -443,7 +443,7 @@ static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *C, ReportList *r
else {
nodeVerifyGroup(ntree); /* update group node socket links*/
NodeTagChanged(ntree, node);
- WM_event_add_notifier(C, NC_NODE|NA_EDITED, ntree);
+ WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
if (group)
id_us_plus(&group->id);
@@ -489,7 +489,7 @@ static bNode *rna_NodeTree_node_texture_new(bNodeTree *ntree, bContext *C, Repor
return node;
}
-static void rna_NodeTree_node_remove(bNodeTree *ntree, bContext *C, ReportList *reports, bNode *node)
+static void rna_NodeTree_node_remove(bNodeTree *ntree, ReportList *reports, bNode *node)
{
if (BLI_findindex(&ntree->nodes, node) == -1) {
BKE_reportf(reports, RPT_ERROR, "Unable to locate node '%s' in nodetree", node->name);
@@ -501,11 +501,11 @@ static void rna_NodeTree_node_remove(bNodeTree *ntree, bContext *C, ReportList *
nodeFreeNode(ntree, node);
nodeVerifyGroup(ntree); /* update group node socket links*/
- WM_event_add_notifier(C, NC_NODE|NA_EDITED, ntree);
+ WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
}
}
-static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, bContext *C, ReportList *reports, bNodeSocket *in, bNodeSocket *out)
+static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports, bNodeSocket *in, bNodeSocket *out)
{
bNodeLink *ret;
bNode *fromnode, *tonode;
@@ -529,12 +529,12 @@ static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, bContext *C, ReportLis
ntreeSolveOrder(ntree);
- WM_event_add_notifier(C, NC_NODE|NA_EDITED, ntree);
+ WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
return ret;
}
-static void rna_NodeTree_link_remove(bNodeTree *ntree, bContext *C, ReportList *reports, bNodeLink *link)
+static void rna_NodeTree_link_remove(bNodeTree *ntree, ReportList *reports, bNodeLink *link)
{
if (BLI_findindex(&ntree->links, link) == -1) {
BKE_reportf(reports, RPT_ERROR, "Unable to locate link in nodetree");
@@ -544,7 +544,7 @@ static void rna_NodeTree_link_remove(bNodeTree *ntree, bContext *C, ReportList *
ntreeSolveOrder(ntree);
nodeVerifyGroup(ntree); /* update group node socket links*/
- WM_event_add_notifier(C, NC_NODE|NA_EDITED, ntree);
+ WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
}
}
@@ -2338,7 +2338,7 @@ static void rna_def_nodetree_link_api(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_NodeTree_link_new");
RNA_def_function_ui_description(func, "Add a node link to this node tree.");
- RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_pointer(func, "input", "NodeSocket", "", "The input socket.");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "output", "NodeSocket", "", "The output socket.");
@@ -2349,7 +2349,7 @@ static void rna_def_nodetree_link_api(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "remove", "rna_NodeTree_link_remove");
RNA_def_function_ui_description(func, "remove a node link from the node tree.");
- RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_pointer(func, "link", "NodeLink", "", "The node link to remove.");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -2377,7 +2377,7 @@ static void rna_def_composite_nodetree_api(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "remove", "rna_NodeTree_node_remove");
RNA_def_function_ui_description(func, "remove a node from this node tree.");
- RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove.");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -2405,7 +2405,7 @@ static void rna_def_shader_nodetree_api(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "remove", "rna_NodeTree_node_remove");
RNA_def_function_ui_description(func, "remove a node from this node tree.");
- RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove.");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -2433,7 +2433,7 @@ static void rna_def_texture_nodetree_api(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "remove", "rna_NodeTree_node_remove");
RNA_def_function_ui_description(func, "remove a node from this node tree.");
- RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove.");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index cd16b75a8ed..289f3de2f2c 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -148,7 +148,7 @@ EnumPropertyItem object_type_curve_items[] = {
static void rna_Object_internal_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- DAG_id_flush_update(ptr->id.data, OB_RECALC_OB);
+ DAG_id_tag_update(ptr->id.data, OB_RECALC_OB);
}
static void rna_Object_matrix_world_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -206,7 +206,7 @@ static void rna_Object_matrix_basis_set(PointerRNA *ptr, const float values[16])
void rna_Object_internal_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
+ DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_DRAW, ptr->id.data);
}
@@ -238,7 +238,7 @@ void rna_Object_active_shape_update(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Object_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- DAG_id_flush_update(ptr->id.data, OB_RECALC_OB);
+ DAG_id_tag_update(ptr->id.data, OB_RECALC_OB);
DAG_scene_sort(bmain, scene);
WM_main_add_notifier(NC_OBJECT|ND_PARENT, ptr->id.data);
}
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 34e3caad618..af77c55dbf9 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -278,7 +278,7 @@ static void rna_Object_update(Object *ob, Scene *sce, int object, int data, int
if(data) flag |= OB_RECALC_DATA;
if(time) flag |= OB_RECALC_TIME;
- DAG_id_flush_update(&ob->id, flag);
+ DAG_id_tag_update(&ob->id, flag);
}
static PointerRNA rna_Object_add_shape_key(Object *ob, bContext *C, ReportList *reports, const char *name, int from_mix)
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index cdcc57bde12..3947e0366e6 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -110,7 +110,7 @@ static void rna_Cache_change(Main *bmain, Scene *scene, PointerRNA *ptr)
BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
for(pid=pidlist.first; pid; pid=pid->next) {
if(pid->cache==cache)
@@ -179,7 +179,7 @@ static void rna_Cache_idname_change(Main *bmain, Scene *scene, PointerRNA *ptr)
BKE_ptcache_load_external(pid);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
else {
for(pid=pidlist.first; pid; pid=pid->next) {
@@ -480,7 +480,7 @@ static void rna_FieldSettings_update(Main *bmain, Scene *scene, PointerRNA *ptr)
part->pd2->tex= 0;
}
- DAG_id_flush_update(&part->id, OB_RECALC_ALL|PSYS_RECALC_RESET);
+ DAG_id_tag_update(&part->id, OB_RECALC_ALL|PSYS_RECALC_RESET);
WM_main_add_notifier(NC_OBJECT|ND_DRAW, NULL);
}
@@ -492,7 +492,7 @@ static void rna_FieldSettings_update(Main *bmain, Scene *scene, PointerRNA *ptr)
ob->pd->tex= 0;
}
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_id_tag_update(&ob->id, OB_RECALC_OB);
WM_main_add_notifier(NC_OBJECT|ND_DRAW, ob);
}
}
@@ -522,7 +522,7 @@ static void rna_FieldSettings_shape_update(Main *bmain, Scene *scene, PointerRNA
static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
if(particle_id_check(ptr)) {
- DAG_id_flush_update((ID*)ptr->id.data, OB_RECALC_ALL|PSYS_RECALC_RESET);
+ DAG_id_tag_update((ID*)ptr->id.data, OB_RECALC_ALL|PSYS_RECALC_RESET);
}
else {
Object *ob= (Object*)ptr->id.data;
@@ -539,9 +539,9 @@ static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, Point
DAG_scene_sort(bmain, scene);
if(ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE)
- DAG_id_flush_update(&ob->id, OB_RECALC_ALL);
+ DAG_id_tag_update(&ob->id, OB_RECALC_ALL);
else
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_id_tag_update(&ob->id, OB_RECALC_OB);
WM_main_add_notifier(NC_OBJECT|ND_DRAW, ob);
}
@@ -573,7 +573,7 @@ static char *rna_FieldSettings_path(PointerRNA *ptr)
static void rna_EffectorWeight_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- DAG_id_flush_update((ID*)ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET);
+ DAG_id_tag_update((ID*)ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET);
WM_main_add_notifier(NC_OBJECT|ND_DRAW, NULL);
}
@@ -582,7 +582,7 @@ static void rna_EffectorWeight_dependency_update(Main *bmain, Scene *scene, Poin
{
DAG_scene_sort(bmain, scene);
- DAG_id_flush_update((ID*)ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET);
+ DAG_id_tag_update((ID*)ptr->id.data, OB_RECALC_DATA|PSYS_RECALC_RESET);
WM_main_add_notifier(NC_OBJECT|ND_DRAW, NULL);
}
@@ -649,7 +649,7 @@ static void rna_CollisionSettings_update(Main *bmain, Scene *scene, PointerRNA *
{
Object *ob= (Object*)ptr->id.data;
- DAG_id_flush_update(&ob->id, OB_RECALC_ALL);
+ DAG_id_tag_update(&ob->id, OB_RECALC_ALL);
WM_main_add_notifier(NC_OBJECT|ND_DRAW, ob);
}
@@ -657,7 +657,7 @@ static void rna_softbody_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Object *ob= (Object*)ptr->id.data;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob);
}
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index a8b9b5b3e51..38e052dd7be 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -201,10 +201,10 @@ static void particle_recalc(Main *bmain, Scene *scene, PointerRNA *ptr, short fl
psys->recalc = flag;
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
+ DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
}
else
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA|flag);
+ DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA|flag);
WM_main_add_notifier(NC_OBJECT|ND_PARTICLE|NA_EDITED, NULL);
}
@@ -279,7 +279,7 @@ static void rna_Particle_target_reset(Main *bmain, Scene *scene, PointerRNA *ptr
psys->recalc = PSYS_RECALC_RESET;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
DAG_scene_sort(bmain, scene);
}
@@ -295,7 +295,7 @@ static void rna_Particle_target_redo(Main *bmain, Scene *scene, PointerRNA *ptr)
psys->recalc = PSYS_RECALC_REDO;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_PARTICLE|NA_EDITED, NULL);
}
}
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 309800e8a83..be14556cb41 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -70,7 +70,7 @@ static void rna_Pose_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
// XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
+ DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
}
static void rna_Pose_IK_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -78,7 +78,7 @@ static void rna_Pose_IK_update(Main *bmain, Scene *scene, PointerRNA *ptr)
// XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
Object *ob= ptr->id.data;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
BIK_clear_data(ob->pose);
}
@@ -162,7 +162,7 @@ static void rna_Pose_ik_solver_update(Main *bmain, Scene *scene, PointerRNA *ptr
object_test_constraints(ob);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
}
/* rotation - axis-angle */
@@ -271,7 +271,7 @@ static void rna_Itasc_update(Main *bmain, Scene *scene, PointerRNA *ptr)
itasc->maxvel = 100.f;
BIK_update_param(ob->pose);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
static void rna_Itasc_update_rebuild(Main *bmain, Scene *scene, PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 520a6e659d7..cb12c042298 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -725,7 +725,7 @@ static void rna_Scene_glsl_update(Main *bmain, Scene *unused, PointerRNA *ptr)
{
Scene *scene= (Scene*)ptr->id.data;
- DAG_id_flush_update(&scene->id, 0);
+ DAG_id_tag_update(&scene->id, 0);
}
static void rna_RenderSettings_color_management_update(Main *bmain, Scene *unused, PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index f4cc6427599..6203df0a975 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -105,7 +105,7 @@ static void rna_ParticleEdit_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Object *ob= (scene->basact)? scene->basact->object: NULL;
- if(ob) DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ if(ob) DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
static void rna_ParticleEdit_tool_set(PointerRNA *ptr, int value)
{
@@ -115,7 +115,7 @@ static void rna_ParticleEdit_tool_set(PointerRNA *ptr, int value)
if((pset->brushtype == PE_BRUSH_WEIGHT || value == PE_BRUSH_WEIGHT) && pset->scene) {
Object *ob = (pset->scene->basact)? pset->scene->basact->object: NULL;
if(ob) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_PARTICLE|NA_EDITED, NULL);
}
}
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index cdc80cfa176..fc1584c7a0f 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -50,7 +50,7 @@
static void rna_Smoke_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);
+ DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
}
static void rna_Smoke_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 0697ce8d056..1752096d0aa 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -670,7 +670,7 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *bmain, Scene *scene, Po
}
/* force depsgraph flush too */
- DAG_id_flush_update(&obact->id, OB_RECALC_OB|OB_RECALC_DATA);
+ DAG_id_tag_update(&obact->id, OB_RECALC_OB|OB_RECALC_DATA);
}
}
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index c020ceb2c0f..6bdb3fbc738 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -128,7 +128,7 @@ static void rna_Texture_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Tex *tex= ptr->id.data;
- DAG_id_flush_update(&tex->id, 0);
+ DAG_id_tag_update(&tex->id, 0);
WM_main_add_notifier(NC_TEXTURE, tex);
}
@@ -153,7 +153,7 @@ static void rna_Texture_nodes_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Tex *tex= ptr->id.data;
- DAG_id_flush_update(&tex->id, 0);
+ DAG_id_tag_update(&tex->id, 0);
WM_main_add_notifier(NC_TEXTURE|ND_NODES, tex);
}
@@ -168,7 +168,7 @@ void rna_TextureSlot_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
ID *id= ptr->id.data;
- DAG_id_flush_update(id, 0);
+ DAG_id_tag_update(id, 0);
switch(GS(id->name)) {
case ID_MA:
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 116e25030d6..014406f9074 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -219,7 +219,7 @@ static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRN
for(ob= bmain->object.first; ob; ob= ob->id.next) {
if(ob->mode & OB_MODE_WEIGHT_PAINT)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
rna_userdef_update(bmain, scene, ptr);
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index f7aa30174ac..1358964a92b 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -86,7 +86,7 @@ static void rna_World_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
World *wo= ptr->id.data;
- DAG_id_flush_update(&wo->id, 0);
+ DAG_id_tag_update(&wo->id, 0);
WM_main_add_notifier(NC_WORLD, wo);
}
@@ -94,7 +94,7 @@ static void rna_World_draw_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
World *wo= ptr->id.data;
- DAG_id_flush_update(&wo->id, 0);
+ DAG_id_tag_update(&wo->id, 0);
WM_main_add_notifier(NC_WORLD|ND_WORLD_DRAW, wo);
}
@@ -103,7 +103,7 @@ static void rna_World_draw_mist_update(Main *bmain, Scene *scene, PointerRNA *pt
{
World *wo= ptr->id.data;
- DAG_id_flush_update(&wo->id, 0);
+ DAG_id_tag_update(&wo->id, 0);
WM_main_add_notifier(NC_WORLD|ND_WORLD_DRAW, wo);
WM_main_add_notifier(NC_OBJECT|ND_DRAW, NULL);
}
@@ -112,7 +112,7 @@ static void rna_World_stars_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
World *wo= ptr->id.data;
- DAG_id_flush_update(&wo->id, 0);
+ DAG_id_tag_update(&wo->id, 0);
WM_main_add_notifier(NC_WORLD|ND_WORLD_STARS, wo);
}