Wireframe Overlay: Make use of colorTransform when transforming an object
authorClément Foucault <foucault.clem@gmail.com>
Tue, 18 Dec 2018 20:39:56 +0000 (21:39 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Tue, 18 Dec 2018 21:17:53 +0000 (22:17 +0100)
source/blender/draw/modes/overlay_mode.c

index 2011597e088619e01bee2e0859fb9fc3213c18f5..e5b7959f38e9aa71d260744732ac977833737b41 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "BKE_editmesh.h"
 #include "BKE_object.h"
 
 #include "BKE_editmesh.h"
 #include "BKE_object.h"
+#include "BKE_global.h"
 
 #include "GPU_shader.h"
 #include "GPU_extensions.h"
 
 #include "GPU_shader.h"
 #include "GPU_extensions.h"
@@ -250,6 +251,7 @@ static void overlay_cache_populate(void *vedata, Object *ob)
                            ((ob->base_flag & BASE_SELECTED) != 0))
                        {
                                rim_col = (ob == draw_ctx->obact) ? ts.colorActive : ts.colorSelect;
                            ((ob->base_flag & BASE_SELECTED) != 0))
                        {
                                rim_col = (ob == draw_ctx->obact) ? ts.colorActive : ts.colorSelect;
+                               rim_col = (G.moving & G_TRANSFORM_OBJ) ? ts.colorTransform : rim_col;
                        }
 
                        /* This fixes only the biggest case which is a plane in ortho view. */
                        }
 
                        /* This fixes only the biggest case which is a plane in ortho view. */