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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_mesh.c')
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index cdab225f09c..b6563ec067d 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -57,22 +57,29 @@ static void rna_Mesh_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
{
ID *id= ptr->id.data;
- DAG_id_flush_update(id, OB_RECALC_DATA);
- WM_main_add_notifier(NC_GEOM|ND_DATA, id);
+ /* cheating way for importers to avoid slow updates */
+ if(id->us > 0) {
+ DAG_id_flush_update(id, OB_RECALC_DATA);
+ WM_main_add_notifier(NC_GEOM|ND_DATA, id);
+ }
}
static void rna_Mesh_update_select(Main *bmain, Scene *scene, PointerRNA *ptr)
{
ID *id= ptr->id.data;
-
- WM_main_add_notifier(NC_GEOM|ND_SELECT, id);
+ /* cheating way for importers to avoid slow updates */
+ if(id->us > 0) {
+ WM_main_add_notifier(NC_GEOM|ND_SELECT, id);
+ }
}
void rna_Mesh_update_draw(Main *bmain, Scene *scene, PointerRNA *ptr)
{
ID *id= ptr->id.data;
-
- WM_main_add_notifier(NC_GEOM|ND_DATA, id);
+ /* cheating way for importers to avoid slow updates */
+ if(id->us > 0) {
+ WM_main_add_notifier(NC_GEOM|ND_DATA, id);
+ }
}
static void rna_MeshVertex_normal_get(PointerRNA *ptr, float *value)