17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-05 10:59:02 +01:00

feat(editor): edit session (-edit) and scenery layers

This commit is contained in:
2026-10-02 21:29:18 +02:00
parent 69f5f551a1
commit 73f2f68aa0
19 changed files with 560 additions and 3 deletions

View File

@@ -70,6 +70,7 @@ struct node_data {
double range_max { std::numeric_limits<double>::max() };
std::string name;
std::string type;
layer_handle layer { null_handle }; // scenery layer the node is defined in, if any
};
// holds unique piece of geometry, covered with single material
@@ -359,6 +360,10 @@ public:
group( scene::group_handle Group );
scene::group_handle
group() const;
void
layer( scene::layer_handle Layer );
scene::layer_handle
layer() const;
void
mark_dirty() { m_dirty = true; }
bool
@@ -375,6 +380,8 @@ public:
bool m_visible { true }; // visibility flag
std::string m_name;
bool m_dirty { false };
bool m_layerhidden { false }; // the node was visible until its scenery layer was hidden
scene::layer_handle m_layer { null_handle }; // scenery layer this node belongs to, if any
UID uuid;
private:
@@ -443,6 +450,18 @@ basic_node::group() const {
return m_group;
}
inline
void
basic_node::layer( scene::layer_handle Layer ) {
m_layer = Layer;
}
inline
scene::layer_handle
basic_node::layer() const {
return m_layer;
}
} // scene
//---------------------------------------------------------------------------