diff --git a/SCsub b/SCsub index 2505d28a..8e3d803a 100644 --- a/SCsub +++ b/SCsub @@ -1,8 +1,10 @@ -Import('env') -Import('env_modules') +Import("env") +Import("env_modules") -# Note, support for FastNoise2 requires C++17, and doesn't work yet on ARM. +# Note, support for FastNoise2 requires C++17, and only works on x86. FAST_NOISE_2_SRC = env["voxel_fast_noise_2"] +if not env["arch"].startswith("x86"): + FAST_NOISE_2_SRC = False RUN_TESTS = env["voxel_tests"] @@ -107,7 +109,7 @@ if FAST_NOISE_2_SRC: env_voxel.Append(CXXFLAGS=["-Wno-unknown-pragmas"]) # Build from source. Should be the simplest, but requires C++17 - SConscript('thirdparty/fast_noise_2/SConscript', exports = ["env", "env_voxel"]) + SConscript("thirdparty/fast_noise_2/SConscript", exports = ["env", "env_voxel"]) env_voxel.Append(CPPPATH=["thirdparty/fast_noise_2/include"]) @@ -128,12 +130,12 @@ for f in voxel_files: # TODO Check webassembly builds (`env["platform"] == "javascript"`) # Ignored clang warnings because Godot's codebase is old and isn't using override yet -if env['platform'] in ['osx', 'android']: - env_voxel.Append(CXXFLAGS=['-Wno-inconsistent-missing-override']) +if env["platform"] in ["osx", "android"]: + env_voxel.Append(CXXFLAGS=["-Wno-inconsistent-missing-override"]) # Doesn't work, since the rest of Godot doesn't use this, linking fails. # No safe STL boundary checks for you. -#if env['target'] == 'debug': +#if env["target"] == "debug": # if env.msvc: # # Enable STL bound checks, Godot's master environment doesn't do it -# env_voxel.Append(CXXFLAGS=['/D_DEBUG']) +# env_voxel.Append(CXXFLAGS=["/D_DEBUG"]) diff --git a/config.py b/config.py index 9187b05b..472ea5e1 100644 --- a/config.py +++ b/config.py @@ -11,7 +11,7 @@ def configure(env): env_vars.Add(BoolVariable("voxel_tests", "Build with tests for the voxel module, which will run on startup of the engine", False)) - env_vars.Add(BoolVariable("voxel_fast_noise_2", "Build FastNoise2 support", True)) + env_vars.Add(BoolVariable("voxel_fast_noise_2", "Build FastNoise2 support (x86-only)", True)) env_vars.Update(env) Help(env_vars.GenerateHelpText(env)) diff --git a/doc/classes/VoxelBlockSerializer.xml b/doc/classes/VoxelBlockSerializer.xml index 1c9ea75a..f86c4ccc 100644 --- a/doc/classes/VoxelBlockSerializer.xml +++ b/doc/classes/VoxelBlockSerializer.xml @@ -27,19 +27,19 @@ - - - - + + + + Reads the data of a [VoxelBuffer] from a [StreamPeer]. You must provide the number of bytes to read, and the destination buffer must have the expected size. - - - + + + Stores the data of a [VoxelBuffer] into a [StreamPeer]. Returns the number of written bytes. diff --git a/doc/classes/VoxelBlockyLibrary.xml b/doc/classes/VoxelBlockyLibrary.xml index 9c7718e2..e6ba4387 100644 --- a/doc/classes/VoxelBlockyLibrary.xml +++ b/doc/classes/VoxelBlockyLibrary.xml @@ -19,12 +19,12 @@ - - ID of the model. It must be comprised between 0 and [member voxel_count] excluded. This ID will be used in voxel data. - - Name of the model. It is convenient to give one for better organization. + + Creates a new model attached to this library. + [code]id[/code]: ID of the model. It must be comprised between 0 and [member voxel_count] excluded. This ID will be used in voxel data. + [code]name[/code]: Name of the model. It is convenient to give one for better organization. @@ -36,21 +36,21 @@ - + Gets a model from its ID. - + Finds the first model having the specified name. If not found, returns [code]null[/code]. - + Finds the ID of the first model having the specified name. If not found, returns [code]null[/code]. diff --git a/doc/classes/VoxelBlockyModel.xml b/doc/classes/VoxelBlockyModel.xml index ce8ef9b5..b12aff6a 100644 --- a/doc/classes/VoxelBlockyModel.xml +++ b/doc/classes/VoxelBlockyModel.xml @@ -18,7 +18,7 @@ - + Gets the material override for a specific surface of the model. @@ -31,14 +31,14 @@ - + Tells if a specific surface produces mesh-based collisions. - + Sets the ID of the model. This method is deprecated. Changing the ID of a model after it's been added to a library is not supported. @@ -46,16 +46,16 @@ - - + + Sets a material override for a specific surface of the model. It allows to use the same mesh on multiple models, but using different materials on each. - - + + Enables or disables mesh-based collision on a specific surface. It allows a model to have solid parts and others where players can pass through. diff --git a/doc/classes/VoxelBoxMover.xml b/doc/classes/VoxelBoxMover.xml index c72800c4..0d05d952 100644 --- a/doc/classes/VoxelBoxMover.xml +++ b/doc/classes/VoxelBoxMover.xml @@ -28,10 +28,10 @@ - - - - + + + + Given a motion vector, returns a modified vector telling you by how much to move your character. This is similar to [method KinematicBody.move_and_slide], except you have to apply the movement. @@ -51,7 +51,7 @@ - + Sets the collision mask used to detect collidable voxels. Only voxels sharing at least one bit between the masks will be detected. @@ -60,14 +60,14 @@ - + Sets the maximum height that can be climbed like "stairs". - + When enabled, [method get_motion] will attempt to climb up small steps. This allows to implement Minecraft-like stairs. diff --git a/doc/classes/VoxelBuffer.xml b/doc/classes/VoxelBuffer.xml index 0cc9135e..7853319b 100644 --- a/doc/classes/VoxelBuffer.xml +++ b/doc/classes/VoxelBuffer.xml @@ -24,8 +24,8 @@ - - + + Erases per-voxel metadata within the specified area. @@ -37,19 +37,19 @@ - - + + Copies all values from the channel of another [VoxelBuffer] into the same channel for the current buffer. The depth formats must match. - - - - - + + + + + Copies values from a channel's sub-region of another [VoxelBuffer] into the same channel for the current buffer, at a specific location. The depth formats must match. If corners of the area represent a negative-size area, they will be sorted back. @@ -59,10 +59,10 @@ - - - - + + + + Copies per-voxel metadata from a sub-region of another [VoxelBuffer] into the the current buffer, at a specific location. Values will be a shallow copy. If corners of the area represent a negative-size area, they will be sorted back. @@ -72,25 +72,25 @@ - - - + + + Clears the buffer and gives it the specified size. - + - - - - + + + + Produces a downscaled version of this buffer, by a factor of 2, without any form of interpolation (i.e using nearest-neighbor). Metadata is not copied. @@ -98,33 +98,33 @@ - - + + Fills one channel of this buffer with a specific raw value. - - - - + + + + Fills an area of a channel in this buffer with a specific raw value. - - + + Fills one channel of this buffer with a specific float value. - + Executes a function on every voxel in this buffer which have associated metadata. The function's arguments must be (position: Vector3i, metadata: Variant). @@ -133,9 +133,9 @@ - - - + + + Executes a function on every voxel in this buffer which have associated metadata, within the specified area. @@ -148,14 +148,14 @@ - + Gets which compression mode the specified channel has. - + Gets which bit depth the specified channel has. @@ -166,47 +166,29 @@ Gets the 3D size of the buffer in voxels. - - - - Gets how many voxels the buffer contains across the X axis. - - - - - - Gets how many voxels the buffer contains across the Y axis. - - - - - - Gets how many voxels the buffer contains across the Z axis. - - - - - - + + + + Gets the raw value of a voxel within this buffer. - - - - + + + + Gets the float value of a voxel within this buffer. You may use this function if you work with SDF volumes (smooth voxels). - + Gets the metadata attached to a specific voxel in this buffer. @@ -219,7 +201,7 @@ - + Checks if every voxel within a channel has the same value. @@ -231,7 +213,7 @@ - + Sets arbitrary data on this buffer. Old data is replaced. Note, this is separate storage from per-voxel metadata. If this [VoxelBuffer] is saved, this metadata will also be saved along voxels, so make sure the data supports serialization (i.e you can't put nodes or arbitrary objects in it). @@ -239,38 +221,38 @@ - - + + Changes the bit depth of a given channel. This controls the range of values a channel can hold. See [enum VoxelBuffer.Depth] for more information. - - - - - + + + + + Sets the raw value of a voxel. If you use smooth voxels, you may prefer using [method set_voxel_f]. - - - - - + + + + + Sets the float value of a voxel. This method should be used if you work on SDF data (smooth voxels). - - + + Attaches arbitrary data on a specific voxel. Old data is replaced. If this [VoxelBuffer] is saved, this metadata will also be saved along voxels, so make sure the data supports serialization (i.e you can't put nodes or arbitrary objects in it). @@ -278,9 +260,9 @@ - - - + + + diff --git a/doc/classes/VoxelColorPalette.xml b/doc/classes/VoxelColorPalette.xml index c93f2107..e98494c2 100644 --- a/doc/classes/VoxelColorPalette.xml +++ b/doc/classes/VoxelColorPalette.xml @@ -12,14 +12,14 @@ - + - - + + diff --git a/doc/classes/VoxelGenerator.xml b/doc/classes/VoxelGenerator.xml index 01f7a30f..d86c8965 100644 --- a/doc/classes/VoxelGenerator.xml +++ b/doc/classes/VoxelGenerator.xml @@ -10,9 +10,9 @@ - - - + + + Generates a block of voxels within the specified world area. [code]out_buffer[/code]: Buffer in which voxel data will be generated. It should not be [code]null[/code] and should be given the requested size. Do not keep a reference on it after the call. diff --git a/doc/classes/VoxelGeneratorGraph.xml b/doc/classes/VoxelGeneratorGraph.xml index 968a40c6..1fc7bf8d 100644 --- a/doc/classes/VoxelGeneratorGraph.xml +++ b/doc/classes/VoxelGeneratorGraph.xml @@ -13,36 +13,36 @@ - - - - + + + + - - - - + + + + - - - + + + - - - - + + + + Tests if two ports can be connected together. @@ -76,9 +76,9 @@ - - - + + + Creates a graph node of a given type at a specific visual position. That position does not affect how the graph will perform, however it helps organizing nodes. An optional ID can be specified. If left to 0, the ID will be generated. @@ -87,8 +87,8 @@ - - + + @@ -99,13 +99,13 @@ - + - + @@ -121,20 +121,20 @@ - - + + - + - + @@ -145,14 +145,14 @@ - + - - + + @@ -163,79 +163,79 @@ - + - + - - - - + + + + - + - - + + - - - + + + - - + + - - + + - - + + - - - + + + - - + + @@ -256,7 +256,7 @@ - + @@ -356,7 +356,9 @@ - + + + diff --git a/doc/classes/VoxelGeneratorHeightmap.xml b/doc/classes/VoxelGeneratorHeightmap.xml index 3b9cf655..ad3b65d5 100644 --- a/doc/classes/VoxelGeneratorHeightmap.xml +++ b/doc/classes/VoxelGeneratorHeightmap.xml @@ -16,7 +16,7 @@ Minimum height where the surface will generate. - + Scale applied to the signed distance field. This is useful when smooth voxels are used, to reduce blockyness over large distances. diff --git a/doc/classes/VoxelGeneratorScript.xml b/doc/classes/VoxelGeneratorScript.xml index c10595cc..6aaaa9e3 100644 --- a/doc/classes/VoxelGeneratorScript.xml +++ b/doc/classes/VoxelGeneratorScript.xml @@ -11,9 +11,9 @@ - - - + + + [code]out_buffer[/code]: Buffer in which to populate voxel data. It will never be [code]null[/code] and will have the requested size. It is only valid for this function, do not store it anywhere after the end. [code]origin_in_voxels[/code]: Coordinates of the lower corner of the box to generate, relative to LOD0. The size of the box is known from [code]out_buffer[/code]. diff --git a/doc/classes/VoxelInstanceGenerator.xml b/doc/classes/VoxelInstanceGenerator.xml index 9ea9fba3..86692684 100644 --- a/doc/classes/VoxelInstanceGenerator.xml +++ b/doc/classes/VoxelInstanceGenerator.xml @@ -14,7 +14,7 @@ Controls how many instances are generated. Might give different results depending on the type of emission chosen. - In which way instances are primarily emitted. + In which way instances are primarily emitted. Instances will not be created above this height. @@ -57,7 +57,7 @@ When enabled, instances will randomly be flipped upside down. This can be useful with small rocks to create illusion of more variety. - Sets how random scales are distributed. + Sets how random scales are distributed. Sets how much instances will align with the ground. diff --git a/doc/classes/VoxelInstanceLibrary.xml b/doc/classes/VoxelInstanceLibrary.xml index a52a24f3..a5a91664 100644 --- a/doc/classes/VoxelInstanceLibrary.xml +++ b/doc/classes/VoxelInstanceLibrary.xml @@ -10,8 +10,8 @@ - - + + @@ -22,19 +22,19 @@ - + - + - + diff --git a/doc/classes/VoxelInstanceLibraryMultiMeshItem.xml b/doc/classes/VoxelInstanceLibraryMultiMeshItem.xml index 3ee673d3..bf36015a 100644 --- a/doc/classes/VoxelInstanceLibraryMultiMeshItem.xml +++ b/doc/classes/VoxelInstanceLibraryMultiMeshItem.xml @@ -9,20 +9,20 @@ - + - - + + - + @@ -46,6 +46,8 @@ + + diff --git a/doc/classes/VoxelInstancer.xml b/doc/classes/VoxelInstancer.xml index 9d89e37b..8d004948 100644 --- a/doc/classes/VoxelInstancer.xml +++ b/doc/classes/VoxelInstancer.xml @@ -11,7 +11,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -38,14 +38,14 @@ - + - - + + diff --git a/doc/classes/VoxelLodTerrain.xml b/doc/classes/VoxelLodTerrain.xml index 7b67f6b7..82d176a7 100644 --- a/doc/classes/VoxelLodTerrain.xml +++ b/doc/classes/VoxelLodTerrain.xml @@ -10,8 +10,8 @@ - - + + @@ -22,14 +22,14 @@ - - + + - + @@ -40,8 +40,8 @@ - - + + @@ -57,28 +57,28 @@ - - + + - - + + - + - - + + @@ -130,21 +130,21 @@ - + - - + + - - + + @@ -174,6 +174,16 @@ + + + + + + + + + + diff --git a/doc/classes/VoxelMeshSDF.xml b/doc/classes/VoxelMeshSDF.xml index bad97740..b9045efc 100644 --- a/doc/classes/VoxelMeshSDF.xml +++ b/doc/classes/VoxelMeshSDF.xml @@ -14,13 +14,13 @@ - + - + @@ -34,6 +34,16 @@ + + + + + + + + + + diff --git a/doc/classes/VoxelMesher.xml b/doc/classes/VoxelMesher.xml index 1be50fb9..fdb76bd0 100644 --- a/doc/classes/VoxelMesher.xml +++ b/doc/classes/VoxelMesher.xml @@ -11,8 +11,9 @@ - - + + + Builds a mesh from the provided voxels. Materials will be attached to each surface based on the provided array. The way materials are used can depend on the type of mesher. diff --git a/doc/classes/VoxelMesherCubes.xml b/doc/classes/VoxelMesherCubes.xml index 8ed4c3fb..ab28dfb4 100644 --- a/doc/classes/VoxelMesherCubes.xml +++ b/doc/classes/VoxelMesherCubes.xml @@ -9,8 +9,8 @@ - - + + diff --git a/doc/classes/VoxelMesherDMC.xml b/doc/classes/VoxelMesherDMC.xml index 86d46a17..415c0a88 100644 --- a/doc/classes/VoxelMesherDMC.xml +++ b/doc/classes/VoxelMesherDMC.xml @@ -20,7 +20,7 @@ - + diff --git a/doc/classes/VoxelMesherTransvoxel.xml b/doc/classes/VoxelMesherTransvoxel.xml index 57fc925a..eb0c5a47 100644 --- a/doc/classes/VoxelMesherTransvoxel.xml +++ b/doc/classes/VoxelMesherTransvoxel.xml @@ -10,8 +10,8 @@ - - + + diff --git a/doc/classes/VoxelNode.xml b/doc/classes/VoxelNode.xml index 02a2ed23..a7d2f25f 100644 --- a/doc/classes/VoxelNode.xml +++ b/doc/classes/VoxelNode.xml @@ -20,4 +20,12 @@ Primary source of persistent voxel data. If left unassigned, the whole volume will use the generator. + + + + + + + + diff --git a/doc/classes/VoxelStream.xml b/doc/classes/VoxelStream.xml index 8dce8756..e3970f45 100644 --- a/doc/classes/VoxelStream.xml +++ b/doc/classes/VoxelStream.xml @@ -10,9 +10,9 @@ - - - + + + @@ -28,26 +28,26 @@ - - - + + + [code]buffer[/code]: Block of voxels to save. It is strongly recommended to not keep a reference to that data afterward, because streams are allowed to cache it, and saved data must represent either snapshots (copies) or last references to the data after the volume they belonged to is destroyed. - - - + + + - - - + + + diff --git a/doc/classes/VoxelStreamRegionFiles.xml b/doc/classes/VoxelStreamRegionFiles.xml index 81e9f981..9637f711 100644 --- a/doc/classes/VoxelStreamRegionFiles.xml +++ b/doc/classes/VoxelStreamRegionFiles.xml @@ -12,7 +12,7 @@ - + diff --git a/doc/classes/VoxelStreamSQLite.xml b/doc/classes/VoxelStreamSQLite.xml index a557fd3e..54e13944 100644 --- a/doc/classes/VoxelStreamSQLite.xml +++ b/doc/classes/VoxelStreamSQLite.xml @@ -15,7 +15,7 @@ - + diff --git a/doc/classes/VoxelStreamScript.xml b/doc/classes/VoxelStreamScript.xml index 9156500d..a5ad9fcd 100644 --- a/doc/classes/VoxelStreamScript.xml +++ b/doc/classes/VoxelStreamScript.xml @@ -15,17 +15,17 @@ - - - + + + - - - + + + diff --git a/doc/classes/VoxelTerrain.xml b/doc/classes/VoxelTerrain.xml index 4a7d3903..706b00d7 100644 --- a/doc/classes/VoxelTerrain.xml +++ b/doc/classes/VoxelTerrain.xml @@ -10,20 +10,20 @@ - - + + - + - + Converts data block coordinates into voxel coordinates. Voxel coordinates of a block correspond to its lowest corner. @@ -55,8 +55,8 @@ - - + + @@ -69,13 +69,13 @@ - + - + Forces a specific block to be saved. Note 1: all modified blocks are automatically saved before the terrain is destroyed. @@ -94,14 +94,14 @@ - - + + - + @@ -142,14 +142,14 @@ - + Emitted when a new data block is loaded from stream. Note: it might be not visible yet. - + Emitted when a data block is unloaded due to being outside view distance. diff --git a/doc/classes/VoxelTool.xml b/doc/classes/VoxelTool.xml index 3e96904f..375bea76 100644 --- a/doc/classes/VoxelTool.xml +++ b/doc/classes/VoxelTool.xml @@ -12,99 +12,99 @@ - + - - - + + + - - + + Operate on a rectangular cuboid section of the terrain. [code]begin[/code] and [code]end[/code] are inclusive. Choose operation and which voxel to use by setting [code]value[/code] and [code]mode[/code] before calling this function. - + - - + + - + - + - + - + - - - - + + + + - - - - + + + + - - + + - - + + - - + + diff --git a/doc/classes/VoxelToolLodTerrain.xml b/doc/classes/VoxelToolLodTerrain.xml index 0ba0db71..192fbc63 100644 --- a/doc/classes/VoxelToolLodTerrain.xml +++ b/doc/classes/VoxelToolLodTerrain.xml @@ -9,19 +9,27 @@ + + + + + + + + - - - - + + + + - - + + @@ -32,14 +40,14 @@ - + - - + + Turns floating voxels into RigidBodies. Chunks of floating voxels are detected within a box. The box is relative to the voxel volume this VoxelTool is attached to. Chunks have to be contained entirely within that box to be considered floating. Chunks are removed from the source volume and transformed into RigidBodies with convex collision shapes. They will be added as child of the provided node. They will start "kinematic", and turn "rigid" after a short time, to allow the terrain to update its colliders after the removal (otherwise they will overlap). The function returns an array of these rigid bodies, which you can use to attach further behavior to them (such as disappearing after some time or distance for example). @@ -48,16 +56,16 @@ - + - - - - + + + + diff --git a/doc/classes/VoxelToolTerrain.xml b/doc/classes/VoxelToolTerrain.xml index 0e10c18d..d220801d 100644 --- a/doc/classes/VoxelToolTerrain.xml +++ b/doc/classes/VoxelToolTerrain.xml @@ -11,17 +11,17 @@ - - - - + + + + - - + + Executes a function for each voxel holding metadata in the given area. The given callback takes two arguments: voxel position (Vector3i), voxel metadata (Variant). @@ -30,10 +30,10 @@ - - - - + + + + Picks random voxels within the specified area and executes a function on them. This only works for terrains using [VoxelMesherBlocky]. Only voxels where [member Voxel.random_tickable] is [code]true[/code] will be picked. The given callback takes two arguments: voxel position (Vector3i), voxel value (int). diff --git a/doc/classes/VoxelViewer.xml b/doc/classes/VoxelViewer.xml index bcad7fde..74483e9a 100644 --- a/doc/classes/VoxelViewer.xml +++ b/doc/classes/VoxelViewer.xml @@ -17,7 +17,7 @@ - + diff --git a/doc/classes/VoxelVoxLoader.xml b/doc/classes/VoxelVoxLoader.xml index fd752686..1c2f7197 100644 --- a/doc/classes/VoxelVoxLoader.xml +++ b/doc/classes/VoxelVoxLoader.xml @@ -9,9 +9,9 @@ - - - + + + diff --git a/doc/classes/ZN_FastNoiseLite.xml b/doc/classes/ZN_FastNoiseLite.xml index 1238d2b5..51fb2d5d 100644 --- a/doc/classes/ZN_FastNoiseLite.xml +++ b/doc/classes/ZN_FastNoiseLite.xml @@ -10,28 +10,28 @@ - - + + - + - - - + + + - + diff --git a/doc/classes/ZN_FastNoiseLiteGradient.xml b/doc/classes/ZN_FastNoiseLiteGradient.xml index 0e4a8e8c..6fe417c1 100644 --- a/doc/classes/ZN_FastNoiseLiteGradient.xml +++ b/doc/classes/ZN_FastNoiseLiteGradient.xml @@ -10,13 +10,13 @@ - + - + diff --git a/doc/classes/ZN_ThreadedTask.xml b/doc/classes/ZN_ThreadedTask.xml index 9e5c9101..a12ee86a 100644 --- a/doc/classes/ZN_ThreadedTask.xml +++ b/doc/classes/ZN_ThreadedTask.xml @@ -19,7 +19,7 @@ - + diff --git a/editor/fast_noise_2/noise_analysis_window.cpp b/editor/fast_noise_2/noise_analysis_window.cpp index 8ac837be..3b7a3342 100644 --- a/editor/fast_noise_2/noise_analysis_window.cpp +++ b/editor/fast_noise_2/noise_analysis_window.cpp @@ -109,8 +109,9 @@ NoiseAnalysisWindow::NoiseAnalysisWindow() { { Label *label = memnew(Label); label->set_text(TTR("Maximum derivative over step length*:")); - label->set_tooltip(TTR("Depending on the noise type, this measure can vary due to very small discontinuities, " - "so it may be interesting to try multiple step lengths, from shortest to longest.")); + label->set_tooltip_text( + TTR("Depending on the noise type, this measure can vary due to very small discontinuities, " + "so it may be interesting to try multiple step lengths, from shortest to longest.")); label->set_mouse_filter(Control::MOUSE_FILTER_STOP); vbox_container->add_child(label); } diff --git a/editor/graph/voxel_graph_editor.cpp b/editor/graph/voxel_graph_editor.cpp index 6bd99410..5f5f35b6 100644 --- a/editor/graph/voxel_graph_editor.cpp +++ b/editor/graph/voxel_graph_editor.cpp @@ -85,7 +85,8 @@ VoxelGraphEditor::VoxelGraphEditor() { CheckBox *live_update_checkbox = memnew(CheckBox); live_update_checkbox->set_text(TTR("Live Update")); - live_update_checkbox->set_tooltip(TTR("Automatically re-generate the terrain when the generator is modified")); + live_update_checkbox->set_tooltip_text( + TTR("Automatically re-generate the terrain when the generator is modified")); live_update_checkbox->set_pressed(_live_update_enabled); live_update_checkbox->connect("toggled", callable_mp(this, &VoxelGraphEditor::_on_live_update_toggled)); toolbar->add_child(live_update_checkbox); @@ -97,12 +98,12 @@ VoxelGraphEditor::VoxelGraphEditor() { _pin_button = memnew(Button); _pin_button->set_flat(true); _pin_button->set_toggle_mode(true); - _pin_button->set_tooltip(TTR("Pin VoxelGraphEditor")); + _pin_button->set_tooltip_text(TTR("Pin VoxelGraphEditor")); toolbar->add_child(_pin_button); _popout_button = memnew(Button); _popout_button->set_flat(true); - _popout_button->set_tooltip(TTR("Pop-out as separate window")); + _popout_button->set_tooltip_text(TTR("Pop-out as separate window")); _popout_button->connect("pressed", callable_mp(this, &VoxelGraphEditor::_on_popout_button_pressed)); toolbar->add_child(_popout_button); @@ -648,7 +649,7 @@ void VoxelGraphEditor::update_previews(bool with_live_update) { ERR_PRINT(String("Voxel graph compilation failed: {0}").format(varray(result.message))); _compile_result_label->set_text(result.message); - _compile_result_label->set_tooltip(result.message); + _compile_result_label->set_tooltip_text(result.message); _compile_result_label->set_modulate(Color(1, 0.3, 0.1)); _compile_result_label->show(); diff --git a/editor/graph/voxel_graph_editor_node.cpp b/editor/graph/voxel_graph_editor_node.cpp index 76c506de..b1749f76 100644 --- a/editor/graph/voxel_graph_editor_node.cpp +++ b/editor/graph/voxel_graph_editor_node.cpp @@ -237,14 +237,14 @@ void VoxelGraphEditorNode::update_range_analysis_tooltips( } const math::Interval range = state.get_range(address); Control *label = _output_labels[port_index]; - label->set_tooltip(String("Min: {0}\nMax: {1}").format(varray(range.min, range.max))); + label->set_tooltip_text(String("Min: {0}\nMax: {1}").format(varray(range.min, range.max))); } } void VoxelGraphEditorNode::clear_range_analysis_tooltips() { for (unsigned int i = 0; i < _output_labels.size(); ++i) { Control *oc = _output_labels[i]; - oc->set_tooltip(""); + oc->set_tooltip_text(""); } } diff --git a/editor/instance_library/voxel_instance_library_multimesh_item_inspector_plugin.cpp b/editor/instance_library/voxel_instance_library_multimesh_item_inspector_plugin.cpp index a501aa48..54af6bc5 100644 --- a/editor/instance_library/voxel_instance_library_multimesh_item_inspector_plugin.cpp +++ b/editor/instance_library/voxel_instance_library_multimesh_item_inspector_plugin.cpp @@ -17,8 +17,9 @@ void VoxelInstanceLibraryMultiMeshItemInspectorPlugin::parse_group(Object *p_obj // TODO I preferred this at the end of the group, but Godot doesn't expose anything to do it. // This is a legacy workflow, we'll see if it can be removed later. Button *button = memnew(Button); - button->set_tooltip(TTR("Set properties based on an existing scene. This might copy mesh and material data if " - "the scene embeds them. Properties will not update if the scene changes later.")); + button->set_tooltip_text( + TTR("Set properties based on an existing scene. This might copy mesh and material data if " + "the scene embeds them. Properties will not update if the scene changes later.")); button->set_text(TTR("Update from scene...")); // Using a bind() instead of relying on "currently edited" item in the editor plugin allows to support multiple // sub-inspectors. Plugins are not instanced per-inspected-object, but custom controls are. diff --git a/editor/terrain/voxel_terrain_editor_task_indicator.h b/editor/terrain/voxel_terrain_editor_task_indicator.h index 716a2a4d..9a581731 100644 --- a/editor/terrain/voxel_terrain_editor_task_indicator.h +++ b/editor/terrain/voxel_terrain_editor_task_indicator.h @@ -59,7 +59,7 @@ private: CRASH_COND(stat.label != nullptr); Label *name_label = memnew(Label); name_label->set_text(short_name); - name_label->set_tooltip(long_name); + name_label->set_tooltip_text(long_name); name_label->set_mouse_filter(Control::MOUSE_FILTER_PASS); // Necessary for tooltip to work add_child(name_label); stat.label = memnew(Label); diff --git a/meshers/blocky/voxel_blocky_model.h b/meshers/blocky/voxel_blocky_model.h index a31a652a..6e63746a 100644 --- a/meshers/blocky/voxel_blocky_model.h +++ b/meshers/blocky/voxel_blocky_model.h @@ -11,8 +11,6 @@ namespace zylann::voxel { -class VoxelBlockyLibrary; - // Definition of one type of voxel for use with `VoxelMesherBlocky`. // A voxel can be a simple coloured cube, or a more complex model. // Important: it is recommended that you create voxels from a library rather than using new().