diff options
| author | Hubert Jarosz | 2016-03-09 00:00:52 +0100 |
|---|---|---|
| committer | Hubert Jarosz | 2016-03-09 00:00:52 +0100 |
| commit | 4a4f2479146aa33e235ed57cde311efda68d3c8f (patch) | |
| tree | cf91f2869ff8f058c6682569fb31e22e5ee736ad /tools/editor/plugins | |
| parent | 1dad6eca812e5c2e313b54265114de8a1d73d999 (diff) | |
| download | godot-4a4f2479146aa33e235ed57cde311efda68d3c8f.tar.gz godot-4a4f2479146aa33e235ed57cde311efda68d3c8f.tar.zst godot-4a4f2479146aa33e235ed57cde311efda68d3c8f.zip | |
remove trailing whitespace
Diffstat (limited to 'tools/editor/plugins')
19 files changed, 105 insertions, 105 deletions
diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp index 010753e88..0b06aab44 100644 --- a/tools/editor/plugins/animation_player_editor_plugin.cpp +++ b/tools/editor/plugins/animation_player_editor_plugin.cpp @@ -731,7 +731,7 @@ void AnimationPlayerEditor::_dialog_action(String p_file) { String current = animation->get_item_text(animation->get_selected()); if (current != "") { Ref<Animation> anim = player->get_animation(current); - + ERR_FAIL_COND(!anim->cast_to<Resource>()) RES current_res = RES(anim->cast_to<Resource>()); @@ -1424,7 +1424,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) { add_child(error_dialog); name_dialog->connect("confirmed", this,"_animation_name_edited"); - + blend_editor.dialog = memnew( AcceptDialog ); add_child(blend_editor.dialog); blend_editor.dialog->get_ok()->set_text("Close"); @@ -1441,7 +1441,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) { updating_blends=false; blend_editor.tree->connect("item_edited",this,"_blend_edited"); - + autoplay->connect("pressed", this,"_autoplay_pressed"); autoplay->set_toggle_mode(true); diff --git a/tools/editor/plugins/animation_tree_editor_plugin.cpp b/tools/editor/plugins/animation_tree_editor_plugin.cpp index d85553b4d..08c2a1c3a 100644 --- a/tools/editor/plugins/animation_tree_editor_plugin.cpp +++ b/tools/editor/plugins/animation_tree_editor_plugin.cpp @@ -593,7 +593,7 @@ void AnimationTreeEditor::_draw_node(const StringName& p_node) { } break; case AnimationTreePlayer::NODE_ONESHOT: - case AnimationTreePlayer::NODE_MIX: + case AnimationTreePlayer::NODE_MIX: case AnimationTreePlayer::NODE_BLEND2: case AnimationTreePlayer::NODE_BLEND3: case AnimationTreePlayer::NODE_BLEND4: @@ -1155,7 +1155,7 @@ StringName AnimationTreeEditor::_add_node(int p_item) { anim_tree->node_set_pos(name,Point2(last_x,last_y)); order.push_back(name); last_x+=10; - last_y+=10; + last_y+=10; last_x=last_x % (int)get_size().width; last_y=last_y % (int)get_size().height; update(); diff --git a/tools/editor/plugins/baked_light_baker.h b/tools/editor/plugins/baked_light_baker.h index 8fbeeddc6..5c172f79c 100644 --- a/tools/editor/plugins/baked_light_baker.h +++ b/tools/editor/plugins/baked_light_baker.h @@ -96,7 +96,7 @@ public: struct Triangle { - AABB aabb; + AABB aabb; Vector3 vertices[3]; Vector2 uvs[3]; Vector2 bake_uvs[3]; diff --git a/tools/editor/plugins/baked_light_editor_plugin.cpp b/tools/editor/plugins/baked_light_editor_plugin.cpp index 22a188bce..56aabaf6d 100644 --- a/tools/editor/plugins/baked_light_editor_plugin.cpp +++ b/tools/editor/plugins/baked_light_editor_plugin.cpp @@ -131,7 +131,7 @@ void BakedLightEditor::_notification(int p_option) { last_rays_time=rays_snap; bake_info->set_text("rays/s: "+itos(rays_sec)); - update_timeout=1; + update_timeout=1; print_line("MSUPDATE: "+itos(OS::get_singleton()->get_ticks_msec()-t)); t=OS::get_singleton()->get_ticks_msec(); node->get_baked_light()->set_octree(octree_texture); diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index f8bc97a43..6eb26542b 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -49,10 +49,10 @@ friend class CanvasItemEditor; SpinBox *grid_offset_x; SpinBox *grid_offset_y; SpinBox *grid_step_x; - SpinBox *grid_step_y; - SpinBox *rotation_offset; + SpinBox *grid_step_y; + SpinBox *rotation_offset; SpinBox *rotation_step; - + public: SnapDialog() : ConfirmationDialog() { const int SPIN_BOX_GRID_RANGE = 256; @@ -134,7 +134,7 @@ public: rotation_step->set_suffix("deg"); child_container->add_child(rotation_step); } - + void set_fields(const Point2 p_grid_offset, const Size2 p_grid_step, const float p_rotation_offset, const float p_rotation_step) { grid_offset_x->set_val(p_grid_offset.x); grid_offset_y->set_val(p_grid_offset.y); @@ -143,7 +143,7 @@ public: rotation_offset->set_val(p_rotation_offset * (180 / Math_PI)); rotation_step->set_val(p_rotation_step * (180 / Math_PI)); } - + void get_fields(Point2 &p_grid_offset, Size2 &p_grid_step, float &p_rotation_offset, float &p_rotation_step) { p_grid_offset.x = grid_offset_x->get_val(); p_grid_offset.y = grid_offset_y->get_val(); @@ -1328,7 +1328,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) { first=false; } - BoneIK bik; + BoneIK bik; bik.node=b; bik.len=len; bik.orig_state=b->edit_get_state(); @@ -2670,7 +2670,7 @@ void CanvasItemEditor::_popup_callback(int p_op) { } #endif } break; - + case SPACE_HORIZONTAL: { //space_selected_items< proj_vector2_x, compare_items_x >(); } break; @@ -3164,7 +3164,7 @@ bool CanvasItemEditor::box_selection_end() { SWAP(bsfrom.x,bsto.x); if (bsfrom.y>bsto.y) SWAP(bsfrom.y,bsto.y); - + if ( bsfrom.distance_to( bsto ) < 3 ) { print_line( "box selection too small" ); box_selecting=false; @@ -3183,7 +3183,7 @@ bool CanvasItemEditor::box_selection_end() { box_selecting=false; viewport->update(); - + return true; } #endif diff --git a/tools/editor/plugins/canvas_item_editor_plugin.h b/tools/editor/plugins/canvas_item_editor_plugin.h index df24734fd..301c67756 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.h +++ b/tools/editor/plugins/canvas_item_editor_plugin.h @@ -302,11 +302,11 @@ class CanvasItemEditor : public VBoxContainer { bool _select(CanvasItem *item, Point2 p_click_pos, bool p_append, bool p_drag=true); ConfirmationDialog *snap_dialog; - + AcceptDialog *value_dialog; Label *dialog_label; SpinBox *dialog_val; - + CanvasItem *ref_item; void _edit_set_pivot(const Vector2& mouse_pos); @@ -369,29 +369,29 @@ protected: bool box_selection_end(); HBoxContainer *get_panel_hb() { return hb; } - + struct compare_items_x { bool operator()( const CanvasItem *a, const CanvasItem *b ) const { return a->get_global_transform().elements[2].x < b->get_global_transform().elements[2].x; } }; - + struct compare_items_y { bool operator()( const CanvasItem *a, const CanvasItem *b ) const { return a->get_global_transform().elements[2].y < b->get_global_transform().elements[2].y; } }; - + struct proj_vector2_x { float get( const Vector2 &v ) { return v.x; } void set( Vector2 &v, float f ) { v.x = f; } }; - + struct proj_vector2_y { float get( const Vector2 &v ) { return v.y; } void set( Vector2 &v, float f ) { v.y = f; } }; - + template< class P, class C > void space_selected_items(); static CanvasItemEditor *singleton; diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_editor_plugin.cpp index d4198f316..44854e655 100644 --- a/tools/editor/plugins/collision_polygon_editor_plugin.cpp +++ b/tools/editor/plugins/collision_polygon_editor_plugin.cpp @@ -40,7 +40,7 @@ void CollisionPolygonEditor::_notification(int p_what) { case NOTIFICATION_READY: { button_create->set_icon( get_icon("Edit","EditorIcons")); - button_edit->set_icon( get_icon("MovePoint","EditorIcons")); + button_edit->set_icon( get_icon("MovePoint","EditorIcons")); button_edit->set_pressed(true); get_tree()->connect("node_removed",this,"_node_removed"); diff --git a/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp b/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp index 7e5d52d17..1916d55ee 100644 --- a/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp +++ b/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp @@ -451,11 +451,11 @@ void CollisionShape2DEditor::_canvas_draw() { case LINE_SHAPE: { Ref<LineShape2D> shape = node->get_shape(); - + handles.resize(2); handles[0] = shape->get_normal() * shape->get_d(); handles[1] = shape->get_normal() * (shape->get_d() + 30.0); - + c->draw_texture(h,gt.xform(handles[0])-size); c->draw_texture(h,gt.xform(handles[1])-size); diff --git a/tools/editor/plugins/control_editor_plugin.cpp b/tools/editor/plugins/control_editor_plugin.cpp index 375622a89..9dff5e6ce 100644 --- a/tools/editor/plugins/control_editor_plugin.cpp +++ b/tools/editor/plugins/control_editor_plugin.cpp @@ -80,16 +80,16 @@ void ControlEditor::_node_removed(Node *p_node) { // slow as hell Control* ControlEditor::_select_control_at_pos(const Point2& p_pos,Node* p_node) { - + for (int i=p_node->get_child_count()-1;i>=0;i--) { - + Control *r=_select_control_at_pos(p_pos,p_node->get_child(i)); if (r) return r; } - + Control *c=p_node->cast_to<Control>(); - + if (c) { Rect2 rect = c->get_window_rect(); if (c->get_window()==current_window) { @@ -123,9 +123,9 @@ void ControlEditor::_key_move(const Vector2& p_dir, bool p_snap) { void ControlEditor::_input_event(InputEvent p_event) { - + if (p_event.type==InputEvent::MOUSE_BUTTON) { - + const InputEventMouseButton &b=p_event.mouse_button; if (b.button_index==BUTTON_RIGHT) { @@ -146,12 +146,12 @@ void ControlEditor::_input_event(InputEvent p_event) { } //if (!controls.size()) // return; - + if (b.button_index!=BUTTON_LEFT) return; if (!b.pressed) { - + if (drag!=DRAG_NONE) { if (undo_redo) { @@ -321,11 +321,11 @@ void ControlEditor::_input_event(InputEvent p_event) { } } - + if (p_event.type==InputEvent::MOUSE_MOTION) { - + const InputEventMouseMotion &m=p_event.mouse_motion; - + if (drag==DRAG_NONE || !current_window) return; @@ -449,7 +449,7 @@ void ControlEditor::_input_event(InputEvent p_event) { } - + } @@ -492,9 +492,9 @@ void ControlEditor::_update_scroll(float) { } void ControlEditor::_notification(int p_what) { - + if (p_what==NOTIFICATION_PROCESS) { - + for(ControlMap::Element *E=controls.front();E;E=E->next()) { Control *control = E->key(); @@ -504,16 +504,16 @@ void ControlEditor::_notification(int p_what) { E->get().last_rect=r; } } - + } - + if (p_what==NOTIFICATION_CHILDREN_CONFIGURED) { - + get_scene()->connect("node_removed",this,"_node_removed"); } - + if (p_what==NOTIFICATION_DRAW) { - + // TODO fetch the viewport? /* if (!control) { @@ -572,11 +572,11 @@ VisualServer::get_singleton()->canvas_item_add_rect(ci,m_rect,m_color); //DRAW_EMPTY_RECT( Rect2( current_window->get_scroll()-Point2(1,1), get_size()+Size2(2,2)), Color(0.8,0.8,1.0,0.8) ); E->get().last_rect = rect; } - } + } } void ControlEditor::edit(Control *p_control) { - + drag=DRAG_NONE; _clear_controls(); @@ -727,9 +727,9 @@ void ControlEditor::_popup_callback(int p_op) { } void ControlEditor::_bind_methods() { - + ObjectTypeDB::bind_method("_input_event",&ControlEditor::_input_event); - ObjectTypeDB::bind_method("_node_removed",&ControlEditor::_node_removed); + ObjectTypeDB::bind_method("_node_removed",&ControlEditor::_node_removed); ObjectTypeDB::bind_method("_update_scroll",&ControlEditor::_update_scroll); ObjectTypeDB::bind_method("_popup_callback",&ControlEditor::_popup_callback); ObjectTypeDB::bind_method("_visibility_changed",&ControlEditor::_visibility_changed); @@ -781,13 +781,13 @@ ControlEditor::ControlEditor(EditorNode *p_editor) { void ControlEditorPlugin::edit(Object *p_object) { - + control_editor->set_undo_redo(&get_undo_redo()); control_editor->edit(p_object->cast_to<Control>()); } bool ControlEditorPlugin::handles(Object *p_object) const { - + return p_object->is_type("Control"); } @@ -797,7 +797,7 @@ void ControlEditorPlugin::make_visible(bool p_visible) { control_editor->show(); control_editor->set_process(true); } else { - + control_editor->hide(); control_editor->set_process(false); } @@ -805,14 +805,14 @@ void ControlEditorPlugin::make_visible(bool p_visible) { } ControlEditorPlugin::ControlEditorPlugin(EditorNode *p_node) { - + editor=p_node; control_editor = memnew( ControlEditor(editor) ); editor->get_viewport()->add_child(control_editor); control_editor->set_area_as_parent_rect(); control_editor->hide(); - + } diff --git a/tools/editor/plugins/control_editor_plugin.h b/tools/editor/plugins/control_editor_plugin.h index 94cffc8d8..6234698ee 100644 --- a/tools/editor/plugins/control_editor_plugin.h +++ b/tools/editor/plugins/control_editor_plugin.h @@ -37,9 +37,9 @@ #if 0 class ControlEditor : public Control { - - OBJ_TYPE(ControlEditor, Control ); - + + OBJ_TYPE(ControlEditor, Control ); + EditorNode *editor; enum { @@ -103,13 +103,13 @@ class ControlEditor : public Control { void _find_controls_span(Node *p_node, Rect2& r_rect); -protected: +protected: void _notification(int p_what); - void _input_event(InputEvent p_event); + void _input_event(InputEvent p_event); void _node_removed(Node *p_node); static void _bind_methods(); -public: - +public: + bool get_remove_list(List<Node*> *p_list); void set_undo_redo(UndoRedo *p_undo_redo) {undo_redo=p_undo_redo; } void edit(Control *p_control); @@ -117,14 +117,14 @@ public: }; class ControlEditorPlugin : public EditorPlugin { - + OBJ_TYPE( ControlEditorPlugin, EditorPlugin ); - + ControlEditor *control_editor; EditorNode *editor; - + public: - + virtual String get_name() const { return "GUI"; } bool has_main_screen() const { return true; } virtual void edit(Object *p_object); @@ -132,7 +132,7 @@ public: virtual void make_visible(bool p_visible); virtual bool get_remove_list(List<Node*> *p_list) { return control_editor->get_remove_list(p_list); } - + ControlEditorPlugin(EditorNode *p_node); ~ControlEditorPlugin(); diff --git a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp index c861a5841..ab4f14b80 100644 --- a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp +++ b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp @@ -27,7 +27,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "cube_grid_theme_editor_plugin.h" - + #include "scene/3d/mesh_instance.h" #include "scene/3d/physics_body.h" #include "scene/main/viewport.h" @@ -337,7 +337,7 @@ MeshLibraryEditorPlugin::MeshLibraryEditorPlugin(EditorNode *p_node) { theme_editor->set_anchor( MARGIN_RIGHT, Control::ANCHOR_END ); theme_editor->set_anchor( MARGIN_BOTTOM, Control::ANCHOR_BEGIN ); theme_editor->set_end( Point2(0,22) ); - theme_editor->hide(); + theme_editor->hide(); } diff --git a/tools/editor/plugins/item_list_editor_plugin.cpp b/tools/editor/plugins/item_list_editor_plugin.cpp index 6f0db959b..08af1a064 100644 --- a/tools/editor/plugins/item_list_editor_plugin.cpp +++ b/tools/editor/plugins/item_list_editor_plugin.cpp @@ -119,7 +119,7 @@ void ItemListOptionButtonPlugin::set_object(Object *p_object) { bool ItemListOptionButtonPlugin::handles(Object *p_object) const { - return p_object->is_type("OptionButton"); + return p_object->is_type("OptionButton"); } int ItemListOptionButtonPlugin::get_flags() const { @@ -130,23 +130,23 @@ int ItemListOptionButtonPlugin::get_flags() const { void ItemListOptionButtonPlugin::add_item() { ob->add_item( "Item "+itos(ob->get_item_count())); - _change_notify(); + _change_notify(); } int ItemListOptionButtonPlugin::get_item_count() const { - return ob->get_item_count(); + return ob->get_item_count(); } void ItemListOptionButtonPlugin::erase(int p_idx) { - ob->remove_item(p_idx); + ob->remove_item(p_idx); _change_notify(); } ItemListOptionButtonPlugin::ItemListOptionButtonPlugin() { - ob=NULL; + ob=NULL; } /////////////////////////////////////////////////////////////// @@ -259,7 +259,7 @@ void ItemListEditor::edit(Node *p_item_list) { item_plugins[i]->set_object(p_item_list); property_editor->edit(item_plugins[i]); - + if (has_icon(item_list->get_type(), "EditorIcons")) toolbar_button->set_icon(get_icon(item_list->get_type(), "EditorIcons")); else diff --git a/tools/editor/plugins/multimesh_editor_plugin.cpp b/tools/editor/plugins/multimesh_editor_plugin.cpp index 3f63ef706..15df9a626 100644 --- a/tools/editor/plugins/multimesh_editor_plugin.cpp +++ b/tools/editor/plugins/multimesh_editor_plugin.cpp @@ -326,7 +326,7 @@ MultiMeshEditor::MultiMeshEditor() { options = memnew( MenuButton ); SpatialEditor::get_singleton()->add_control_to_menu_panel(options); - + options->set_text("MultiMesh"); options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("MultiMeshInstance","EditorIcons")); diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.cpp b/tools/editor/plugins/polygon_2d_editor_plugin.cpp index 3e9c58d60..849fe8264 100644 --- a/tools/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/tools/editor/plugins/polygon_2d_editor_plugin.cpp @@ -69,7 +69,7 @@ void Polygon2DEditor::_node_removed(Node *p_node) { if(p_node==node) { edit(NULL); hide(); - + canvas_item_editor->get_viewport_control()->update(); } @@ -760,7 +760,7 @@ void Polygon2DEditor::edit(Node *p_collision_polygon) { node=p_collision_polygon->cast_to<Polygon2D>(); if (!canvas_item_editor->get_viewport_control()->is_connected("draw",this,"_canvas_draw")) canvas_item_editor->get_viewport_control()->connect("draw",this,"_canvas_draw"); - + wip.clear(); wip_active=false; edited_point=-1; diff --git a/tools/editor/plugins/resource_preloader_editor_plugin.cpp b/tools/editor/plugins/resource_preloader_editor_plugin.cpp index 8490f63ff..442046b06 100644 --- a/tools/editor/plugins/resource_preloader_editor_plugin.cpp +++ b/tools/editor/plugins/resource_preloader_editor_plugin.cpp @@ -46,7 +46,7 @@ void ResourcePreloaderEditor::_notification(int p_what) { } if (p_what==NOTIFICATION_ENTER_TREE) { - load->set_icon( get_icon("Folder","EditorIcons") ); + load->set_icon( get_icon("Folder","EditorIcons") ); _delete->set_icon( get_icon("Del","EditorIcons") ); } diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 4be8b3f95..2fb5dd619 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -711,7 +711,7 @@ void ScriptEditor::_close_current_tab() { int selected = tab_container->get_current_tab(); if (selected<0 || selected>=tab_container->get_child_count()) return; - + Node *tselected = tab_container->get_child(selected); ScriptTextEditor *current = tab_container->get_child(selected)->cast_to<ScriptTextEditor>(); if (current) { diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp index 716103311..2d3100ac0 100644 --- a/tools/editor/plugins/shader_editor_plugin.cpp +++ b/tools/editor/plugins/shader_editor_plugin.cpp @@ -28,7 +28,7 @@ /*************************************************************************/ #include "shader_editor_plugin.h" #include "tools/editor/editor_settings.h" - + #include "spatial_editor_plugin.h" #include "io/resource_loader.h" #include "io/resource_saver.h" @@ -52,7 +52,7 @@ Ref<Shader> ShaderTextEditor::get_edited_shader() const { } void ShaderTextEditor::set_edited_shader(const Ref<Shader>& p_shader,ShaderLanguage::ShaderType p_type) { - shader=p_shader; + shader=p_shader; type=p_type; _load_theme_settings(); diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index 522da24ea..e787c7470 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -1265,7 +1265,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) { } else if (m.button_mask&1) { if (nav_scheme == NAVIGATION_MAYA && m.mod.alt) { - nav_mode = NAVIGATION_ORBIT; + nav_mode = NAVIGATION_ORBIT; } else if (nav_scheme == NAVIGATION_MODO && m.mod.alt && m.mod.shift) { nav_mode = NAVIGATION_PAN; } else if (nav_scheme == NAVIGATION_MODO && m.mod.alt && m.mod.control) { @@ -2606,15 +2606,15 @@ void SpatialEditor::_generate_selection_box() { aabb.grow_by( aabb.get_longest_axis_size()/20.0 ); Ref<SurfaceTool> st = memnew( SurfaceTool ); - + st->begin(Mesh::PRIMITIVE_LINES); for (int i=0;i<12;i++) { - + Vector3 a,b; - aabb.get_edge(i,a,b); - + aabb.get_edge(i,a,b); + /*Vector<Vector3> points; - Vector<Color> colors; + Vector<Color> colors; points.push_back(a); points.push_back(b);*/ @@ -2804,7 +2804,7 @@ void SpatialEditor::set_state(const Dictionary& p_state) { void SpatialEditor::edit(Spatial *p_spatial) { - + if (p_spatial!=selected) { if (selected) { @@ -2836,8 +2836,8 @@ void SpatialEditor::edit(Spatial *p_spatial) { // should become the selection } - - + + } void SpatialEditor::_xform_dialog_action() { @@ -4167,7 +4167,7 @@ SpatialEditor::~SpatialEditor() { void SpatialEditorPlugin::make_visible(bool p_visible) { if (p_visible) { - + spatial_editor->show(); spatial_editor->set_process(true); @@ -4175,7 +4175,7 @@ void SpatialEditorPlugin::make_visible(bool p_visible) { spatial_editor->grab_focus(); } else { - + spatial_editor->hide(); spatial_editor->set_process(false); //VisualServer::get_singleton()->viewport_set_hide_scenario(editor->get_scene_root()->get_viewport(),true); @@ -4189,7 +4189,7 @@ void SpatialEditorPlugin::edit(Object *p_object) { } bool SpatialEditorPlugin::handles(Object *p_object) const { - + return p_object->is_type("Spatial"); } @@ -4223,7 +4223,7 @@ void SpatialEditorPlugin::snap_cursor_to_plane(const Plane& p_plane) { SpatialEditorPlugin::SpatialEditorPlugin(EditorNode *p_node) { - + editor=p_node; spatial_editor = memnew( SpatialEditor(p_node) ); spatial_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL); @@ -4238,7 +4238,7 @@ SpatialEditorPlugin::SpatialEditorPlugin(EditorNode *p_node) { SpatialEditorPlugin::~SpatialEditorPlugin() { - + } diff --git a/tools/editor/plugins/spatial_editor_plugin.h b/tools/editor/plugins/spatial_editor_plugin.h index af1b6919a..54086b003 100644 --- a/tools/editor/plugins/spatial_editor_plugin.h +++ b/tools/editor/plugins/spatial_editor_plugin.h @@ -278,7 +278,7 @@ public: }; class SpatialEditor : public VBoxContainer { - + OBJ_TYPE(SpatialEditor, VBoxContainer ); public: @@ -338,7 +338,7 @@ private: Ref<Mesh> selection_box; RID indicators; - RID indicators_instance; + RID indicators_instance; RID cursor_mesh; RID cursor_instance; RID indicator_mat; @@ -352,7 +352,7 @@ private: Spatial *sp; RID poly_instance; }; - + Map<uint32_t,Selected> selected; */ struct Gizmo { @@ -361,8 +361,8 @@ private: float scale; Transform transform; } gizmo; - - + + enum MenuOption { @@ -471,7 +471,7 @@ private: void _update_default_light_angle(); void _default_light_angle_input(const InputEvent& p_event); -protected: +protected: @@ -481,7 +481,7 @@ protected: void _unhandled_key_input(InputEvent p_event); static void _bind_methods(); -public: +public: static SpatialEditor *get_singleton() { return singleton; } @@ -541,9 +541,9 @@ public: }; class SpatialEditorPlugin : public EditorPlugin { - + OBJ_TYPE( SpatialEditorPlugin, EditorPlugin ); - + SpatialEditor *spatial_editor; EditorNode *editor; protected: @@ -555,7 +555,7 @@ public: SpatialEditor *get_spatial_editor() { return spatial_editor; } virtual String get_name() const { return "3D"; } bool has_main_screen() const { return true; } - virtual void make_visible(bool p_visible); + virtual void make_visible(bool p_visible); virtual void edit(Object *p_object); virtual bool handles(Object *p_object) const; |
