0 votes

I'm trying to import a plugin for creating polygons from raster images into Godot 3.0 but I'm getting this error. There was another error which seemed to stem from the plugin being from an earlier build, which was an easy fix, but this one isn't going away. I've looked at the documentation and it seems that EditiorInterface still holds a getbasecontrol ( ) function, which the plugin doesn't overload, so I'm confused as to why this isn't working.

The error before this one was because the plugin was checking to see if the node being handled is a Sprite. Its previous syntax was
return (node extends Sprite)
which I changed to
return (node is Sprite)

Don't think that would be relevant, but just in case it might be.

I'm really stumped.

here's a link to the plugin's repository. The above is the only thing I've done to it, I haven't even imported anything into my project yet because I haven't gotten the thing to load properly.

Thanks for any and all assistance.

asked Nov 30, 2018 in Engine by tyo (42 points)

1 Answer

+1 vote
Best answer

The error means you are trying to call get_base_control on a EditorPlugin. You should be calling it on an EditorInterface: https://docs.godotengine.org/en/3.0/classes/class_editorinterface.html?highlight=get_base_control

Make sure you are doing it like this:

# In your script extending EditorPlugin
var base_control = get_editor_interface().get_base_control()
answered Nov 30, 2018 by Zylann (26,033 points)
selected Nov 30, 2018 by tyo


Must be that the plugin was made before EditorPlugin and EditorInterface was separated and my mind filled in blanks where there wasn't any. I've found several more errors like this and am combing through now. Thanks for the assist.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.