me2beats / nodepath-filter

Filter nodes in Godot Engine Inspector NodePath dialog by type/class

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nodepath-filter

Filter nodes in Inspector NodePath dialog by type/class. This is an attempt to solve this godotengine/godot-proposals#934

usage

Say you have export (NodePath) var control_path. This node should be Control

Then all you need is to create property named control (that is same as control_path but without _path) and specify the type: var control:Control

script

Now only Control nodes can be selected in NodePath dialog.

inspector

select a node dont allow derived

There is also a setting in EditorSettings

settings

(me2beats_plugins/nodepath_filter/include_derived_classes) to allow selecting Nodes of derived (child) clases (in this case, not only Controls but also Containers etc, but still not Nodes). select a node allow derived

Known issues:

  • when enabling the plugin (and in some other cases), you should change node selection to make it work.
  • currently works only for GDScript

About

Filter nodes in Godot Engine Inspector NodePath dialog by type/class

License:MIT License


Languages

Language:GDScript 100.0%