diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2020-05-25 11:43:44 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2020-05-26 09:29:24 +0300 |
commit | 77fdd189e4b22d2aa2410109a1a514d21f58d865 (patch) | |
tree | 9542e07d9d946ff329038afed6c84681264b82be /source/blender/editors/include | |
parent | 39aa122a0e6d8ff744bec9a245b23d8e9eb2387d (diff) |
Fix T76970: Unneccessary update calls viewport
Due to recent changes clicks in the node editor would trigger a
depsgraph update resulting in too many redraws. This patch limits
the updates to when workbench shown in texture mode in any visible
screen.
There are still cases where too many updates are created. For example when
there are a Cycles render viewport and a Workbench texture viewport on the
same screen.
This fix is meant as a workaround. The actual fix should add a mechanism
to the depsgraph and the viewports should check if they need to be redrawn.
Reviewed By: Brecht van Lommel
Differential Revision: https://developer.blender.org/D7830
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_node.h | 5 | ||||
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index 7a1f64b61d4..db028479e94 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -101,7 +101,10 @@ void ED_node_texture_default(const struct bContext *C, struct Tex *tex); bool ED_node_select_check(ListBase *lb); void ED_node_select_all(ListBase *lb, int action); void ED_node_post_apply_transform(struct bContext *C, struct bNodeTree *ntree); -void ED_node_set_active(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node); +void ED_node_set_active(struct Main *bmain, + struct bNodeTree *ntree, + struct bNode *node, + bool *r_active_texture_changed); void ED_node_composite_job(const struct bContext *C, struct bNodeTree *nodetree, diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 668ca3c6437..8ac7bd34613 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -129,6 +129,9 @@ enum eV3DCursorOrient { void ED_view3d_background_color_get(const struct Scene *scene, const struct View3D *v3d, float r_color[3]); +bool ED_view3d_has_workbench_in_texture_color(const struct Scene *scene, + const struct Object *ob, + const struct View3D *v3d); void ED_view3d_cursor3d_position(struct bContext *C, const int mval[2], const bool use_depth, |