diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2022-04-24 16:59:24 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2022-04-29 08:02:39 -0500 |
commit | b831fb0a540bee165d46c1c229f2ec4569c88461 (patch) | |
tree | 87110f1b711f153d435e05a7658dec15d18efd90 /editor | |
parent | 81139c94a8b1fd0ea29cb64627f4b8dc0962a5b7 (diff) |
Rename Transform2D "elements" to "columns"
Diffstat (limited to 'editor')
-rw-r--r-- | editor/debugger/debug_adapter/debug_adapter_protocol.cpp | 12 | ||||
-rw-r--r-- | editor/debugger/script_editor_debugger.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/animation_state_machine_editor.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/polygon_2d_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/texture_region_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/property_editor.cpp | 4 |
7 files changed, 17 insertions, 17 deletions
diff --git a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp index 745ca17efd..632d9a5eb3 100644 --- a/editor/debugger/debug_adapter/debug_adapter_protocol.cpp +++ b/editor/debugger/debug_adapter/debug_adapter_protocol.cpp @@ -268,12 +268,12 @@ int DebugAdapterProtocol::parse_variant(const Variant &p_var) { x.type = type_vec2; y.type = type_vec2; origin.type = type_vec2; - x.value = transform.elements[0]; - y.value = transform.elements[1]; - origin.value = transform.elements[2]; - x.variablesReference = parse_variant(transform.elements[0]); - y.variablesReference = parse_variant(transform.elements[1]); - origin.variablesReference = parse_variant(transform.elements[2]); + x.value = transform.columns[0]; + y.value = transform.columns[1]; + origin.value = transform.columns[2]; + x.variablesReference = parse_variant(transform.columns[0]); + y.variablesReference = parse_variant(transform.columns[1]); + origin.variablesReference = parse_variant(transform.columns[2]); Array arr; arr.push_back(x.to_json()); diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index 98391d286a..1c8d66e4be 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -812,7 +812,7 @@ void ScriptEditorDebugger::_notification(int p_what) { Transform2D transform; transform.scale_basis(Size2(zoom, zoom)); - transform.elements[2] = -offset * zoom; + transform.columns[2] = -offset * zoom; Array msg; msg.push_back(transform); diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 8397772bf8..42f17965ce 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -521,9 +521,9 @@ void AnimationNodeStateMachineEditor::_connection_draw(const Vector2 &p_from, co Ref<Texture2D> icon = icons[p_mode + (p_auto_advance ? 3 : 0)]; Transform2D xf; - xf.elements[0] = (p_to - p_from).normalized(); - xf.elements[1] = xf.elements[0].orthogonal(); - xf.elements[2] = (p_from + p_to) * 0.5 - xf.elements[1] * icon->get_height() * 0.5 - xf.elements[0] * icon->get_height() * 0.5; + xf.columns[0] = (p_to - p_from).normalized(); + xf.columns[1] = xf.columns[0].orthogonal(); + xf.columns[2] = (p_from + p_to) * 0.5 - xf.columns[1] * icon->get_height() * 0.5 - xf.columns[0] * icon->get_height() * 0.5; state_machine_draw->draw_set_transform_matrix(xf); state_machine_draw->draw_texture(icon, Vector2(), icon_color); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index c840ce22ce..fd2aaec4da 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -3675,7 +3675,7 @@ void CanvasItemEditor::_draw_viewport() { // Update the transform transform = Transform2D(); transform.scale_basis(Size2(zoom, zoom)); - transform.elements[2] = -view_offset * zoom; + transform.columns[2] = -view_offset * zoom; EditorNode::get_singleton()->get_scene_root()->set_global_canvas_transform(transform); // hide/show buttons depending on the selection diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index 8566e92b22..a682bb455c 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -455,7 +455,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { } Transform2D mtx; - mtx.elements[2] = -uv_draw_ofs; + mtx.columns[2] = -uv_draw_ofs; mtx.scale_basis(Vector2(uv_draw_zoom, uv_draw_zoom)); Ref<InputEventMouseButton> mb = p_input; @@ -970,7 +970,7 @@ void Polygon2DEditor::_uv_draw() { String warning; Transform2D mtx; - mtx.elements[2] = -uv_draw_ofs; + mtx.columns[2] = -uv_draw_ofs; mtx.scale_basis(Vector2(uv_draw_zoom, uv_draw_zoom)); RS::get_singleton()->canvas_item_add_set_transform(uv_edit_draw->get_canvas_item(), mtx); diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index 3fa12233a8..455592aa26 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -78,7 +78,7 @@ void TextureRegionEditor::_region_draw() { } Transform2D mtx; - mtx.elements[2] = -draw_ofs * draw_zoom; + mtx.columns[2] = -draw_ofs * draw_zoom; mtx.scale_basis(Vector2(draw_zoom, draw_zoom)); RS::get_singleton()->canvas_item_add_set_transform(edit_draw->get_canvas_item(), mtx); @@ -267,7 +267,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) { } Transform2D mtx; - mtx.elements[2] = -draw_ofs * draw_zoom; + mtx.columns[2] = -draw_ofs * draw_zoom; mtx.scale_basis(Vector2(draw_zoom, draw_zoom)); const real_t handle_radius = 8 * EDSCALE; diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 52fb0d4f4e..b09072ff4f 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -768,7 +768,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: Transform2D basis = v; for (int i = 0; i < 6; i++) { - value_editor[i]->set_text(String::num(basis.elements[i / 2][i % 2])); + value_editor[i]->set_text(String::num(basis.columns[i / 2][i % 2])); } } break; @@ -1568,7 +1568,7 @@ void CustomPropertyEditor::_modified(String p_string) { case Variant::TRANSFORM2D: { Transform2D m; for (int i = 0; i < 6; i++) { - m.elements[i / 2][i % 2] = _parse_real_expression(value_editor[i]->get_text()); + m.columns[i / 2][i % 2] = _parse_real_expression(value_editor[i]->get_text()); } v = m; |