TerrainTextureEditor ​
Inherits: ResourceEditor < Control
The Terrain Textures editor (the TerrainTextureDefinition database): the library a terrain is painted from. A texture has its textures (albedo, normal, roughness), how big one repeat is on the ground, the surface type footsteps use, and how the weather changes it. See docs: World > Terrain Textures.
Description ​
Files can be dragged from the FileSystem dock onto the Albedo, Normal, Roughness, Height, Emission and Subsurface buttons (one file each), or several at once onto the Texture maps section or any of the buttons: they are sorted by the words in their names (albedo, basecolor, diffuse, color / normal, nrm / orm, arm / roughness / height, displacement, bump / emission, emissive / sss, subsurface), so the maps of a material exported from Material Maker, Substance or ambientCG land where they belong. A file with orm in its name turns on "Roughness texture is ORM".
Variables ​
TerrainTextureDefinition: | current_texture | |
LineEdit | library_search | |
Button | library_refresh | |
Label | library_status | |
Tree | library_tree | |
HBoxContainer | source_row | |
Label | source_label | |
Button | source_show_button | |
Button | source_reload_button | |
Button | source_delete_button | |
Dictionary | detile_boxes | {} # (DetileSlider) |
TerrainDetilePreview | detile_preview | |
Dictionary | sections | {} |
Methods ​
void | refresh_library() |
PackedStringArray | dropped_paths( data: Variant ) static |
StringName | classify_file( path: String ) static |
Array[StringName] | drop_files( paths: PackedStringArray, slot: StringName ) |
Constants ​
PackedStringArrayIMAGE_EXTENSIONS =TerrainTextureFiles.IMAGE_EXTENSIONS
Variable descriptions ​
TerrainTextureDefinition: current_texture ​
No description yet.
LineEdit library_search ​
No description yet.
Button library_refresh ​
No description yet.
Label library_status ​
No description yet.
Tree library_tree ​
No description yet.
HBoxContainer source_row ​
No description yet.
Label source_label ​
No description yet.
Button source_show_button ​
No description yet.
Button source_reload_button ​
No description yet.
Button source_delete_button ​
No description yet.
Dictionary detile_boxes = # (DetileSlider) ​
The rows of the Detiling numbers of a texture (made in code under the Anti-tiling check box): property name -> its box
TerrainDetilePreview detile_preview ​
The preview of the detiling (under the numbers)
Dictionary sections = ​
The sub sections of the textures part of the editor (name -> the section), made in code from the rows of the scene
Method descriptions ​
void refresh_library() ​
Looks for new, changed and missing folders (making the entries they need) and shows the tree again.
PackedStringArray dropped_paths( data: Variant ) ​
The texture files in what was dragged (the FileSystem dock gives {"type": "files", "files": [paths]}): only picture files.
StringName classify_file( path: String ) ​
Which map a file is, from the words in its name: &"albedo", &"normal", &"orm", &"height", &"roughness" or &"" when the name says nothing.
Array[StringName] drop_files( paths: PackedStringArray, slot: StringName ) ​
Puts dropped files in the texture: one file goes to the slot it was dropped on (slot &"" = the section: by its name); several go where their names say. An ORM file turns on "Roughness texture is ORM". Returns the slots that were set, in the order they were set.