diff options
-rw-r--r-- | doc/base/classes.xml | 10 | ||||
-rw-r--r-- | platform/android/export/export.cpp | 2 | ||||
-rw-r--r-- | platform/bb10/export/export.cpp | 2 | ||||
-rw-r--r-- | platform/javascript/export/export.cpp | 2 | ||||
-rw-r--r-- | platform/osx/export/export.cpp | 2 | ||||
-rw-r--r-- | scene/animation/animation_tree_player.cpp | 90 | ||||
-rw-r--r-- | scene/animation/animation_tree_player.h | 8 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 54 | ||||
-rw-r--r-- | scene/gui/text_edit.h | 3 | ||||
-rw-r--r-- | tools/editor/editor_import_export.cpp | 45 | ||||
-rw-r--r-- | tools/editor/editor_import_export.h | 15 | ||||
-rw-r--r-- | tools/editor/editor_node.cpp | 5 | ||||
-rw-r--r-- | tools/editor/editor_node.h | 1 | ||||
-rw-r--r-- | tools/editor/plugins/animation_tree_editor_plugin.cpp | 52 | ||||
-rw-r--r-- | tools/editor/project_export.cpp | 11 | ||||
-rw-r--r-- | tools/editor/project_export.h | 1 |
16 files changed, 228 insertions, 75 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 1c555bb944..68d5b3e071 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -3029,6 +3029,16 @@ <description> </description> </method> + <method name="animation_node_set_filter_path"> + <argument index="0" name="id" type="String"> + </argument> + <argument index="1" name="path" type="NodePath"> + </argument> + <argument index="2" name="enable" type="bool"> + </argument> + <description> + </description> + </method> <method name="oneshot_node_set_fadein_time"> <argument index="0" name="id" type="String"> </argument> diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 60f4e61c68..bd63cadc57 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -251,7 +251,7 @@ public: virtual String get_device_info(int p_device) const; virtual Error run(int p_device,int p_flags=0); - virtual bool requieres_password(bool p_debug) const { return !p_debug; } + virtual bool requires_password(bool p_debug) const { return !p_debug; } virtual String get_binary_extension() const { return "apk"; } virtual Error export_project(const String& p_path, bool p_debug, int p_flags=0); diff --git a/platform/bb10/export/export.cpp b/platform/bb10/export/export.cpp index a17c4cb134..da3a958a56 100644 --- a/platform/bb10/export/export.cpp +++ b/platform/bb10/export/export.cpp @@ -69,7 +69,7 @@ public: virtual String get_device_info(int p_device) const; virtual Error run(int p_device,int p_flags=0); - virtual bool requieres_password(bool p_debug) const { return !p_debug; } + virtual bool requires_password(bool p_debug) const { return !p_debug; } virtual String get_binary_extension() const { return "bar"; } virtual Error export_project(const String& p_path,bool p_debug,int p_flags=0); diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp index e055aeea56..de57d770c4 100644 --- a/platform/javascript/export/export.cpp +++ b/platform/javascript/export/export.cpp @@ -86,7 +86,7 @@ public: virtual String get_device_info(int p_device) const { return "Run exported HTML in the system's default browser."; } virtual Error run(int p_device,int p_flags=0); - virtual bool requieres_password(bool p_debug) const { return false; } + virtual bool requires_password(bool p_debug) const { return false; } virtual String get_binary_extension() const { return "html"; } virtual Error export_project(const String& p_path,bool p_debug,int p_flags=0); diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index 0bece6ec76..3bc4ebdb1a 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -59,7 +59,7 @@ public: virtual String get_device_info(int p_device) const { return String(); } virtual Error run(int p_device,int p_flags=0); - virtual bool requieres_password(bool p_debug) const { return false; } + virtual bool requires_password(bool p_debug) const { return false; } virtual String get_binary_extension() const { return "zip"; } virtual Error export_project(const String& p_path,bool p_debug,int p_flags=0); diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp index c732dd54cf..211c5961b0 100644 --- a/scene/animation/animation_tree_player.cpp +++ b/scene/animation/animation_tree_player.cpp @@ -139,6 +139,11 @@ bool AnimationTreePlayer::_set(const StringName& p_name, const Variant& p_value) animation_node_set_master_animation(id,node.get_valid("from")); else animation_node_set_animation(id,node.get_valid("animation")); + Array filters= node.get_valid("filter"); + for(int i=0;i<filters.size();i++) { + + animation_node_set_filter_path(id,filters[i],true); + } } break; case NODE_ONESHOT: { @@ -276,6 +281,15 @@ bool AnimationTreePlayer::_get(const StringName& p_name,Variant &r_ret) const { } else { node["animation"]=an->animation; } + Array k; + List<NodePath> keys; + an->filter.get_key_list(&keys); + k.resize(keys.size()); + int i=0; + for(List<NodePath>::Element *E=keys.front();E;E=E->next()) { + k[i++]=E->get(); + } + node["filter"]=k; } break; case NODE_ONESHOT: { OneShotNode *osn = static_cast<OneShotNode*>(n); @@ -439,7 +453,6 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode //transform to seconds... - switch(nb->type) { case NODE_OUTPUT: { @@ -464,7 +477,7 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode an->time=p_time; an->step=0; } else { - an->time+=p_time; + an->time=MAX(0,an->time+p_time); an->step=p_time; } @@ -482,14 +495,12 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode an->skip=true; for (List<AnimationNode::TrackRef>::Element *E=an->tref.front();E;E=E->next()) { - - if (p_filter && p_filter->has(an->animation->track_get_path(E->get().local_track))) { - - if (p_reverse_weight<0) - E->get().weight=0; - else - E->get().weight=p_reverse_weight; - + NodePath track_path = an->animation->track_get_path(E->get().local_track); + if (p_filter && p_filter->has(track_path)) { + E->get().weight = MAX(0, p_reverse_weight); + } else if(an->filter.has(track_path)) { + E->get().weight = 0; + E->get().track->skip = true; } else { E->get().weight=p_weight; } @@ -552,18 +563,17 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode float main_rem; float os_rem; + float os_reverse_weight = p_reverse_weight; if (!osn->filter.empty()) { - - main_rem = _process_node(osn->inputs[0].node,r_prev_anim,(osn->mix?p_weight:p_weight*(1.0-blend)),p_time,p_seek,&osn->filter,p_weight); - os_rem = _process_node(osn->inputs[1].node,r_prev_anim,p_weight*blend,p_time,os_seek,&osn->filter,-1); - - } else { - - main_rem = _process_node(osn->inputs[0].node,r_prev_anim,(osn->mix?p_weight:p_weight*(1.0-blend)),p_time,p_seek); - os_rem = _process_node(osn->inputs[1].node,r_prev_anim,p_weight*blend,p_time,os_seek); + p_filter = &osn->filter; + p_reverse_weight = p_weight; + os_reverse_weight = -1; } + main_rem = _process_node(osn->inputs[0].node,r_prev_anim,(osn->mix?p_weight:p_weight*(1.0-blend)),p_time,p_seek,p_filter,p_reverse_weight); + os_rem = _process_node(osn->inputs[1].node,r_prev_anim,p_weight*blend,p_time,os_seek,p_filter,os_reverse_weight); + if (osn->start) { osn->remaining=os_rem; osn->start=false; @@ -768,6 +778,8 @@ void AnimationTreePlayer::_process_animation(float p_delta) { t.value = t.object->get(t.property); t.value.zero(); + + t.skip = false; } @@ -816,16 +828,9 @@ void AnimationTreePlayer::_process_animation(float p_delta) { if (a->value_track_is_continuous(tr.local_track)) { Variant value = a->value_track_interpolate(tr.local_track,anim_list->time); Variant::blend(tr.track->value,value,blend,tr.track->value); - tr.track->object->set(tr.track->property,tr.track->value); } else { - - List<int> indices; - a->value_track_get_key_indices(tr.local_track,anim_list->time,anim_list->step,&indices); - for(List<int>::Element *E=indices.front();E;E=E->next()) { - - Variant value = a->track_get_key_value(tr.local_track,E->get()); - tr.track->object->set(tr.track->property,value); - } + int index = a->track_find_key(tr.local_track,anim_list->time); + tr.track->value = a->track_get_key_value(tr.local_track, index); } } break; case Animation::TYPE_METHOD: { ///< Call any method on a specific node. @@ -854,11 +859,13 @@ void AnimationTreePlayer::_process_animation(float p_delta) { Track &t = E->get(); - if (!t.object) + if (t.skip || !t.object) continue; - if(t.property) // value track; was applied in step 2 + if(t.property) { // value track + t.object->set(t.property,t.value); continue; + } Transform xform; xform.basis=t.rot; @@ -983,6 +990,24 @@ void AnimationTreePlayer::animation_node_set_master_animation(const StringName& } +void AnimationTreePlayer::animation_node_set_filter_path(const StringName& p_node,const NodePath& p_track_path,bool p_filter) { + + GET_NODE( NODE_ANIMATION, AnimationNode ); + + if (p_filter) + n->filter[p_track_path]=true; + else + n->filter.erase(p_track_path); + +} + +void AnimationTreePlayer::animation_node_set_get_filtered_paths(const StringName& p_node,List<NodePath> *r_paths) const{ + + GET_NODE( NODE_ANIMATION, AnimationNode ); + + n->filter.get_key_list(r_paths); +} + void AnimationTreePlayer::oneshot_node_set_fadein_time(const StringName& p_node,float p_time) { GET_NODE( NODE_ONESHOT, OneShotNode ); @@ -1210,6 +1235,12 @@ String AnimationTreePlayer::animation_node_get_master_animation(const StringName } +bool AnimationTreePlayer::animation_node_is_path_filtered(const StringName& p_node,const NodePath& p_path) const { + + GET_NODE_V(NODE_ANIMATION, AnimationNode, 0 ); + return n->filter.has(p_path); +} + float AnimationTreePlayer::oneshot_node_get_fadein_time(const StringName& p_node) const { @@ -1750,6 +1781,7 @@ void AnimationTreePlayer::_bind_methods() { ObjectTypeDB::bind_method(_MD("animation_node_set_master_animation","id","source"),&AnimationTreePlayer::animation_node_set_master_animation); ObjectTypeDB::bind_method(_MD("animation_node_get_master_animation","id"),&AnimationTreePlayer::animation_node_get_master_animation); + ObjectTypeDB::bind_method(_MD("animation_node_set_filter_path","id","path","enable"),&AnimationTreePlayer::animation_node_set_filter_path); ObjectTypeDB::bind_method(_MD("oneshot_node_set_fadein_time","id","time_sec"),&AnimationTreePlayer::oneshot_node_set_fadein_time); ObjectTypeDB::bind_method(_MD("oneshot_node_get_fadein_time","id"),&AnimationTreePlayer::oneshot_node_get_fadein_time); diff --git a/scene/animation/animation_tree_player.h b/scene/animation/animation_tree_player.h index 2e44d69aa1..0e78281e4c 100644 --- a/scene/animation/animation_tree_player.h +++ b/scene/animation/animation_tree_player.h @@ -111,6 +111,7 @@ private: Variant value; + bool skip; }; @@ -162,6 +163,9 @@ private: float step; String from; bool skip; + + HashMap<NodePath,bool> filter; + AnimationNode() { type=NODE_ANIMATION; next=NULL; last_version=0; skip=false; } }; @@ -310,6 +314,10 @@ public: void animation_node_set_master_animation(const StringName& p_node,const String& p_master_animation); String animation_node_get_master_animation(const StringName& p_node) const; + void animation_node_set_filter_path(const StringName& p_node,const NodePath& p_filter,bool p_enable); + void animation_node_set_get_filtered_paths(const StringName& p_node,List<NodePath> *r_paths) const; + bool animation_node_is_path_filtered(const StringName& p_node,const NodePath& p_path) const; + /* ONE SHOT NODE */ void oneshot_node_set_fadein_time(const StringName& p_node,float p_time); diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index f7461a736c..41d546c6f7 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -2057,7 +2057,17 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { scancode_handled=false; break; } -#ifdef APPLE_STYLE_KEYS +#ifndef APPLE_STYLE_KEYS + if (k.mod.command) { + _scroll_lines_up(); + break; + } +#else + if (k.mod.command && k.mod.alt) { + _scroll_lines_up(); + break; + } + if (k.mod.command) cursor_set_line(0); else @@ -2084,7 +2094,17 @@ void TextEdit::_input_event(const InputEvent& p_input_event) { scancode_handled=false; break; } -#ifdef APPLE_STYLE_KEYS +#ifndef APPLE_STYLE_KEYS + if (k.mod.command) { + _scroll_lines_down(); + break; + } +#else + if (k.mod.command && k.mod.alt) { + _scroll_lines_down(); + break; + } + if (k.mod.command) cursor_set_line(text.size()-1); else @@ -2498,6 +2518,36 @@ void TextEdit::_post_shift_selection() { selection.selecting_text=true; } +void TextEdit::_scroll_lines_up() { + // adjust the vertical scroll + if (get_v_scroll() > 0) { + set_v_scroll(get_v_scroll() - 1); + } + + // adjust the cursor + if (cursor_get_line() >= (get_visible_rows() + get_v_scroll()) && !selection.active) { + cursor_set_line((get_visible_rows() + get_v_scroll()) - 1, false); + } +} + +void TextEdit::_scroll_lines_down() { + // calculate the maximum vertical scroll position + int max_v_scroll = get_line_count() - 1; + if (!scroll_past_end_of_file_enabled) { + max_v_scroll -= get_visible_rows() - 1; + } + + // adjust the vertical scroll + if (get_v_scroll() < max_v_scroll) { + set_v_scroll(get_v_scroll() + 1); + } + + // adjust the cursor + if ((cursor_get_line()) <= get_v_scroll() - 1 && !selection.active) { + cursor_set_line(get_v_scroll(), false); + } +} + /**** TEXT EDIT CORE API ****/ void TextEdit::_base_insert_text(int p_line, int p_char,const String& p_text,int &r_end_line,int &r_end_column) { diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index 09c2a4d729..193dd236d1 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -259,6 +259,9 @@ class TextEdit : public Control { void _pre_shift_selection(); void _post_shift_selection(); + void _scroll_lines_up(); + void _scroll_lines_down(); + // void mouse_motion(const Point& p_pos, const Point& p_rel, int p_button_mask); Size2 get_minimum_size(); diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp index e02ffd337b..bdf1726d85 100644 --- a/tools/editor/editor_import_export.cpp +++ b/tools/editor/editor_import_export.cpp @@ -294,6 +294,39 @@ static void _remove_filter_from_list(Set<StringName>& r_list,const String& p_fil _edit_filter_list(r_list,p_filter,true); } +bool EditorExportPlatform::_set(const StringName& p_name, const Variant& p_value) { + + String n = p_name; + + if (n=="debug/debugging_enabled") { + set_debugging_enabled(p_value); + } else { + return false; + } + + return true; + +} + +bool EditorExportPlatform::_get(const StringName& p_name,Variant &r_ret) const { + + String n = p_name; + + if (n=="debug/debugging_enabled") { + r_ret=is_debugging_enabled(); + } else { + return false; + } + + return true; + +} + +void EditorExportPlatform::_get_property_list( List<PropertyInfo> *p_list) const { + + p_list->push_front( PropertyInfo( Variant::BOOL, "debug/debugging_enabled")); +} + Vector<uint8_t> EditorExportPlatform::get_exported_file_default(String& p_fname) const { FileAccess *f = FileAccess::open(p_fname,FileAccess::READ); @@ -481,8 +514,15 @@ bool EditorExportPlatform::exists_export_template(String template_file_name, Str +bool EditorExportPlatform::is_debugging_enabled() const { + + return debugging_enabled; +} +void EditorExportPlatform::set_debugging_enabled(bool p_enabled) { + debugging_enabled = p_enabled; +} bool EditorExportPlatformPC::_set(const StringName& p_name, const Variant& p_value) { @@ -1260,6 +1300,11 @@ Error EditorExportPlatform::save_pack(FileAccess *dst,bool p_make_bundles, int p return OK; } +EditorExportPlatform::EditorExportPlatform() { + + debugging_enabled = true; +} + Error EditorExportPlatformPC::export_project(const String& p_path, bool p_debug, int p_flags) { diff --git a/tools/editor/editor_import_export.h b/tools/editor/editor_import_export.h index fc8ad58bd9..c131488d18 100644 --- a/tools/editor/editor_import_export.h +++ b/tools/editor/editor_import_export.h @@ -86,8 +86,17 @@ class EditorExportPlatform : public Reference { public: typedef Error (*EditorExportSaveFunction)(void *p_userdata,const String& p_path, const Vector<uint8_t>& p_data,int p_file,int p_total); + +private: + + bool debugging_enabled; + protected: + bool _set(const StringName& p_name, const Variant& p_value); + bool _get(const StringName& p_name,Variant &r_ret) const; + void _get_property_list( List<PropertyInfo> *p_list) const; + Vector<uint8_t> get_exported_file_default(String& p_fname) const; virtual Vector<uint8_t> get_exported_file(String& p_fname) const; virtual Vector<StringName> get_dependencies(bool p_bundles) const; @@ -145,6 +154,8 @@ public: EXPORT_VIEW_NAVIGATION=16, }; + bool is_debugging_enabled() const; + void set_debugging_enabled( bool p_enabled ); Error export_project_files(EditorExportSaveFunction p_func, void* p_udata,bool p_make_bundles); @@ -164,11 +175,11 @@ public: virtual bool can_export(String *r_error=NULL) const=0; - virtual bool requieres_password(bool p_debug) const { return false; } + virtual bool requires_password(bool p_debug) const { return false; } virtual String get_binary_extension() const=0; virtual Error export_project(const String& p_path,bool p_debug,int p_flags=0)=0; - EditorExportPlatform() {}; + EditorExportPlatform(); }; class EditorExportPlatformPC : public EditorExportPlatform { diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 316485f42a..e556a26d7a 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -6011,11 +6011,6 @@ EditorNode::EditorNode() { - file_export_check = memnew( CheckButton ); - file_export_check->set_text("Enable Debugging"); - file_export_check->set_pressed(true); - file_export_check->connect("pressed",this,"_export_debug_toggled"); - file_export->get_vbox()->add_margin_child("Debug:",file_export_check); file_export_password = memnew( LineEdit ); file_export_password->set_secret(true); file_export_password->set_editable(false); diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h index e4939afd34..c3b7a817c5 100644 --- a/tools/editor/editor_node.h +++ b/tools/editor/editor_node.h @@ -299,7 +299,6 @@ private: FileDialog *file_export; FileDialog *file_export_lib; FileDialog *file_script; - CheckButton *file_export_check; CheckButton *file_export_lib_merge; LineEdit *file_export_password; String current_path; diff --git a/tools/editor/plugins/animation_tree_editor_plugin.cpp b/tools/editor/plugins/animation_tree_editor_plugin.cpp index 08c2a1c3ae..7e1214ec83 100644 --- a/tools/editor/plugins/animation_tree_editor_plugin.cpp +++ b/tools/editor/plugins/animation_tree_editor_plugin.cpp @@ -239,8 +239,12 @@ void AnimationTreeEditor::_play_toggled() { void AnimationTreeEditor::_master_anim_menu_item(int p_item) { - String str = master_anim_popup->get_item_text(p_item); - anim_tree->animation_node_set_master_animation(edited_node,str); + if(p_item == 0) _edit_filters(); + else { + + String str = master_anim_popup->get_item_text(p_item); + anim_tree->animation_node_set_master_animation(edited_node,str); + } update(); } @@ -291,6 +295,8 @@ void AnimationTreeEditor::_popup_edit_dialog() { AnimationPlayer *ap = anim_tree->get_node(anim_tree->get_master_player())->cast_to<AnimationPlayer>(); master_anim_popup->clear(); + master_anim_popup->add_item("Edit Filters"); + master_anim_popup->add_separator(); List<StringName> sn; ap->get_animation_list(&sn); sn.sort_custom<StringName::AlphCompare>(); @@ -652,39 +658,35 @@ AnimationTreeEditor::ClickType AnimationTreeEditor::_locate_click(const Point2& float y = pos.y-style->get_offset().height; - if (y<h) - return CLICK_NODE; - y-=h; - - if (y<h) + if (y<2*h) return CLICK_NODE; + y-=2*h; - y-=h; - - int count=0; // title and name int inputs = anim_tree->node_get_input_count(node); - count += inputs?inputs:1; + int count = MAX(inputs,1); - for(int i=0;i<count;i++) { + if (inputs==0 || (pos.x > size.width/2 && type != AnimationTreePlayer::NODE_OUTPUT)) { - if (y<h) { + if (y<count*h) { - if (inputs==0 || ( type!=AnimationTreePlayer::NODE_OUTPUT && pos.x > size.width/2)) { + if (p_slot_index) + *p_slot_index=0; + return CLICK_OUTPUT_SLOT; + } + } - if (p_slot_index) - *p_slot_index=0; - return CLICK_OUTPUT_SLOT; - } else { + for(int i=0;i<count;i++) { - if (p_slot_index) - *p_slot_index=i; - return CLICK_INPUT_SLOT; - } + if (y<h) { + if (p_slot_index) + *p_slot_index=i; + return CLICK_INPUT_SLOT; } y-=h; } - return (type!=AnimationTreePlayer::NODE_OUTPUT && type!=AnimationTreePlayer::NODE_TIMESEEK)?CLICK_PARAMETER:CLICK_NODE; + bool has_parameters = type!=AnimationTreePlayer::NODE_OUTPUT && type!=AnimationTreePlayer::NODE_TIMESEEK; + return has_parameters ? CLICK_PARAMETER : CLICK_NODE; } return CLICK_NONE; @@ -1243,6 +1245,8 @@ void AnimationTreeEditor::_filter_edited() { anim_tree->oneshot_node_set_filter_path(edited_node,ed->get_metadata(0),ed->is_checked(0)); } else if (anim_tree->node_get_type(edited_node)==AnimationTreePlayer::NODE_BLEND2) { anim_tree->blend2_node_set_filter_path(edited_node,ed->get_metadata(0),ed->is_checked(0)); + } else if (anim_tree->node_get_type(edited_node)==AnimationTreePlayer::NODE_ANIMATION) { + anim_tree->animation_node_set_filter_path(edited_node,ed->get_metadata(0),ed->is_checked(0)); } } @@ -1310,6 +1314,8 @@ void AnimationTreeEditor::_edit_filters() { it->set_checked(0, anim_tree->oneshot_node_is_path_filtered(edited_node,E->get())); } else if (anim_tree->node_get_type(edited_node)==AnimationTreePlayer::NODE_BLEND2) { it->set_checked(0, anim_tree->blend2_node_is_path_filtered(edited_node,E->get())); + } else if (anim_tree->node_get_type(edited_node)==AnimationTreePlayer::NODE_ANIMATION) { + it->set_checked(0, anim_tree->animation_node_is_path_filtered(edited_node,E->get())); } pm[E->get()]=it; } diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp index df8ebad08d..199d7646d4 100644 --- a/tools/editor/project_export.cpp +++ b/tools/editor/project_export.cpp @@ -481,7 +481,8 @@ void ProjectExportDialog::_export_action(const String& p_file) { return; String platform = selected->get_metadata(0); - Error err = export_platform(platform,p_file,file_export_check->is_pressed(),file_export_password->get_text(),false); + bool debugging_enabled = EditorImportExport::get_singleton()->get_export_platform(platform)->is_debugging_enabled(); + Error err = export_platform(platform,p_file,debugging_enabled,file_export_password->get_text(),false); if (err!=OK) { error->set_text("Error exporting project!"); error->popup_centered_minsize(); @@ -592,7 +593,7 @@ void ProjectExportDialog::custom_action(const String&) { String extension = exporter->get_binary_extension(); - file_export_password->set_editable( exporter->requieres_password(file_export_check->is_pressed())); + file_export_password->set_editable( exporter->requires_password(exporter->is_debugging_enabled()) ); file_export->clear_filters(); if (extension!="") { @@ -1453,12 +1454,6 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) { file_export->set_title("Export Project"); file_export->connect("file_selected", this,"_export_action"); - file_export_check = memnew( CheckButton ); - file_export_check->set_text("Enable Debugging"); - file_export_check->set_pressed(true); - file_export_check->connect("pressed",this,"_export_debug_toggled"); - file_export->get_vbox()->add_margin_child("Debug:",file_export_check); - file_export_password = memnew( LineEdit ); file_export_password->set_secret(true); file_export_password->set_editable(false); diff --git a/tools/editor/project_export.h b/tools/editor/project_export.h index dc076ce201..8cf2bf3afc 100644 --- a/tools/editor/project_export.h +++ b/tools/editor/project_export.h @@ -86,7 +86,6 @@ private: EditorFileDialog *pck_export; EditorFileDialog *file_export; - CheckButton *file_export_check; LineEdit *file_export_password; Button *button_export; |