[Bf-blender-cvs] [28d2058e2c4] blender2.8: Fix rotate around point under cursor 'seeing' hidden faces in paint modes.

Alexander Gavrilov noreply at git.blender.org
Thu Nov 29 12:58:57 CET 2018


Commit: 28d2058e2c4801da4b4c60b2870deb13b535b1cc
Author: Alexander Gavrilov
Date:   Thu Nov 29 14:24:30 2018 +0300
Branches: blender2.8
https://developer.blender.org/rB28d2058e2c4801da4b4c60b2870deb13b535b1cc

Fix rotate around point under cursor 'seeing' hidden faces in paint modes.

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

M	source/blender/draw/engines/basic/basic_engine.c

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

diff --git a/source/blender/draw/engines/basic/basic_engine.c b/source/blender/draw/engines/basic/basic_engine.c
index 9dc8c8f2f34..8356838a885 100644
--- a/source/blender/draw/engines/basic/basic_engine.c
+++ b/source/blender/draw/engines/basic/basic_engine.c
@@ -157,7 +157,10 @@ static void basic_cache_populate(void *vedata, Object *ob)
 		}
 	}
 
-	struct GPUBatch *geom = DRW_cache_object_surface_get(ob);
+	const bool is_active = (ob == draw_ctx->obact);
+	const bool use_hide = is_active && DRW_object_use_hide_faces(ob);
+
+	struct GPUBatch *geom = DRW_cache_object_surface_get_ex(ob, use_hide);
 	if (geom) {
 		const bool do_cull = (draw_ctx->v3d && (draw_ctx->v3d->flag2 & V3D_BACKFACE_CULLING));
 		/* Depth Prepass */



More information about the Bf-blender-cvs mailing list