This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
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.
https://github.com/timoschwarzer/polygonizer-gd-addon

Thanks for any and all assistance.

in Engine by (63 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()
by (29,510 points)
selected by

Ahhh!

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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.