Document the EditorFeatureProfile class

(cherry picked from commit 7ab279403d)
This commit is contained in:
Hugo Locurcio 2020-03-23 17:11:18 +01:00 committed by Rémi Verschelde
parent c18381119e
commit e88cfedf0e
1 changed files with 21 additions and 0 deletions

View File

@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorFeatureProfile" inherits="Reference" version="3.2"> <class name="EditorFeatureProfile" inherits="Reference" version="3.2">
<brief_description> <brief_description>
An editor feature profile which can be used to disable specific features.
</brief_description> </brief_description>
<description> <description>
An editor feature profile can be used to disable specific features of the Godot editor. When disabled, the features won't appear in the editor, which makes the editor less cluttered. This is useful in education settings to reduce confusion or when working in a team. For example, artists and level designers could use a feature profile that disables the script editor to avoid accidentally making changes to files they aren't supposed to edit.
To manage editor feature profiles visually, use [b]Editor &gt; Manage Feature Profiles...[/b] at the top of the editor window.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
@ -13,6 +16,7 @@
<argument index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature"> <argument index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature">
</argument> </argument>
<description> <description>
Returns the specified [code]feature[/code]'s human-readable name.
</description> </description>
</method> </method>
<method name="is_class_disabled" qualifiers="const"> <method name="is_class_disabled" qualifiers="const">
@ -21,6 +25,7 @@
<argument index="0" name="class_name" type="String"> <argument index="0" name="class_name" type="String">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if the class specified by [code]class_name[/code] is disabled. When disabled, the class won't appear in the Create New Node dialog.
</description> </description>
</method> </method>
<method name="is_class_editor_disabled" qualifiers="const"> <method name="is_class_editor_disabled" qualifiers="const">
@ -29,6 +34,7 @@
<argument index="0" name="class_name" type="String"> <argument index="0" name="class_name" type="String">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if editing for the class specified by [code]class_name[/code] is disabled. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class.
</description> </description>
</method> </method>
<method name="is_class_property_disabled" qualifiers="const"> <method name="is_class_property_disabled" qualifiers="const">
@ -39,6 +45,7 @@
<argument index="1" name="property" type="String"> <argument index="1" name="property" type="String">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if [code]property[/code] is disabled in the class specified by [code]class_name[/code]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [code]class_name[/code].
</description> </description>
</method> </method>
<method name="is_feature_disabled" qualifiers="const"> <method name="is_feature_disabled" qualifiers="const">
@ -47,6 +54,7 @@
<argument index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature"> <argument index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if the [code]feature[/code] is disabled. When a feature is disabled, it will disappear from the editor entirely.
</description> </description>
</method> </method>
<method name="load_from_file"> <method name="load_from_file">
@ -55,6 +63,7 @@
<argument index="0" name="path" type="String"> <argument index="0" name="path" type="String">
</argument> </argument>
<description> <description>
Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's [b]Export[/b] button or the [method save_to_file] method.
</description> </description>
</method> </method>
<method name="save_to_file"> <method name="save_to_file">
@ -63,6 +72,7 @@
<argument index="0" name="path" type="String"> <argument index="0" name="path" type="String">
</argument> </argument>
<description> <description>
Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's [b]Import[/b] button or the [method load_from_file] button.
</description> </description>
</method> </method>
<method name="set_disable_class"> <method name="set_disable_class">
@ -73,6 +83,7 @@
<argument index="1" name="disable" type="bool"> <argument index="1" name="disable" type="bool">
</argument> </argument>
<description> <description>
If [code]disable[/code] is [code]true[/code], disables the class specified by [code]class_name[/code]. When disabled, the class won't appear in the Create New Node dialog.
</description> </description>
</method> </method>
<method name="set_disable_class_editor"> <method name="set_disable_class_editor">
@ -83,6 +94,7 @@
<argument index="1" name="disable" type="bool"> <argument index="1" name="disable" type="bool">
</argument> </argument>
<description> <description>
If [code]disable[/code] is [code]true[/code], disables editing for the class specified by [code]class_name[/code]. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class.
</description> </description>
</method> </method>
<method name="set_disable_class_property"> <method name="set_disable_class_property">
@ -95,6 +107,7 @@
<argument index="2" name="disable" type="bool"> <argument index="2" name="disable" type="bool">
</argument> </argument>
<description> <description>
If [code]disable[/code] is [code]true[/code], disables editing for [code]property[/code] in the class specified by [code]class_name[/code]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [code]class_name[/code].
</description> </description>
</method> </method>
<method name="set_disable_feature"> <method name="set_disable_feature">
@ -105,23 +118,31 @@
<argument index="1" name="disable" type="bool"> <argument index="1" name="disable" type="bool">
</argument> </argument>
<description> <description>
If [code]disable[/code] is [code]true[/code], disables the editor feature specified in [code]feature[/code]. When a feature is disabled, it will disappear from the editor entirely.
</description> </description>
</method> </method>
</methods> </methods>
<constants> <constants>
<constant name="FEATURE_3D" value="0" enum="Feature"> <constant name="FEATURE_3D" value="0" enum="Feature">
The 3D editor. If this feature is disabled, the 3D editor won't display but 3D nodes will still display in the Create New Node dialog.
</constant> </constant>
<constant name="FEATURE_SCRIPT" value="1" enum="Feature"> <constant name="FEATURE_SCRIPT" value="1" enum="Feature">
The Script tab, which contains the script editor and class reference browser. If this feature is disabled, the Script tab won't display.
</constant> </constant>
<constant name="FEATURE_ASSET_LIB" value="2" enum="Feature"> <constant name="FEATURE_ASSET_LIB" value="2" enum="Feature">
The AssetLib tab. If this feature is disabled, the AssetLib tab won't display.
</constant> </constant>
<constant name="FEATURE_SCENE_TREE" value="3" enum="Feature"> <constant name="FEATURE_SCENE_TREE" value="3" enum="Feature">
Scene tree editing. If this feature is disabled, the Scene tree dock will still be visible but will be read-only.
</constant> </constant>
<constant name="FEATURE_IMPORT_DOCK" value="4" enum="Feature"> <constant name="FEATURE_IMPORT_DOCK" value="4" enum="Feature">
The Import dock. If this feature is disabled, the Import dock won't be visible.
</constant> </constant>
<constant name="FEATURE_NODE_DOCK" value="5" enum="Feature"> <constant name="FEATURE_NODE_DOCK" value="5" enum="Feature">
The Node dock. If this feature is disabled, signals and groups won't be visible and modifiable from the editor.
</constant> </constant>
<constant name="FEATURE_FILESYSTEM_DOCK" value="6" enum="Feature"> <constant name="FEATURE_FILESYSTEM_DOCK" value="6" enum="Feature">
The FileSystem dock. If this feature is disabled, the FileSystem dock won't be visible.
</constant> </constant>
<constant name="FEATURE_MAX" value="7" enum="Feature"> <constant name="FEATURE_MAX" value="7" enum="Feature">
Represents the size of the [enum Feature] enum. Represents the size of the [enum Feature] enum.