mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
NEW:add hide function in assemble_view menu
1.support hide funtion in assemble view 2.fix an issue that switch printable in assemble view will make model-in-assemble-view turn transparent instead of model-in-view3D 3.fix a crash: right-click on objectlist after entering assemble view Change-Id: Ia1a7ca492637eeaacd862ba015c440a55a83ca6e
This commit is contained in:
parent
674348c575
commit
5fc3694e08
9 changed files with 115 additions and 20 deletions
|
@ -390,6 +390,8 @@ std::array<float, 4> GLVolume::MODEL_NEGTIVE_COL = {0.3f, 0.3f, 0.3f, 0.4f};
|
|||
std::array<float, 4> GLVolume::SUPPORT_ENFORCER_COL = {0.3f, 0.3f, 1.0f, 0.4f};
|
||||
std::array<float, 4> GLVolume::SUPPORT_BLOCKER_COL = {1.0f, 0.3f, 0.3f, 0.4f};
|
||||
|
||||
std::array<float, 4> GLVolume::MODEL_HIDDEN_COL = {0.f, 0.f, 0.f, 0.3f};
|
||||
|
||||
std::array<std::array<float, 4>, 5> GLVolume::MODEL_COLOR = { {
|
||||
{ 1.0f, 1.0f, 0.0f, 1.f },
|
||||
{ 1.0f, 0.5f, 0.5f, 1.f },
|
||||
|
@ -430,6 +432,7 @@ GLVolume::GLVolume(float r, float g, float b, float a)
|
|||
, selected(false)
|
||||
, disabled(false)
|
||||
, printable(true)
|
||||
, visible(true)
|
||||
, is_active(true)
|
||||
, zoom_to_volumes(true)
|
||||
, shader_outside_printer_detection_enabled(false)
|
||||
|
@ -521,6 +524,14 @@ void GLVolume::set_render_color()
|
|||
render_color[2] = UNPRINTABLE_COLOR[2];
|
||||
render_color[3] = UNPRINTABLE_COLOR[3];
|
||||
}
|
||||
|
||||
//BBS set invisible color
|
||||
if (!visible) {
|
||||
render_color[0] = MODEL_HIDDEN_COL[0];
|
||||
render_color[1] = MODEL_HIDDEN_COL[1];
|
||||
render_color[2] = MODEL_HIDDEN_COL[2];
|
||||
render_color[3] = MODEL_HIDDEN_COL[3];
|
||||
}
|
||||
}
|
||||
|
||||
std::array<float, 4> color_from_model_volume(const ModelVolume& model_volume)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue