summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp2
-rw-r--r--editor/plugins/particles_2d_editor_plugin.cpp13
-rw-r--r--editor/plugins/particles_editor_plugin.cpp42
-rw-r--r--editor/plugins/particles_editor_plugin.h1
4 files changed, 2 insertions, 56 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 3ab8f318a7..f04bc04d92 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -340,7 +340,7 @@ void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int
} break;
case HTTPRequest::RESULT_REQUEST_FAILED: {
error_text = TTR("Request failed, return code:") + " " + itos(p_code);
- status->set_text(TTR("Req. Failed."));
+ status->set_text(TTR("Request Failed."));
} break;
case HTTPRequest::RESULT_REDIRECT_LIMIT_REACHED: {
error_text = TTR("Request failed, too many redirects");
diff --git a/editor/plugins/particles_2d_editor_plugin.cpp b/editor/plugins/particles_2d_editor_plugin.cpp
index 5eaa248224..ff8a9f93d6 100644
--- a/editor/plugins/particles_2d_editor_plugin.cpp
+++ b/editor/plugins/particles_2d_editor_plugin.cpp
@@ -77,11 +77,6 @@ void Particles2DEditorPlugin::_menu_callback(int p_idx) {
case MENU_CLEAR_EMISSION_MASK: {
emission_mask->popup_centered_minsize();
-
- /*undo_redo->create_action(TTR("Clear Emission Mask"));
- undo_redo->add_do_method(particles, "set_emission_points", PoolVector<Vector2>());
- undo_redo->add_undo_method(particles, "set_emission_points", particles->get_emission_points());
- undo_redo->commit_action();*/
} break;
}
}
@@ -309,14 +304,6 @@ void Particles2DEditorPlugin::_generate_emission_mask() {
} else {
pm->set_emission_shape(ParticlesMaterial::EMISSION_SHAPE_POINTS);
}
-
- /*undo_redo->create_action(TTR("Set Emission Mask"));
- undo_redo->add_do_method(particles, "set_emission_points", epoints);
- undo_redo->add_do_method(particles, "set_emission_half_extents", extents);
- undo_redo->add_undo_method(particles, "set_emission_points", particles->get_emission_points());
- undo_redo->add_undo_method(particles, "set_emission_half_extents", particles->get_emission_half_extents());
- undo_redo->commit_action();
- */
}
void Particles2DEditorPlugin::_notification(int p_what) {
diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp
index f4a9960087..52eba099c6 100644
--- a/editor/plugins/particles_editor_plugin.cpp
+++ b/editor/plugins/particles_editor_plugin.cpp
@@ -40,11 +40,6 @@ void ParticlesEditor::_node_removed(Node *p_node) {
}
}
-void ParticlesEditor::_resource_seleted(const String &p_res) {
-
- //print_line("selected resource path: "+p_res);
-}
-
void ParticlesEditor::_node_selected(const NodePath &p_path) {
Node *sel = get_node(p_path);
@@ -84,23 +79,6 @@ void ParticlesEditor::_node_selected(const NodePath &p_path) {
emission_dialog->popup_centered(Size2(300, 130));
}
-/*
-
-void ParticlesEditor::_populate() {
-
- if(!node)
- return;
-
-
- if (node->get_particles().is_null())
- return;
-
- node->get_particles()->set_instance_count(populate_amount->get_text().to_int());
- node->populate_parent(populate_rotate_random->get_val(),populate_tilt_random->get_val(),populate_scale_random->get_text().to_double(),populate_scale->get_text().to_double());
-
-}
-*/
-
void ParticlesEditor::_notification(int p_notification) {
if (p_notification == NOTIFICATION_ENTER_TREE) {
@@ -132,13 +110,7 @@ void ParticlesEditor::_menu_option(int p_option) {
EditorNode::get_singleton()->show_warning(TTR("A processor material of type 'ParticlesMaterial' is required."));
return;
}
- /*
- Node *root = get_scene()->get_root_node();
- ERR_FAIL_COND(!root);
- EditorNode *en = Object::cast_to<EditorNode>(root);
- ERR_FAIL_COND(!en);
- Node * node = en->get_edited_scene();
-*/
+
emission_tree_dialog->popup_centered_ratio();
} break;
@@ -365,20 +337,14 @@ void ParticlesEditor::_generate_emission_points() {
material->set_emission_point_count(point_count);
material->set_emission_point_texture(tex);
}
-
- //print_line("point count: "+itos(points.size()));
- //node->set_emission_points(points);
}
void ParticlesEditor::_bind_methods() {
ClassDB::bind_method("_menu_option", &ParticlesEditor::_menu_option);
- ClassDB::bind_method("_resource_seleted", &ParticlesEditor::_resource_seleted);
ClassDB::bind_method("_node_selected", &ParticlesEditor::_node_selected);
ClassDB::bind_method("_generate_emission_points", &ParticlesEditor::_generate_emission_points);
ClassDB::bind_method("_generate_aabb", &ParticlesEditor::_generate_aabb);
-
- //ClassDB::bind_method("_populate",&ParticlesEditor::_populate);
}
ParticlesEditor::ParticlesEditor() {
@@ -394,8 +360,6 @@ ParticlesEditor::ParticlesEditor() {
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Create Emission Points From Mesh"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH);
options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
- // options->get_popup()->add_item(TTR("Clear Emitter"), MENU_OPTION_CLEAR_EMISSION_VOLUME);
-
options->get_popup()->connect("id_pressed", this, "_menu_option");
emission_dialog = memnew(ConfirmationDialog);
@@ -420,7 +384,6 @@ ParticlesEditor::ParticlesEditor() {
emission_dialog->connect("confirmed", this, "_generate_emission_points");
err_dialog = memnew(ConfirmationDialog);
- //err_dialog->get_cancel()->hide();
add_child(err_dialog);
emission_file_dialog = memnew(EditorFileDialog);
@@ -454,9 +417,6 @@ ParticlesEditor::ParticlesEditor() {
add_child(generate_aabb);
generate_aabb->connect("confirmed", this, "_generate_aabb");
-
- //options->set_anchor(MARGIN_LEFT,Control::ANCHOR_END);
- //options->set_anchor(MARGIN_RIGHT,Control::ANCHOR_END);
}
void ParticlesEditorPlugin::edit(Object *p_object) {
diff --git a/editor/plugins/particles_editor_plugin.h b/editor/plugins/particles_editor_plugin.h
index 2c8ce88eb2..a65538c7fa 100644
--- a/editor/plugins/particles_editor_plugin.h
+++ b/editor/plugins/particles_editor_plugin.h
@@ -73,7 +73,6 @@ class ParticlesEditor : public Control {
void _generate_aabb();
void _generate_emission_points();
- void _resource_seleted(const String &p_res);
void _node_selected(const NodePath &p_path);
void _menu_option(int);