[Bf-blender-cvs] [41350a9] master: Workaround T44351: Scopes make editmesh lag

Campbell Barton noreply at git.blender.org
Mon Apr 13 14:44:30 CEST 2015


Commit: 41350a91b52fa391bdd9e37b1c7b171b3a6b9021
Author: Campbell Barton
Date:   Mon Apr 13 22:39:27 2015 +1000
Branches: master
https://developer.blender.org/rB41350a91b52fa391bdd9e37b1c7b171b3a6b9021

Workaround T44351: Scopes make editmesh lag

Scopes are very heavy to calculate and editmesh uv's can cause the image view to redraw.

Best just disable scopes in this case.

===================================================================

M	release/scripts/startup/bl_ui/space_image.py
M	source/blender/editors/space_image/image_edit.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index a1101bb..9a1b9db 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -1060,7 +1060,7 @@ class ImageScopesPanel:
         if sima.mode in {'PAINT'}:
             return False
         ob = context.active_object
-        if ob and ob.mode in {'TEXTURE_PAINT'}:
+        if ob and ob.mode in {'TEXTURE_PAINT', 'EDIT'}:
             return False
         return True
 
diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c
index 8e2c6b9..19fa068 100644
--- a/source/blender/editors/space_image/image_edit.c
+++ b/source/blender/editors/space_image/image_edit.c
@@ -299,7 +299,7 @@ void ED_space_image_scopes_update(const struct bContext *C, struct SpaceImage *s
 	/* scope update can be expensive, don't update during paint modes */
 	if (sima->mode == SI_MODE_PAINT)
 		return;
-	if (ob && ((ob->mode & OB_MODE_TEXTURE_PAINT) != 0))
+	if (ob && ((ob->mode & (OB_MODE_TEXTURE_PAINT | OB_MODE_EDIT)) != 0))
 		return;
 	
 	scopes_update(&sima->scopes, ibuf, use_view_settings ? &scene->view_settings : NULL, &scene->display_settings);




More information about the Bf-blender-cvs mailing list