[Bf-blender-cvs] [1c0f5e79fa1] master: DRW: Fix pointcloud selection
Jarrett Johnson
noreply at git.blender.org
Mon Nov 21 15:50:40 CET 2022
Commit: 1c0f5e79fa105747c0e71b33a00bba2c79b0cc74
Author: Jarrett Johnson
Date: Mon Nov 21 15:49:33 2022 +0100
Branches: master
https://developer.blender.org/rB1c0f5e79fa105747c0e71b33a00bba2c79b0cc74
DRW: Fix pointcloud selection
Fixes point cloud selection by using new draw call.
Reviewed By: fclem
Maniphest Tasks: T102659
Differential Revision: https://developer.blender.org/D16501
===================================================================
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 05e62764bb1..44857cd87e1 100644
--- a/source/blender/draw/engines/basic/basic_engine.c
+++ b/source/blender/draw/engines/basic/basic_engine.c
@@ -164,6 +164,11 @@ static void basic_cache_populate(void *vedata, Object *ob)
DRW_shgroup_curves_create_sub(ob, stl->g_data->depth_curves_shgrp[do_in_front], NULL);
}
+ if (ob->type == OB_POINTCLOUD) {
+ DRW_shgroup_pointcloud_create_sub(ob, stl->g_data->depth_pointcloud_shgrp[do_in_front], NULL);
+ return;
+ }
+
/* Make flat object selectable in ortho view if wireframe is enabled. */
if ((draw_ctx->v3d->overlay.flag & V3D_OVERLAY_WIREFRAMES) ||
(draw_ctx->v3d->shading.type == OB_WIRE) || (ob->dtx & OB_DRAWWIRE) || (ob->dt == OB_WIRE)) {
@@ -187,15 +192,8 @@ static void basic_cache_populate(void *vedata, Object *ob)
const bool do_cull = (draw_ctx->v3d &&
(draw_ctx->v3d->shading.flag & V3D_SHADING_BACKFACE_CULLING));
- DRWShadingGroup *shgrp = NULL;
-
- if (ob->type == OB_POINTCLOUD) {
- shgrp = stl->g_data->depth_pointcloud_shgrp[do_in_front];
- }
- else {
- shgrp = (do_cull) ? stl->g_data->depth_shgrp_cull[do_in_front] :
- stl->g_data->depth_shgrp[do_in_front];
- }
+ DRWShadingGroup *shgrp = (do_cull) ? stl->g_data->depth_shgrp_cull[do_in_front] :
+ stl->g_data->depth_shgrp[do_in_front];
if (use_sculpt_pbvh) {
DRW_shgroup_call_sculpt(shgrp, ob, false, false, false, false, false);
More information about the Bf-blender-cvs
mailing list