4#include "entt/meta/meta.hpp"
32 std::function<std::vector<entt::handle>()>
factory{};
55 auto is_valid() const ->
bool override;
74 auto is_valid() const ->
bool override;
81 entt::meta_type component_type{};
83 bool do_was_successful{
false};
90 auto is_valid() const ->
bool override;
91 void draw_in_inspector(
rtti::context& ctx) override;
97 entt::meta_type component_type{};
99 bool do_was_successful{
false};
100 std::stringstream stream{};
107 auto is_valid() const ->
bool override;
108 void draw_in_inspector(
rtti::context& ctx) override;
124 auto is_valid() const ->
bool override;
125 void draw_in_inspector(
rtti::context& ctx) override;
131 std::string old_name{};
132 std::string new_name{};
140 auto is_valid() const ->
bool override;
141 void draw_in_inspector(
rtti::context& ctx) override;
147 std::string old_tag{};
148 std::string new_tag{};
156 auto is_valid() const ->
bool override;
157 void draw_in_inspector(
rtti::context& ctx) override;
163 std::vector<asset_handle<material>> old_materials{};
164 std::vector<asset_handle<material>> new_materials{};
174 auto is_valid() const ->
bool override;
175 void draw_in_inspector(
rtti::context& ctx) override;
190 auto is_valid() const ->
bool override;
191 void draw_in_inspector(
rtti::context& ctx) override;
206 auto is_valid() const ->
bool override;
207 void draw_in_inspector(
rtti::context& ctx) override;
214 std::string script_type_name{};
216 bool do_was_successful{
false};
223 auto is_valid() const ->
bool override;
224 void draw_in_inspector(
rtti::context& ctx) override;
230 std::string script_type_name{};
231 int script_index{-1};
233 bool do_was_successful{
false};
235 std::stringstream removed_script_object_data{};
242 auto is_valid() const ->
bool override;
243 void draw_in_inspector(
rtti::context& ctx) override;
Thread-safe handle to an asset.
Undoable create for entity subtrees: invokes a user-supplied factory on first execution,...
auto is_mergeable(const editing_action_t &previous) const -> bool override
void undo_action() override
create_entities_action_t(std::function< std::vector< entt::handle >()> factory)
Multi-root constructor. The factory returns the set of newly-created roots.
std::function< std::vector< entt::handle >()> factory
bool captured
True once the initial factory-driven creation has run and the snapshot is populated.
void do_action() override
auto is_valid() const -> bool override
std::vector< entt::uhandle > parent_entities
Parent of each root (may hold a nil uuid for root-level entities). Refreshed on every undo.
std::vector< std::string > serialized_roots
Serialized bytes of each root, captured after the first factory execution.
std::vector< entt::uhandle > root_entities
Handles of each created root; the registry pointer persists even after the entity is destroyed.
std::vector< std::vector< hpp::uuid > > subtree_uuids
Preorder UUIDs per root subtree (same ordering as save_to_stream / flatten_hierarchy).
Undoable delete for entity subtrees: snapshots serialized roots at construction, deletes on do,...