- app/: app demo (Kivy/buildozer) da API do robo - software/: servidor RoboMovel (SLAM, profundidade, navegacao) e firmware da base movel (movido de firmware/) - simulacao/: projeto Godot do robo e script de lancamento servidor + simulacao - modelos/: planta do 5o andar do bloco D, cena Blender do corredor e modelo real do robo - partes/mdf/: chapas identificadas e nesting da base do robo (DXF/SVG/FCStd) - projeto/render, relatorio/imagens, slides: renders finais e apresentacoes de progresso - ferramentas/scripts: encaixe de chapas, planta do bloco D e render do corredor no Blender - .gitignore: ignora backups do Blender/FreeCAD e .godot/ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
45 lines
2.1 KiB
GDScript
45 lines
2.1 KiB
GDScript
## Makes the editor pick up changes on disk.
|
|
##
|
|
## Scripts are reloaded by the editor on its own, but a scene already open
|
|
## keeps the version it loaded, and some changes — a new class_name, an
|
|
## addon's own code — are only fully picked up by restarting.
|
|
##
|
|
## A restart is deferred to the end of the turn for the same reason
|
|
## resume_session is: it tears down the dock, and the MCP server the dock
|
|
## hosts, in the middle of the call asking for it.
|
|
class_name ClaudeGodotToolReload
|
|
extends ClaudeGodotTool
|
|
|
|
func definition() -> Dictionary:
|
|
return {
|
|
"name": "reload",
|
|
"description": "Reload after changing files. scope 'filesystem' rescans res:// so new files appear (cheap, immediate). 'scene' reloads one open scene from disk. 'editor' restarts the whole editor — it ends this conversation's turn and closes the dock, so only ask for it when something genuinely needs a restart, and tell the user first.",
|
|
"input_schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"scope": {"type": "string", "description": "'filesystem' (default), 'scene' or 'editor'."},
|
|
"path": {"type": "string", "description": "For scope 'scene': the .tscn to reload."}
|
|
}
|
|
}
|
|
}
|
|
|
|
func execute(input: Dictionary) -> Dictionary:
|
|
match str(input.get("scope", "filesystem")).to_lower():
|
|
"scene":
|
|
var path := resolve_path(input.get("path", ""))
|
|
if path == "" or not FileAccess.file_exists(path):
|
|
return {"is_error": true, "content": "scope 'scene' needs the path of a scene that exists; got %s." % path}
|
|
EditorInterface.reload_scene_from_path(path)
|
|
return {"content": "Reloaded %s from disk." % path}
|
|
|
|
"editor":
|
|
# Not done here: the restart has to outlive this call.
|
|
return {
|
|
"content": "The editor will restart once this turn finishes, saving first. The dock and its MCP server go down with it and this conversation ends — it is saved and will be in the session list when the editor comes back.",
|
|
"restart_editor": true,
|
|
}
|
|
|
|
_:
|
|
EditorInterface.get_resource_filesystem().scan()
|
|
return {"content": "Rescanning res:// — files written outside the editor will show up once it finishes."}
|