diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-06-06 22:06:58 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-06-06 22:06:58 -0300 |
commit | b524b40fdc5325c840192ce92dbed8108ccef2d9 (patch) | |
tree | ec7f74db082b4b91f7614ed4391c53bc73b60bfd /tools/editor/plugins | |
parent | 14c4c1b568ffa40a179332fbc77e9b52c6bdf514 (diff) |
-fixed many memory initialization issues
-fixed deadlock on previews thread
-fixed compilation errors on unix
Diffstat (limited to 'tools/editor/plugins')
6 files changed, 17 insertions, 3 deletions
diff --git a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp index a533c6aa1e..8eea723126 100644 --- a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp +++ b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp @@ -380,6 +380,7 @@ void CollisionPolygon2DEditor::_bind_methods() { CollisionPolygon2DEditor::CollisionPolygon2DEditor(EditorNode *p_editor) { + node=NULL; canvas_item_editor=NULL; editor=p_editor; undo_redo = editor->get_undo_redo(); diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_editor_plugin.cpp index de40727f1b..381cfd74ab 100644 --- a/tools/editor/plugins/collision_polygon_editor_plugin.cpp +++ b/tools/editor/plugins/collision_polygon_editor_plugin.cpp @@ -533,6 +533,7 @@ void CollisionPolygonEditor::_bind_methods() { CollisionPolygonEditor::CollisionPolygonEditor(EditorNode *p_editor) { + node=NULL; editor=p_editor; undo_redo = editor->get_undo_redo(); diff --git a/tools/editor/plugins/editor_preview_plugins.cpp b/tools/editor/plugins/editor_preview_plugins.cpp index 9532c6b9e9..a77ba9a605 100644 --- a/tools/editor/plugins/editor_preview_plugins.cpp +++ b/tools/editor/plugins/editor_preview_plugins.cpp @@ -63,14 +63,15 @@ EditorTexturePreviewPlugin::EditorTexturePreviewPlugin() { Ref<Texture> EditorPackedScenePreviewPlugin::_gen_from_imd(Ref<ResourceImportMetadata> p_imd) { - if (p_imd.is_null()) + if (p_imd.is_null()) { return Ref<Texture>(); + } if (!p_imd->has_option("thumbnail")) return Ref<Texture>(); Variant tn = p_imd->get_option("thumbnail"); - print_line(Variant::get_type_name(tn.get_type())); + //print_line(Variant::get_type_name(tn.get_type())); DVector<uint8_t> thumbnail = tn; int len = thumbnail.size(); diff --git a/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp b/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp index bf882857d9..757b5327dd 100644 --- a/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp +++ b/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp @@ -411,6 +411,7 @@ void LightOccluder2DEditor::_bind_methods() { LightOccluder2DEditor::LightOccluder2DEditor(EditorNode *p_editor) { + node=NULL; canvas_item_editor=NULL; editor=p_editor; undo_redo = editor->get_undo_redo(); diff --git a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp index bc15741d0f..fa1f614413 100644 --- a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp +++ b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp @@ -459,7 +459,7 @@ void NavigationPolygonEditor::_bind_methods() { } NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor) { - + node=NULL; canvas_item_editor=NULL; editor=p_editor; undo_redo = editor->get_undo_redo(); diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index 0b3f3e0626..77663f39c0 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -2216,6 +2216,14 @@ void SpatialEditorViewport::reset() { SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, EditorNode *p_editor, int p_index) { + _edit.mode=TRANSFORM_NONE; + _edit.plane=TRANSFORM_VIEW; + _edit.edited_gizmo=0; + _edit.snap=1; + _edit.gizmo_handle=0; + + + index=p_index; editor=p_editor; editor_selection=editor->get_editor_selection();; @@ -3615,6 +3623,8 @@ void SpatialEditor::_default_light_angle_input(const InputEvent& p_event) { SpatialEditor::SpatialEditor(EditorNode *p_editor) { + gizmo.visible=true; + gizmo.scale=1.0; viewport_environment = Ref<Environment>( memnew( Environment ) ); undo_redo=p_editor->get_undo_redo(); |