Zylann / godot_heightmap_plugin

HeightMap terrain for Godot implemented in GDScript
Other
1.71k stars 159 forks source link

Invalid get index 'GROUND_ALBEDO_BUMP' #108

Closed GammaGames closed 4 years ago

GammaGames commented 4 years ago

After installing the addon in 3.2 I got the following errors:

Updating detail layer material
Exit world
 scene/3d/navigation.cpp:144 - Condition ' !nm.linked ' is true.
Switch Scene Tab
Create HeightMap
HTerrainCollider: creating body
Set new data [Resource:41801]
Connecting new HeightMapData
HTerrainCollider: setting up heightmap
Create grid for lod 0, 32x32
Create grid for lod 1, 16x16
Create grid for lod 2, 8x8
Create grid for lod 3, 4x4
Create grid for lod 4, 2x2
Create grid for lod 5, 1x1
Set data done
Setting chunk size to 16
Chunk size snapped to 16
Enter world
Enter tree
Updating detail layer material
Transform changed
Updating detail layer material
Updating terrain material params
Edit [Spatial:98327]
 res://addons/zylann.hterrain/tools/texture_editor/texture_editor_dialog.gd:40 - Invalid get index 'GROUND_ALBEDO_BUMP' (on base: 'GDScript').
 res://addons/zylann.hterrain/tools/texture_editor/texture_editor.gd:35 - Invalid get index 'GROUND_ALBEDO_BUMP' (on base: 'GDScript').
Edit Null
 res://addons/zylann.hterrain/tools/texture_editor/texture_editor_dialog.gd:40 - Invalid get index 'GROUND_ALBEDO_BUMP' (on base: 'GDScript').
Edit [Spatial:98327]
 res://addons/zylann.hterrain/tools/texture_editor/texture_editor_dialog.gd:40 - Invalid get index 'GROUND_ALBEDO_BUMP' (on base: 'GDScript').
 res://addons/zylann.hterrain/tools/texture_editor/texture_editor.gd:35 - Invalid get index 'GROUND_ALBEDO_BUMP' (on base: 'GDScript').
 core/math/camera_matrix.cpp:294 - Condition ' !res ' is true. returned: false

My textures are empty: image

I am unsure what went wrong, I didn't lose anything important but I thought I should still report it, in case it's affecting other users

Zylann commented 4 years ago

I have no idea what's going on here, GROUND_ALBEDO_BUMP is correctly defined in HTerrain. Did you actually update the plugin while Godot was open? Does it work if you restart the editor?

GammaGames commented 4 years ago

I updated it through the in-engine addon installer, when I opened the scene again it looked like that. When I restart the editor it looks the same as it did, but I can remove the old terrain and it will work fine

Zylann commented 4 years ago

@GammaGames I think Godot did not properly reload the scripts. Also I think the idea of "updating" by just downloading over from the assetlib tab is a very bad idea... the plugin should be turned off, entirely removed first and then re-added because files can have been moved, end up as dupes or confuse the running tool scripts. Maybe that should be something to propose to Godot.

GammaGames commented 4 years ago

Do they have a proper way to update addons? I was updating to 3.2 and I can just load the project like normal, so I didn't expect to need any special procedure. I'll close this then, since it's likely not an issue with the plugin. Thank you!

Zylann commented 4 years ago

Do they have a proper way to update addons?

Not really, that was my point :) The way I described should be done manually at the moment.