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:
committed by
Brecht Van Lommel
parent
ca6b75b106
commit
a2d96b0879
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user