Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PluginConfigDialog. #19837

Merged
merged 1 commit into from
Aug 15, 2018
Merged

Conversation

willnationsdev
Copy link
Contributor

Here are a host of small changes that were all part of #19778. Someone please let me know which parts of this people wanna discard, and of those remaining, which ones I should merge into single commits (or if I should just roll all of these commits up into one, etc.).

@swarnimarun
Copy link
Contributor

swarnimarun commented Jun 29, 2018

Nice work atleast you didn't give up I know I would have.
I would love a number of these changes.

@reduz
Copy link
Member

reduz commented Jun 29, 2018

As I mentioned before, most of those are solutions in search of problems, or things that need a lot more discussion. We can leave this open and eventually discuss this stuff when time comes

@willnationsdev
Copy link
Contributor Author

willnationsdev commented Jun 29, 2018

@reduz, well, true, in their current state, the majority of these just give answers to a now nonexistent set of problems (most deal with problems I encountered while building my own changes).

The ones that are more usability-focused that solve real issues are...

  1. The GDScript can_instance method taking into account the presence of a can_instance method on the GDScriptInstance - applicable to the existing custom type system...I think? (Edit: pretty sure this can be used anywhere since it'll check the can_instance method when deciding whether to instance the script. So it isn't just for custom types).
  2. Rebuilding documentation tool. Creates a simplified GUI for something that usually must be done on the command line.
  3. The PluginCreateDialog and it's related changes create a simplified GUI for editing plugin configs which previously required direct text editing. It also makes it possible to generate files for creating a plugin.

Everything else most certainly addresses no-longer-existing problems.

@willnationsdev
Copy link
Contributor Author

willnationsdev commented Jun 29, 2018

If people like the PluginCreateDialog idea, I can move it into a different PR to be merged while the others are in limbo / discussed. Or if you just wanna wait on them all, that's fine too. I'll be around, so let me know. 👍

(I trimmed the PR so only the significant stuff remains for discussion)

@willnationsdev willnationsdev force-pushed the plugin-utilities branch 2 times, most recently from a54afc0 to 8a8fd94 Compare June 29, 2018 19:22
@Zylann
Copy link
Contributor

Zylann commented Jun 29, 2018

I like the PluginCreateDialog. In fact I was thinking about PR-ing one, since it is useful, saves time, improves discoverability and shipping it as a plugin itself is awkward.

@willnationsdev
Copy link
Contributor Author

willnationsdev commented Jul 4, 2018

Should I just extract the PluginCreateDialog into its own PR, or leave it in here, assuming people will discuss the usefulness of the docs rebuild / abstract GDScript commits?

@@ -5032,6 +5039,7 @@ EditorNode::EditorNode() {
p->add_child(tool_menu);
p->add_submenu_item(TTR("Tools"), "Tools");
tool_menu->add_item(TTR("Orphan Resource Explorer"), TOOLS_ORPHAN_RESOURCES);
tool_menu->add_item(TTR("Rebuild Documentation"), TOOLS_RELOAD_DOCS);
Copy link
Member

@akien-mga akien-mga Jul 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the point of this feature.

Rebuilding documentation is only relevant when you made code changes and compiled them, and since that usually happens on the command line, it's much easier to run --doctool directly.

It's even more wrong if you're using the official Godot binary, as it's not in bin/ next to the doc/ directory as your feature hardcodes it, so it will just dump a full documentation tree in an unexpected location in ../doc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the idea (at the time) was to be able to have the doctool generate content for XML files in your project folder / plugin folders too. Combined with the ability to generate XML files from a Script, this would allow you to create in-engine documentation for the scripts in your project. And in a case like that, being able to easily rebuild stuff from the editor would be useful.

However, it's a fair point that all of that is predicated on features that aren't even implemented yet (script-based XML generation, generating docs from local files rather than just the godot repo).

I can go ahead and remove it from this PR.

#ifndef PLUGIN_CREATE_DIALOG_H
#define PLUGIN_CREATE_DIALOG_H

#include "../scene/gui/check_box.h"
Copy link
Member

@akien-mga akien-mga Jul 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use relative paths, the root folder is already in the include path so you can do #include "scene/gui/check_box.h".

if (E) {

if (!E->get()->is_static()) {
WARN_PRINT(String("Can't call non-static function: 'can_instance' in script.").utf8().get_data());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI, you could use WARN_PRINTS("Can't call non-static function: 'can_instance' in script."); directly.

@willnationsdev willnationsdev force-pushed the plugin-utilities branch 3 times, most recently from 05664a7 to 52e6c83 Compare July 19, 2018 15:34
@willnationsdev willnationsdev changed the title TypeDB-salvaged plugin and editor utilities. Add PluginConfigDialog. Jul 26, 2018
@willnationsdev
Copy link
Contributor Author

Since I never mentioned it, this PR has been redesigned so that it's just the PluginConfigDialog changes. Should be good to go.

@akien-mga akien-mga merged commit 2f20836 into godotengine:master Aug 15, 2018
@akien-mga
Copy link
Member

Thanks!

@willnationsdev willnationsdev deleted the plugin-utilities branch September 23, 2018 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants