Snake-case .tscn, .gd and _on_* callbacks

Co-authored-by: Doug Thompson <s-git@dougthompson.co.uk>
This commit is contained in:
Max Hilbrunner
2023-05-18 12:45:55 +02:00
parent 03081e0f14
commit 72c0af46b2
33 changed files with 133 additions and 139 deletions

View File

@@ -30,7 +30,7 @@ This would be a basic setup:
::
# MyCustomGizmoPlugin.gd
# my_custom_gizmo_plugin.gd
extends EditorNode3DGizmoPlugin
@@ -45,7 +45,7 @@ This would be a basic setup:
extends EditorPlugin
const MyCustomGizmoPlugin = preload("res://addons/my-addon/MyCustomGizmoPlugin.gd")
const MyCustomGizmoPlugin = preload("res://addons/my-addon/my_custom_gizmo_plugin.gd")
var gizmo_plugin = MyCustomGizmoPlugin.new()
@@ -126,7 +126,7 @@ So the final plugin would look somewhat like this:
extends EditorNode3DGizmoPlugin
const MyCustomNode3D = preload("res://addons/my-addon/MyCustomNode3D.gd")
const MyCustomNode3D = preload("res://addons/my-addon/my_custom_node_3d.gd")
func _init():
@@ -177,12 +177,12 @@ for the Node3D nodes we want to target.
::
# MyCustomGizmoPlugin.gd
# my_custom_gizmo_plugin.gd
extends EditorNode3DGizmoPlugin
const MyCustomNode3D = preload("res://addons/my-addon/MyCustomNode3D.gd")
const MyCustomGizmo = preload("res://addons/my-addon/MyCustomGizmo.gd")
const MyCustomNode3D = preload("res://addons/my-addon/my_custom_node_3d.gd")
const MyCustomGizmo = preload("res://addons/my-addon/my_custom_gizmo.gd")
func _init():
@@ -201,7 +201,7 @@ This way all the gizmo logic and drawing methods can be implemented in a new cla
::
# MyCustomGizmo.gd
# my_custom_gizmo.gd
extends EditorNode3DGizmo

View File

@@ -52,7 +52,7 @@ you should remove the instance you have added by calling
func _enter_tree():
plugin = preload("res://addons/my_inspector_plugin/MyInspectorPlugin.gd").new()
plugin = preload("res://addons/my_inspector_plugin/my_inspector_plugin.gd").new()
add_inspector_plugin(plugin)
@@ -87,7 +87,7 @@ you should remove the instance you have added by calling
Interacting with the inspector
------------------------------
To interact with the inspector dock, your ``MyInspectorPlugin.gd`` script must
To interact with the inspector dock, your ``my_inspector_plugin.gd`` script must
extend the :ref:`class_EditorInspectorPlugin` class. This class provides several
virtual methods that affect how the inspector handles properties.
@@ -112,10 +112,10 @@ specifically add :ref:`class_EditorProperty`-based controls.
.. tabs::
.. code-tab:: gdscript GDScript
# MyInspectorPlugin.gd
# my_inspector_plugin.gd
extends EditorInspectorPlugin
var RandomIntEditor = preload("res://addons/my_inspector_plugin/RandomIntEditor.gd")
var RandomIntEditor = preload("res://addons/my_inspector_plugin/random_int_editor.gd")
func _can_handle(object):
@@ -149,8 +149,8 @@ specifically add :ref:`class_EditorProperty`-based controls.
return true;
}
public override bool _ParseProperty(GodotObject @object, Variant.Type type,
string name, PropertyHint hintType, string hintString,
public override bool _ParseProperty(GodotObject @object, Variant.Type type,
string name, PropertyHint hintType, string hintString,
PropertyUsageFlags usageFlags, bool wide)
{
// We handle properties of type integer.
@@ -197,7 +197,7 @@ followed by ``set_bottom_editor()`` to position it below the name.
.. tabs::
.. code-tab:: gdscript GDScript
# RandomIntEditor.gd
# random_int_editor.gd
extends EditorProperty

View File

@@ -124,7 +124,7 @@ Add a script to the button like this:
extends Button
func _on_PrintHello_pressed():
func _on_print_hello_pressed():
print("Hello from the main screen plugin!")
.. code-tab:: csharp

View File

@@ -32,7 +32,7 @@ all you need to initialize your plugin.
::
# PerlinNoise3D.gd
# perlin_noise_3d.gd
@tool
extends VisualShaderNodeCustom
class_name VisualShaderNodePerlinNoise3D