Sidebar visual hints set as default
This commit is contained in:
parent
cceff0c519
commit
012c681e67
@ -26,8 +26,6 @@
|
|||||||
#define ENABLE_NONCUSTOM_DATA_VIEW_RENDERING (0 && ENABLE_1_42_0_ALPHA1)
|
#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
|
// 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)
|
#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
|
// Separate rendering for opaque and transparent volumes
|
||||||
#define ENABLE_IMPROVED_TRANSPARENT_VOLUMES_RENDERING (1 && ENABLE_1_42_0_ALPHA1)
|
#define ENABLE_IMPROVED_TRANSPARENT_VOLUMES_RENDERING (1 && ENABLE_1_42_0_ALPHA1)
|
||||||
|
|
||||||
|
@ -1678,7 +1678,6 @@ void _3DScene::point3_to_verts(const Vec3crd& point, double width, double height
|
|||||||
|
|
||||||
GUI::GLCanvas3DManager _3DScene::s_canvas_mgr;
|
GUI::GLCanvas3DManager _3DScene::s_canvas_mgr;
|
||||||
|
|
||||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
GLModel::GLModel()
|
GLModel::GLModel()
|
||||||
: m_useVBOs(false)
|
: m_useVBOs(false)
|
||||||
#if ENABLE_PRINT_BED_MODELS
|
#if ENABLE_PRINT_BED_MODELS
|
||||||
@ -1977,7 +1976,6 @@ bool GLCurvedArrow::on_init(bool useVBOs)
|
|||||||
m_volume.finalize_geometry(m_useVBOs);
|
m_volume.finalize_geometry(m_useVBOs);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
|
|
||||||
#if ENABLE_PRINT_BED_MODELS
|
#if ENABLE_PRINT_BED_MODELS
|
||||||
bool GLBed::on_init_from_file(const std::string& filename, bool useVBOs)
|
bool GLBed::on_init_from_file(const std::string& filename, bool useVBOs)
|
||||||
|
@ -485,7 +485,6 @@ private:
|
|||||||
GLVolumeCollection& operator=(const GLVolumeCollection &);
|
GLVolumeCollection& operator=(const GLVolumeCollection &);
|
||||||
};
|
};
|
||||||
|
|
||||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
class GLModel
|
class GLModel
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
@ -552,7 +551,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual bool on_init(bool useVBOs);
|
virtual bool on_init(bool useVBOs);
|
||||||
};
|
};
|
||||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
|
|
||||||
#if ENABLE_PRINT_BED_MODELS
|
#if ENABLE_PRINT_BED_MODELS
|
||||||
class GLBed : public GLModel
|
class GLBed : public GLModel
|
||||||
|
@ -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 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_DARK_COLOR[3] = { 0.478f, 0.192f, 0.039f };
|
||||||
static const float ERROR_BG_LIGHT_COLOR[3] = { 0.753f, 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 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 } };
|
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 Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
@ -1320,7 +1317,6 @@ void GLCanvas3D::Selection::set_volumes(GLVolumePtrs* volumes)
|
|||||||
_update_valid();
|
_update_valid();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
bool GLCanvas3D::Selection::init(bool useVBOs)
|
bool GLCanvas3D::Selection::init(bool useVBOs)
|
||||||
{
|
{
|
||||||
if (!m_arrow.init(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());
|
m_curved_arrow.set_scale(5.0 * Vec3d::Ones());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
|
|
||||||
void GLCanvas3D::Selection::set_model(Model* model)
|
void GLCanvas3D::Selection::set_model(Model* model)
|
||||||
{
|
{
|
||||||
@ -2115,7 +2110,6 @@ void GLCanvas3D::Selection::render_center() const
|
|||||||
}
|
}
|
||||||
#endif // ENABLE_RENDER_SELECTION_CENTER
|
#endif // ENABLE_RENDER_SELECTION_CENTER
|
||||||
|
|
||||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
void GLCanvas3D::Selection::render_sidebar_hints(const std::string& sidebar_field) const
|
void GLCanvas3D::Selection::render_sidebar_hints(const std::string& sidebar_field) const
|
||||||
{
|
{
|
||||||
if (sidebar_field.empty())
|
if (sidebar_field.empty())
|
||||||
@ -2170,7 +2164,6 @@ void GLCanvas3D::Selection::render_sidebar_hints(const std::string& sidebar_fiel
|
|||||||
|
|
||||||
::glDisable(GL_LIGHTING);
|
::glDisable(GL_LIGHTING);
|
||||||
}
|
}
|
||||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
|
|
||||||
bool GLCanvas3D::Selection::requires_local_axes() const
|
bool GLCanvas3D::Selection::requires_local_axes() const
|
||||||
{
|
{
|
||||||
@ -2575,7 +2568,6 @@ void GLCanvas3D::Selection::_render_bounding_box(const BoundingBoxf3& box, float
|
|||||||
::glEnd();
|
::glEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
void GLCanvas3D::Selection::_render_sidebar_position_hints(const std::string& sidebar_field) const
|
void GLCanvas3D::Selection::_render_sidebar_position_hints(const std::string& sidebar_field) const
|
||||||
{
|
{
|
||||||
if (boost::ends_with(sidebar_field, "x"))
|
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
|
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)
|
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())
|
if (!_init_toolbar())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
if (!m_selection.init(m_use_VBOs))
|
if (!m_selection.init(m_use_VBOs))
|
||||||
return false;
|
return false;
|
||||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
|
|
||||||
post_event(SimpleEvent(EVT_GLCANVAS_INIT));
|
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
|
// this position is used later into on_mouse() to drag the objects
|
||||||
m_mouse.scene_position = _mouse_to_3d(m_mouse.position.cast<int>());
|
m_mouse.scene_position = _mouse_to_3d(m_mouse.position.cast<int>());
|
||||||
|
|
||||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
_render_selection_sidebar_hints();
|
_render_selection_sidebar_hints();
|
||||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
|
|
||||||
_render_current_gizmo();
|
_render_current_gizmo();
|
||||||
#if ENABLE_SHOW_CAMERA_TARGET
|
#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
|
void GLCanvas3D::_render_selection_sidebar_hints() const
|
||||||
{
|
{
|
||||||
if (m_use_VBOs)
|
if (m_use_VBOs)
|
||||||
@ -6644,7 +6630,6 @@ void GLCanvas3D::_render_selection_sidebar_hints() const
|
|||||||
if (m_use_VBOs)
|
if (m_use_VBOs)
|
||||||
m_shader.stop_using();
|
m_shader.stop_using();
|
||||||
}
|
}
|
||||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
|
|
||||||
void GLCanvas3D::_update_volumes_hover_state() const
|
void GLCanvas3D::_update_volumes_hover_state() const
|
||||||
{
|
{
|
||||||
|
@ -528,10 +528,8 @@ public:
|
|||||||
#if ENABLE_RENDER_SELECTION_CENTER
|
#if ENABLE_RENDER_SELECTION_CENTER
|
||||||
GLUquadricObj* m_quadric;
|
GLUquadricObj* m_quadric;
|
||||||
#endif // ENABLE_RENDER_SELECTION_CENTER
|
#endif // ENABLE_RENDER_SELECTION_CENTER
|
||||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
mutable GLArrow m_arrow;
|
mutable GLArrow m_arrow;
|
||||||
mutable GLCurvedArrow m_curved_arrow;
|
mutable GLCurvedArrow m_curved_arrow;
|
||||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Selection();
|
Selection();
|
||||||
@ -540,9 +538,7 @@ public:
|
|||||||
#endif // ENABLE_RENDER_SELECTION_CENTER
|
#endif // ENABLE_RENDER_SELECTION_CENTER
|
||||||
|
|
||||||
void set_volumes(GLVolumePtrs* volumes);
|
void set_volumes(GLVolumePtrs* volumes);
|
||||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
bool init(bool useVBOs);
|
bool init(bool useVBOs);
|
||||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
|
|
||||||
Model* get_model() const { return m_model; }
|
Model* get_model() const { return m_model; }
|
||||||
void set_model(Model* model);
|
void set_model(Model* model);
|
||||||
@ -620,9 +616,7 @@ public:
|
|||||||
#if ENABLE_RENDER_SELECTION_CENTER
|
#if ENABLE_RENDER_SELECTION_CENTER
|
||||||
void render_center() const;
|
void render_center() const;
|
||||||
#endif // ENABLE_RENDER_SELECTION_CENTER
|
#endif // ENABLE_RENDER_SELECTION_CENTER
|
||||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
void render_sidebar_hints(const std::string& sidebar_field) const;
|
void render_sidebar_hints(const std::string& sidebar_field) const;
|
||||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
|
|
||||||
bool requires_local_axes() const;
|
bool requires_local_axes() const;
|
||||||
|
|
||||||
@ -640,7 +634,6 @@ public:
|
|||||||
void _render_selected_volumes() const;
|
void _render_selected_volumes() const;
|
||||||
void _render_synchronized_volumes() const;
|
void _render_synchronized_volumes() const;
|
||||||
void _render_bounding_box(const BoundingBoxf3& box, float* color) 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_position_hints(const std::string& sidebar_field) const;
|
||||||
void _render_sidebar_rotation_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;
|
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_rotation_hint(Axis axis) const;
|
||||||
void _render_sidebar_scale_hint(Axis axis) const;
|
void _render_sidebar_scale_hint(Axis axis) const;
|
||||||
void _render_sidebar_size_hint(Axis axis, double length) 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_instances(bool including_z = false);
|
||||||
void _synchronize_unselected_volumes();
|
void _synchronize_unselected_volumes();
|
||||||
void _ensure_on_bed();
|
void _ensure_on_bed();
|
||||||
@ -1072,9 +1064,7 @@ private:
|
|||||||
void _render_camera_target() const;
|
void _render_camera_target() const;
|
||||||
#endif // ENABLE_SHOW_CAMERA_TARGET
|
#endif // ENABLE_SHOW_CAMERA_TARGET
|
||||||
void _render_sla_slices() const;
|
void _render_sla_slices() const;
|
||||||
#if ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
void _render_selection_sidebar_hints() const;
|
void _render_selection_sidebar_hints() const;
|
||||||
#endif // ENABLE_SIDEBAR_VISUAL_HINTS
|
|
||||||
|
|
||||||
void _update_volumes_hover_state() const;
|
void _update_volumes_hover_state() const;
|
||||||
void _update_gizmos_data();
|
void _update_gizmos_data();
|
||||||
|
Loading…
Reference in New Issue
Block a user