You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can see that #180 was labeled as a "partially fixes #170", but #170 got closed. The specific errors in #170 are fixed, but I have not been able to reload any type of tool script with any method besides a restart of the editor.
When I save changes to a script, errors appear in the output which are identical to the ones quoted on #280: AttributeError tool_class object has no attribute script.
The specific attributes complained about seem to depend on the type of node the script is attached to. For example a Node2D will just complain about "editor_description" and "script", whereas an AnimatedSprite will raise the same exception regarding the attribute "playing".
I decided to experiment with this a bit, and set up the following class:
fromgodotimportexposed, ProjectSettings, ResourceLoaderfromgodotimportexportfromgodotimport*@exposed(tool=True)classtool_script(AnimatedSprite):
def_enter_tree(self):
# Initialization of the plugin goes hereprint("tree entered")
def_ready(self):
print("ready")
def_process(self,delta):
pass
Checking the "Playing" box in the inspector gives:
Traceback (most recent call last):
File "build\windows-64\pythonscript\_godot_instance.pxi", line 67, in _godot.pythonscript_instance_get_prop
File "build\windows-64\pythonscript\godot\bindings.pyx", line 244, in godot.bindings.Object.__getattr__
AttributeError: `tool_script` object has no attribute `playing`
Traceback (most recent call last):
File "build\windows-64\pythonscript\_godot_instance.pxi", line 52, in _godot.pythonscript_instance_set_prop
File "build\windows-64\pythonscript\godot\bindings.pyx", line 253, in godot.bindings.Object.__setattr__
File "build\windows-64\pythonscript\godot\bindings.pyx", line 171577, in godot.bindings.AnimatedSprite.playing.__set__
File "build\windows-64\pythonscript\godot\bindings.pyx", line 244, in godot.bindings.Object.__getattr__
AttributeError: `tool_script` object has no attribute `_set_playing`
Set playing
Traceback (most recent call last):
File "build\windows-64\pythonscript\_godot_instance.pxi", line 67, in _godot.pythonscript_instance_get_prop
File "build\windows-64\pythonscript\godot\bindings.pyx", line 244, in godot.bindings.Object.__getattr__
AttributeError: `tool_script` object has no attribute `playing`
Traceback (most recent call last):
File "build\windows-64\pythonscript\_godot_instance.pxi", line 67, in _godot.pythonscript_instance_get_prop
File "build\windows-64\pythonscript\godot\bindings.pyx", line 244, in godot.bindings.Object.__getattr__
AttributeError: `tool_script` object has no attribute `playing`
Traceback (most recent call last):
File "build\windows-64\pythonscript\_godot_instance.pxi", line 67, in _godot.pythonscript_instance_get_prop
File "build\windows-64\pythonscript\godot\bindings.pyx", line 244, in godot.bindings.Object.__getattr__
AttributeError: `tool_script` object has no attribute `playing`
I can avoid all these errors if I use an autoload class; however, the script still does not reload. I guess that leaves me with no specific leads.
The text was updated successfully, but these errors were encountered:
I can see that #180 was labeled as a "partially fixes #170", but #170 got closed. The specific errors in #170 are fixed, but I have not been able to reload any type of tool script with any method besides a restart of the editor.
When I save changes to a script, errors appear in the output which are identical to the ones quoted on #280: AttributeError
tool_class
object has no attributescript
.The specific attributes complained about seem to depend on the type of node the script is attached to. For example a Node2D will just complain about "editor_description" and "script", whereas an AnimatedSprite will raise the same exception regarding the attribute "playing".
I decided to experiment with this a bit, and set up the following class:
Checking the "Playing" box in the inspector gives:
I can avoid all these errors if I use an autoload class; however, the script still does not reload. I guess that leaves me with no specific leads.
The text was updated successfully, but these errors were encountered: