mirror of
https://github.com/blender/blender
synced 2026-09-26 16:15:47 +03:00
Sculpt: Disable sculpt sample detail size on invisible objects
Addresses part of #112371 Pull Request: https://projects.blender.org/blender/blender/pulls/118075
This commit is contained in:
parent
ca6b75b106
commit
a2d96b0879
1 changed files with 7 additions and 0 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#include "DNA_mesh_types.h"
|
||||
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_layer.hh"
|
||||
#include "BKE_paint.hh"
|
||||
#include "BKE_pbvh_api.hh"
|
||||
#include "BKE_screen.hh"
|
||||
|
|
@ -272,6 +273,12 @@ static int sample_detail(bContext *C, const int event_xy[2], int mode)
|
|||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
const View3D *v3d = CTX_wm_view3d(C);
|
||||
const Base *base = CTX_data_active_base(C);
|
||||
if (!BKE_base_is_visible(v3d, base)) {
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
const int mval[2] = {
|
||||
event_xy[0] - region->winrct.xmin,
|
||||
event_xy[1] - region->winrct.ymin,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue