Cleanup: Overlay-Next: Use same test for V3D everywhere
This commit is contained in:
@@ -133,7 +133,7 @@ class Armatures {
|
||||
|
||||
void begin_sync(Resources &res, const State &state)
|
||||
{
|
||||
enabled_ = state.v3d && !(state.overlay.flag & V3D_OVERLAY_HIDE_BONES);
|
||||
enabled_ = state.space_type == SPACE_VIEW3D && !(state.overlay.flag & V3D_OVERLAY_HIDE_BONES);
|
||||
|
||||
if (!enabled_) {
|
||||
return;
|
||||
|
||||
@@ -34,7 +34,7 @@ class EditText {
|
||||
|
||||
void begin_sync(const State &state)
|
||||
{
|
||||
enabled_ = state.v3d;
|
||||
enabled_ = state.space_type == SPACE_VIEW3D;
|
||||
text_selection_buf.clear();
|
||||
text_cursor_buf.clear();
|
||||
box_line_buf_.clear();
|
||||
|
||||
@@ -35,7 +35,8 @@ class Fade {
|
||||
{
|
||||
const bool do_edit_mesh_fade_geom = !state.xray_enabled &&
|
||||
(state.overlay.flag & V3D_OVERLAY_FADE_INACTIVE);
|
||||
enabled_ = state.v3d && (do_edit_mesh_fade_geom || state.do_pose_fade_geom) &&
|
||||
enabled_ = state.space_type == SPACE_VIEW3D &&
|
||||
(do_edit_mesh_fade_geom || state.do_pose_fade_geom) &&
|
||||
(selection_type_ == SelectionType::DISABLED);
|
||||
|
||||
if (!enabled_) {
|
||||
|
||||
@@ -28,7 +28,7 @@ class ModeTransfer {
|
||||
public:
|
||||
void begin_sync(Resources &res, const State &state)
|
||||
{
|
||||
enabled_ = state.v3d && (res.selection_type == SelectionType::DISABLED);
|
||||
enabled_ = state.space_type == SPACE_VIEW3D && (res.selection_type == SelectionType::DISABLED);
|
||||
|
||||
if (!enabled_) {
|
||||
/* Not used. But release the data. */
|
||||
|
||||
@@ -25,7 +25,7 @@ class Origins {
|
||||
const bool is_paint_mode = (state.object_mode &
|
||||
(OB_MODE_ALL_PAINT | OB_MODE_ALL_PAINT_GPENCIL |
|
||||
OB_MODE_SCULPT_CURVES)) != 0;
|
||||
enabled_ = state.v3d && !is_paint_mode &&
|
||||
enabled_ = state.space_type == SPACE_VIEW3D && !is_paint_mode &&
|
||||
(state.overlay.flag & V3D_OVERLAY_HIDE_OBJECT_ORIGINS) == 0;
|
||||
point_buf_.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user