Show original model texture while simulated colors are being generated
This commit is contained in:
@@ -914,17 +914,8 @@ void GLVolume::render_mmu_texture_preview(const Transform3d &view_matrix,
|
||||
return preview_colors;
|
||||
};
|
||||
|
||||
const bool original_mesh_preview_can_defer_source_texture =
|
||||
use_original_mesh_texture_preview &&
|
||||
texture_preview_simulation_enabled_for_filament(base_filament_id, num_physical, texture_mgr);
|
||||
const bool mmuseg_preview_can_defer_source_texture =
|
||||
!use_original_mesh_texture_preview &&
|
||||
!mmuseg_texture_preview_models.empty() &&
|
||||
texture_preview_simulation_enabled_for_all_filaments(mmuseg_texture_preview_filament_ids, num_physical, texture_mgr);
|
||||
if ((use_original_mesh_texture_preview || !mmuseg_texture_preview_models.empty()) &&
|
||||
(original_mesh_preview_can_defer_source_texture ||
|
||||
mmuseg_preview_can_defer_source_texture ||
|
||||
ensure_model_volume_texture_preview(*model_volume, mmuseg_texture_preview, mmuseg_texture_preview_signature))) {
|
||||
ensure_model_volume_texture_preview(*model_volume, mmuseg_texture_preview, mmuseg_texture_preview_signature)) {
|
||||
if (use_original_mesh_texture_preview) {
|
||||
const int extruder_id = model_volume->extruder_id();
|
||||
const ColorRGBA fallback_color = extruder_colors.empty() ? ColorRGBA(0.15f, 0.65f, 0.6f, 1.f) : extruder_colors.front();
|
||||
|
||||
@@ -1869,12 +1869,8 @@ void TriangleSelectorPatch::render_texture_preview(const Transform3d& m
|
||||
return preview_colors;
|
||||
};
|
||||
|
||||
const bool texture_preview_can_defer_source_texture =
|
||||
!m_texture_preview_models.empty() &&
|
||||
texture_preview_simulation_enabled_for_all_filaments(m_texture_preview_filament_ids, num_physical, texture_mgr);
|
||||
if (!m_texture_preview_models.empty() &&
|
||||
(texture_preview_can_defer_source_texture ||
|
||||
ensure_model_volume_texture_preview(*m_model_volume, m_texture_preview, m_texture_preview_signature))) {
|
||||
ensure_model_volume_texture_preview(*m_model_volume, m_texture_preview, m_texture_preview_signature)) {
|
||||
render_model_texture_preview_models(m_texture_preview_models,
|
||||
adjusted_preview_colors(m_texture_preview_colors),
|
||||
m_texture_preview_filament_ids,
|
||||
|
||||
@@ -3266,7 +3266,12 @@ bool build_mmu_vertex_color_preview_models(
|
||||
*simulation_settings,
|
||||
model,
|
||||
preview_override,
|
||||
preview_owner_key))
|
||||
preview_owner_key) &&
|
||||
!build_texture_mapping_color_preview_model_for_state(model_volume,
|
||||
triangles_per_type[state_id],
|
||||
nullptr,
|
||||
model,
|
||||
preview_override))
|
||||
continue;
|
||||
} else {
|
||||
if (!build_texture_mapping_color_preview_model_for_state(model_volume,
|
||||
@@ -3283,7 +3288,8 @@ bool build_mmu_vertex_color_preview_models(
|
||||
filament_id,
|
||||
*simulation_settings,
|
||||
preview_owner_key,
|
||||
model))
|
||||
model) &&
|
||||
!build_vertex_color_preview_model_for_state(model_volume, triangles_per_type[state_id], nullptr, model))
|
||||
continue;
|
||||
} else {
|
||||
if (!build_vertex_color_preview_model_for_state(model_volume, triangles_per_type[state_id], nullptr, model))
|
||||
|
||||
Reference in New Issue
Block a user