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
EditorProperty* are bound but are not recognized within Editor #24042
Comments
No need to open two issues. I'll close the former. |
Sorry about that, thought it could be considered a different problem all together! |
This is still the issue in Godot 3.1 beta 11 e930fb9 |
Well now that I look at this issue again I don't think exposing all the @akien-mga btw don't know if you think it is better to close this thread and make a new one, that is more based on the |
Lets consider a trivial use case:
Lets say we implement a quick editor plugin to add this "custom" inspector. We can currently do this by extending
But this currently doesn't work. So the issues I see currently:
Possible solutions (options) I see (not mutually exclusive):
P.S.: Sorry for the long comment, just seems like a pretty complex issue. |
Another option I thought of: |
this can be done really easily without exposing all of the
this way you wouldn't need to expose all the classes just use for example a static method that will return a so it's just necessary to make a EditorProperty static method exposed to the Editor... or even make the method exposed in the EditorInspectorPlugin, it makes more sense |
@xDGameStudios I agree, there is no need of exposing the concrete implementation classes. Static method in |
The problem with this is that in the source code the |
@xDGameStudios ok, then I guess we go with the static factory method in |
@xDGameStudios, @reduz, @akien-mga So instead I'm thinking of implementing a separate class
Any thoughts regarding this? (Also, not sure if this is a proper place for the engine development questions, but I thought its easier to ask here within the context of this issue)
As I understand such functions do exist in |
I've already tried this before and the only workaround I found was to expect a dictionary from the GDScript side with the correct key values :) |
@xDGameStudios Yea, as a workaround dictionary would work, of course. But it is not in line with other APIs, so would not look good. But the weird part is that I can actually compile it with 5 arguments like this:
But not with 6 arguments:
And I do think this function needs 6 arguments to be in line with the method signature of EditorInspectorPlugin#parse_property(). Also this way we can assign I think this can be useful if we create a new E.g:
|
I understand the usage as I said I have already implemented this before and it works... but I used a dictionary because there is no support for exposing methods with more than 5 arguments to the Scripting API.. and since no one seemed interested in the idea.. I kind of left it on the side... and didn't made the PR myself :) |
Are there any updates on this? I found myself replicating nodes from the source just to make this (and some more complex usages than just categories) For future reference, seems like is mentioned here: godotengine/godot-proposals#300 |
Godot version:
v3.1.alpha.calinou.a8a92ec
OS/device including version:
OSX Mojave
Issue description:
Posted a while back referring to EditorProperty, being broke #24032 but it seems that it's not the only one. This time the problem seems to be that this classes are not begin recognized inside the editor.
Even though EditorPropertyResource, EditorPropertyInteger, EditorPropertyColor.... they have bound methods and events and everything else but are not recognized within editor and cannot be instantiated.
Steps to reproduce:
try to create any of these:
EditorPropertyResource.new();
EditorPropertyInteger.new();
EditorPropertyColor.new();
doesn't compile!!
The text was updated successfully, but these errors were encountered: