mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-27 14:17:37 +01:00
Removed the SNAME macro, I'll probably keep static counting support for StringNames though.
This commit is contained in:
parent
6825202490
commit
9d9271b518
@ -217,7 +217,7 @@ StringName _scs_create(const char *p_chr, bool p_static = false);
|
||||
* Use in places that can be called hundreds of times per frame (or more) is recommended, but this situation is very rare. If in doubt, do not use.
|
||||
*/
|
||||
|
||||
#define SNAME(m_arg) ([]() -> const StringName & { static StringName sname = _scs_create(m_arg, true); return sname; })()
|
||||
//#define SNAME(m_arg) ([]() -> const StringName & { static StringName sname = _scs_create(m_arg, true); return sname; })()
|
||||
|
||||
|
||||
#endif // STRING_NAME_H
|
||||
|
@ -597,7 +597,7 @@ void SkeletonEditor::update_joint_tree() {
|
||||
|
||||
items.insert(-1, root);
|
||||
|
||||
Ref<Texture> bone_icon = get_icon(SNAME("Bone"), SNAME("EditorIcons"));
|
||||
Ref<Texture> bone_icon = get_icon("Bone", "EditorIcons");
|
||||
|
||||
Vector<int> bones_to_process = skeleton->get_parentless_bones();
|
||||
while (bones_to_process.size() > 0) {
|
||||
@ -688,7 +688,7 @@ void SkeletonEditor::create_editors() {
|
||||
ne->add_control_to_menu_panel(skeleton_options);
|
||||
|
||||
skeleton_options->set_text(TTR("Skeleton"));
|
||||
skeleton_options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon(SNAME("Skeleton"), SNAME("EditorIcons")));
|
||||
skeleton_options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Skeleton", "EditorIcons"));
|
||||
|
||||
skeleton_options->get_popup()->add_item(TTR("Init pose"), SKELETON_OPTION_INIT_POSE);
|
||||
skeleton_options->get_popup()->add_item(TTR("Insert key of all bone poses"), SKELETON_OPTION_INSERT_KEYS);
|
||||
@ -704,7 +704,7 @@ void SkeletonEditor::create_editors() {
|
||||
ne->add_control_to_menu_panel(rest_options);
|
||||
|
||||
rest_options->set_text(TTR("Edit Rest"));
|
||||
rest_options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon(SNAME("BoneAttachment"), SNAME("EditorIcons")));
|
||||
rest_options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("BoneAttachment", "EditorIcons"));
|
||||
|
||||
rest_options->get_popup()->add_item(TTR("Apply current pose to rest"), REST_OPTION_POSE_TO_REST);
|
||||
rest_options->get_popup()->connect("id_pressed", this, "_on_click_rest_option");
|
||||
@ -1444,9 +1444,9 @@ void SkeletonGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
|
||||
int bone_shape = EditorSettings::get_singleton()->get("editors/3d_gizmos/gizmo_settings/bone_shape");
|
||||
|
||||
LocalVector<Color> axis_colors;
|
||||
axis_colors.push_back(SpatialEditor::get_singleton()->get_color(SNAME("axis_x_color"), SNAME("Editor")));
|
||||
axis_colors.push_back(SpatialEditor::get_singleton()->get_color(SNAME("axis_y_color"), SNAME("Editor")));
|
||||
axis_colors.push_back(SpatialEditor::get_singleton()->get_color(SNAME("axis_z_color"), SNAME("Editor")));
|
||||
axis_colors.push_back(SpatialEditor::get_singleton()->get_color("axis_x_color", "Editor"));
|
||||
axis_colors.push_back(SpatialEditor::get_singleton()->get_color("axis_y_color", "Editor"));
|
||||
axis_colors.push_back(SpatialEditor::get_singleton()->get_color("axis_z_color", "Editor"));
|
||||
|
||||
Ref<SurfaceTool> surface_tool(memnew(SurfaceTool));
|
||||
surface_tool->begin(Mesh::PRIMITIVE_LINES);
|
||||
|
@ -250,13 +250,13 @@ void BoneAttachment::_validate_property(PropertyInfo &property) const {
|
||||
}
|
||||
|
||||
bool BoneAttachment::_set(const StringName &p_path, const Variant &p_value) {
|
||||
if (p_path == SNAME("override_pose")) {
|
||||
if (p_path == "override_pose") {
|
||||
set_override_pose(p_value);
|
||||
} else if (p_path == SNAME("override_mode")) {
|
||||
} else if (p_path == "override_mode") {
|
||||
set_override_mode(p_value);
|
||||
} else if (p_path == SNAME("use_external_skeleton")) {
|
||||
} else if (p_path == "use_external_skeleton") {
|
||||
set_use_external_skeleton(p_value);
|
||||
} else if (p_path == SNAME("external_skeleton")) {
|
||||
} else if (p_path == "external_skeleton") {
|
||||
set_external_skeleton(p_value);
|
||||
}
|
||||
|
||||
@ -264,13 +264,13 @@ bool BoneAttachment::_set(const StringName &p_path, const Variant &p_value) {
|
||||
}
|
||||
|
||||
bool BoneAttachment::_get(const StringName &p_path, Variant &r_ret) const {
|
||||
if (p_path == SNAME("override_pose")) {
|
||||
if (p_path == "override_pose") {
|
||||
r_ret = get_override_pose();
|
||||
} else if (p_path == SNAME("override_mode")) {
|
||||
} else if (p_path == "override_mode") {
|
||||
r_ret = get_override_mode();
|
||||
} else if (p_path == SNAME("use_external_skeleton")) {
|
||||
} else if (p_path == "use_external_skeleton") {
|
||||
r_ret = get_use_external_skeleton();
|
||||
} else if (p_path == SNAME("external_skeleton")) {
|
||||
} else if (p_path == "external_skeleton") {
|
||||
r_ret = get_external_skeleton();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user