Sidebar visual hints set as default

This commit is contained in:
Enrico Turri 2019-01-21 12:36:34 +01:00
parent cceff0c519
commit 012c681e67
5 changed files with 0 additions and 31 deletions

View File

@ -26,8 +26,6 @@
#define ENABLE_NONCUSTOM_DATA_VIEW_RENDERING (0 && ENABLE_1_42_0_ALPHA1)
// Renders a small sphere in the center of the bounding box of the current selection when no gizmo is active
#define ENABLE_RENDER_SELECTION_CENTER (0 && ENABLE_1_42_0_ALPHA1)
// Show visual hints in the 3D scene when sidebar matrix fields have focus
#define ENABLE_SIDEBAR_VISUAL_HINTS (1 && ENABLE_1_42_0_ALPHA1)
// Separate rendering for opaque and transparent volumes
#define ENABLE_IMPROVED_TRANSPARENT_VOLUMES_RENDERING (1 && ENABLE_1_42_0_ALPHA1)

View File

@ -1678,7 +1678,6 @@ void _3DScene::point3_to_verts(const Vec3crd& point, double width, double height
GUI::GLCanvas3DManager _3DScene::s_canvas_mgr;
#if ENABLE_SIDEBAR_VISUAL_HINTS
GLModel::GLModel()
: m_useVBOs(false)
#if ENABLE_PRINT_BED_MODELS
@ -1977,7 +1976,6 @@ bool GLCurvedArrow::on_init(bool useVBOs)
m_volume.finalize_geometry(m_useVBOs);
return true;
}
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
#if ENABLE_PRINT_BED_MODELS
bool GLBed::on_init_from_file(const std::string& filename, bool useVBOs)

View File

@ -485,7 +485,6 @@ private:
GLVolumeCollection& operator=(const GLVolumeCollection &);
};
#if ENABLE_SIDEBAR_VISUAL_HINTS
class GLModel
{
protected:
@ -552,7 +551,6 @@ public:
protected:
virtual bool on_init(bool useVBOs);
};
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
#if ENABLE_PRINT_BED_MODELS
class GLBed : public GLModel

View File

@ -72,11 +72,8 @@ static const float DEFAULT_BG_DARK_COLOR[3] = { 0.478f, 0.478f, 0.478f };
static const float DEFAULT_BG_LIGHT_COLOR[3] = { 0.753f, 0.753f, 0.753f };
static const float ERROR_BG_DARK_COLOR[3] = { 0.478f, 0.192f, 0.039f };
static const float ERROR_BG_LIGHT_COLOR[3] = { 0.753f, 0.192f, 0.039f };
#if ENABLE_SIDEBAR_VISUAL_HINTS
static const float UNIFORM_SCALE_COLOR[3] = { 1.0f, 0.38f, 0.0f };
static const float AXES_COLOR[3][3] = { { 1.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 0.0f, 1.0f } };
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
namespace Slic3r {
namespace GUI {
@ -1320,7 +1317,6 @@ void GLCanvas3D::Selection::set_volumes(GLVolumePtrs* volumes)
_update_valid();
}
#if ENABLE_SIDEBAR_VISUAL_HINTS
bool GLCanvas3D::Selection::init(bool useVBOs)
{
if (!m_arrow.init(useVBOs))
@ -1334,7 +1330,6 @@ bool GLCanvas3D::Selection::init(bool useVBOs)
m_curved_arrow.set_scale(5.0 * Vec3d::Ones());
return true;
}
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
void GLCanvas3D::Selection::set_model(Model* model)
{
@ -2115,7 +2110,6 @@ void GLCanvas3D::Selection::render_center() const
}
#endif // ENABLE_RENDER_SELECTION_CENTER
#if ENABLE_SIDEBAR_VISUAL_HINTS
void GLCanvas3D::Selection::render_sidebar_hints(const std::string& sidebar_field) const
{
if (sidebar_field.empty())
@ -2170,7 +2164,6 @@ void GLCanvas3D::Selection::render_sidebar_hints(const std::string& sidebar_fiel
::glDisable(GL_LIGHTING);
}
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
bool GLCanvas3D::Selection::requires_local_axes() const
{
@ -2575,7 +2568,6 @@ void GLCanvas3D::Selection::_render_bounding_box(const BoundingBoxf3& box, float
::glEnd();
}
#if ENABLE_SIDEBAR_VISUAL_HINTS
void GLCanvas3D::Selection::_render_sidebar_position_hints(const std::string& sidebar_field) const
{
if (boost::ends_with(sidebar_field, "x"))
@ -2671,7 +2663,6 @@ void GLCanvas3D::Selection::_render_sidebar_scale_hint(Axis axis) const
void GLCanvas3D::Selection::_render_sidebar_size_hint(Axis axis, double length) const
{
}
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
void GLCanvas3D::Selection::_synchronize_unselected_instances(bool including_z)
{
@ -3947,10 +3938,8 @@ bool GLCanvas3D::init(bool useVBOs, bool use_legacy_opengl)
if (!_init_toolbar())
return false;
#if ENABLE_SIDEBAR_VISUAL_HINTS
if (!m_selection.init(m_use_VBOs))
return false;
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
post_event(SimpleEvent(EVT_GLCANVAS_INIT));
@ -4317,9 +4306,7 @@ void GLCanvas3D::render()
// this position is used later into on_mouse() to drag the objects
m_mouse.scene_position = _mouse_to_3d(m_mouse.position.cast<int>());
#if ENABLE_SIDEBAR_VISUAL_HINTS
_render_selection_sidebar_hints();
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
_render_current_gizmo();
#if ENABLE_SHOW_CAMERA_TARGET
@ -6633,7 +6620,6 @@ void GLCanvas3D::_render_sla_slices() const
}
}
#if ENABLE_SIDEBAR_VISUAL_HINTS
void GLCanvas3D::_render_selection_sidebar_hints() const
{
if (m_use_VBOs)
@ -6644,7 +6630,6 @@ void GLCanvas3D::_render_selection_sidebar_hints() const
if (m_use_VBOs)
m_shader.stop_using();
}
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
void GLCanvas3D::_update_volumes_hover_state() const
{

View File

@ -528,10 +528,8 @@ public:
#if ENABLE_RENDER_SELECTION_CENTER
GLUquadricObj* m_quadric;
#endif // ENABLE_RENDER_SELECTION_CENTER
#if ENABLE_SIDEBAR_VISUAL_HINTS
mutable GLArrow m_arrow;
mutable GLCurvedArrow m_curved_arrow;
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
public:
Selection();
@ -540,9 +538,7 @@ public:
#endif // ENABLE_RENDER_SELECTION_CENTER
void set_volumes(GLVolumePtrs* volumes);
#if ENABLE_SIDEBAR_VISUAL_HINTS
bool init(bool useVBOs);
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
Model* get_model() const { return m_model; }
void set_model(Model* model);
@ -620,9 +616,7 @@ public:
#if ENABLE_RENDER_SELECTION_CENTER
void render_center() const;
#endif // ENABLE_RENDER_SELECTION_CENTER
#if ENABLE_SIDEBAR_VISUAL_HINTS
void render_sidebar_hints(const std::string& sidebar_field) const;
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
bool requires_local_axes() const;
@ -640,7 +634,6 @@ public:
void _render_selected_volumes() const;
void _render_synchronized_volumes() const;
void _render_bounding_box(const BoundingBoxf3& box, float* color) const;
#if ENABLE_SIDEBAR_VISUAL_HINTS
void _render_sidebar_position_hints(const std::string& sidebar_field) const;
void _render_sidebar_rotation_hints(const std::string& sidebar_field) const;
void _render_sidebar_scale_hints(const std::string& sidebar_field) const;
@ -649,7 +642,6 @@ public:
void _render_sidebar_rotation_hint(Axis axis) const;
void _render_sidebar_scale_hint(Axis axis) const;
void _render_sidebar_size_hint(Axis axis, double length) const;
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
void _synchronize_unselected_instances(bool including_z = false);
void _synchronize_unselected_volumes();
void _ensure_on_bed();
@ -1072,9 +1064,7 @@ private:
void _render_camera_target() const;
#endif // ENABLE_SHOW_CAMERA_TARGET
void _render_sla_slices() const;
#if ENABLE_SIDEBAR_VISUAL_HINTS
void _render_selection_sidebar_hints() const;
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
void _update_volumes_hover_state() const;
void _update_gizmos_data();