mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 05:09:20 +02:00
feat(editor): include database, placing .inc templates from the node bank
This commit is contained in:
@@ -71,7 +71,7 @@ struct node_data {
|
||||
std::string name;
|
||||
std::string type;
|
||||
layer_handle layer { null_handle }; // scenery layer the node is defined in, if any
|
||||
bool is_template { false }; // the node is defined by an *.inc template rather than directly by a scenery layer file
|
||||
instance_handle instance { 0 }; // include of an *.inc template which defines the node, if it isn't defined directly by a scenery layer file
|
||||
};
|
||||
|
||||
// holds unique piece of geometry, covered with single material
|
||||
@@ -365,6 +365,9 @@ public:
|
||||
layer( scene::layer_handle Layer );
|
||||
scene::layer_handle
|
||||
layer() const;
|
||||
// true if the node is defined by an *.inc template
|
||||
bool
|
||||
from_template() const { return m_instance != 0; }
|
||||
void
|
||||
mark_dirty() { m_dirty = true; }
|
||||
bool
|
||||
@@ -381,9 +384,11 @@ 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
|
||||
bool m_template { false }; // the node is defined by an *.inc template, which the editor can't rewrite. set only for scenery opened for editing
|
||||
bool m_layerhidden { false }; // the node was visible until the editor hid its scenery layer, or the include which defines it
|
||||
scene::layer_handle m_layer { null_handle }; // scenery layer this node belongs to, if any
|
||||
// include of an *.inc template which defines the node; 0 if the node is defined directly by a scenery layer file.
|
||||
// such nodes can't be rewritten one by one on scenery save. set only for scenery opened for editing
|
||||
scene::instance_handle m_instance { 0 };
|
||||
UID uuid;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user