├── .github └── FUNDING.yml ├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── asset_manager ├── Asset_Placer.tscn ├── Hlod_Baker_Guest.gd ├── Hlod_Baker_Guest.gd.uid ├── asset_io.gd ├── asset_io.gd.uid ├── asset_io_baker.gd ├── asset_io_baker.gd.uid ├── asset_io_data.gd ├── asset_io_data.gd.uid ├── asset_io_materials.gd ├── asset_io_materials.gd.uid ├── asset_placer.gd ├── asset_placer.gd.uid ├── asset_placer_action_menu.gd ├── asset_placer_action_menu.gd.uid ├── asset_placer_add.gd ├── asset_placer_add.gd.uid ├── asset_placer_add.tscn ├── asset_placer_filter.gd ├── asset_placer_filter.gd.uid ├── asset_placer_filter.tscn ├── asset_placer_place.gd ├── asset_placer_place.gd.uid ├── asset_placer_place.tscn ├── assets_placer_grid.gd ├── assets_placer_grid.gd.uid ├── assets_tree.tscn ├── blender_addons │ ├── open_gltf_file.py │ └── open_modify_mesh.py ├── collection_editor.gd ├── collection_editor.gd.uid ├── collection_editor.tscn ├── collection_type_filter.gd ├── collection_type_filter.gd.uid ├── debug_info.gd ├── debug_info.gd.uid ├── gltf_extras │ ├── gltf_extras_extension.gd │ ├── gltf_extras_extension.gd.uid │ ├── post_import_extras.gd │ ├── post_import_extras.gd.uid │ ├── post_import_original.gd │ └── post_import_original.gd.uid ├── hlod_baker.gd ├── hlod_baker.gd.uid ├── inspector_plugin.gd ├── inspector_plugin.gd.uid ├── lod_distance_settings.gd ├── lod_distance_settings.gd.uid ├── m_hlod_previewer.gd ├── m_hlod_previewer.gd.uid ├── materials_list.gd ├── materials_list.gd.uid ├── mesh_settings_resource.gd ├── mesh_settings_resource.gd.uid ├── mhlod_previewer.tscn ├── physics_setting.gd ├── physics_setting.gd.uid ├── physics_setting.tscn ├── popup_button.gd ├── popup_button.gd.uid ├── post_import_update_bakers_and_hlod.gd ├── post_import_update_bakers_and_hlod.gd.uid ├── settings_button.gd ├── settings_button.gd.uid ├── thumbnail_manager.gd ├── thumbnail_manager.gd.uid └── ui │ ├── asset_library_settings.gd │ ├── asset_library_settings.gd.uid │ ├── asset_library_settings.tscn │ ├── current_filter_settings.res │ ├── filter_by_tags_control.tscn │ ├── filter_popup_menu.gd │ ├── filter_popup_menu.gd.uid │ ├── filter_settings.gd │ ├── filter_settings.gd.uid │ ├── grouping_button_group.tres │ ├── grouping_popup.gd │ ├── grouping_popup.gd.uid │ ├── grouping_popup.tscn │ ├── import_window.gd │ ├── import_window.gd.uid │ ├── import_window.tscn │ ├── import_window_hlod_scene.gd │ ├── import_window_hlod_scene.gd.uid │ ├── import_window_hlod_scene.tscn │ ├── inspector │ ├── asset_table_inspector.gd │ ├── asset_table_inspector.gd.uid │ ├── asset_table_inspector.tscn │ ├── collection_inspector.gd │ ├── collection_inspector.gd.uid │ ├── collection_inspector.tscn │ ├── collection_item.tscn │ ├── hlod_baker_guest_inspector.tscn │ ├── hlod_baker_inspector.gd │ ├── hlod_baker_inspector.gd.uid │ ├── hlod_baker_inspector.tscn │ ├── hlod_baker_inspector_joined_mesh_preview.gd │ ├── hlod_baker_inspector_joined_mesh_preview.gd.uid │ ├── hlod_baker_inspector_joined_mesh_preview.tscn │ ├── mhlod_node_inspector.gd │ ├── mhlod_node_inspector.gd.uid │ ├── mhlod_node_inspector.tscn │ ├── mhlod_scene_inspector.gd │ ├── mhlod_scene_inspector.gd.uid │ ├── mhlod_scene_inspector.tscn │ ├── save_and_replace_with_hlod_button.gd │ ├── save_and_replace_with_hlod_button.gd.uid │ ├── variation_layers │ │ ├── layer_btn.gd │ │ ├── layer_btn.gd.uid │ │ ├── layers.gd │ │ ├── layers.gd.uid │ │ ├── variation_layers.tscn │ │ └── variation_layers_dialog.tscn │ ├── variation_layers_dialog.gd │ └── variation_layers_dialog.gd.uid │ ├── manage_glbs.gd │ ├── manage_glbs.gd.uid │ ├── manage_groups.gd │ ├── manage_groups.gd.uid │ ├── manage_paths.gd │ ├── manage_paths.gd.uid │ ├── manage_tags.gd │ ├── manage_tags.gd.uid │ ├── mesh_join_window.gd │ ├── mesh_join_window.gd.uid │ ├── mesh_join_window.tscn │ ├── mesh_layers_control.tscn │ ├── search_component.gd │ ├── search_component.gd.uid │ ├── search_component.tscn │ ├── select_resources_by_type.gd │ ├── select_resources_by_type.gd.uid │ ├── select_resources_by_type.tscn │ ├── settings_glb_tree.gd │ ├── settings_glb_tree.gd.uid │ ├── sort_button_group.tres │ ├── sort_popup.gd │ ├── sort_popup.gd.uid │ ├── sort_popup.tscn │ ├── tags_editor.gd │ ├── tags_editor.gd.uid │ └── tags_editor.tscn ├── brush_masks ├── 01.exr ├── 01.exr.import ├── 02.exr ├── 02.exr.import ├── 03.exr ├── 03.exr.import ├── 04.exr ├── 04.exr.import ├── 05.exr ├── 05.exr.import ├── 06.png └── 06.png.import ├── gdextension ├── .gdignore ├── .vscode │ ├── c_cpp_properties.json │ └── settings.json ├── MTerrain.txt ├── MTerrain_double.txt ├── SConstruct ├── build_android.sh ├── build_linux.sh ├── build_mac.sh ├── build_windows.sh └── src │ ├── color_brushes │ ├── mbitwise_brush.cpp │ ├── mbitwise_brush.h │ ├── mchannel_painter.cpp │ ├── mchannel_painter.h │ ├── mpaint_16.cpp │ ├── mpaint_16.h │ ├── mpaint_256.cpp │ ├── mpaint_256.h │ ├── mpaint_color.cpp │ └── mpaint_color.h │ ├── editor │ ├── masset_mesh.cpp │ ├── masset_mesh.h │ ├── masset_mesh_updater.cpp │ ├── masset_mesh_updater.h │ ├── masset_table.cpp │ ├── masset_table.h │ ├── mmesh_joiner.cpp │ └── mmesh_joiner.h │ ├── grass │ ├── mgrass.cpp │ ├── mgrass.h │ ├── mgrass_chunk.h │ ├── mgrass_data.cpp │ ├── mgrass_data.h │ ├── mgrass_lod_setting.cpp │ └── mgrass_lod_setting.h │ ├── height_brushes │ ├── mhole.cpp │ ├── mhole.h │ ├── mraise.cpp │ ├── mraise.h │ ├── mremove_layer.cpp │ ├── mremove_layer.h │ ├── msmooth.cpp │ ├── msmooth.h │ ├── mtoheight.cpp │ └── mtoheight.h │ ├── hlod │ ├── mdecal.cpp │ ├── mdecal.h │ ├── mdecal_instance.cpp │ ├── mdecal_instance.h │ ├── mhlod.cpp │ ├── mhlod.h │ ├── mhlod_collision_setting.cpp │ ├── mhlod_collision_setting.h │ ├── mhlod_item.h │ ├── mhlod_node3d.cpp │ ├── mhlod_node3d.h │ ├── mhlod_scene.cpp │ ├── mhlod_scene.h │ ├── mmesh.cpp │ └── mmesh.h │ ├── mbound.cpp │ ├── mbound.h │ ├── mbrush_layers.cpp │ ├── mbrush_layers.h │ ├── mbrush_manager.cpp │ ├── mbrush_manager.h │ ├── mchunk_generator.cpp │ ├── mchunk_generator.h │ ├── mchunks.cpp │ ├── mchunks.h │ ├── mcollision.cpp │ ├── mcollision.h │ ├── mcolor_brush.h │ ├── mconfig.h │ ├── mgrid.cpp │ ├── mgrid.h │ ├── mheight_brush.h │ ├── mimage.cpp │ ├── mimage.h │ ├── moctree.cpp │ ├── moctree.h │ ├── mpixel_region.cpp │ ├── mpixel_region.h │ ├── mregion.cpp │ ├── mregion.h │ ├── mresource.cpp │ ├── mresource.h │ ├── mterrain.cpp │ ├── mterrain.h │ ├── mterrain_material.cpp │ ├── mterrain_material.h │ ├── mtool.cpp │ ├── mtool.h │ ├── navmesh │ ├── mnavigation_mesh_data.cpp │ ├── mnavigation_mesh_data.h │ ├── mnavigation_region_3d.cpp │ ├── mnavigation_region_3d.h │ ├── mobstacle.cpp │ └── mobstacle.h │ ├── octmesh │ ├── mmesh_lod.cpp │ ├── mmesh_lod.h │ ├── moctmesh.cpp │ └── moctmesh.h │ ├── path │ ├── mcurve.cpp │ ├── mcurve.h │ ├── mcurve_instance.cpp │ ├── mcurve_instance.h │ ├── mcurve_mesh.cpp │ ├── mcurve_mesh.h │ ├── mcurve_mesh_override.cpp │ ├── mcurve_mesh_override.h │ ├── mcurve_terrain.cpp │ ├── mcurve_terrain.h │ ├── mintersection.cpp │ ├── mintersection.h │ ├── mpath.cpp │ └── mpath.h │ ├── register_types.cpp │ ├── register_types.h │ ├── thirdparty │ └── qoi.h │ └── util │ ├── lru_cache.h │ ├── mbool_vector.h │ └── mbyte_float.h ├── gizmos ├── aabb_gizmo.gd ├── aabb_gizmo.gd.uid ├── masset_mesh_gizmo.gd ├── masset_mesh_gizmo.gd.uid ├── mcurve_mesh_gui.gd ├── mcurve_mesh_gui.gd.uid ├── mcurve_mesh_gui.tscn ├── moct_mesh_gizmo.gd ├── moct_mesh_gizmo.gd.uid ├── mpath_gizmo.gd ├── mpath_gizmo.gd.uid ├── mpath_gizmo_gui.gd ├── mpath_gizmo_gui.gd.uid └── mpath_gizmo_gui.tscn ├── gui ├── Save config.gd ├── Save config.gd.uid ├── brush_decal.gd ├── brush_decal.gd.uid ├── brush_decal.tscn ├── brush_layers.gd ├── brush_layers.gd.uid ├── brush_layers.tscn ├── channel_brush_control.gd ├── channel_brush_control.gd.uid ├── color_layer_creator_panel.tscn ├── color_layer_creator_window.gd ├── color_layer_creator_window.gd.uid ├── color_layer_creator_window.tscn ├── control_prop_element │ ├── bool.gd │ ├── bool.gd.uid │ ├── bool.tscn │ ├── float.gd │ ├── float.gd.uid │ ├── float.tscn │ ├── float_range.gd │ ├── float_range.gd.uid │ ├── float_range.tscn │ ├── int.gd │ ├── int.gd.uid │ ├── int.tscn │ ├── int_enum.gd │ ├── int_enum.gd.uid │ └── int_enum.tscn ├── gui_part │ ├── data_compress_option.tscn │ └── file_compress.tscn ├── human_male.gd ├── human_male.gd.uid ├── human_male.obj ├── human_male.obj.import ├── human_male.tscn ├── image_creator_window.gd ├── image_creator_window.gd.uid ├── image_creator_window.tscn ├── import Godot res.gd ├── import Godot res.gd.uid ├── import_window.gd ├── import_window.gd.uid ├── import_window.tscn ├── layers_title.tscn ├── mask_decal.gd ├── mask_decal.gd.uid ├── mask_decal.tscn ├── mpath_help_popup.tscn ├── mtools.gd ├── mtools.gd.uid ├── mtools.tscn ├── mtools_brush_item.gd ├── mtools_brush_item.gd.uid ├── mtools_brush_item.tscn ├── mtools_brush_size.gd ├── mtools_brush_size.gd.uid ├── mtools_brushes.gd ├── mtools_brushes.gd.uid ├── mtools_color_brush_item.gd ├── mtools_color_brush_item.gd.uid ├── mtools_color_brush_item.tscn ├── mtools_create_color_brush.gd ├── mtools_create_color_brush.gd.uid ├── mtools_create_color_brush.tscn ├── mtools_edit_mode_selector.gd ├── mtools_edit_mode_selector.gd.uid ├── mtools_keyboard_shortcut_item.gd ├── mtools_keyboard_shortcut_item.gd.uid ├── mtools_keyboard_shortcut_item.tscn ├── mtools_layer_item.gd ├── mtools_layer_item.gd.uid ├── mtools_layer_item.tscn ├── mtools_layer_warning_popup.gd ├── mtools_layer_warning_popup.gd.uid ├── mtools_layer_warning_popup.tscn ├── mtools_layers.gd ├── mtools_layers.gd.uid ├── mtools_mask_list.gd ├── mtools_mask_list.gd.uid ├── mtools_mask_list.tscn ├── mtools_masks.gd ├── mtools_masks.gd.uid ├── mtools_options.gd ├── mtools_options.gd.uid ├── mtools_popup_remove_color_layer.gd ├── mtools_popup_remove_color_layer.gd.uid ├── mtools_popup_remove_color_layer.tscn ├── mtools_slider_value.gd ├── mtools_slider_value.gd.uid ├── mtools_status_bar.gd ├── mtools_status_bar.gd.uid ├── mtools_transform_terrain_popup.tscn ├── paint_mode_instructions_popup.tscn ├── paint_panel.gd ├── paint_panel.gd.uid ├── paint_panel.tscn ├── shortcuts_panel.gd ├── shortcuts_panel.gd.uid ├── shortcuts_panel.tscn ├── styles │ ├── button_stylebox.tres │ ├── button_stylebox_icon_only.tres │ ├── button_stylebox_icon_only_hover.tres │ ├── mterrain_gui_theme.tres │ ├── popup_panel_stylebox.tres │ ├── sider_back_stylebox.tres │ ├── sider_front_stylebox.tres │ ├── sider_highlight_stylebox.tres │ ├── stylebox_selected.tres │ └── terrain_info_label_stylebox.tres ├── terrain_info.gd ├── terrain_info.gd.uid ├── terrain_info.tscn └── tsnap.tscn ├── icons ├── M-terrain_icon.png ├── M-terrain_icon.png.import ├── MCurve.svg ├── MCurve.svg.import ├── MCurveInstance.svg ├── MCurveInstance.svg.import ├── MCurveMesh.svg ├── MCurveMesh.svg.import ├── MIntersection.svg ├── MIntersection.svg.import ├── MMeshLod.svg ├── MMeshLod.svg.import ├── MNavigationRegion3D.png ├── MNavigationRegion3D.png.import ├── MOctMesh.svg ├── MOctMesh.svg.import ├── MOctree.svg ├── MOctree.svg.import ├── MPath.svg ├── MPath.svg.import ├── automatic_refresh_icon.svg ├── automatic_refresh_icon.svg.import ├── blender.svg ├── blender.svg.import ├── brush.png ├── brush.png.import ├── brush_icon.png ├── brush_icon.png.import ├── brush_icon_hole.svg ├── brush_icon_hole.svg.import ├── brush_icon_raise.svg ├── brush_icon_raise.svg.import ├── brush_icon_smooth.svg ├── brush_icon_smooth.svg.import ├── brush_icon_to_height.svg ├── brush_icon_to_height.svg.import ├── collapse_normal.svg.import ├── collapse_pressed.svg.import ├── connect_icon.svg ├── connect_icon.svg.import ├── depth_test.svg ├── depth_test.svg.import ├── disconnect_icon.svg ├── disconnect_icon.svg.import ├── edit_icon.svg ├── edit_icon.svg.import ├── eraser_icon.svg ├── eraser_icon.svg.import ├── eye-close.svg ├── eye-close.svg.import ├── eye.svg ├── eye.svg.import ├── eye_hidden_icon.svg.import ├── eye_icon.svg.import ├── eye_off.svg ├── eye_off.svg.import ├── filter_icon.svg ├── filter_icon.svg.import ├── foilage_icon.png ├── foilage_icon.png.import ├── grouping_icon.svg ├── grouping_icon.svg.import ├── handle00.png ├── handle00.png.import ├── handle01.png ├── handle01.png.import ├── hbaker.svg ├── hbaker.svg.import ├── hbaker_guest.svg ├── hbaker_guest.svg.import ├── hidden.png ├── hidden.png.import ├── hlod.svg ├── hlod.svg.import ├── hlod_node3d.svg ├── hlod_node3d.svg.import ├── hlod_scene.svg ├── hlod_scene.svg.import ├── hmasset_mesh.svg ├── hmasset_mesh.svg.import ├── human.svg ├── human.svg.import ├── human_button_normal.png ├── human_button_normal.png.import ├── human_button_pressed.png ├── human_button_pressed.png.import ├── human_disabled.svg ├── human_disabled.svg.import ├── icon_close.svg ├── icon_close.svg.import ├── info_icon.png ├── info_icon.png.import ├── info_icon_pressed.png ├── info_icon_pressed.png.import ├── invert_icon.svg ├── invert_icon.svg.import ├── invert_icon_inverted.svg ├── invert_icon_inverted.svg.import ├── invert_icon_normal.svg ├── invert_icon_normal.svg.import ├── lock.svg ├── lock.svg.import ├── magnet_icon.svg ├── magnet_icon.svg.import ├── mdecal.svg ├── mdecal.svg.import ├── mdecal_instance.svg ├── mdecal_instance.svg.import ├── merge_down_icon.svg ├── merge_down_icon.svg.import ├── merge_layers_icon.svg ├── merge_layers_icon.svg.import ├── mirror_icon.svg ├── mirror_icon.svg.import ├── more_options_icon.svg ├── more_options_icon.svg.import ├── mpath_collapse_point_icon.svg ├── mpath_collapse_point_icon.svg.import ├── no_images.png ├── no_images.png.import ├── no_mask_icon.svg ├── no_mask_icon.svg.import ├── object_icon.svg ├── object_icon.svg.import ├── obstacle_icon.png ├── obstacle_icon.png.import ├── open.svg ├── open.svg.import ├── packed_scene.svg ├── packed_scene.svg.import ├── paint-normal.png ├── paint-normal.png.import ├── paint-pressed.png ├── paint-pressed.png.import ├── paint.svg ├── paint.svg.import ├── physics_icon.svg ├── physics_icon.svg.import ├── raise_brush_icon.svg.import ├── reverse_brush_icon.svg ├── reverse_brush_icon.svg.import ├── reverse_brush_icon_normal.svg ├── reverse_brush_icon_normal.svg.import ├── reverse_brush_icon_reversed.svg ├── reverse_brush_icon_reversed.svg.import ├── rotate_disabled_icon.svg ├── rotate_disabled_icon.svg.import ├── rotate_icon.svg ├── rotate_icon.svg.import ├── rotation.svg ├── rotation.svg.import ├── save_active.png ├── save_active.png.import ├── save_deactive.png ├── save_deactive.png.import ├── save_icon.svg ├── save_icon.svg.import ├── save_icon_disable.svg ├── save_icon_disable.svg.import ├── scale_disabled_icon.svg ├── scale_disabled_icon.svg.import ├── scale_icon.svg ├── scale_icon.svg.import ├── sculpt_terrain.svg ├── sculpt_terrain.svg.import ├── search_icon.svg ├── search_icon.svg.import ├── settings_icon.svg ├── settings_icon.svg.import ├── show.png ├── show.png.import ├── slider_grabber.svg ├── slider_grabber.svg.import ├── slider_grabber_highlight_icon.svg ├── slider_grabber_highlight_icon.svg.import ├── snap_grid_disabled_icon.svg ├── snap_grid_disabled_icon.svg.import ├── snap_grid_icon.svg ├── snap_grid_icon.svg.import ├── sort_icon.svg ├── sort_icon.svg.import ├── switch_direction_icon.svg ├── switch_direction_icon.svg.import ├── tag_icon.svg ├── tag_icon.svg.import ├── terrain_icon.png ├── terrain_icon.png.import ├── tick_icon.svg ├── tick_icon.svg.import ├── toggle_connection.svg ├── toggle_connection.svg.import ├── trash.svg ├── trash.svg.import ├── tsnap_icon.png ├── tsnap_icon.png.import ├── tsnap_icon_pressed.png ├── tsnap_icon_pressed.png.import ├── walk_icon.svg └── walk_icon.svg.import ├── inspector ├── gui │ ├── curve_terrain.gd │ ├── curve_terrain.gd.uid │ ├── curve_terrain.tscn │ ├── mpath_inspector_gui.gd │ ├── mpath_inspector_gui.gd.uid │ └── mpath_inspector_gui.tscn ├── mpath.gd └── mpath.gd.uid ├── m_terrain.gd ├── m_terrain.gd.uid ├── mterrain_settings.gd ├── mterrain_settings.gd.uid ├── plugin.cfg ├── shader_include ├── paint16.gdshaderinc ├── paint16.gdshaderinc.uid ├── paint256.gdshaderinc └── paint256.gdshaderinc.uid ├── shaders ├── boundary.gdshader └── boundary.gdshader.uid ├── show_region.gdshader ├── show_region.gdshader.uid ├── start.gdshader ├── start.gdshader.uid ├── start_material.res ├── start_material_opengl.res ├── start_opengl.gdshader └── start_opengl.gdshader.uid /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: mohsenzare 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | gdextension/.vscode/* 2 | tmp/* 3 | 4 | *sconsign.dblite 5 | *.dblite 6 | *.os 7 | *.tmp 8 | 9 | # Prerequisites 10 | *.d 11 | 12 | # Compiled Object files 13 | *.slo 14 | *.lo 15 | *.o 16 | *.obj 17 | 18 | # Precompiled Headers 19 | *.gch 20 | *.pch 21 | 22 | # Compiled Dynamic libraries 23 | *.so 24 | *.dylib 25 | *.dll 26 | 27 | # Fortran module files 28 | *.mod 29 | *.smod 30 | 31 | # Compiled Static libraries 32 | *.lai 33 | *.la 34 | *.a 35 | *.lib 36 | 37 | # Executables 38 | *.exe 39 | *.out 40 | *.app 41 | 42 | 43 | !/gui/human_male.obj 44 | 45 | config/* 46 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "gdextension/godot-cpp"] 2 | path = gdextension/godot-cpp 3 | url = https://github.com/godotengine/godot-cpp.git 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 mohsenph69 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /asset_manager/Hlod_Baker_Guest.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dwpfuoghn01on 2 | -------------------------------------------------------------------------------- /asset_manager/asset_io.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bo30edvb0agfg 2 | -------------------------------------------------------------------------------- /asset_manager/asset_io_baker.gd.uid: -------------------------------------------------------------------------------- 1 | uid://df5wsfg3iakxm 2 | -------------------------------------------------------------------------------- /asset_manager/asset_io_data.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cjdiyr238x6so 2 | -------------------------------------------------------------------------------- /asset_manager/asset_io_materials.gd.uid: -------------------------------------------------------------------------------- 1 | uid://ce5q8f4br7do1 2 | -------------------------------------------------------------------------------- /asset_manager/asset_placer.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bggv7u4sgk8kq 2 | -------------------------------------------------------------------------------- /asset_manager/asset_placer_action_menu.gd.uid: -------------------------------------------------------------------------------- 1 | uid://d0f5p6pw243kx 2 | -------------------------------------------------------------------------------- /asset_manager/asset_placer_add.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends PanelContainer 3 | 4 | @onready var add_baker_button:Button = find_child("add_baker_button") 5 | @onready var add_decal_button:Button = find_child("add_decal_button") 6 | @onready var add_packed_scene_button:Button = find_child("add_packed_scene_button") 7 | 8 | func _ready(): 9 | 10 | add_baker_button.pressed.connect(func(): 11 | AssetIOBaker.create_baker_scene() 12 | AssetIO.asset_placer.add_asset_finished(false) 13 | ) 14 | add_packed_scene_button.pressed.connect(func(): 15 | AssetIO.create_packed_scene() 16 | AssetIO.asset_placer.add_asset_finished() 17 | ) 18 | add_decal_button.pressed.connect(func(): 19 | var decal = AssetIO.create_decal() 20 | AssetIO.asset_placer.assets_changed.emit( decal ) 21 | AssetIO.asset_placer.add_asset_finished() 22 | ) 23 | -------------------------------------------------------------------------------- /asset_manager/asset_placer_add.gd.uid: -------------------------------------------------------------------------------- 1 | uid://btow8vgtqkq5f 2 | -------------------------------------------------------------------------------- /asset_manager/asset_placer_add.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://brnnnn7sygntf"] 2 | 3 | [ext_resource type="Script" uid="uid://btow8vgtqkq5f" path="res://addons/m_terrain/asset_manager/asset_placer_add.gd" id="1_m0sve"] 4 | 5 | [node name="asset_placer_add" type="PanelContainer"] 6 | visible = false 7 | anchors_preset = 1 8 | anchor_left = 1.0 9 | anchor_right = 1.0 10 | offset_left = -129.0 11 | offset_top = -117.0 12 | offset_bottom = -10.0 13 | grow_horizontal = 0 14 | size_flags_horizontal = 3 15 | size_flags_vertical = 3 16 | script = ExtResource("1_m0sve") 17 | 18 | [node name="VBoxContainer" type="VBoxContainer" parent="."] 19 | layout_mode = 2 20 | 21 | [node name="add_baker_button" type="Button" parent="VBoxContainer"] 22 | layout_mode = 2 23 | text = "Baker" 24 | 25 | [node name="add_decal_button" type="Button" parent="VBoxContainer"] 26 | layout_mode = 2 27 | text = "Decal" 28 | 29 | [node name="add_packed_scene_button" type="Button" parent="VBoxContainer"] 30 | layout_mode = 2 31 | text = "Packed Scene" 32 | -------------------------------------------------------------------------------- /asset_manager/asset_placer_filter.gd.uid: -------------------------------------------------------------------------------- 1 | uid://ma2dx0qeblo 2 | -------------------------------------------------------------------------------- /asset_manager/asset_placer_place.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dbhoptkfcvvuh 2 | -------------------------------------------------------------------------------- /asset_manager/assets_placer_grid.gd.uid: -------------------------------------------------------------------------------- 1 | uid://xheye4c45cw5 2 | -------------------------------------------------------------------------------- /asset_manager/assets_tree.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://b5o4frfy8r423"] 2 | 3 | [ext_resource type="Script" uid="uid://xheye4c45cw5" path="res://addons/m_terrain/asset_manager/assets_placer_grid.gd" id="1_lybir"] 4 | 5 | [node name="assets_tree" type="Tree"] 6 | size_flags_vertical = 3 7 | columns = 4 8 | allow_reselect = true 9 | allow_rmb_select = true 10 | allow_search = false 11 | hide_root = true 12 | select_mode = 2 13 | script = ExtResource("1_lybir") 14 | -------------------------------------------------------------------------------- /asset_manager/collection_editor.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Node3D 3 | var asset_mesh_updater: MAssetMeshUpdater 4 | var timer: Timer 5 | func _notification(what: int): 6 | if what == NOTIFICATION_EDITOR_PRE_SAVE: 7 | for child in get_children(): 8 | child.owner = null 9 | if what == NOTIFICATION_EDITOR_POST_SAVE: 10 | for child in get_children(): 11 | child.owner = self 12 | 13 | func _enter_tree(): 14 | asset_mesh_updater = MAssetMeshUpdater.new() 15 | asset_mesh_updater.set_root_node(self) 16 | timer = Timer.new() 17 | add_child(timer) 18 | timer.timeout.connect(update_lod) 19 | timer.start(2) 20 | 21 | func update_lod(): 22 | asset_mesh_updater.update_auto_lod() 23 | 24 | func _exit_tree(): 25 | timer.queue_free() 26 | -------------------------------------------------------------------------------- /asset_manager/collection_editor.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cvfyumpnvcjyx 2 | -------------------------------------------------------------------------------- /asset_manager/collection_editor.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://dhwm55hy1pmuu"] 2 | 3 | [ext_resource type="Script" uid="uid://cvfyumpnvcjyx" path="res://addons/m_terrain/asset_manager/collection_editor.gd" id="1_aksm0"] 4 | 5 | [node name="Collection_Editor" type="Node3D"] 6 | script = ExtResource("1_aksm0") 7 | -------------------------------------------------------------------------------- /asset_manager/collection_type_filter.gd.uid: -------------------------------------------------------------------------------- 1 | uid://kck7njj1v1ho 2 | -------------------------------------------------------------------------------- /asset_manager/debug_info.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Button 3 | 4 | @onready var tree:Tree = get_child(0) 5 | var last_update:int= 0 6 | var tree_items = {} 7 | 8 | func _toggled(toggled_on): 9 | set_process(toggled_on) 10 | tree.visible = toggled_on 11 | 12 | func _ready(): 13 | tree.visible = false 14 | tree.set_column_custom_minimum_width(1, 75) 15 | tree.set_column_expand(1, false) 16 | var data = MHlodScene.get_debug_info() 17 | var root: TreeItem = tree.create_item() 18 | for key in data: 19 | var item := root.create_child() 20 | tree_items[key] = item 21 | item.set_text(0, key) 22 | item.set_text_alignment(1, HORIZONTAL_ALIGNMENT_RIGHT) 23 | 24 | func _process(delta): 25 | if not is_node_ready() or not is_visible_in_tree(): return 26 | if abs(Time.get_ticks_msec() - last_update) > 1000: 27 | last_update = Time.get_ticks_msec() 28 | var data = MHlodScene.get_debug_info() 29 | for key in data: 30 | var item = tree_items[key] 31 | item.set_text(1, str(data[key])) 32 | -------------------------------------------------------------------------------- /asset_manager/debug_info.gd.uid: -------------------------------------------------------------------------------- 1 | uid://kwosnhrayoxm 2 | -------------------------------------------------------------------------------- /asset_manager/gltf_extras/gltf_extras_extension.gd.uid: -------------------------------------------------------------------------------- 1 | uid://b17w58jnqrhar 2 | -------------------------------------------------------------------------------- /asset_manager/gltf_extras/post_import_extras.gd.uid: -------------------------------------------------------------------------------- 1 | uid://crh7mguc8p8rk 2 | -------------------------------------------------------------------------------- /asset_manager/gltf_extras/post_import_original.gd.uid: -------------------------------------------------------------------------------- 1 | uid://7k7xy6kgw61k 2 | -------------------------------------------------------------------------------- /asset_manager/hlod_baker.gd.uid: -------------------------------------------------------------------------------- 1 | uid://c7psgcj7gw01w 2 | -------------------------------------------------------------------------------- /asset_manager/inspector_plugin.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bb0gb35qqwerm 2 | -------------------------------------------------------------------------------- /asset_manager/lod_distance_settings.gd: -------------------------------------------------------------------------------- 1 | class_name Lod_Distance_Settings extends Resource 2 | @export var distances: PackedFloat32Array 3 | -------------------------------------------------------------------------------- /asset_manager/lod_distance_settings.gd.uid: -------------------------------------------------------------------------------- 1 | uid://b4k6aq4n5udy0 2 | -------------------------------------------------------------------------------- /asset_manager/m_hlod_previewer.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends MHlodScene 3 | var timer: Timer 4 | var asset_mesh_updater: MAssetMeshUpdater 5 | 6 | func _enter_tree(): 7 | asset_mesh_updater = MAssetMeshUpdater.new() 8 | asset_mesh_updater.set_root_node(self) 9 | timer = Timer.new() 10 | add_child(timer) 11 | timer.timeout.connect(update_lod) 12 | timer.start(1) 13 | for child in get_children(): 14 | if child is Node3D: 15 | child.owner = self 16 | 17 | func update_lod(): 18 | asset_mesh_updater.update_auto_lod() 19 | 20 | func _exit_tree(): 21 | timer.queue_free() 22 | -------------------------------------------------------------------------------- /asset_manager/m_hlod_previewer.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dokyhrxmdc7a1 2 | -------------------------------------------------------------------------------- /asset_manager/materials_list.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Tree 3 | signal material_table_changed 4 | 5 | func _can_drop_data(at_position: Vector2, data: Variant): 6 | return "files" in data 7 | 8 | func _drop_data(at_position: Vector2, data: Variant): 9 | var filesystem = EditorInterface.get_resource_filesystem() 10 | var materials = AssetIOMaterials.get_material_table() 11 | for file in data.files: 12 | if filesystem.get_file_type(file) in ["StandardMaterial3D", "ShaderMaterial", "ORMMaterial3D"]: 13 | var mat = load(file) 14 | if not mat is Material: continue 15 | if materials.find_key(file) == null: 16 | AssetIOMaterials.update_material(-1, load(file)) 17 | material_table_changed.emit() 18 | 19 | -------------------------------------------------------------------------------- /asset_manager/materials_list.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bb52bbtg5x7gi 2 | -------------------------------------------------------------------------------- /asset_manager/mesh_settings_resource.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | class_name MeshSettingsResource extends Resource 3 | @export_enum("On", "Off", "Double-Sided", "Shadows only") var shadow_settings: int 4 | @export_enum("Static", "Dynamic", "Off") var global_illumination_mode: int 5 | @export_flags_3d_render var layers 6 | -------------------------------------------------------------------------------- /asset_manager/mesh_settings_resource.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bpfd2iupjj20r 2 | -------------------------------------------------------------------------------- /asset_manager/mhlod_previewer.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://byq2krnjsg1oc"] 2 | 3 | [ext_resource type="Script" uid="uid://dokyhrxmdc7a1" path="res://addons/m_terrain/asset_manager/m_hlod_previewer.gd" id="1_p66ot"] 4 | 5 | [sub_resource type="Resource" id="Resource_ucqhn"] 6 | metadata/__load_path__ = "res://massets/hlod/Test_Baker.res" 7 | 8 | [node name="MHlodScene" type="MHlodScene"] 9 | hlod = SubResource("Resource_ucqhn") 10 | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -3) 11 | script = ExtResource("1_p66ot") 12 | -------------------------------------------------------------------------------- /asset_manager/physics_setting.gd.uid: -------------------------------------------------------------------------------- 1 | uid://b8v7amn4qa04m 2 | -------------------------------------------------------------------------------- /asset_manager/popup_button.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Button 3 | @export var centered := false 4 | 5 | func _ready(): 6 | focus_exited.connect(func(): 7 | check_focus.call_deferred() 8 | ) 9 | 10 | func check_focus(): 11 | var focus = get_viewport().gui_get_focus_owner() 12 | if not focus or not is_ancestor_of(focus): 13 | button_pressed = false 14 | elif is_ancestor_of(focus): 15 | get_tree().create_timer(0.15).timeout.connect(grab_focus) 16 | 17 | func _toggled(toggle_on): 18 | var popup = get_child(0) 19 | popup.visible=toggle_on 20 | popup.position.y = -popup.size.y -10 21 | 22 | -------------------------------------------------------------------------------- /asset_manager/popup_button.gd.uid: -------------------------------------------------------------------------------- 1 | uid://ijmcdn1dc7kf 2 | -------------------------------------------------------------------------------- /asset_manager/post_import_update_bakers_and_hlod.gd: -------------------------------------------------------------------------------- 1 | extends Object 2 | 3 | static func get_baker_scene_list(root = MAssetTable.get_editor_baker_scenes_dir()): 4 | var result = [] 5 | for dir in DirAccess.get_directories_at(root): 6 | var current_dir = root.path_join(dir) 7 | result.append_array( DirAccess.get_files_at( current_dir )) 8 | result.append_array(get_baker_scene_list(current_dir)) 9 | return result 10 | 11 | static func is_collection_in_baker(baker_path, collection_id): 12 | var baker:PackedScene = load(baker_path) 13 | var state: SceneState = baker.get_state() 14 | for node_id in state.get_node_count(): 15 | for prop_id in state.get_node_property_count(node_id): 16 | if state.get_node_property_name(node_id, prop_id) == "collection_id": 17 | if state.get_node_property_value(node_id, prop_id) == collection_id: 18 | return true 19 | 20 | static func update_bakers(collection_ids := []): 21 | for path in get_baker_scene_list(): 22 | for collection_id in collection_ids: 23 | if is_collection_in_baker(path, collection_id): 24 | pass # rebake 25 | -------------------------------------------------------------------------------- /asset_manager/post_import_update_bakers_and_hlod.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bg3wxo388ad6p 2 | -------------------------------------------------------------------------------- /asset_manager/settings_button.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Button 3 | 4 | var settings 5 | 6 | func _ready(): 7 | settings = preload("res://addons/m_terrain/asset_manager/ui/asset_library_settings.tscn").instantiate() 8 | add_child(settings) 9 | settings.visible = false 10 | settings.find_child("close_settings_button").pressed.connect(func():button_pressed = not button_pressed) 11 | 12 | 13 | func _toggled(toggled_on): 14 | if toggled_on: 15 | if settings.get_parent(): 16 | remove_child(settings) 17 | EditorInterface.get_editor_main_screen().get_parent().add_child(settings) 18 | settings.size_flags_horizontal = Control.SIZE_EXPAND_FILL 19 | settings.size_flags_vertical = Control.SIZE_EXPAND_FILL 20 | settings.size_flags_stretch_ratio = 100000000000 21 | settings.visible = true 22 | else: 23 | EditorInterface.get_editor_main_screen().get_parent().remove_child(settings) 24 | settings.visible = false 25 | add_child(settings) 26 | 27 | -------------------------------------------------------------------------------- /asset_manager/settings_button.gd.uid: -------------------------------------------------------------------------------- 1 | uid://1sx5e6wxrehk 2 | -------------------------------------------------------------------------------- /asset_manager/thumbnail_manager.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cdexqj8do0ptt 2 | -------------------------------------------------------------------------------- /asset_manager/ui/asset_library_settings.gd.uid: -------------------------------------------------------------------------------- 1 | uid://xlnhtmnxknfm 2 | -------------------------------------------------------------------------------- /asset_manager/ui/current_filter_settings.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/asset_manager/ui/current_filter_settings.res -------------------------------------------------------------------------------- /asset_manager/ui/filter_popup_menu.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cfbfyfhbegur3 2 | -------------------------------------------------------------------------------- /asset_manager/ui/filter_settings.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bcx4pcyow0mus 2 | -------------------------------------------------------------------------------- /asset_manager/ui/grouping_button_group.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="ButtonGroup" format=3 uid="uid://b8t5kwxlmhy22"] 2 | 3 | [resource] 4 | -------------------------------------------------------------------------------- /asset_manager/ui/grouping_popup.gd.uid: -------------------------------------------------------------------------------- 1 | uid://ddihj5eo8c31f 2 | -------------------------------------------------------------------------------- /asset_manager/ui/grouping_popup.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://cysovcswko088"] 2 | 3 | [ext_resource type="Script" uid="uid://ddihj5eo8c31f" path="res://addons/m_terrain/asset_manager/ui/grouping_popup.gd" id="1_oqoy2"] 4 | [ext_resource type="Theme" uid="uid://b3bd1lceed8ec" path="res://addons/m_terrain/gui/styles/mterrain_gui_theme.tres" id="2_vflmy"] 5 | 6 | [node name="PanelContainer" type="PanelContainer"] 7 | anchors_preset = 15 8 | anchor_right = 1.0 9 | anchor_bottom = 1.0 10 | grow_horizontal = 2 11 | grow_vertical = 2 12 | size_flags_horizontal = 3 13 | size_flags_vertical = 3 14 | theme = ExtResource("2_vflmy") 15 | script = ExtResource("1_oqoy2") 16 | 17 | [node name="group_list" type="VBoxContainer" parent="."] 18 | layout_mode = 2 19 | 20 | [node name="None" type="Button" parent="group_list"] 21 | layout_mode = 2 22 | toggle_mode = true 23 | text = "None" 24 | -------------------------------------------------------------------------------- /asset_manager/ui/import_window.gd.uid: -------------------------------------------------------------------------------- 1 | uid://ckwhvejt8epcd 2 | -------------------------------------------------------------------------------- /asset_manager/ui/import_window_hlod_scene.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dgkng6rjwwm3x 2 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/asset_table_inspector.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bgpe1kot22fas 2 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/asset_table_inspector.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://cypjfwjlguowi"] 2 | 3 | [ext_resource type="Script" uid="uid://bgpe1kot22fas" path="res://addons/m_terrain/asset_manager/ui/inspector/asset_table_inspector.gd" id="1_oevxw"] 4 | 5 | [node name="Control" type="VBoxContainer"] 6 | anchors_preset = 15 7 | anchor_right = 1.0 8 | anchor_bottom = 1.0 9 | grow_horizontal = 2 10 | grow_vertical = 2 11 | script = ExtResource("1_oevxw") 12 | 13 | [node name="clear_btn" type="Button" parent="."] 14 | layout_mode = 2 15 | text = "Clear" 16 | 17 | [node name="reload_btn" type="Button" parent="."] 18 | layout_mode = 2 19 | text = "Reload" 20 | 21 | [node name="collections_label" type="RichTextLabel" parent="."] 22 | custom_minimum_size = Vector2(100, 120) 23 | layout_mode = 2 24 | bbcode_enabled = true 25 | autowrap_mode = 1 26 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/collection_inspector.gd.uid: -------------------------------------------------------------------------------- 1 | uid://8i0a7ajmifyj 2 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/collection_inspector.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://cx62jqylamm04"] 2 | 3 | [ext_resource type="Script" uid="uid://8i0a7ajmifyj" path="res://addons/m_terrain/asset_manager/ui/inspector/collection_inspector.gd" id="1_vx466"] 4 | 5 | [node name="Control" type="VBoxContainer"] 6 | anchors_preset = 15 7 | anchor_right = 1.0 8 | anchor_bottom = 1.0 9 | grow_horizontal = 2 10 | grow_vertical = 2 11 | script = ExtResource("1_vx466") 12 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/collection_item.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene format=3 uid="uid://c7sarfan15ac3"] 2 | 3 | [node name="collection" type="HBoxContainer"] 4 | anchors_preset = 15 5 | anchor_right = 1.0 6 | anchor_bottom = 1.0 7 | grow_horizontal = 2 8 | grow_vertical = 2 9 | 10 | [node name="id" type="Label" parent="."] 11 | layout_mode = 2 12 | text = "-1" 13 | 14 | [node name="name" type="LineEdit" parent="."] 15 | layout_mode = 2 16 | text = "collection name" 17 | expand_to_text_length = true 18 | 19 | [node name="remove" type="Button" parent="."] 20 | layout_mode = 2 21 | text = "x" 22 | 23 | [node name="meshes" type="Label" parent="."] 24 | layout_mode = 2 25 | size_flags_horizontal = 3 26 | autowrap_mode = 2 27 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/hlod_baker_guest_inspector.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://8p3wi7b8y3qh"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://boyvdfyc4qv16" path="res://addons/m_terrain/asset_manager/ui/inspector/hlod_baker_inspector.tscn" id="1_l1xqd"] 4 | [ext_resource type="Texture2D" uid="uid://cbdu2j1j6r76t" path="res://addons/m_terrain/icons/hlod_scene.svg" id="2_65svk"] 5 | [ext_resource type="Script" uid="uid://dfh6gdwpgs6wc" path="res://addons/m_terrain/asset_manager/ui/inspector/save_and_replace_with_hlod_button.gd" id="3_7odm2"] 6 | 7 | [node name="HlodBakerInspector" instance=ExtResource("1_l1xqd")] 8 | 9 | [node name="save_and_replace_with_hlod_button" type="Button" parent="HBoxContainer3" index="3"] 10 | custom_minimum_size = Vector2(32, 0) 11 | layout_mode = 2 12 | tooltip_text = "Save and replace with mhlod_scene" 13 | icon = ExtResource("2_65svk") 14 | alignment = 0 15 | icon_alignment = 1 16 | script = ExtResource("3_7odm2") 17 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/hlod_baker_inspector.gd.uid: -------------------------------------------------------------------------------- 1 | uid://6vka5suy1afj 2 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/hlod_baker_inspector_joined_mesh_preview.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bvkdads07bsr5 2 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/mhlod_node_inspector.gd.uid: -------------------------------------------------------------------------------- 1 | uid://ddyxq6oxgdr7u 2 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/mhlod_node_inspector.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://cl7pw54mmpvlb"] 2 | 3 | [ext_resource type="Script" uid="uid://ddyxq6oxgdr7u" path="res://addons/m_terrain/asset_manager/ui/inspector/mhlod_node_inspector.gd" id="1_nlfb7"] 4 | 5 | [node name="_VBoxContainer_26448" type="VBoxContainer"] 6 | anchors_preset = 15 7 | anchor_right = 1.0 8 | anchor_bottom = 1.0 9 | offset_left = 8.0 10 | offset_top = 8.0 11 | offset_right = -8.0 12 | offset_bottom = -8.0 13 | script = ExtResource("1_nlfb7") 14 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/mhlod_scene_inspector.gd.uid: -------------------------------------------------------------------------------- 1 | uid://w7t06tg3cm1a 2 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/mhlod_scene_inspector.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://buvo4x4g1q0tr"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://emr0fpf2qo8g" path="res://addons/m_terrain/asset_manager/ui/inspector/variation_layers/variation_layers.tscn" id="2_3rehg"] 4 | [ext_resource type="Script" uid="uid://w7t06tg3cm1a" path="res://addons/m_terrain/asset_manager/ui/inspector/mhlod_scene_inspector.gd" id="2_dc4at"] 5 | 6 | [node name="MhlodSceneInspector" type="VBoxContainer"] 7 | offset_right = 1152.0 8 | offset_bottom = 648.0 9 | script = ExtResource("2_dc4at") 10 | 11 | [node name="edit_baker_scene_button" type="Button" parent="."] 12 | layout_mode = 2 13 | text = "Edit Baker Scene" 14 | 15 | [node name="Label" type="Label" parent="."] 16 | layout_mode = 2 17 | text = "HLOD Active Variation Layers" 18 | 19 | [node name="Layers" parent="." instance=ExtResource("2_3rehg")] 20 | layout_mode = 2 21 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/save_and_replace_with_hlod_button.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Button 3 | 4 | func _ready(): 5 | if not owner.baker is HLod_Baker_Guest: 6 | queue_free() 7 | return 8 | visible = not owner.baker == EditorInterface.get_edited_scene_root() and owner.baker.scene_file_path 9 | pressed.connect(owner.baker.replace_baker_with_mhlod_scene) 10 | 11 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/save_and_replace_with_hlod_button.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dfh6gdwpgs6wc 2 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/variation_layers/layer_btn.gd.uid: -------------------------------------------------------------------------------- 1 | uid://b5almom0qmo23 2 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/variation_layers/layers.gd.uid: -------------------------------------------------------------------------------- 1 | uid://colk7jshoghh0 2 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/variation_layers/variation_layers.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://emr0fpf2qo8g"] 2 | 3 | [ext_resource type="Script" uid="uid://colk7jshoghh0" path="res://addons/m_terrain/asset_manager/ui/inspector/variation_layers/layers.gd" id="1_wefvq"] 4 | [ext_resource type="Theme" uid="uid://b3bd1lceed8ec" path="res://addons/m_terrain/gui/styles/mterrain_gui_theme.tres" id="1_wjh67"] 5 | 6 | [node name="Layers" type="GridContainer"] 7 | offset_right = 40.0 8 | offset_bottom = 40.0 9 | theme = ExtResource("1_wjh67") 10 | columns = 8 11 | script = ExtResource("1_wefvq") 12 | layer_names = PackedStringArray("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "") 13 | 14 | [node name="rename_dialog" type="ConfirmationDialog" parent="."] 15 | title = "Rename" 16 | initial_position = 4 17 | 18 | [node name="rename_line" type="LineEdit" parent="rename_dialog"] 19 | offset_left = 8.0 20 | offset_top = 8.0 21 | offset_right = 192.0 22 | offset_bottom = 49.0 23 | -------------------------------------------------------------------------------- /asset_manager/ui/inspector/variation_layers_dialog.gd.uid: -------------------------------------------------------------------------------- 1 | uid://desm26t6ldaq2 2 | -------------------------------------------------------------------------------- /asset_manager/ui/manage_glbs.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dnro4amnxhg0n 2 | -------------------------------------------------------------------------------- /asset_manager/ui/manage_groups.gd.uid: -------------------------------------------------------------------------------- 1 | uid://b1hrna04ilvss 2 | -------------------------------------------------------------------------------- /asset_manager/ui/manage_paths.gd.uid: -------------------------------------------------------------------------------- 1 | uid://c0mu27qbusgd3 2 | -------------------------------------------------------------------------------- /asset_manager/ui/manage_tags.gd.uid: -------------------------------------------------------------------------------- 1 | uid://y5h12c1uapm4 2 | -------------------------------------------------------------------------------- /asset_manager/ui/mesh_join_window.gd.uid: -------------------------------------------------------------------------------- 1 | uid://db0ikpqkgut5p 2 | -------------------------------------------------------------------------------- /asset_manager/ui/search_component.gd.uid: -------------------------------------------------------------------------------- 1 | uid://7f80hufdgyen 2 | -------------------------------------------------------------------------------- /asset_manager/ui/select_resources_by_type.gd.uid: -------------------------------------------------------------------------------- 1 | uid://6flhate7jscx 2 | -------------------------------------------------------------------------------- /asset_manager/ui/settings_glb_tree.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Tree 3 | 4 | func _can_drop_data(at_position: Vector2, data: Variant): 5 | if "files" in data and data.files[0].containsn(".glb" ): 6 | return true 7 | 8 | func _drop_data(at_position, data): 9 | for file in data.files: 10 | AssetIO.glb_load(file) 11 | -------------------------------------------------------------------------------- /asset_manager/ui/settings_glb_tree.gd.uid: -------------------------------------------------------------------------------- 1 | uid://x0seisljfdew 2 | -------------------------------------------------------------------------------- /asset_manager/ui/sort_button_group.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="ButtonGroup" format=3 uid="uid://dgsyafll57jff"] 2 | 3 | [resource] 4 | -------------------------------------------------------------------------------- /asset_manager/ui/sort_popup.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Control 3 | 4 | signal sort_mode_changed 5 | 6 | @onready var sort_type_list = find_child("sort_type_list") 7 | 8 | var button_group = preload("res://addons/m_terrain/asset_manager/ui/sort_button_group.tres") 9 | var sort_mode 10 | 11 | func _ready(): 12 | #if not EditorInterface.get_edited_scene_root() or EditorInterface.get_edited_scene_root() == self or EditorInterface.get_edited_scene_root().is_ancestor_of(self): return 13 | if not is_instance_valid(sort_type_list): return 14 | for button in sort_type_list.get_children(): 15 | button.button_group = button_group 16 | button_group.pressed.connect(func(button): 17 | if sort_mode != button.name: 18 | sort_mode = button.name 19 | sort_mode_changed.emit(button.name) 20 | ) 21 | -------------------------------------------------------------------------------- /asset_manager/ui/sort_popup.gd.uid: -------------------------------------------------------------------------------- 1 | uid://b7ugscyioll5h 2 | -------------------------------------------------------------------------------- /asset_manager/ui/tags_editor.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dh3hdnbfhb6oy 2 | -------------------------------------------------------------------------------- /brush_masks/01.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/brush_masks/01.exr -------------------------------------------------------------------------------- /brush_masks/01.exr.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="keep" 4 | -------------------------------------------------------------------------------- /brush_masks/02.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/brush_masks/02.exr -------------------------------------------------------------------------------- /brush_masks/02.exr.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="keep" 4 | -------------------------------------------------------------------------------- /brush_masks/03.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/brush_masks/03.exr -------------------------------------------------------------------------------- /brush_masks/03.exr.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="keep" 4 | -------------------------------------------------------------------------------- /brush_masks/04.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/brush_masks/04.exr -------------------------------------------------------------------------------- /brush_masks/04.exr.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="keep" 4 | -------------------------------------------------------------------------------- /brush_masks/05.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/brush_masks/05.exr -------------------------------------------------------------------------------- /brush_masks/05.exr.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="keep" 4 | -------------------------------------------------------------------------------- /brush_masks/06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/brush_masks/06.png -------------------------------------------------------------------------------- /brush_masks/06.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="keep" 4 | -------------------------------------------------------------------------------- /gdextension/.gdignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/gdextension/.gdignore -------------------------------------------------------------------------------- /gdextension/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Linux", 5 | "includePath": [ 6 | "${workspaceFolder}/godot-cpp/include/", 7 | "${workspaceFolder}/godot-cpp/gen/include/", 8 | "${workspaceFolder}/godot-cpp/gdextension/", 9 | "${workspaceFolder}/src/" 10 | ], 11 | "defines": [ 12 | "DEBUG_ENABLED" 13 | ], 14 | "compilerPath": "/usr/bin/clang", 15 | "cStandard": "c17", 16 | "cppStandard": "c++14", 17 | "intelliSenseMode": "linux-clang-x64" 18 | } 19 | ], 20 | "version": 4 21 | } -------------------------------------------------------------------------------- /gdextension/build_android.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | $SHELL -c "env -i scons platform=android target=template_release generate_bindings=yes ANDROID_HOME=/home/bardia/Android/Sdk $1" 4 | $SHELL -c "env -i scons platform=android target=template_debug generate_bindings=yes ANDROID_HOME=/home/bardia/Android/Sdk $1" 5 | -------------------------------------------------------------------------------- /gdextension/build_linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | $SHELL -c "env -i scons platform=linux target=template_release arch=x86_64 $1" 4 | $SHELL -c "env -i scons platform=linux target=template_debug arch=x86_64 $1" 5 | $SHELL -c "env -i scons platform=linux target=template_release arch=x86_32 $1" 6 | $SHELL -c "env -i scons platform=linux target=template_debug arch=x86_32 $1" 7 | -------------------------------------------------------------------------------- /gdextension/build_mac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | scons platform=macos target=template_release $1 4 | scons platform=macos target=template_debug $1 5 | scons platform=ios target=template_release $1 6 | scons platform=ios target=template_debug $1 7 | -------------------------------------------------------------------------------- /gdextension/build_windows.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | $SHELL -c "env -i scons platform=windows target=template_release arch=x86_32 generate_bindings=yes $1" 4 | $SHELL -c "env -i scons platform=windows target=template_debug arch=x86_32 generate_bindings=yes $1" 5 | $SHELL -c "env -i scons platform=windows target=template_release arch=x86_64 generate_bindings=yes $1" 6 | $SHELL -c "env -i scons platform=windows target=template_debug arch=x86_64 generate_bindings=yes $1" 7 | -------------------------------------------------------------------------------- /gdextension/src/color_brushes/mbitwise_brush.h: -------------------------------------------------------------------------------- 1 | #ifndef MBITWISEBRUSH 2 | #define MBITWISEBRUSH 3 | 4 | #include "../mcolor_brush.h" 5 | 6 | 7 | class MBitwiseBrush : public MColorBrush{ 8 | bool value=false; 9 | uint32_t bit=0; 10 | String _get_name(); 11 | void _set_property(String prop_name, Variant value); 12 | bool is_two_point_brush(); 13 | void before_draw(); 14 | void set_color(uint32_t local_x,uint32_t local_y,uint32_t x,uint32_t y,MImage* img); 15 | }; 16 | #endif -------------------------------------------------------------------------------- /gdextension/src/color_brushes/mchannel_painter.h: -------------------------------------------------------------------------------- 1 | #ifndef MCHANNELPAINTER 2 | #define MCHANNELPAINTER 3 | 4 | #include "../mcolor_brush.h" 5 | 6 | 7 | class MChannelPainter : public MColorBrush{ 8 | bool red = false; 9 | bool green = false; 10 | bool blue = false; 11 | bool alpha = false; 12 | float red_value=0; 13 | float green_value=0; 14 | float blue_value=0; 15 | float alpha_value=0; 16 | float hardness = 0.9; 17 | String _get_name(); 18 | void _set_property(String prop_name, Variant value); 19 | bool is_two_point_brush(); 20 | void before_draw(); 21 | void set_color(uint32_t local_x,uint32_t local_y,uint32_t x,uint32_t y,MImage* img); 22 | }; 23 | 24 | 25 | 26 | #endif -------------------------------------------------------------------------------- /gdextension/src/color_brushes/mpaint_16.h: -------------------------------------------------------------------------------- 1 | #ifndef MPAINT16 2 | #define MPAINT16 3 | 4 | #include "../mcolor_brush.h" 5 | 6 | 7 | class MPaint16 : public MColorBrush{ 8 | uint8_t paint_layer; 9 | String _get_name(); 10 | void _set_property(String prop_name, Variant value); 11 | bool is_two_point_brush(); 12 | void before_draw(); 13 | void set_color(uint32_t local_x,uint32_t local_y,uint32_t x,uint32_t y,MImage* img); 14 | }; 15 | #endif -------------------------------------------------------------------------------- /gdextension/src/color_brushes/mpaint_256.h: -------------------------------------------------------------------------------- 1 | #ifndef MPAINT256 2 | #define MPAINT256 3 | 4 | #include "../mcolor_brush.h" 5 | 6 | 7 | class MPaint256 : public MColorBrush{ 8 | uint8_t paint_layer; 9 | String _get_name(); 10 | void _set_property(String prop_name, Variant value); 11 | bool is_two_point_brush(); 12 | void before_draw(); 13 | void set_color(uint32_t local_x,uint32_t local_y,uint32_t x,uint32_t y,MImage* img); 14 | }; 15 | #endif -------------------------------------------------------------------------------- /gdextension/src/color_brushes/mpaint_color.h: -------------------------------------------------------------------------------- 1 | #ifndef MPAINTCOLOR 2 | #define MPAINTCOLOR 3 | 4 | #include "../mcolor_brush.h" 5 | 6 | 7 | class MPaintColor : public MColorBrush{ 8 | Color color; 9 | float hardness; 10 | String _get_name(); 11 | void _set_property(String prop_name, Variant value); 12 | bool is_two_point_brush(); 13 | void before_draw(); 14 | void set_color(uint32_t local_x,uint32_t local_y,uint32_t x,uint32_t y,MImage* img); 15 | }; 16 | #endif -------------------------------------------------------------------------------- /gdextension/src/height_brushes/mhole.h: -------------------------------------------------------------------------------- 1 | #ifndef MHOLE 2 | #define MHOLE 3 | 4 | #include "../mheight_brush.h" 5 | 6 | class MHole : public MHeightBrush { 7 | public: 8 | bool add=true; 9 | MHole(); 10 | ~MHole(); 11 | String _get_name(); 12 | Array _get_property_list(); 13 | void _set_property(String prop_name, Variant value); 14 | bool is_two_point_brush(); 15 | void before_draw(); 16 | float get_height(uint32_t x,uint32_t y); 17 | }; 18 | #endif -------------------------------------------------------------------------------- /gdextension/src/height_brushes/mraise.h: -------------------------------------------------------------------------------- 1 | #ifndef RAISEBRUSH 2 | #define RAISEBRUSH 3 | 4 | #include "../mheight_brush.h" 5 | 6 | class MRaise : public MHeightBrush { 7 | public: 8 | float hardness=0.5; 9 | float amount=0.2; 10 | float revers=false; 11 | float final_amount; 12 | MRaise(); 13 | ~MRaise(); 14 | String _get_name(); 15 | Array _get_property_list(); 16 | void _set_property(String prop_name, Variant value); 17 | bool is_two_point_brush(); 18 | void before_draw(); 19 | float get_height(uint32_t x,uint32_t y); 20 | }; 21 | #endif -------------------------------------------------------------------------------- /gdextension/src/height_brushes/mremove_layer.h: -------------------------------------------------------------------------------- 1 | #ifndef MREMOVELAYER 2 | #define MREMOVELAYER 3 | 4 | #include "../mheight_brush.h" 5 | 6 | class MRemoveLayer : public MHeightBrush { 7 | public: 8 | float hardness=0.5; 9 | float amount=0.5; 10 | MRemoveLayer(); 11 | ~MRemoveLayer(); 12 | String _get_name(); 13 | Array _get_property_list(); 14 | void _set_property(String prop_name, Variant value); 15 | bool is_two_point_brush(); 16 | void before_draw(); 17 | float get_height(uint32_t x,uint32_t y); 18 | }; 19 | #endif -------------------------------------------------------------------------------- /gdextension/src/height_brushes/msmooth.h: -------------------------------------------------------------------------------- 1 | #ifndef MSMOOTH 2 | #define MSMOOTH 3 | 4 | 5 | 6 | #include "../mheight_brush.h" 7 | 8 | class MSmooth : public MHeightBrush { 9 | public: 10 | int mode = 1; 11 | float amount = 0.5; 12 | MSmooth(); 13 | ~MSmooth(); 14 | String _get_name(); 15 | Array _get_property_list(); 16 | void _set_property(String prop_name, Variant value); 17 | bool is_two_point_brush(); 18 | void before_draw(); 19 | float get_height(uint32_t x,uint32_t y); 20 | }; 21 | 22 | 23 | #endif -------------------------------------------------------------------------------- /gdextension/src/height_brushes/mtoheight.h: -------------------------------------------------------------------------------- 1 | #ifndef MTOHEIGHT 2 | #define MTOHEIGHT 3 | 4 | #include "../mheight_brush.h" 5 | 6 | using namespace godot; 7 | 8 | class MToHeight : public MHeightBrush { 9 | public: 10 | float weight=0.4; 11 | float hardness=0.5; 12 | float offset=0.0; 13 | int mode=1; 14 | float start_height; 15 | MToHeight(); 16 | ~MToHeight(); 17 | String _get_name(); 18 | Array _get_property_list(); 19 | void _set_property(String prop_name, Variant value); 20 | bool is_two_point_brush(); 21 | void before_draw(); 22 | float get_height(uint32_t x,uint32_t y); 23 | }; 24 | #endif -------------------------------------------------------------------------------- /gdextension/src/hlod/mdecal_instance.h: -------------------------------------------------------------------------------- 1 | #ifndef ___MDECALINSTANCE__ 2 | #define ___MDECALINSTANCE__ 3 | 4 | #include "mdecal.h" 5 | #include 6 | 7 | class MDecalInstance : public VisualInstance3D { 8 | GDCLASS(MDecalInstance,VisualInstance3D); 9 | protected: 10 | static void _bind_methods(); 11 | private: 12 | Ref mdecal; 13 | 14 | 15 | public: 16 | bool has_decal() const; 17 | void set_decal(Ref input); 18 | Ref get_decal() const; 19 | 20 | AABB _get_aabb() const; 21 | 22 | void _notification(int32_t what); 23 | }; 24 | 25 | #endif -------------------------------------------------------------------------------- /gdextension/src/mchunk_generator.h: -------------------------------------------------------------------------------- 1 | #ifndef MCHUNK_GENERATOR 2 | #define MCHUNK_GENERATOR 3 | 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | using namespace godot; 10 | 11 | class MChunkGenerator : public Object{ 12 | GDCLASS(MChunkGenerator, Object); 13 | 14 | protected: 15 | static void _bind_methods(); 16 | 17 | public: 18 | static Ref generate(real_t size, real_t h_scale, bool el, bool er, bool et, bool eb); 19 | 20 | }; 21 | 22 | 23 | 24 | 25 | #endif -------------------------------------------------------------------------------- /gdextension/src/mcollision.cpp: -------------------------------------------------------------------------------- 1 | #include "mcollision.h" 2 | 3 | 4 | 5 | 6 | 7 | void MCollision::_bind_methods(){ 8 | ClassDB::bind_method(D_METHOD("is_collided"), &MCollision::is_collided); 9 | ClassDB::bind_method(D_METHOD("get_collision_position"), &MCollision::get_collision_position); 10 | } 11 | 12 | bool MCollision::is_collided(){ 13 | return collided; 14 | } 15 | Vector3 MCollision::get_collision_position(){ 16 | return collision_position; 17 | } -------------------------------------------------------------------------------- /gdextension/src/mcollision.h: -------------------------------------------------------------------------------- 1 | #ifndef MCOLLISION 2 | #define MCOLLISION 3 | 4 | 5 | #include 6 | #include 7 | 8 | using namespace godot; 9 | 10 | 11 | class MCollision : public RefCounted { 12 | GDCLASS(MCollision,RefCounted); 13 | 14 | protected: 15 | static void _bind_methods(); 16 | public: 17 | bool collided=false; 18 | Vector3 collision_position; 19 | 20 | bool is_collided(); 21 | Vector3 get_collision_position(); 22 | 23 | }; 24 | 25 | 26 | 27 | 28 | 29 | #endif -------------------------------------------------------------------------------- /gdextension/src/mcolor_brush.h: -------------------------------------------------------------------------------- 1 | #ifndef MCOLORBRUSH 2 | #define MCOLORBRUSH 3 | 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "mconfig.h" 11 | 12 | #include "mgrid.h" 13 | 14 | using namespace godot; 15 | 16 | 17 | 18 | 19 | class MColorBrush { 20 | protected: 21 | MGrid* grid; 22 | public: 23 | void set_grid(MGrid* _grid){grid = _grid;}; 24 | virtual ~MColorBrush(){}; 25 | virtual String _get_name()=0; 26 | virtual void _set_property(String prop_name, Variant value)=0; 27 | virtual bool is_two_point_brush()=0; 28 | virtual void before_draw()=0; 29 | virtual void set_color(uint32_t local_x,uint32_t local_y,uint32_t x,uint32_t y,MImage* img)=0; 30 | }; 31 | #endif -------------------------------------------------------------------------------- /gdextension/src/navmesh/mnavigation_mesh_data.h: -------------------------------------------------------------------------------- 1 | #ifndef MNAVIGATIONDATA 2 | #define MNAVIGATIONDATA 3 | 4 | #include 5 | #include 6 | 7 | using namespace godot; 8 | 9 | class MNavigationMeshData : public Resource { 10 | GDCLASS(MNavigationMeshData, Resource); 11 | 12 | protected: 13 | static void _bind_methods(); 14 | 15 | public: 16 | PackedByteArray data; 17 | bool on_all_at_creation = true; 18 | 19 | void set_data(const PackedByteArray& d); 20 | PackedByteArray get_data(); 21 | 22 | void set_on_all_at_creation(bool input); 23 | bool get_on_all_at_creation(); 24 | }; 25 | 26 | 27 | #endif -------------------------------------------------------------------------------- /gdextension/src/navmesh/mobstacle.h: -------------------------------------------------------------------------------- 1 | #ifndef MOBSTACLE 2 | #define MOBSTACLE 3 | 4 | #include 5 | 6 | 7 | using namespace godot; 8 | 9 | 10 | class MObstacle : public Node3D{ 11 | GDCLASS(MObstacle,Node3D); 12 | 13 | protected: 14 | static void _bind_methods(); 15 | 16 | public: 17 | float width=1.0; 18 | float depth=1.0; 19 | MObstacle(); 20 | ~MObstacle(); 21 | 22 | float get_width(); 23 | void set_width(float input); 24 | float get_depth(); 25 | void set_depth(float input); 26 | bool has_gizmo() const; 27 | AABB get_aabb() const; 28 | }; 29 | #endif -------------------------------------------------------------------------------- /gdextension/src/octmesh/mmesh_lod.h: -------------------------------------------------------------------------------- 1 | #ifndef _MMESH_LOD 2 | #define _MMESH_LOD 3 | 4 | 5 | #include 6 | #include 7 | 8 | using namespace godot; 9 | 10 | 11 | class MMeshLod : public Resource { 12 | GDCLASS(MMeshLod,Resource); 13 | 14 | protected: 15 | static void _bind_methods(); 16 | 17 | private: 18 | TypedArray meshes; 19 | 20 | 21 | public: 22 | MMeshLod(); 23 | ~MMeshLod(); 24 | RID get_mesh_rid(int8_t lod); 25 | RID get_mesh_rid_last(int8_t lod); 26 | Ref get_mesh(int8_t lod); 27 | Ref get_mesh_last(int8_t lod); 28 | Ref get_last_valid_mesh(); 29 | void set_meshes(TypedArray input); 30 | TypedArray get_meshes() const; 31 | 32 | 33 | bool _set(const StringName &p_name, const Variant &p_value); 34 | bool _get(const StringName &p_name, Variant &r_ret) const; 35 | void _get_property_list(List *p_list) const; 36 | bool _property_can_revert(const StringName &p_name) const; 37 | }; 38 | #endif -------------------------------------------------------------------------------- /gdextension/src/path/mpath.h: -------------------------------------------------------------------------------- 1 | #ifndef _MPATH 2 | #define _MPATH 3 | 4 | #include 5 | 6 | 7 | #include "mcurve.h" 8 | 9 | #include 10 | 11 | 12 | using namespace godot; 13 | 14 | class MPath : public Node3D{ 15 | GDCLASS(MPath,Node3D); 16 | 17 | protected: 18 | static void _bind_methods(); 19 | 20 | private: 21 | int32_t selected_handle = -1; 22 | RID scenario; 23 | RID space; 24 | void _get_handle(PackedVector3Array& positions, PackedInt32Array& ids, const MCurve::Point* p,uint32_t p_id,bool secondary) const; 25 | bool mirror_control = true; 26 | static Vector all_path_nodes; 27 | 28 | public: 29 | static TypedArray get_all_path_nodes(); 30 | MPath(); 31 | ~MPath(); 32 | Ref curve; 33 | 34 | void set_curve(Ref input); 35 | Ref get_curve(); 36 | 37 | void _notification(int p_what); 38 | void update_scenario_space(); 39 | RID get_scenario(); 40 | RID get_space(); 41 | }; 42 | #endif -------------------------------------------------------------------------------- /gdextension/src/register_types.h: -------------------------------------------------------------------------------- 1 | #ifndef EXAMPLE_REGISTER_TYPES_H 2 | #define EXAMPLE_REGISTER_TYPES_H 3 | 4 | #include 5 | 6 | using namespace godot; 7 | 8 | void initialize_test_module(ModuleInitializationLevel p_level); 9 | void uninitialize_test_module(ModuleInitializationLevel p_level); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /gizmos/aabb_gizmo.gd.uid: -------------------------------------------------------------------------------- 1 | uid://c4tskukwwlvc0 2 | -------------------------------------------------------------------------------- /gizmos/masset_mesh_gizmo.gd.uid: -------------------------------------------------------------------------------- 1 | uid://2erqhy3t0rql 2 | -------------------------------------------------------------------------------- /gizmos/mcurve_mesh_gui.gd.uid: -------------------------------------------------------------------------------- 1 | uid://creqec55xp0sw 2 | -------------------------------------------------------------------------------- /gizmos/mcurve_mesh_gui.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://b76ioum2i7yjy"] 2 | 3 | [ext_resource type="Script" uid="uid://creqec55xp0sw" path="res://addons/m_terrain/gizmos/mcurve_mesh_gui.gd" id="1_16uhh"] 4 | 5 | [node name="mcurve_mesh" type="HBoxContainer"] 6 | anchors_preset = 15 7 | anchor_right = 1.0 8 | anchor_bottom = 1.0 9 | grow_horizontal = 2 10 | grow_vertical = 2 11 | script = ExtResource("1_16uhh") 12 | 13 | [node name="active" type="CheckBox" parent="."] 14 | layout_mode = 2 15 | text = "Modify" 16 | 17 | [node name="segment_select" type="OptionButton" parent="."] 18 | visible = false 19 | layout_mode = 2 20 | 21 | [node name="socket_select" type="OptionButton" parent="."] 22 | visible = false 23 | layout_mode = 2 24 | 25 | [connection signal="visibility_changed" from="." to="." method="_on_visibility_changed"] 26 | [connection signal="toggled" from="active" to="." method="_on_active_toggled"] 27 | [connection signal="item_selected" from="segment_select" to="." method="_on_segment_select_item_selected"] 28 | [connection signal="item_selected" from="socket_select" to="." method="_on_socket_select_item_selected"] 29 | -------------------------------------------------------------------------------- /gizmos/moct_mesh_gizmo.gd.uid: -------------------------------------------------------------------------------- 1 | uid://crf23mqdw0isp 2 | -------------------------------------------------------------------------------- /gizmos/mpath_gizmo.gd.uid: -------------------------------------------------------------------------------- 1 | uid://b0rfcx16e4fo6 2 | -------------------------------------------------------------------------------- /gizmos/mpath_gizmo_gui.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bbaq5maxitm64 2 | -------------------------------------------------------------------------------- /gui/Save config.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dkgbmou7xmtbd 2 | -------------------------------------------------------------------------------- /gui/brush_decal.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Decal 3 | class_name MBrushDecal 4 | 5 | var radius:float=5.0 6 | 7 | func set_brush_size(input:float): 8 | size.x = input 9 | size.z = input 10 | radius = input/2 11 | 12 | func get_brush_size()->float: 13 | return size.x 14 | 15 | func change_brush_color(input:Color): 16 | modulate = input 17 | -------------------------------------------------------------------------------- /gui/brush_decal.gd.uid: -------------------------------------------------------------------------------- 1 | uid://da8f3ni8io72l 2 | -------------------------------------------------------------------------------- /gui/brush_decal.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://cgvj582ftey6e"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://b5cmhvvnwshvc" path="res://addons/m_terrain/icons/brush.png" id="1_tnwak"] 4 | [ext_resource type="Script" uid="uid://da8f3ni8io72l" path="res://addons/m_terrain/gui/brush_decal.gd" id="2_ws2n5"] 5 | 6 | [node name="brush_decal" type="Decal"] 7 | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 41.7598, 0, 20.5917) 8 | sorting_offset = 1.0 9 | size = Vector3(10, 1000, 10) 10 | texture_albedo = ExtResource("1_tnwak") 11 | modulate = Color(0, 0.435294, 0.027451, 1) 12 | script = ExtResource("2_ws2n5") 13 | -------------------------------------------------------------------------------- /gui/brush_layers.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends ItemList 3 | 4 | 5 | var no_image = preload("res://addons/m_terrain/icons/no_images.png") 6 | 7 | var index:int 8 | var uniform:String 9 | var brush_name:String 10 | 11 | func create_layers(input:Array): 12 | print("sss input ",input) 13 | var index = -1 14 | for i in input: 15 | index +=1 16 | var iname:String= i["name"] 17 | if iname.is_empty(): 18 | iname = "layer "+str(index) 19 | var icon:Texture = i["icon"] 20 | if not icon: 21 | icon = no_image 22 | var id = add_item(iname,icon) 23 | set_item_custom_bg_color(index,i["icon-color"]) 24 | -------------------------------------------------------------------------------- /gui/brush_layers.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dr04rwb0tovg8 2 | -------------------------------------------------------------------------------- /gui/brush_layers.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://bacapwqdybi81"] 2 | 3 | [ext_resource type="Script" uid="uid://dr04rwb0tovg8" path="res://addons/m_terrain/gui/brush_layers.gd" id="1_3au4w"] 4 | 5 | [node name="brush_layers" type="ItemList"] 6 | custom_minimum_size = Vector2(300, 250) 7 | anchors_preset = 10 8 | anchor_right = 1.0 9 | grow_horizontal = 2 10 | max_columns = 4 11 | script = ExtResource("1_3au4w") 12 | -------------------------------------------------------------------------------- /gui/channel_brush_control.gd.uid: -------------------------------------------------------------------------------- 1 | uid://c8evnnsf40p45 2 | -------------------------------------------------------------------------------- /gui/color_layer_creator_window.gd.uid: -------------------------------------------------------------------------------- 1 | uid://ddhqtgl8r18bn 2 | -------------------------------------------------------------------------------- /gui/color_layer_creator_window.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://gsibulkr5nt"] 2 | 3 | [ext_resource type="Theme" uid="uid://b3bd1lceed8ec" path="res://addons/m_terrain/gui/styles/mterrain_gui_theme.tres" id="1_f6oq8"] 4 | [ext_resource type="Script" uid="uid://ddhqtgl8r18bn" path="res://addons/m_terrain/gui/color_layer_creator_window.gd" id="1_ietn6"] 5 | [ext_resource type="PackedScene" uid="uid://dptq8ffglb0du" path="res://addons/m_terrain/gui/color_layer_creator_panel.tscn" id="3_ep3fc"] 6 | 7 | [node name="image_creator_window" type="Window"] 8 | initial_position = 1 9 | size = Vector2i(550, 600) 10 | wrap_controls = true 11 | popup_window = true 12 | theme = ExtResource("1_f6oq8") 13 | script = ExtResource("1_ietn6") 14 | 15 | [node name="PanelContainer" parent="." instance=ExtResource("3_ep3fc")] 16 | 17 | [connection signal="close_requested" from="." to="." method="_on_close_requested"] 18 | -------------------------------------------------------------------------------- /gui/control_prop_element/bool.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends BoxContainer 3 | 4 | signal prop_changed 5 | 6 | var prop_name:String 7 | var value:bool 8 | 9 | 10 | func update_name(input:String): 11 | prop_name = input 12 | $label.text = input 13 | 14 | func set_value(input:bool): 15 | value = input 16 | $Control/CheckButton.button_pressed = input 17 | 18 | 19 | func _on_check_button_toggled(button_pressed): 20 | value = button_pressed 21 | emit_signal("prop_changed",prop_name,value) 22 | -------------------------------------------------------------------------------- /gui/control_prop_element/bool.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dcx1m4f33qb0h 2 | -------------------------------------------------------------------------------- /gui/control_prop_element/float.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends BoxContainer 3 | 4 | signal prop_changed 5 | 6 | var prop_name:String 7 | var value:float 8 | var max:float = 1000000000000000000 9 | var min:float = -100000000000000000 10 | 11 | func set_max(input): 12 | max=input 13 | 14 | func set_min(input): 15 | max=input 16 | 17 | 18 | func update_name(input:String): 19 | prop_name = input 20 | $label.text = input 21 | 22 | func set_value(input:float): 23 | value = input 24 | $value.text = str(input) 25 | 26 | func _on_value_text_submitted(new_text:String): 27 | if new_text.is_valid_float(): 28 | value = new_text.to_float() 29 | if value>max: 30 | value = max 31 | if value void: 12 | item_list.item_selected.connect(_on_values_item_selected) 13 | 14 | func set_options(input:String): 15 | if not item_list: 16 | await ready 17 | var options = input.split(",") 18 | for o in options: 19 | item_list.add_item(o) 20 | 21 | func update_name(input:String): 22 | prop_name = input 23 | for i in item_list.item_count: 24 | if item_list.get_item_text(i) == input: 25 | item_list.select(i) 26 | #$Button.text = input 27 | 28 | func set_value(input:int): 29 | #print("set select ", input) 30 | value = input 31 | item_list.select(input) 32 | 33 | func _on_values_item_selected(index): 34 | value = index 35 | emit_signal("prop_changed",prop_name,value) 36 | -------------------------------------------------------------------------------- /gui/control_prop_element/int_enum.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dgqv4r30v6k6i 2 | -------------------------------------------------------------------------------- /gui/control_prop_element/int_enum.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://csovwghad2mro"] 2 | 3 | [ext_resource type="Script" uid="uid://dgqv4r30v6k6i" path="res://addons/m_terrain/gui/control_prop_element/int_enum.gd" id="1_heunk"] 4 | 5 | [node name="int_enum" type="MarginContainer"] 6 | offset_right = 112.0 7 | offset_bottom = 47.0 8 | size_flags_horizontal = 3 9 | size_flags_vertical = 3 10 | theme_override_constants/margin_left = 12 11 | theme_override_constants/margin_top = 12 12 | theme_override_constants/margin_right = 12 13 | theme_override_constants/margin_bottom = 12 14 | script = ExtResource("1_heunk") 15 | 16 | [node name="ItemList" type="ItemList" parent="."] 17 | layout_mode = 2 18 | mouse_filter = 1 19 | -------------------------------------------------------------------------------- /gui/gui_part/data_compress_option.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene format=3 uid="uid://c2pjojed3ox4q"] 2 | 3 | [node name="data_compress_option" type="OptionButton"] 4 | item_count = 3 5 | selected = 0 6 | popup/item_0/text = "COMPRESS_NONE" 7 | popup/item_0/id = 0 8 | popup/item_1/text = "COMPRESS_QOI" 9 | popup/item_1/id = 1 10 | popup/item_2/text = "COMPRESS_PNG" 11 | popup/item_2/id = 2 12 | -------------------------------------------------------------------------------- /gui/gui_part/file_compress.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene format=3 uid="uid://bt4wolcb7b55e"] 2 | 3 | [node name="file_compress" type="OptionButton"] 4 | item_count = 5 5 | selected = 0 6 | popup/item_0/text = "FILE_COMPRESSION_NONE" 7 | popup/item_0/id = 0 8 | popup/item_1/text = "FILE_COMPRESSION_FASTLZ" 9 | popup/item_1/id = 1 10 | popup/item_2/text = "FILE_COMPRESSION_DEFLATE" 11 | popup/item_2/id = 2 12 | popup/item_3/text = "FILE_COMPRESSION_ZSTD" 13 | popup/item_3/id = 3 14 | popup/item_4/text = "FILE_COMPRESSION_GZIP" 15 | popup/item_4/id = 4 16 | -------------------------------------------------------------------------------- /gui/human_male.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends MeshInstance3D 3 | 4 | 5 | func _on_visibility_changed(): 6 | if visible: 7 | $anim.play("rotate") 8 | else: 9 | $anim.stop() 10 | -------------------------------------------------------------------------------- /gui/human_male.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dmyqtylpm7uno 2 | -------------------------------------------------------------------------------- /gui/human_male.obj.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="wavefront_obj" 4 | importer_version=1 5 | type="Mesh" 6 | uid="uid://c5eueesxs7em3" 7 | path="res://.godot/imported/human_male.obj-5319b4815f3ac84bede93167a58372a3.mesh" 8 | 9 | [deps] 10 | 11 | files=["res://.godot/imported/human_male.obj-5319b4815f3ac84bede93167a58372a3.mesh"] 12 | 13 | source_file="res://addons/m_terrain/gui/human_male.obj" 14 | dest_files=["res://.godot/imported/human_male.obj-5319b4815f3ac84bede93167a58372a3.mesh", "res://.godot/imported/human_male.obj-5319b4815f3ac84bede93167a58372a3.mesh"] 15 | 16 | [params] 17 | 18 | generate_tangents=true 19 | generate_lods=true 20 | generate_shadow_mesh=true 21 | generate_lightmap_uv2=false 22 | generate_lightmap_uv2_texel_size=0.2 23 | scale_mesh=Vector3(1, 1, 1) 24 | offset_mesh=Vector3(0, 0, 0) 25 | force_disable_mesh_compression=false 26 | -------------------------------------------------------------------------------- /gui/image_creator_window.gd.uid: -------------------------------------------------------------------------------- 1 | uid://clt7nkmhx1da4 2 | -------------------------------------------------------------------------------- /gui/import Godot res.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cju48uql17f23 2 | -------------------------------------------------------------------------------- /gui/import_window.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bw6j1vtvkxmnr 2 | -------------------------------------------------------------------------------- /gui/layers_title.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://dm30obl3srq6t"] 2 | 3 | [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_46wdk"] 4 | bg_color = Color(0.329412, 0.329412, 0.329412, 1) 5 | border_width_left = 2 6 | border_width_top = 2 7 | border_width_right = 2 8 | border_width_bottom = 2 9 | border_color = Color(0, 0, 0, 1) 10 | 11 | [node name="layers_title" type="Label"] 12 | anchors_preset = 10 13 | anchor_right = 1.0 14 | offset_bottom = 30.0 15 | grow_horizontal = 2 16 | theme_override_colors/font_color = Color(0.882353, 0.905882, 0.529412, 1) 17 | theme_override_colors/font_shadow_color = Color(0.160784, 0.305882, 0, 1) 18 | theme_override_colors/font_outline_color = Color(0.0705882, 0.0627451, 0.0196078, 1) 19 | theme_override_constants/shadow_offset_x = 1 20 | theme_override_constants/shadow_offset_y = 3 21 | theme_override_constants/outline_size = 5 22 | theme_override_constants/shadow_outline_size = 5 23 | theme_override_font_sizes/font_size = 16 24 | theme_override_styles/normal = SubResource("StyleBoxFlat_46wdk") 25 | text = "Splatmap" 26 | horizontal_alignment = 1 27 | -------------------------------------------------------------------------------- /gui/mask_decal.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cnn3ptofof2so 2 | -------------------------------------------------------------------------------- /gui/mask_decal.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://cu3koya88juu"] 2 | 3 | [ext_resource type="Script" uid="uid://cnn3ptofof2so" path="res://addons/m_terrain/gui/mask_decal.gd" id="1_8ow5o"] 4 | 5 | [sub_resource type="FastNoiseLite" id="FastNoiseLite_ejyee"] 6 | 7 | [sub_resource type="NoiseTexture2D" id="NoiseTexture2D_cuo2h"] 8 | noise = SubResource("FastNoiseLite_ejyee") 9 | 10 | [node name="stencil_decal" type="Decal"] 11 | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.87774e-05, 0, 6.1725e-05) 12 | size = Vector3(8, 20000, 8) 13 | texture_albedo = SubResource("NoiseTexture2D_cuo2h") 14 | albedo_mix = 0.8 15 | script = ExtResource("1_8ow5o") 16 | -------------------------------------------------------------------------------- /gui/mtools.gd.uid: -------------------------------------------------------------------------------- 1 | uid://b4iewrh0vvwof 2 | -------------------------------------------------------------------------------- /gui/mtools_brush_item.gd.uid: -------------------------------------------------------------------------------- 1 | uid://w45vri8rw4xr 2 | -------------------------------------------------------------------------------- /gui/mtools_brush_size.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Button 3 | 4 | signal brush_size_changed 5 | 6 | @export var slider: VSlider 7 | @export var textbox: LineEdit 8 | 9 | func _ready(): 10 | slider.value_changed.connect(update_value) 11 | textbox.text_submitted.connect(update_value) 12 | 13 | var panel = get_child(0) 14 | panel.visible = false 15 | panel.position.y = -panel.size.y 16 | 17 | func update_value(new_value): 18 | var changed = false 19 | if slider.value != float(new_value): 20 | slider.value = float(new_value) 21 | changed = true 22 | if textbox.text != str(new_value): 23 | textbox.text = str(new_value) 24 | changed = true 25 | if changed: 26 | brush_size_changed.emit(float(new_value)) 27 | -------------------------------------------------------------------------------- /gui/mtools_brush_size.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cw8qay6ruv1n1 2 | -------------------------------------------------------------------------------- /gui/mtools_brushes.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cc1dp2kwxqsyt 2 | -------------------------------------------------------------------------------- /gui/mtools_color_brush_item.gd: -------------------------------------------------------------------------------- 1 | extends Control 2 | 3 | var no_image = preload("res://addons/m_terrain/icons/no_images.png") 4 | 5 | var index:int 6 | var uniform:String 7 | var brush_name:String 8 | 9 | #func create(brush_name="", icon=no_image): 10 | #if brush_name.is_empty(): 11 | # brush_name = "layer "+str(index) 12 | #var id = add_item(iname,icon) 13 | #set_item_custom_bg_color(index,i["icon-color"]) 14 | -------------------------------------------------------------------------------- /gui/mtools_color_brush_item.gd.uid: -------------------------------------------------------------------------------- 1 | uid://r6vskcsgcv6x 2 | -------------------------------------------------------------------------------- /gui/mtools_color_brush_item.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene format=3 uid="uid://bviuhw13qam3a"] 2 | 3 | [node name="Control" type="Control"] 4 | layout_mode = 3 5 | anchors_preset = 15 6 | anchor_right = 1.0 7 | anchor_bottom = 1.0 8 | grow_horizontal = 2 9 | grow_vertical = 2 10 | -------------------------------------------------------------------------------- /gui/mtools_create_color_brush.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cfuk1e6g0w1ei 2 | -------------------------------------------------------------------------------- /gui/mtools_edit_mode_selector.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dsm3hvb5jjr1g 2 | -------------------------------------------------------------------------------- /gui/mtools_keyboard_shortcut_item.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends HBoxContainer 3 | 4 | signal keymap_changed 5 | 6 | @onready var label = $Label 7 | @onready var value = $Button 8 | 9 | var waiting_for_input = false 10 | 11 | func _ready(): 12 | value.pressed.connect(begin_remap) 13 | 14 | func begin_remap(): 15 | value.text = "...waiting for input..." 16 | waiting_for_input = true 17 | 18 | func _input(event): 19 | if waiting_for_input and event is InputEventKey and event.pressed: 20 | if event.keycode in [KEY_SHIFT, KEY_CTRL, KEY_ALT]: 21 | return 22 | var new_text = "" 23 | if Input.is_key_pressed(KEY_CTRL): 24 | new_text += "ctrl " 25 | if Input.is_key_pressed(KEY_ALT): 26 | if new_text != "": 27 | new_text += "+ " 28 | new_text += "alt " 29 | if Input.is_key_pressed(KEY_SHIFT): 30 | if new_text != "": 31 | new_text += "+ " 32 | new_text += "shift " 33 | value.text = OS.get_keycode_string(event.keycode) 34 | keymap_changed.emit(name, event.keycode, Input.is_key_pressed(KEY_CTRL), Input.is_key_pressed(KEY_ALT), Input.is_key_pressed(KEY_SHIFT) ) 35 | -------------------------------------------------------------------------------- /gui/mtools_keyboard_shortcut_item.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cqkuc8gumbxpa 2 | -------------------------------------------------------------------------------- /gui/mtools_keyboard_shortcut_item.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://co53fkr4oogwn"] 2 | 3 | [ext_resource type="Script" uid="uid://cqkuc8gumbxpa" path="res://addons/m_terrain/gui/mtools_keyboard_shortcut_item.gd" id="1_e0rfo"] 4 | 5 | [node name="HBoxContainer" type="HBoxContainer"] 6 | alignment = 1 7 | script = ExtResource("1_e0rfo") 8 | 9 | [node name="Label" type="Label" parent="."] 10 | layout_mode = 2 11 | size_flags_horizontal = 3 12 | text = "key" 13 | horizontal_alignment = 2 14 | 15 | [node name="VSeparator" type="VSeparator" parent="."] 16 | layout_mode = 2 17 | theme_override_constants/separation = 32 18 | 19 | [node name="Button" type="Button" parent="."] 20 | layout_mode = 2 21 | size_flags_horizontal = 3 22 | text = "value" 23 | alignment = 0 24 | -------------------------------------------------------------------------------- /gui/mtools_layer_item.gd.uid: -------------------------------------------------------------------------------- 1 | uid://ceytm2gd114yj 2 | -------------------------------------------------------------------------------- /gui/mtools_layer_warning_popup.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Window 3 | signal confirmed 4 | func _ready(): 5 | find_child("confirm_button").pressed.connect(func(): confirmed.emit()) 6 | find_child("confirm_button").pressed.connect(queue_free) 7 | find_child("cancel_button").pressed.connect(queue_free) 8 | close_requested.connect(queue_free) 9 | -------------------------------------------------------------------------------- /gui/mtools_layer_warning_popup.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bmn8ifr8wn6c6 2 | -------------------------------------------------------------------------------- /gui/mtools_layers.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bnyseobe7yjc0 2 | -------------------------------------------------------------------------------- /gui/mtools_mask_list.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cockrb2et34ps 2 | -------------------------------------------------------------------------------- /gui/mtools_mask_list.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://b6wfdaqojnwju"] 2 | 3 | [ext_resource type="Script" uid="uid://cockrb2et34ps" path="res://addons/m_terrain/gui/mtools_mask_list.gd" id="1_sg3sf"] 4 | 5 | [node name="brush_masks" type="ItemList"] 6 | custom_minimum_size = Vector2(0, 160) 7 | anchors_preset = 10 8 | anchor_right = 1.0 9 | offset_bottom = 160.0 10 | grow_horizontal = 2 11 | allow_reselect = true 12 | max_columns = 8 13 | fixed_icon_size = Vector2i(64, 64) 14 | script = ExtResource("1_sg3sf") 15 | 16 | [connection signal="item_selected" from="." to="." method="_on_item_selected"] 17 | -------------------------------------------------------------------------------- /gui/mtools_masks.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dstl3ub6mrekw 2 | -------------------------------------------------------------------------------- /gui/mtools_options.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Button 3 | 4 | func _ready(): 5 | var panel = get_child(0) 6 | panel.visible = false 7 | panel.position.y = -panel.size.y - 4 8 | 9 | 10 | func _on_panel_container_resized(): 11 | $PanelContainer.position.y = -$PanelContainer.size.y - 2 12 | -------------------------------------------------------------------------------- /gui/mtools_options.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bv605j738r7xc 2 | -------------------------------------------------------------------------------- /gui/mtools_popup_remove_color_layer.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Window 3 | signal confirmed 4 | func _ready(): 5 | find_child("delete_layer").pressed.connect(func(): confirmed.emit(false)) 6 | find_child("delete_layer_and_image").pressed.connect(func(): confirmed.emit(true)) 7 | find_child("delete_layer").pressed.connect(queue_free) 8 | find_child("delete_layer_and_image").pressed.connect(queue_free) 9 | find_child("cancel_button").pressed.connect(queue_free) 10 | close_requested.connect(queue_free) 11 | 12 | func set_shared_uniform_label(list:Array): 13 | if list == []: 14 | find_child("shared_uniform_label").visible = false 15 | else: 16 | var names = "" 17 | for i in list: 18 | names += str(i, ", ") 19 | find_child("shared_uniform_label").text = "this image is shared with: " + names 20 | -------------------------------------------------------------------------------- /gui/mtools_popup_remove_color_layer.gd.uid: -------------------------------------------------------------------------------- 1 | uid://iv7un1lfbv4s 2 | -------------------------------------------------------------------------------- /gui/mtools_slider_value.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends BoxContainer 3 | signal value_changed 4 | @onready var slider = $VSlider 5 | @onready var textbox = $LineEdit 6 | 7 | 8 | func _ready(): 9 | slider.value_changed.connect(update_value) 10 | textbox.text_submitted.connect(update_value) 11 | 12 | func update_value(new_value): 13 | var changed = false 14 | new_value = clamp(float(new_value), slider.min_value, slider.max_value) 15 | if slider.value != float(new_value): 16 | textbox.text = str(new_value) #to ensure that it is clamped 17 | slider.value = new_value 18 | changed = true 19 | if textbox.text != str(new_value): 20 | textbox.text = str(new_value) 21 | changed = true 22 | if changed: 23 | value_changed.emit(new_value) 24 | -------------------------------------------------------------------------------- /gui/mtools_slider_value.gd.uid: -------------------------------------------------------------------------------- 1 | uid://dq0ru2u30qba7 2 | -------------------------------------------------------------------------------- /gui/mtools_status_bar.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends HBoxContainer 3 | 4 | func toggle_visible(toggled_on): 5 | visible = not toggled_on 6 | 7 | func set_height_label(input:float): 8 | $h_label.text = ("H: "+str(input)+"m").pad_decimals(2) 9 | 10 | func disable_height_label(): 11 | $h_label.text = "H: UNKOWN" 12 | 13 | func set_distance_label(input:float): 14 | $d_label.text = ("D: "+str(input)+"m").pad_decimals(2) 15 | 16 | func disable_distance_label(): 17 | $d_label.text = "D: UNKOWN" 18 | 19 | func set_grass_label(input:int): 20 | $g_label.text = " G: " + str(input) 21 | 22 | func disable_grass_label(): 23 | $g_label.text = "" 24 | 25 | func set_region_label(input:int): 26 | $r_label.text = "R:"+str(input) 27 | 28 | func disable_region_label(): 29 | $r_label.text = "" 30 | 31 | 32 | func _on_hide_status_toggled(toggled_on: bool) -> void: 33 | pass # Replace with function body. 34 | -------------------------------------------------------------------------------- /gui/mtools_status_bar.gd.uid: -------------------------------------------------------------------------------- 1 | uid://di71mip2nvecg 2 | -------------------------------------------------------------------------------- /gui/paint_panel.gd: -------------------------------------------------------------------------------- 1 | extends HBoxContainer 2 | -------------------------------------------------------------------------------- /gui/paint_panel.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cipqkqua7n4ps 2 | -------------------------------------------------------------------------------- /gui/shortcuts_panel.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Control 3 | 4 | @onready var list:ItemList = find_child("ItemList") 5 | var callbacks := [] 6 | 7 | func setup(button_icons: Array, button_callbacks: Array): 8 | callbacks = button_callbacks 9 | list.clear() 10 | list.item_selected.connect(process_selection) 11 | for icon in button_icons: 12 | list.add_icon_item(icon) 13 | 14 | func process_selection(id): 15 | if len(callbacks) -------------------------------------------------------------------------------- /icons/open.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://ryifoq2od5r2" 6 | path="res://.godot/imported/open.svg-9b876d3f8d52293806764774fd1da2f1.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/open.svg" 14 | dest_files=["res://.godot/imported/open.svg-9b876d3f8d52293806764774fd1da2f1.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/packed_scene.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icons/packed_scene.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://b3c7sde5pvg7x" 6 | path="res://.godot/imported/packed_scene.svg-c556f5f2d9923700beac0c70e76e94c1.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/packed_scene.svg" 14 | dest_files=["res://.godot/imported/packed_scene.svg-c556f5f2d9923700beac0c70e76e94c1.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/paint-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/icons/paint-normal.png -------------------------------------------------------------------------------- /icons/paint-normal.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dok8ugsvea2hg" 6 | path="res://.godot/imported/paint-normal.png-c6b2562f6c84603ad7f896e44c5ddb3e.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/paint-normal.png" 14 | dest_files=["res://.godot/imported/paint-normal.png-c6b2562f6c84603ad7f896e44c5ddb3e.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /icons/paint-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/icons/paint-pressed.png -------------------------------------------------------------------------------- /icons/paint-pressed.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dc8xvtd03qq1j" 6 | path="res://.godot/imported/paint-pressed.png-2aba7a39a29cb1d2747aa99fdd447a3c.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/paint-pressed.png" 14 | dest_files=["res://.godot/imported/paint-pressed.png-2aba7a39a29cb1d2747aa99fdd447a3c.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /icons/paint.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bv66xmw5mis4k" 6 | path="res://.godot/imported/paint.svg-cc3eae7fd8485a70abf8ca51b9d99e5e.ctex" 7 | metadata={ 8 | "has_editor_variant": true, 9 | "vram_texture": false 10 | } 11 | 12 | [deps] 13 | 14 | source_file="res://addons/m_terrain/icons/paint.svg" 15 | dest_files=["res://.godot/imported/paint.svg-cc3eae7fd8485a70abf8ca51b9d99e5e.ctex"] 16 | 17 | [params] 18 | 19 | compress/mode=0 20 | compress/high_quality=false 21 | compress/lossy_quality=0.7 22 | compress/hdr_compression=1 23 | compress/normal_map=0 24 | compress/channel_pack=0 25 | mipmaps/generate=false 26 | mipmaps/limit=-1 27 | roughness/mode=0 28 | roughness/src_normal="" 29 | process/fix_alpha_border=true 30 | process/premult_alpha=false 31 | process/normal_map_invert_y=false 32 | process/hdr_as_srgb=false 33 | process/hdr_clamp_exposure=false 34 | process/size_limit=0 35 | detect_3d/compress_to=1 36 | svg/scale=1.0 37 | editor/scale_with_editor_scale=true 38 | editor/convert_colors_with_editor_theme=true 39 | -------------------------------------------------------------------------------- /icons/physics_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://da03coo0w347n" 6 | path="res://.godot/imported/physics_icon.svg-49f9fe77f5412ef95e99ba4e0fc155a7.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/physics_icon.svg" 14 | dest_files=["res://.godot/imported/physics_icon.svg-49f9fe77f5412ef95e99ba4e0fc155a7.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/raise_brush_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://5i1jry2pnvsj" 6 | path="res://.godot/imported/raise_brush_icon.svg-ee8613b8f51cc9c183fe3c0e54296441.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/raise_brush_icon.svg" 14 | dest_files=["res://.godot/imported/raise_brush_icon.svg-ee8613b8f51cc9c183fe3c0e54296441.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/reverse_brush_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://byb7ewq1mckcf" 6 | path="res://.godot/imported/reverse_brush_icon.svg-0b1bf8352bb6eeb0118ce8bcc82d1095.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/reverse_brush_icon.svg" 14 | dest_files=["res://.godot/imported/reverse_brush_icon.svg-0b1bf8352bb6eeb0118ce8bcc82d1095.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/rotate_disabled_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bpu07pul55tyv" 6 | path="res://.godot/imported/rotate_disabled_icon.svg-f310956a0cf19723fe90dd73e32be5a8.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/rotate_disabled_icon.svg" 14 | dest_files=["res://.godot/imported/rotate_disabled_icon.svg-f310956a0cf19723fe90dd73e32be5a8.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/rotate_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://8bsyqbwgdlor" 6 | path="res://.godot/imported/rotate_icon.svg-e241df3614f638f91b3ebc8fed65a07a.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/rotate_icon.svg" 14 | dest_files=["res://.godot/imported/rotate_icon.svg-e241df3614f638f91b3ebc8fed65a07a.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/rotation.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cjs22nfbjl71l" 6 | path="res://.godot/imported/rotation.svg-5da06ade55b907392c07caeb6c805099.ctex" 7 | metadata={ 8 | "has_editor_variant": true, 9 | "vram_texture": false 10 | } 11 | 12 | [deps] 13 | 14 | source_file="res://addons/m_terrain/icons/rotation.svg" 15 | dest_files=["res://.godot/imported/rotation.svg-5da06ade55b907392c07caeb6c805099.ctex"] 16 | 17 | [params] 18 | 19 | compress/mode=0 20 | compress/high_quality=false 21 | compress/lossy_quality=0.7 22 | compress/hdr_compression=1 23 | compress/normal_map=0 24 | compress/channel_pack=0 25 | mipmaps/generate=false 26 | mipmaps/limit=-1 27 | roughness/mode=0 28 | roughness/src_normal="" 29 | process/fix_alpha_border=true 30 | process/premult_alpha=false 31 | process/normal_map_invert_y=false 32 | process/hdr_as_srgb=false 33 | process/hdr_clamp_exposure=false 34 | process/size_limit=0 35 | detect_3d/compress_to=1 36 | svg/scale=1.0 37 | editor/scale_with_editor_scale=true 38 | editor/convert_colors_with_editor_theme=true 39 | -------------------------------------------------------------------------------- /icons/save_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/icons/save_active.png -------------------------------------------------------------------------------- /icons/save_active.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://balqs3xpw1e3p" 6 | path="res://.godot/imported/save_active.png-758ea1124ee860b4879c519910c5b9bb.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/save_active.png" 14 | dest_files=["res://.godot/imported/save_active.png-758ea1124ee860b4879c519910c5b9bb.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /icons/save_deactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/icons/save_deactive.png -------------------------------------------------------------------------------- /icons/save_deactive.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://vj2s60luchw7" 6 | path="res://.godot/imported/save_deactive.png-4d38f2b11928d31fe1a01fbc9ead326a.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/save_deactive.png" 14 | dest_files=["res://.godot/imported/save_deactive.png-4d38f2b11928d31fe1a01fbc9ead326a.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /icons/save_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dj86rx42xt6wc" 6 | path="res://.godot/imported/save_icon.svg-1bd5835ef7201c14e61b40f3cb921cf8.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/save_icon.svg" 14 | dest_files=["res://.godot/imported/save_icon.svg-1bd5835ef7201c14e61b40f3cb921cf8.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/save_icon_disable.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://btn8tgu2yhlxj" 6 | path="res://.godot/imported/save_icon_disable.svg-617bf87679baadf262a3b5977269a03e.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/save_icon_disable.svg" 14 | dest_files=["res://.godot/imported/save_icon_disable.svg-617bf87679baadf262a3b5977269a03e.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/scale_disabled_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://es81s75t7i2n" 6 | path="res://.godot/imported/scale_disabled_icon.svg-1b928acecda5638618292749a18cbf34.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/scale_disabled_icon.svg" 14 | dest_files=["res://.godot/imported/scale_disabled_icon.svg-1b928acecda5638618292749a18cbf34.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/scale_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://c5yiqj08mgihl" 6 | path="res://.godot/imported/scale_icon.svg-eb28979468b0fee5c83ef39a2a53b120.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/scale_icon.svg" 14 | dest_files=["res://.godot/imported/scale_icon.svg-eb28979468b0fee5c83ef39a2a53b120.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/sculpt_terrain.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://kmamiw46mftf" 6 | path="res://.godot/imported/sculpt_terrain.svg-6bb3c406d1a6169745d9a508fbf101e8.ctex" 7 | metadata={ 8 | "has_editor_variant": true, 9 | "vram_texture": false 10 | } 11 | 12 | [deps] 13 | 14 | source_file="res://addons/m_terrain/icons/sculpt_terrain.svg" 15 | dest_files=["res://.godot/imported/sculpt_terrain.svg-6bb3c406d1a6169745d9a508fbf101e8.ctex"] 16 | 17 | [params] 18 | 19 | compress/mode=0 20 | compress/high_quality=false 21 | compress/lossy_quality=0.7 22 | compress/hdr_compression=1 23 | compress/normal_map=0 24 | compress/channel_pack=0 25 | mipmaps/generate=false 26 | mipmaps/limit=-1 27 | roughness/mode=0 28 | roughness/src_normal="" 29 | process/fix_alpha_border=true 30 | process/premult_alpha=false 31 | process/normal_map_invert_y=false 32 | process/hdr_as_srgb=false 33 | process/hdr_clamp_exposure=false 34 | process/size_limit=0 35 | detect_3d/compress_to=1 36 | svg/scale=1.0 37 | editor/scale_with_editor_scale=true 38 | editor/convert_colors_with_editor_theme=true 39 | -------------------------------------------------------------------------------- /icons/search_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bq8ier4u23etm" 6 | path="res://.godot/imported/search_icon.svg-3266e0a0e9325cdab1351905a6290a45.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/search_icon.svg" 14 | dest_files=["res://.godot/imported/search_icon.svg-3266e0a0e9325cdab1351905a6290a45.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/settings_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bw2njdr7ynhtk" 6 | path="res://.godot/imported/settings_icon.svg-3542b39b807f7b578dc7af22d8ab8fd7.ctex" 7 | metadata={ 8 | "has_editor_variant": true, 9 | "vram_texture": false 10 | } 11 | 12 | [deps] 13 | 14 | source_file="res://addons/m_terrain/icons/settings_icon.svg" 15 | dest_files=["res://.godot/imported/settings_icon.svg-3542b39b807f7b578dc7af22d8ab8fd7.ctex"] 16 | 17 | [params] 18 | 19 | compress/mode=0 20 | compress/high_quality=false 21 | compress/lossy_quality=0.7 22 | compress/hdr_compression=1 23 | compress/normal_map=0 24 | compress/channel_pack=0 25 | mipmaps/generate=false 26 | mipmaps/limit=-1 27 | roughness/mode=0 28 | roughness/src_normal="" 29 | process/fix_alpha_border=true 30 | process/premult_alpha=false 31 | process/normal_map_invert_y=false 32 | process/hdr_as_srgb=false 33 | process/hdr_clamp_exposure=false 34 | process/size_limit=0 35 | detect_3d/compress_to=1 36 | svg/scale=1.0 37 | editor/scale_with_editor_scale=true 38 | editor/convert_colors_with_editor_theme=true 39 | -------------------------------------------------------------------------------- /icons/show.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/icons/show.png -------------------------------------------------------------------------------- /icons/show.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://h6h1w7oah3kx" 6 | path="res://.godot/imported/show.png-b6f0fd77cdcfcdeb31b2481976608ec2.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/show.png" 14 | dest_files=["res://.godot/imported/show.png-b6f0fd77cdcfcdeb31b2481976608ec2.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /icons/slider_grabber.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bxeg3w2i6m1dd" 6 | path="res://.godot/imported/slider_grabber.svg-29e6a9dfa935cd5e9316051ef5634bfc.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/slider_grabber.svg" 14 | dest_files=["res://.godot/imported/slider_grabber.svg-29e6a9dfa935cd5e9316051ef5634bfc.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/slider_grabber_highlight_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://b0m46wjnrfder" 6 | path="res://.godot/imported/slider_grabber_highlight_icon.svg-b8a8342e31fd5797cca85da080966fc9.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/slider_grabber_highlight_icon.svg" 14 | dest_files=["res://.godot/imported/slider_grabber_highlight_icon.svg-b8a8342e31fd5797cca85da080966fc9.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/snap_grid_disabled_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://c1x4hadtg1807" 6 | path="res://.godot/imported/snap_grid_disabled_icon.svg-5787e6dd8a8afa5377cc8ac193db48c0.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/snap_grid_disabled_icon.svg" 14 | dest_files=["res://.godot/imported/snap_grid_disabled_icon.svg-5787e6dd8a8afa5377cc8ac193db48c0.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/snap_grid_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cjpbohf3ons87" 6 | path="res://.godot/imported/snap_grid_icon.svg-76c2a3535bb515e8012337e18901f73e.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/snap_grid_icon.svg" 14 | dest_files=["res://.godot/imported/snap_grid_icon.svg-76c2a3535bb515e8012337e18901f73e.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/sort_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://8qcyrpxdy2po" 6 | path="res://.godot/imported/sort_icon.svg-a008df8aff081936f6df9bcbb1f75084.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/sort_icon.svg" 14 | dest_files=["res://.godot/imported/sort_icon.svg-a008df8aff081936f6df9bcbb1f75084.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/switch_direction_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://ckrq26s3bkih3" 6 | path="res://.godot/imported/switch_direction_icon.svg-685456fe990114ea89d3df8486e9ed04.ctex" 7 | metadata={ 8 | "has_editor_variant": true, 9 | "vram_texture": false 10 | } 11 | 12 | [deps] 13 | 14 | source_file="res://addons/m_terrain/icons/switch_direction_icon.svg" 15 | dest_files=["res://.godot/imported/switch_direction_icon.svg-685456fe990114ea89d3df8486e9ed04.ctex"] 16 | 17 | [params] 18 | 19 | compress/mode=0 20 | compress/high_quality=false 21 | compress/lossy_quality=0.7 22 | compress/hdr_compression=1 23 | compress/normal_map=0 24 | compress/channel_pack=0 25 | mipmaps/generate=false 26 | mipmaps/limit=-1 27 | roughness/mode=0 28 | roughness/src_normal="" 29 | process/fix_alpha_border=true 30 | process/premult_alpha=false 31 | process/normal_map_invert_y=false 32 | process/hdr_as_srgb=false 33 | process/hdr_clamp_exposure=false 34 | process/size_limit=0 35 | detect_3d/compress_to=1 36 | svg/scale=1.0 37 | editor/scale_with_editor_scale=true 38 | editor/convert_colors_with_editor_theme=true 39 | -------------------------------------------------------------------------------- /icons/tag_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bo00mqw6wv8av" 6 | path="res://.godot/imported/tag_icon.svg-159d1080cf593482efade2f23bf8293c.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/tag_icon.svg" 14 | dest_files=["res://.godot/imported/tag_icon.svg-159d1080cf593482efade2f23bf8293c.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/terrain_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/icons/terrain_icon.png -------------------------------------------------------------------------------- /icons/terrain_icon.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bsdfn2yec6vtv" 6 | path="res://.godot/imported/terrain_icon.png-7662a98f11adcb134a1396ae4615bee6.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/terrain_icon.png" 14 | dest_files=["res://.godot/imported/terrain_icon.png-7662a98f11adcb134a1396ae4615bee6.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /icons/tick_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://o6bjob1w4w0w" 6 | path="res://.godot/imported/tick_icon.svg-754ddccc6a1d73647cf677771d30998e.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/tick_icon.svg" 14 | dest_files=["res://.godot/imported/tick_icon.svg-754ddccc6a1d73647cf677771d30998e.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/toggle_connection.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://c32td7i377ewu" 6 | path="res://.godot/imported/toggle_connection.svg-98488a96328727a238b1a03a7b759541.ctex" 7 | metadata={ 8 | "has_editor_variant": true, 9 | "vram_texture": false 10 | } 11 | 12 | [deps] 13 | 14 | source_file="res://addons/m_terrain/icons/toggle_connection.svg" 15 | dest_files=["res://.godot/imported/toggle_connection.svg-98488a96328727a238b1a03a7b759541.ctex"] 16 | 17 | [params] 18 | 19 | compress/mode=0 20 | compress/high_quality=false 21 | compress/lossy_quality=0.7 22 | compress/hdr_compression=1 23 | compress/normal_map=0 24 | compress/channel_pack=0 25 | mipmaps/generate=false 26 | mipmaps/limit=-1 27 | roughness/mode=0 28 | roughness/src_normal="" 29 | process/fix_alpha_border=true 30 | process/premult_alpha=false 31 | process/normal_map_invert_y=false 32 | process/hdr_as_srgb=false 33 | process/hdr_clamp_exposure=false 34 | process/size_limit=0 35 | detect_3d/compress_to=1 36 | svg/scale=1.0 37 | editor/scale_with_editor_scale=true 38 | editor/convert_colors_with_editor_theme=true 39 | -------------------------------------------------------------------------------- /icons/trash.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bpe0ct6a6rc0b" 6 | path="res://.godot/imported/trash.svg-a7b754c72ae2fb87e4d457889259ebaa.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/trash.svg" 14 | dest_files=["res://.godot/imported/trash.svg-a7b754c72ae2fb87e4d457889259ebaa.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /icons/tsnap_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/icons/tsnap_icon.png -------------------------------------------------------------------------------- /icons/tsnap_icon.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dl46tixprq2ro" 6 | path="res://.godot/imported/tsnap_icon.png-3d3cafa79db00a2e849830ba4628ce16.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/tsnap_icon.png" 14 | dest_files=["res://.godot/imported/tsnap_icon.png-3d3cafa79db00a2e849830ba4628ce16.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /icons/tsnap_icon_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/icons/tsnap_icon_pressed.png -------------------------------------------------------------------------------- /icons/tsnap_icon_pressed.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dow4horhd3x6v" 6 | path="res://.godot/imported/tsnap_icon_pressed.png-033b63880538ce81eeec190409033cf7.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/tsnap_icon_pressed.png" 14 | dest_files=["res://.godot/imported/tsnap_icon_pressed.png-033b63880538ce81eeec190409033cf7.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /icons/walk_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://2dpvr41alpt8" 6 | path="res://.godot/imported/walk_icon.svg-18243c4282b1183d699db0b62b64ff9f.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/m_terrain/icons/walk_icon.svg" 14 | dest_files=["res://.godot/imported/walk_icon.svg-18243c4282b1183d699db0b62b64ff9f.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /inspector/gui/curve_terrain.gd.uid: -------------------------------------------------------------------------------- 1 | uid://kobtpcesvvg0 2 | -------------------------------------------------------------------------------- /inspector/gui/mpath_inspector_gui.gd.uid: -------------------------------------------------------------------------------- 1 | uid://d1aye7volh22v 2 | -------------------------------------------------------------------------------- /inspector/mpath.gd: -------------------------------------------------------------------------------- 1 | extends EditorInspectorPlugin 2 | 3 | var gizmo:EditorNode3DGizmoPlugin 4 | 5 | var gui_res = preload("res://addons/m_terrain/inspector/gui/mpath_inspector_gui.tscn") 6 | var gui 7 | var curve_terrain_res = preload("res://addons/m_terrain/inspector/gui/curve_terrain.tscn") 8 | var curve_terrain:Control 9 | 10 | func _can_handle(object): 11 | return object is MPath 12 | 13 | func _parse_begin(object): 14 | if not(object is MPath) or not object or not object.curve: 15 | return 16 | if not gui: 17 | gui = gui_res.instantiate() 18 | add_custom_control(gui) 19 | gui.gizmo = gizmo 20 | gui.set_path(object) 21 | ## Curve terrain 22 | if gizmo.tools.get_active_mterrain(): 23 | if not curve_terrain: 24 | curve_terrain = curve_terrain_res.instantiate() 25 | add_custom_control(curve_terrain) 26 | gizmo.curve_terrain.terrain = gizmo.tools.get_active_mterrain() 27 | curve_terrain.start_curve_terrain(gizmo,object) 28 | 29 | -------------------------------------------------------------------------------- /inspector/mpath.gd.uid: -------------------------------------------------------------------------------- 1 | uid://bk6i6nfjyb0uc 2 | -------------------------------------------------------------------------------- /m_terrain.gd.uid: -------------------------------------------------------------------------------- 1 | uid://cm3p2xgatawdv 2 | -------------------------------------------------------------------------------- /mterrain_settings.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Object 3 | class_name MTerrainSettings 4 | 5 | 6 | 7 | static func add_projects_settings()->void: 8 | if not ProjectSettings.has_setting(MHlodNode3D.state_data_get_prop_name()): 9 | ProjectSettings.set(MHlodNode3D.state_data_get_prop_name(),MHlodNode3D.state_data_get_cache_size()) 10 | ProjectSettings.add_property_info({ 11 | "name":MHlodNode3D.state_data_get_prop_name(), 12 | "class_name":&"", 13 | "type":TYPE_INT, 14 | "hint":PROPERTY_HINT_NONE, 15 | "hint_string":"", 16 | "usage":PROPERTY_USAGE_DEFAULT 17 | }) 18 | ProjectSettings.set_initial_value(MHlodNode3D.state_data_get_prop_name(),MHlodNode3D.state_data_get_cache_size()) 19 | -------------------------------------------------------------------------------- /mterrain_settings.gd.uid: -------------------------------------------------------------------------------- 1 | uid://rnebcn7x6qkq 2 | -------------------------------------------------------------------------------- /plugin.cfg: -------------------------------------------------------------------------------- 1 | [plugin] 2 | 3 | name="MTerrain" 4 | description="A simple terrain tool for Godot 4.1" 5 | author="Mohsen Zare" 6 | version="0.17.0-dev" 7 | script="m_terrain.gd" 8 | -------------------------------------------------------------------------------- /shader_include/paint16.gdshaderinc: -------------------------------------------------------------------------------- 1 | //Include this before Vertex function 2 | vec4 get_indices16(in sampler2D _tex,out vec2 _weight){ 3 | _weight = vec2(textureSize(_tex,0))*(region_uv - region_b); 4 | ivec2 ipx_pos = ivec2(_weight); 5 | _weight = fract(_weight); 6 | vec4 o; 7 | o.x = texelFetch(_tex,ipx_pos,0).r*15.0; 8 | o.y = texelFetch(_tex,ipx_pos+ivec2(1,0),0).r*15.0; 9 | o.z = texelFetch(_tex,ipx_pos+ivec2(0,1),0).r*15.0; 10 | o.w = texelFetch(_tex,ipx_pos+ivec2(1,1),0).r*15.0; 11 | return o; 12 | } 13 | vec4 get_texture16(in sampler2DArray _tex_arr,in lowp vec4 _indices,in vec2 _weight,in vec2 _uv){ 14 | vec4 a00 = texture(_tex_arr,vec3(_uv,_indices.x)); 15 | vec4 a01 = texture(_tex_arr,vec3(_uv,_indices.y)); 16 | vec4 a10 = texture(_tex_arr,vec3(_uv,_indices.z)); 17 | vec4 a11 = texture(_tex_arr,vec3(_uv,_indices.w)); 18 | vec4 t = mix(a00,a01,_weight.x); 19 | vec4 b = mix(a10,a11,_weight.x); 20 | return mix(t,b,_weight.y); 21 | } -------------------------------------------------------------------------------- /shader_include/paint16.gdshaderinc.uid: -------------------------------------------------------------------------------- 1 | uid://bo7n2rs4skalr 2 | -------------------------------------------------------------------------------- /shader_include/paint256.gdshaderinc: -------------------------------------------------------------------------------- 1 | //Include this before Vertex function 2 | vec4 get_indices256(in sampler2D _tex,out vec2 _weight){ 3 | _weight = vec2(textureSize(_tex,0))*(region_uv - region_b); 4 | ivec2 ipx_pos = ivec2(_weight); 5 | _weight = fract(_weight); 6 | vec4 o; 7 | o.x = texelFetch(_tex,ipx_pos,0).r*255.0; 8 | o.y = texelFetch(_tex,ipx_pos+ivec2(1,0),0).r*255.0; 9 | o.z = texelFetch(_tex,ipx_pos+ivec2(0,1),0).r*255.0; 10 | o.w = texelFetch(_tex,ipx_pos+ivec2(1,1),0).r*255.0; 11 | return o; 12 | } 13 | vec4 get_texture256(in sampler2DArray _tex_arr,in lowp vec4 _indices,in vec2 _weight,in vec2 _uv){ 14 | vec4 a00 = texture(_tex_arr,vec3(_uv,_indices.x)); 15 | vec4 a01 = texture(_tex_arr,vec3(_uv,_indices.y)); 16 | vec4 a10 = texture(_tex_arr,vec3(_uv,_indices.z)); 17 | vec4 a11 = texture(_tex_arr,vec3(_uv,_indices.w)); 18 | vec4 t = mix(a00,a01,_weight.x); 19 | vec4 b = mix(a10,a11,_weight.x); 20 | return mix(t,b,_weight.y); 21 | } -------------------------------------------------------------------------------- /shader_include/paint256.gdshaderinc.uid: -------------------------------------------------------------------------------- 1 | uid://cnntu0ipxwa25 2 | -------------------------------------------------------------------------------- /shaders/boundary.gdshader.uid: -------------------------------------------------------------------------------- 1 | uid://bft2k2odj0f7g 2 | -------------------------------------------------------------------------------- /show_region.gdshader: -------------------------------------------------------------------------------- 1 | shader_type spatial; 2 | render_mode unshaded; 3 | 4 | 5 | 6 | uniform sampler2D mterrain_heightmap:filter_nearest; 7 | uniform sampler2D mterrain_normals:filter_nearest; 8 | 9 | 10 | uniform vec3 region_world_position; 11 | uniform float region_size; 12 | uniform float region_a; 13 | uniform float region_b; 14 | uniform int min_lod; 15 | varying vec3 world_pos; 16 | varying vec2 region_uv; 17 | 18 | void vertex(){ 19 | world_pos = (NODE_POSITION_WORLD + VERTEX); 20 | region_uv = (world_pos.xz - region_world_position.xz)/region_size; 21 | region_uv = region_uv*region_a + region_b; 22 | VERTEX.y = texture(mterrain_heightmap, region_uv).r; 23 | world_pos.y = VERTEX.y; 24 | vec3 n = texture(mterrain_normals, region_uv).rgb; 25 | n = fma(n,vec3(2.0),vec3(-1.0)); 26 | NORMAL = n; 27 | //Scale world uv for terrain texture 28 | world_pos /= 100.0; 29 | 30 | } 31 | 32 | void fragment(){ 33 | vec2 r = clamp(vec2(0.),vec2(1.),region_uv); 34 | ALBEDO = vec3(r,0.0)*0.2; 35 | } 36 | -------------------------------------------------------------------------------- /show_region.gdshader.uid: -------------------------------------------------------------------------------- 1 | uid://ptlo0rrpupoj 2 | -------------------------------------------------------------------------------- /start.gdshader: -------------------------------------------------------------------------------- 1 | shader_type spatial; 2 | 3 | 4 | 5 | uniform sampler2D mterrain_heightmap:filter_nearest; 6 | uniform sampler2D mterrain_normals:filter_nearest; 7 | 8 | uniform vec3 region_world_position; 9 | uniform float region_size; 10 | uniform float region_a; 11 | uniform float region_b; 12 | uniform int min_lod; 13 | varying vec3 world_pos; 14 | varying vec2 region_uv; 15 | 16 | void vertex(){ 17 | world_pos = (NODE_POSITION_WORLD + VERTEX); 18 | region_uv = (world_pos.xz - region_world_position.xz)/region_size; 19 | region_uv = region_uv*region_a + region_b; 20 | VERTEX.y = texture(mterrain_heightmap, region_uv).r; 21 | world_pos.y = VERTEX.y; 22 | vec3 n = texture(mterrain_normals, region_uv).rgb; 23 | n.rb=fma(n.rb,vec2(2.0),vec2(-1.0)); 24 | NORMAL = n; 25 | //Scale world uv for terrain texture 26 | world_pos /= 10.0; 27 | 28 | } 29 | 30 | void fragment(){ 31 | ALBEDO = vec3(0.4); 32 | } 33 | -------------------------------------------------------------------------------- /start.gdshader.uid: -------------------------------------------------------------------------------- 1 | uid://ci1be5t3nv4vs 2 | -------------------------------------------------------------------------------- /start_material.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/start_material.res -------------------------------------------------------------------------------- /start_material_opengl.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohsenph69/Godot-MTerrain-plugin/3bfee4b28544ea0d489bf750af83ea1b149b91e5/start_material_opengl.res -------------------------------------------------------------------------------- /start_opengl.gdshader: -------------------------------------------------------------------------------- 1 | shader_type spatial; 2 | 3 | 4 | 5 | uniform sampler2D mterrain_heightmap:filter_nearest; 6 | uniform sampler2D mterrain_normals:filter_nearest; 7 | 8 | uniform vec3 region_world_position; 9 | uniform float region_size; 10 | uniform float region_a; 11 | uniform float region_b; 12 | uniform int min_lod; 13 | varying vec3 world_pos; 14 | varying vec2 region_uv; 15 | 16 | void vertex(){ 17 | world_pos = (NODE_POSITION_WORLD + VERTEX); 18 | region_uv = (world_pos.xz - region_world_position.xz)/region_size; 19 | region_uv = region_uv*region_a + region_b; 20 | VERTEX.y = texture(mterrain_heightmap, region_uv).r; 21 | world_pos.y = VERTEX.y; 22 | vec3 n = texture(mterrain_normals, region_uv).rgb; 23 | n.rb=n.rb*2.0 - 1.0; 24 | NORMAL = n; 25 | //Scale world uv for terrain texture 26 | world_pos /= 10.0; 27 | 28 | } 29 | 30 | void fragment(){ 31 | ALBEDO = vec3(0.4); 32 | } 33 | -------------------------------------------------------------------------------- /start_opengl.gdshader.uid: -------------------------------------------------------------------------------- 1 | uid://bqhj5mwynksjj 2 | --------------------------------------------------------------------------------