Tech ENABLE_MODIFIERS_ALWAYS_TRANSPARENT set as default
This commit is contained in:
parent
123fc13123
commit
b4308f4245
@ -36,15 +36,6 @@
|
||||
#define ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS 1
|
||||
|
||||
|
||||
//====================
|
||||
// 2.4.0.beta1 techs
|
||||
//====================
|
||||
#define ENABLE_2_4_0_BETA1 1
|
||||
|
||||
// Enable rendering modifiers and similar objects always as transparent
|
||||
#define ENABLE_MODIFIERS_ALWAYS_TRANSPARENT (1 && ENABLE_2_4_0_BETA1)
|
||||
|
||||
|
||||
//====================
|
||||
// 2.4.0.beta2 techs
|
||||
//====================
|
||||
|
@ -451,15 +451,9 @@ std::array<float, 4> color_from_model_volume(const ModelVolume& model_volume)
|
||||
color[2] = 0.2f;
|
||||
}
|
||||
else if (model_volume.is_modifier()) {
|
||||
#if ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
||||
color[0] = 1.0f;
|
||||
color[1] = 1.0f;
|
||||
color[2] = 0.2f;
|
||||
#else
|
||||
color[0] = 0.2f;
|
||||
color[1] = 1.0f;
|
||||
color[2] = 0.2f;
|
||||
#endif // ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
||||
}
|
||||
else if (model_volume.is_support_blocker()) {
|
||||
color[0] = 1.0f;
|
||||
@ -845,15 +839,11 @@ void GLVolumeCollection::render(GLVolumeCollection::ERenderType type, bool disab
|
||||
glsafe(::glDisable(GL_CULL_FACE));
|
||||
|
||||
for (GLVolumeWithIdAndZ& volume : to_render) {
|
||||
#if ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
||||
if (type == ERenderType::Transparent)
|
||||
volume.first->force_transparent = true;
|
||||
#endif // ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
||||
volume.first->set_render_color();
|
||||
#if ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
||||
if (type == ERenderType::Transparent)
|
||||
volume.first->force_transparent = false;
|
||||
#endif // ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
||||
|
||||
// render sinking contours of non-hovered volumes
|
||||
if (m_show_sinking_contours)
|
||||
|
@ -1302,15 +1302,6 @@ bool GLCanvas3D::is_reload_delayed() const
|
||||
void GLCanvas3D::enable_layers_editing(bool enable)
|
||||
{
|
||||
m_layers_editing.set_enabled(enable);
|
||||
#if !ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
||||
const Selection::IndicesList& idxs = m_selection.get_volume_idxs();
|
||||
for (unsigned int idx : idxs) {
|
||||
GLVolume* v = m_volumes.volumes[idx];
|
||||
if (v->is_modifier)
|
||||
v->force_transparent = enable;
|
||||
}
|
||||
#endif // !ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
||||
|
||||
set_as_dirty();
|
||||
}
|
||||
|
||||
|
@ -448,7 +448,6 @@ void Selection::clear()
|
||||
if (m_list.empty())
|
||||
return;
|
||||
|
||||
#if ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
||||
// ensure that the volumes get the proper color before next call to render (expecially needed for transparent volumes)
|
||||
for (unsigned int i : m_list) {
|
||||
GLVolume& volume = *(*m_volumes)[i];
|
||||
@ -460,13 +459,6 @@ void Selection::clear()
|
||||
if (transparent)
|
||||
volume.force_transparent = false;
|
||||
}
|
||||
#else
|
||||
for (unsigned int i : m_list) {
|
||||
(*m_volumes)[i]->selected = false;
|
||||
// ensure the volume gets the proper color before next call to render (expecially needed for transparent volumes)
|
||||
(*m_volumes)[i]->set_render_color();
|
||||
}
|
||||
#endif // ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
||||
|
||||
m_list.clear();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user