mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-05 19:42:47 +00:00
1st installment of new selections (disabled)
This commit is contained in:
@@ -292,10 +292,12 @@ public:
|
||||
float render_color[4];
|
||||
// An ID containing the object ID, volume ID and instance ID.
|
||||
int composite_id;
|
||||
#if !ENABLE_EXTENDED_SELECTION
|
||||
// An ID for group selection. It may be the same for all meshes of all object instances, or for just a single object instance.
|
||||
int select_group_id;
|
||||
// An ID for group dragging. It may be the same for all meshes of all object instances, or for just a single object instance.
|
||||
int drag_group_id;
|
||||
#endif // !ENABLE_EXTENDED_SELECTION
|
||||
// An ID containing the extruder ID (used to select color).
|
||||
int extruder_id;
|
||||
// Is this object selected?
|
||||
@@ -338,6 +340,9 @@ public:
|
||||
const Vec3d& get_rotation() const;
|
||||
void set_rotation(const Vec3d& rotation);
|
||||
|
||||
#if ENABLE_EXTENDED_SELECTION
|
||||
const Vec3d& get_scaling_factor() const;
|
||||
#endif // ENABLE_EXTENDED_SELECTION
|
||||
void set_scaling_factor(const Vec3d& scaling_factor);
|
||||
#else
|
||||
double get_rotation() const;
|
||||
@@ -351,8 +356,10 @@ public:
|
||||
|
||||
void set_convex_hull(const TriangleMesh& convex_hull);
|
||||
|
||||
#if !ENABLE_EXTENDED_SELECTION
|
||||
void set_select_group_id(const std::string& select_by);
|
||||
void set_drag_group_id(const std::string& drag_by);
|
||||
#endif // !ENABLE_EXTENDED_SELECTION
|
||||
|
||||
int object_idx() const { return this->composite_id / 1000000; }
|
||||
int volume_idx() const { return (this->composite_id / 1000) % 1000; }
|
||||
@@ -410,6 +417,10 @@ public:
|
||||
void reset_layer_height_texture_data() { layer_height_texture_data.reset(); }
|
||||
};
|
||||
|
||||
#if ENABLE_EXTENDED_SELECTION
|
||||
typedef std::vector<GLVolume*> GLVolumePtrs;
|
||||
#endif // ENABLE_EXTENDED_SELECTION
|
||||
|
||||
class GLVolumeCollection
|
||||
{
|
||||
// min and max vertex of the print box volume
|
||||
@@ -417,8 +428,12 @@ class GLVolumeCollection
|
||||
float print_box_max[3];
|
||||
|
||||
public:
|
||||
#if ENABLE_EXTENDED_SELECTION
|
||||
GLVolumePtrs volumes;
|
||||
#else
|
||||
std::vector<GLVolume*> volumes;
|
||||
|
||||
#endif // ENABLE_EXTENDED_SELECTION
|
||||
|
||||
GLVolumeCollection() {};
|
||||
~GLVolumeCollection() { clear(); };
|
||||
|
||||
@@ -463,8 +478,10 @@ public:
|
||||
|
||||
void update_colors_by_extruder(const DynamicPrintConfig* config);
|
||||
|
||||
#if !ENABLE_EXTENDED_SELECTION
|
||||
void set_select_by(const std::string& select_by);
|
||||
void set_drag_by(const std::string& drag_by);
|
||||
#endif // !ENABLE_EXTENDED_SELECTION
|
||||
|
||||
// Returns a vector containing the sorted list of all the print_zs of the volumes contained in this collection
|
||||
std::vector<double> get_current_print_zs(bool active_only) const;
|
||||
@@ -500,7 +517,9 @@ public:
|
||||
static bool move_volume_up(wxGLCanvas* canvas, unsigned int id);
|
||||
static bool move_volume_down(wxGLCanvas* canvas, unsigned int id);
|
||||
|
||||
#if !ENABLE_EXTENDED_SELECTION
|
||||
static void set_objects_selections(wxGLCanvas* canvas, const std::vector<int>& selections);
|
||||
#endif // !ENABLE_EXTENDED_SELECTION
|
||||
|
||||
static void set_config(wxGLCanvas* canvas, DynamicPrintConfig* config);
|
||||
static void set_print(wxGLCanvas* canvas, Print* print);
|
||||
@@ -516,10 +535,12 @@ public:
|
||||
static void set_cutting_plane(wxGLCanvas* canvas, float z, const ExPolygons& polygons);
|
||||
|
||||
static void set_color_by(wxGLCanvas* canvas, const std::string& value);
|
||||
#if !ENABLE_EXTENDED_SELECTION
|
||||
static void set_select_by(wxGLCanvas* canvas, const std::string& value);
|
||||
static void set_drag_by(wxGLCanvas* canvas, const std::string& value);
|
||||
|
||||
static std::string get_select_by(wxGLCanvas* canvas);
|
||||
#endif // !ENABLE_EXTENDED_SELECTION
|
||||
|
||||
static bool is_layers_editing_enabled(wxGLCanvas* canvas);
|
||||
static bool is_layers_editing_allowed(wxGLCanvas* canvas);
|
||||
|
||||
Reference in New Issue
Block a user