merge with master
This commit is contained in:
commit
df36a7dcb2
6 changed files with 63 additions and 14 deletions
cmake/modules
deps
src/slic3r/GUI
|
@ -203,20 +203,50 @@ if(UNIX AND OPENVDB_USE_STATIC_LIBS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(OpenVDB_LIB_COMPONENTS "")
|
set(OpenVDB_LIB_COMPONENTS "")
|
||||||
|
set(OpenVDB_DEBUG_SUFFIX "d" CACHE STRING "Suffix for the debug libraries")
|
||||||
|
|
||||||
|
get_property(_is_multi GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||||
|
|
||||||
foreach(COMPONENT ${OpenVDB_FIND_COMPONENTS})
|
foreach(COMPONENT ${OpenVDB_FIND_COMPONENTS})
|
||||||
set(LIB_NAME ${COMPONENT})
|
set(LIB_NAME ${COMPONENT})
|
||||||
find_library(OpenVDB_${COMPONENT}_LIBRARY ${LIB_NAME} lib${LIB_NAME}
|
|
||||||
|
find_library(OpenVDB_${COMPONENT}_LIBRARY_RELEASE ${LIB_NAME} lib${LIB_NAME}
|
||||||
PATHS ${_OPENVDB_LIBRARYDIR_SEARCH_DIRS}
|
PATHS ${_OPENVDB_LIBRARYDIR_SEARCH_DIRS}
|
||||||
PATH_SUFFIXES ${OPENVDB_PATH_SUFFIXES}
|
PATH_SUFFIXES ${OPENVDB_PATH_SUFFIXES}
|
||||||
)
|
)
|
||||||
list(APPEND OpenVDB_LIB_COMPONENTS ${OpenVDB_${COMPONENT}_LIBRARY})
|
|
||||||
|
|
||||||
if(OpenVDB_${COMPONENT}_LIBRARY)
|
find_library(OpenVDB_${COMPONENT}_LIBRARY_DEBUG ${LIB_NAME}${OpenVDB_DEBUG_SUFFIX} lib${LIB_NAME}${OpenVDB_DEBUG_SUFFIX}
|
||||||
set(OpenVDB_${COMPONENT}_FOUND TRUE)
|
PATHS ${_OPENVDB_LIBRARYDIR_SEARCH_DIRS}
|
||||||
else()
|
PATH_SUFFIXES ${OPENVDB_PATH_SUFFIXES}
|
||||||
set(OpenVDB_${COMPONENT}_FOUND FALSE)
|
)
|
||||||
endif()
|
|
||||||
|
if (_is_multi)
|
||||||
|
list(APPEND OpenVDB_LIB_COMPONENTS ${OpenVDB_${COMPONENT}_LIBRARY_RELEASE} ${OpenVDB_${COMPONENT}_LIBRARY_DEBUG})
|
||||||
|
|
||||||
|
list(FIND CMAKE_CONFIGURATION_TYPES "Debug" _has_debug)
|
||||||
|
|
||||||
|
if(OpenVDB_${COMPONENT}_LIBRARY_RELEASE AND (_has_debug LESS 0 OR OpenVDB_${COMPONENT}_LIBRARY_DEBUG))
|
||||||
|
set(OpenVDB_${COMPONENT}_FOUND TRUE)
|
||||||
|
else()
|
||||||
|
set(OpenVDB_${COMPONENT}_FOUND FALSE)
|
||||||
|
endif()
|
||||||
|
else ()
|
||||||
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" _BUILD_TYPE)
|
||||||
|
|
||||||
|
set(OpenVDB_${COMPONENT}_LIBRARY ${OpenVDB_${COMPONENT}_LIBRARY_${_BUILD_TYPE}})
|
||||||
|
|
||||||
|
if (NOT MSVC AND NOT OpenVDB_${COMPONENT}_LIBRARY)
|
||||||
|
set(OpenVDB_${COMPONENT}_LIBRARY ${OpenVDB_${COMPONENT}_LIBRARY_RELEASE})
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
list(APPEND OpenVDB_LIB_COMPONENTS ${OpenVDB_${COMPONENT}_LIBRARY})
|
||||||
|
|
||||||
|
if(OpenVDB_${COMPONENT}_LIBRARY)
|
||||||
|
set(OpenVDB_${COMPONENT}_FOUND TRUE)
|
||||||
|
else()
|
||||||
|
set(OpenVDB_${COMPONENT}_FOUND FALSE)
|
||||||
|
endif()
|
||||||
|
endif ()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if(UNIX AND OPENVDB_USE_STATIC_LIBS)
|
if(UNIX AND OPENVDB_USE_STATIC_LIBS)
|
||||||
|
@ -465,7 +495,6 @@ foreach(COMPONENT ${OpenVDB_FIND_COMPONENTS})
|
||||||
if(NOT TARGET OpenVDB::${COMPONENT})
|
if(NOT TARGET OpenVDB::${COMPONENT})
|
||||||
add_library(OpenVDB::${COMPONENT} UNKNOWN IMPORTED)
|
add_library(OpenVDB::${COMPONENT} UNKNOWN IMPORTED)
|
||||||
set_target_properties(OpenVDB::${COMPONENT} PROPERTIES
|
set_target_properties(OpenVDB::${COMPONENT} PROPERTIES
|
||||||
IMPORTED_LOCATION "${OpenVDB_${COMPONENT}_LIBRARY}"
|
|
||||||
INTERFACE_COMPILE_OPTIONS "${OpenVDB_DEFINITIONS}"
|
INTERFACE_COMPILE_OPTIONS "${OpenVDB_DEFINITIONS}"
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_INCLUDE_DIR}"
|
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_INCLUDE_DIR}"
|
||||||
IMPORTED_LINK_DEPENDENT_LIBRARIES "${_OPENVDB_HIDDEN_DEPENDENCIES}" # non visible deps
|
IMPORTED_LINK_DEPENDENT_LIBRARIES "${_OPENVDB_HIDDEN_DEPENDENCIES}" # non visible deps
|
||||||
|
@ -473,6 +502,17 @@ foreach(COMPONENT ${OpenVDB_FIND_COMPONENTS})
|
||||||
INTERFACE_COMPILE_FEATURES cxx_std_11
|
INTERFACE_COMPILE_FEATURES cxx_std_11
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (_is_multi)
|
||||||
|
set_target_properties(OpenVDB::${COMPONENT} PROPERTIES
|
||||||
|
IMPORTED_LOCATION_RELEASE "${OpenVDB_${COMPONENT}_LIBRARY_RELEASE}"
|
||||||
|
IMPORTED_LOCATION_DEBUG "${OpenVDB_${COMPONENT}_LIBRARY_DEBUG}"
|
||||||
|
)
|
||||||
|
else ()
|
||||||
|
set_target_properties(OpenVDB::${COMPONENT} PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${OpenVDB_${COMPONENT}_LIBRARY}"
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (OPENVDB_USE_STATIC_LIBS)
|
if (OPENVDB_USE_STATIC_LIBS)
|
||||||
set_target_properties(OpenVDB::${COMPONENT} PROPERTIES
|
set_target_properties(OpenVDB::${COMPONENT} PROPERTIES
|
||||||
INTERFACE_COMPILE_DEFINITIONS "OPENVDB_STATICLIB;OPENVDB_OPENEXR_STATICLIB"
|
INTERFACE_COMPILE_DEFINITIONS "OPENVDB_STATICLIB;OPENVDB_OPENEXR_STATICLIB"
|
||||||
|
|
1
deps/CMakeLists.txt
vendored
1
deps/CMakeLists.txt
vendored
|
@ -47,6 +47,7 @@ message(STATUS "PrusaSlicer deps debug build: ${DEP_DEBUG}")
|
||||||
|
|
||||||
find_package(Git REQUIRED)
|
find_package(Git REQUIRED)
|
||||||
|
|
||||||
|
get_property(_is_multi GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||||
|
|
||||||
function(prusaslicer_add_cmake_project projectname)
|
function(prusaslicer_add_cmake_project projectname)
|
||||||
cmake_parse_arguments(P_ARGS "" "INSTALL_DIR;BUILD_COMMAND;INSTALL_COMMAND" "CMAKE_ARGS" ${ARGN})
|
cmake_parse_arguments(P_ARGS "" "INSTALL_DIR;BUILD_COMMAND;INSTALL_COMMAND" "CMAKE_ARGS" ${ARGN})
|
||||||
|
|
|
@ -3874,8 +3874,8 @@ void ObjectList::show_multi_selection_menu()
|
||||||
GetSelections(sels);
|
GetSelections(sels);
|
||||||
|
|
||||||
for (const wxDataViewItem& item : sels)
|
for (const wxDataViewItem& item : sels)
|
||||||
if (!(m_objects_model->GetItemType(item) & (itVolume | itObject)))
|
if (!(m_objects_model->GetItemType(item) & (itVolume | itObject | itInstance)))
|
||||||
// show this menu only for Object(s)/Volume(s) selection
|
// show this menu only for Objects(Instances mixed with Objects)/Volumes selection
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxMenu* menu = new wxMenu();
|
wxMenu* menu = new wxMenu();
|
||||||
|
@ -3885,7 +3885,12 @@ void ObjectList::show_multi_selection_menu()
|
||||||
_(L("Select extruder number for selected objects and/or parts")),
|
_(L("Select extruder number for selected objects and/or parts")),
|
||||||
[this](wxCommandEvent&) { extruder_selection(); }, "", menu);
|
[this](wxCommandEvent&) { extruder_selection(); }, "", menu);
|
||||||
|
|
||||||
PopupMenu(menu);
|
append_menu_item(menu, wxID_ANY, _(L("Reload from disk")), _(L("Reload the selected volumes from disk")),
|
||||||
|
[this](wxCommandEvent&) { wxGetApp().plater()->reload_from_disk(); }, "", menu, []() {
|
||||||
|
return wxGetApp().plater()->can_reload_from_disk();
|
||||||
|
}, wxGetApp().plater());
|
||||||
|
|
||||||
|
wxGetApp().plater()->PopupMenu(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectList::extruder_selection()
|
void ObjectList::extruder_selection()
|
||||||
|
|
|
@ -366,6 +366,8 @@ public:
|
||||||
void update_printable_state(int obj_idx, int instance_idx);
|
void update_printable_state(int obj_idx, int instance_idx);
|
||||||
void toggle_printable_state(wxDataViewItem item);
|
void toggle_printable_state(wxDataViewItem item);
|
||||||
|
|
||||||
|
void show_multi_selection_menu();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#ifdef __WXOSX__
|
#ifdef __WXOSX__
|
||||||
// void OnChar(wxKeyEvent& event);
|
// void OnChar(wxKeyEvent& event);
|
||||||
|
@ -384,8 +386,6 @@ private:
|
||||||
void OnEditingStarted(wxDataViewEvent &event);
|
void OnEditingStarted(wxDataViewEvent &event);
|
||||||
#endif /* __WXMSW__ */
|
#endif /* __WXMSW__ */
|
||||||
void OnEditingDone(wxDataViewEvent &event);
|
void OnEditingDone(wxDataViewEvent &event);
|
||||||
|
|
||||||
void show_multi_selection_menu();
|
|
||||||
void extruder_selection();
|
void extruder_selection();
|
||||||
void set_extruder_for_selected_items(const int extruder) const ;
|
void set_extruder_for_selected_items(const int extruder) const ;
|
||||||
|
|
||||||
|
|
|
@ -3666,7 +3666,10 @@ void Plater::priv::on_right_click(RBtnEvent& evt)
|
||||||
if (evt.data.second) // right button was clicked on empty space
|
if (evt.data.second) // right button was clicked on empty space
|
||||||
menu = &default_menu;
|
menu = &default_menu;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
sidebar->obj_list()->show_multi_selection_menu();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -965,7 +965,7 @@ private:
|
||||||
bool operator<(const TICK_CODE& other) const { return other.tick > this->tick; }
|
bool operator<(const TICK_CODE& other) const { return other.tick > this->tick; }
|
||||||
bool operator>(const TICK_CODE& other) const { return other.tick < this->tick; }
|
bool operator>(const TICK_CODE& other) const { return other.tick < this->tick; }
|
||||||
|
|
||||||
int tick;
|
int tick = 0;
|
||||||
std::string gcode = Slic3r::ColorChangeCode;
|
std::string gcode = Slic3r::ColorChangeCode;
|
||||||
int extruder = 0;
|
int extruder = 0;
|
||||||
std::string color;
|
std::string color;
|
||||||
|
|
Loading…
Add table
Reference in a new issue