Store color information per segment

This commit is contained in:
wmayer
2019-07-04 16:55:03 +02:00
parent 2f4b08035f
commit 4b464dfa58
3 changed files with 6 additions and 0 deletions

View File

@@ -1699,6 +1699,7 @@ void MeshObject::addSegment(const Segment& s)
{
addSegment(s.getIndices());
this->_segments.back().setName(s.getName());
this->_segments.back().setColor(s.getColor());
this->_segments.back().save(s.isSaved());
this->_segments.back()._modifykernel = s._modifykernel;
}

View File

@@ -85,6 +85,7 @@ Segment::Segment(const Segment& s)
: _mesh(s._mesh)
, _indices(s._indices)
, _name(s._name)
, _color(s._color)
, _save(s._save)
, _modifykernel(s._modifykernel)
{

View File

@@ -51,6 +51,9 @@ public:
void setName(const std::string& n) { _name = n; }
const std::string& getName() const { return _name; }
void setColor(const std::string& c) { _color = c; }
const std::string& getColor() const { return _color; }
void save(bool on) { _save = on; }
bool isSaved() const { return _save; }
@@ -61,6 +64,7 @@ private:
MeshObject* _mesh;
std::vector<unsigned long> _indices;
std::string _name;
std::string _color;
bool _save;
bool _modifykernel;