Unravel Engine C++ Reference
|
#include <editing_manager.h>
Classes | |
struct | billboard_gizmos |
struct | focused |
struct | grid |
struct | inverse_kinematics |
struct | selection |
struct | snap |
Public Types | |
enum | select_mode { normal , ctrl , shift } |
enum class | editing_mode { scene , prefab } |
enum class | save_option { yes , no , prompt } |
Public Member Functions | |
auto | init (rtti::context &ctx) -> bool |
auto | deinit (rtti::context &ctx) -> bool |
void | on_play_before_begin (rtti::context &ctx) |
void | on_play_after_end (rtti::context &ctx) |
void | on_frame_update (rtti::context &ctx, delta_t) |
void | on_script_recompile (rtti::context &ctx, const std::string &protocol, uint64_t version) |
void | on_prefab_updated (const asset_handle< prefab > &pfb) |
void | sync_prefab_entity (rtti::context &ctx, entt::handle entity, const asset_handle< prefab > &pfb) |
void | sync_prefab_instances (rtti::context &ctx, scene *scn) |
auto | get_select_mode () const -> select_mode |
void | focus (entt::meta_any object) |
Selects an object. Can be anything. | |
void | focus_path (const fs::path &object) |
void | unselect (bool clear_selection_tools=true) |
Clears the selection data. | |
void | unfocus () |
template<typename T > | |
void | try_unselect () |
Clears the selection data if it maches the type. | |
template<typename T > | |
void | try_unfocus () |
template<typename T > | |
auto | is_selected (const T &entry) -> bool |
template<typename T > | |
auto | is_selected_type () -> bool |
auto | get_active_selection () const -> const entt::meta_any & |
auto | get_active_selection () -> entt::meta_any & |
auto | get_selections () const -> hpp::span< const entt::meta_any > |
auto | get_selections () -> hpp::span< entt::meta_any > |
template<typename T > | |
auto | get_active_selection_as () const -> const T & |
template<typename T > | |
auto | try_get_active_selection_as () -> T * |
template<typename T > | |
auto | try_get_active_selection_as () const -> const T * |
template<typename T > | |
auto | try_get_selections_as () const -> std::vector< const T * > |
template<typename T > | |
auto | try_get_selections_as () -> std::vector< T * > |
template<typename T > | |
auto | try_get_selections_as_copy () const -> std::vector< T > |
template<typename T > | |
auto | is_focused (const T &entry) -> bool |
template<typename T > | |
auto | is_focused (const asset_handle< T > &entry) -> bool |
template<typename T > | |
auto | try_get_active_focus_as () const -> const T * |
template<typename T > | |
void | unselect (const T &entry) |
template<typename T > | |
void | select (const T &entry, select_mode mode=select_mode::normal) |
void | do_action (const std::string &name, const std::function< void()> &action) |
void | do_action (const std::string &name, const std::function< void()> &do_action, const std::function< void()> &undo_action) |
void | do_action (const std::string &name, std::shared_ptr< editing_action_t > action) |
template<typename ActionType , typename... Args> | |
void | do_action (const std::string &name, Args &&... args) |
void | queue_action (const std::string &name, const std::function< void()> &action) |
void | queue_action (const std::string &name, const std::function< void()> &do_action, const std::function< void()> &undo_action) |
void | queue_action (const std::string &name, std::shared_ptr< editing_action_t > action) |
template<typename ActionType , typename... Args> | |
void | queue_action (const std::string &name, Args &&... args) |
void | add_action (const std::string &name, std::shared_ptr< editing_action_t > action, bool immediate=true) |
void | push_undo_stack_enabled (bool enabled) |
void | pop_undo_stack_enabled () |
void | execute_actions () |
void | undo () |
void | redo () |
auto | can_undo () const -> bool |
auto | can_redo () const -> bool |
auto | has_pending_actions () const -> bool |
auto | get_pending_actions_count () const -> size_t |
auto | has_unsaved_changes () const -> bool |
void | clear_unsaved_changes () |
void | clear () |
void | enter_prefab_mode (rtti::context &ctx, const asset_handle< prefab > &prefab, bool auto_save=false) |
void | exit_prefab_mode (rtti::context &ctx, save_option save_changes=save_option::prompt) |
auto | is_prefab_mode () const -> bool |
void | save_prefab_changes (rtti::context &ctx) |
auto | get_active_scene (rtti::context &ctx) -> scene * |
Public Attributes | |
undo_redo_stack | undo_stack |
std::vector< std::shared_ptr< editing_action_t > > | pending_actions |
std::stack< bool > | undo_stack_enabled |
bool | show_grid = true |
enable editor grid | |
bool | show_icon_gizmos = true |
enable editor icon gizmos | |
bool | wireframe_selection = true |
enable wireframe selection | |
ImGuizmo::OPERATION | operation = ImGuizmo::TRANSLATE |
current manipulation gizmo operation. | |
ImGuizmo::MODE | mode = ImGuizmo::LOCAL |
current manipulation gizmo space. | |
selection | selection_data |
selection data containing selected object | |
focused | focused_data |
snap | snap_data |
snap data containging various snap options | |
grid | grid_data |
billboard_gizmos | billboard_data |
inverse_kinematics | ik_data |
editing_mode | current_mode = editing_mode::scene |
asset_handle< prefab > | edited_prefab |
entt::handle | prefab_entity |
scene | prefab_scene {"prefab_scene"} |
Definition at line 20 of file editing_manager.h.
|
strong |
Enumerator | |
---|---|
scene | |
prefab |
Definition at line 74 of file editing_manager.h.
|
strong |
Enumerator | |
---|---|
yes | |
no | |
prompt |
Definition at line 80 of file editing_manager.h.
Enumerator | |
---|---|
normal | |
ctrl | |
shift |
Definition at line 67 of file editing_manager.h.
void unravel::editing_manager::add_action | ( | const std::string & | name, |
std::shared_ptr< editing_action_t > | action, | ||
bool | immediate = true ) |
Definition at line 714 of file editing_manager.cpp.
|
inline |
Definition at line 439 of file editing_manager.h.
|
inline |
Definition at line 438 of file editing_manager.h.
void unravel::editing_manager::clear | ( | ) |
Definition at line 658 of file editing_manager.cpp.
|
inline |
Definition at line 447 of file editing_manager.h.
auto unravel::editing_manager::deinit | ( | rtti::context & | ctx | ) | -> bool |
Definition at line 91 of file editing_manager.cpp.
|
inline |
Definition at line 405 of file editing_manager.h.
void unravel::editing_manager::do_action | ( | const std::string & | name, |
const std::function< void()> & | action ) |
Definition at line 683 of file editing_manager.cpp.
void unravel::editing_manager::do_action | ( | const std::string & | name, |
const std::function< void()> & | do_action, | ||
const std::function< void()> & | undo_action ) |
Definition at line 688 of file editing_manager.cpp.
void unravel::editing_manager::do_action | ( | const std::string & | name, |
std::shared_ptr< editing_action_t > | action ) |
Definition at line 693 of file editing_manager.cpp.
void unravel::editing_manager::enter_prefab_mode | ( | rtti::context & | ctx, |
const asset_handle< prefab > & | prefab, | ||
bool | auto_save = false ) |
Definition at line 471 of file editing_manager.cpp.
void unravel::editing_manager::execute_actions | ( | ) |
Definition at line 759 of file editing_manager.cpp.
void unravel::editing_manager::exit_prefab_mode | ( | rtti::context & | ctx, |
save_option | save_changes = save_option::prompt ) |
Definition at line 562 of file editing_manager.cpp.
void unravel::editing_manager::focus | ( | entt::meta_any | object | ) |
Selects an object. Can be anything.
Definition at line 444 of file editing_manager.cpp.
void unravel::editing_manager::focus_path | ( | const fs::path & | object | ) |
Definition at line 450 of file editing_manager.cpp.
auto unravel::editing_manager::get_active_scene | ( | rtti::context & | ctx | ) | -> scene* |
Definition at line 646 of file editing_manager.cpp.
|
inline |
Definition at line 168 of file editing_manager.h.
|
inline |
Definition at line 163 of file editing_manager.h.
|
inline |
Definition at line 184 of file editing_manager.h.
|
inline |
Definition at line 444 of file editing_manager.h.
auto unravel::editing_manager::get_select_mode | ( | ) | const -> select_mode |
Definition at line 412 of file editing_manager.cpp.
|
inline |
Definition at line 178 of file editing_manager.h.
|
inline |
Definition at line 173 of file editing_manager.h.
|
inline |
Definition at line 443 of file editing_manager.h.
|
inline |
Definition at line 446 of file editing_manager.h.
auto unravel::editing_manager::init | ( | rtti::context & | ctx | ) | -> bool |
Definition at line 79 of file editing_manager.cpp.
|
inline |
Definition at line 275 of file editing_manager.h.
|
inline |
Definition at line 262 of file editing_manager.h.
|
inline |
Definition at line 454 of file editing_manager.h.
|
inline |
Definition at line 143 of file editing_manager.h.
|
inline |
Definition at line 156 of file editing_manager.h.
void unravel::editing_manager::on_frame_update | ( | rtti::context & | ctx, |
delta_t | ) |
Definition at line 428 of file editing_manager.cpp.
void unravel::editing_manager::on_play_after_end | ( | rtti::context & | ctx | ) |
Definition at line 151 of file editing_manager.cpp.
void unravel::editing_manager::on_play_before_begin | ( | rtti::context & | ctx | ) |
Definition at line 98 of file editing_manager.cpp.
void unravel::editing_manager::on_prefab_updated | ( | const asset_handle< prefab > & | pfb | ) |
Definition at line 313 of file editing_manager.cpp.
void unravel::editing_manager::on_script_recompile | ( | rtti::context & | ctx, |
const std::string & | protocol, | ||
uint64_t | version ) |
Definition at line 189 of file editing_manager.cpp.
void unravel::editing_manager::pop_undo_stack_enabled | ( | ) |
Definition at line 754 of file editing_manager.cpp.
void unravel::editing_manager::push_undo_stack_enabled | ( | bool | enabled | ) |
Definition at line 750 of file editing_manager.cpp.
|
inline |
Definition at line 420 of file editing_manager.h.
void unravel::editing_manager::queue_action | ( | const std::string & | name, |
const std::function< void()> & | action ) |
Definition at line 698 of file editing_manager.cpp.
void unravel::editing_manager::queue_action | ( | const std::string & | name, |
const std::function< void()> & | do_action, | ||
const std::function< void()> & | undo_action ) |
Definition at line 703 of file editing_manager.cpp.
void unravel::editing_manager::queue_action | ( | const std::string & | name, |
std::shared_ptr< editing_action_t > | action ) |
Definition at line 708 of file editing_manager.cpp.
void unravel::editing_manager::redo | ( | ) |
Definition at line 792 of file editing_manager.cpp.
void unravel::editing_manager::save_prefab_changes | ( | rtti::context & | ctx | ) |
Definition at line 621 of file editing_manager.cpp.
|
inline |
Definition at line 317 of file editing_manager.h.
void unravel::editing_manager::sync_prefab_entity | ( | rtti::context & | ctx, |
entt::handle | entity, | ||
const asset_handle< prefab > & | pfb ) |
Definition at line 343 of file editing_manager.cpp.
void unravel::editing_manager::sync_prefab_instances | ( | rtti::context & | ctx, |
scene * | scn ) |
Definition at line 402 of file editing_manager.cpp.
|
inline |
Definition at line 293 of file editing_manager.h.
|
inline |
Definition at line 190 of file editing_manager.h.
|
inline |
Definition at line 202 of file editing_manager.h.
|
inline |
Definition at line 230 of file editing_manager.h.
|
inline |
Definition at line 214 of file editing_manager.h.
|
inline |
Definition at line 246 of file editing_manager.h.
|
inline |
Definition at line 134 of file editing_manager.h.
|
inline |
Clears the selection data if it maches the type.
Definition at line 125 of file editing_manager.h.
void unravel::editing_manager::undo | ( | ) |
Definition at line 783 of file editing_manager.cpp.
void unravel::editing_manager::unfocus | ( | ) |
Definition at line 466 of file editing_manager.cpp.
void unravel::editing_manager::unselect | ( | bool | clear_selection_tools = true | ) |
Clears the selection data.
Definition at line 455 of file editing_manager.cpp.
|
inline |
Definition at line 305 of file editing_manager.h.
billboard_gizmos unravel::editing_manager::billboard_data |
Definition at line 478 of file editing_manager.h.
editing_mode unravel::editing_manager::current_mode = editing_mode::scene |
Definition at line 483 of file editing_manager.h.
asset_handle<prefab> unravel::editing_manager::edited_prefab |
Definition at line 486 of file editing_manager.h.
focused unravel::editing_manager::focused_data |
Definition at line 473 of file editing_manager.h.
grid unravel::editing_manager::grid_data |
Definition at line 477 of file editing_manager.h.
inverse_kinematics unravel::editing_manager::ik_data |
Definition at line 480 of file editing_manager.h.
ImGuizmo::MODE unravel::editing_manager::mode = ImGuizmo::LOCAL |
current manipulation gizmo space.
Definition at line 469 of file editing_manager.h.
ImGuizmo::OPERATION unravel::editing_manager::operation = ImGuizmo::TRANSLATE |
current manipulation gizmo operation.
Definition at line 467 of file editing_manager.h.
std::vector<std::shared_ptr<editing_action_t> > unravel::editing_manager::pending_actions |
Definition at line 23 of file editing_manager.h.
entt::handle unravel::editing_manager::prefab_entity |
Definition at line 489 of file editing_manager.h.
scene unravel::editing_manager::prefab_scene {"prefab_scene"} |
Definition at line 492 of file editing_manager.h.
selection unravel::editing_manager::selection_data |
selection data containing selected object
Definition at line 471 of file editing_manager.h.
bool unravel::editing_manager::show_grid = true |
enable editor grid
Definition at line 461 of file editing_manager.h.
bool unravel::editing_manager::show_icon_gizmos = true |
enable editor icon gizmos
Definition at line 463 of file editing_manager.h.
snap unravel::editing_manager::snap_data |
snap data containging various snap options
Definition at line 476 of file editing_manager.h.
undo_redo_stack unravel::editing_manager::undo_stack |
Definition at line 22 of file editing_manager.h.
std::stack<bool> unravel::editing_manager::undo_stack_enabled |
Definition at line 24 of file editing_manager.h.
bool unravel::editing_manager::wireframe_selection = true |
enable wireframe selection
Definition at line 465 of file editing_manager.h.