mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 10:16:50 +00:00
NEW:add "obj preview thumnailData" function
jira: none Change-Id: I688c2f05bf85fca376418115acddb5066ef980eb (cherry picked from commit 16f2b2bcb5fd157f25aa7012dabd99a8d31aec07) (cherry picked from commit 7cc21b5e9745a84d75ea13b66f5653520bb1cba3)
This commit is contained in:
@@ -7,7 +7,6 @@ namespace Slic3r {
|
||||
class TriangleMesh;
|
||||
class Model;
|
||||
class ModelObject;
|
||||
typedef std::function<void(std::vector<RGBA> &input_colors, bool is_single_color, std::vector<unsigned char> &filament_ids, unsigned char &first_extruder_id)> ObjImportColorFn;
|
||||
// Load an OBJ file into a provided model.
|
||||
struct ObjInfo {
|
||||
std::vector<RGBA> vertex_colors;
|
||||
@@ -20,6 +19,17 @@ struct ObjInfo {
|
||||
bool has_uv_png{false};
|
||||
|
||||
};
|
||||
struct ObjDialogInOut
|
||||
{ // input:colors array
|
||||
std::vector<RGBA> input_colors;
|
||||
bool is_single_color{false};
|
||||
// colors array output:
|
||||
std::vector<unsigned char> filament_ids;
|
||||
unsigned char first_extruder_id;
|
||||
bool deal_vertex_color;
|
||||
Model * model{nullptr};
|
||||
};
|
||||
typedef std::function<void(ObjDialogInOut &in_out)> ObjImportColorFn;
|
||||
extern bool load_obj(const char *path, TriangleMesh *mesh, ObjInfo &vertex_colors, std::string &message);
|
||||
extern bool load_obj(const char *path, Model *model, ObjInfo &vertex_colors, std::string &message, const char *object_name = nullptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user