class_editorfeatureprofile.rst 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the EditorFeatureProfile.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_EditorFeatureProfile:
  6. EditorFeatureProfile
  7. ====================
  8. **Inherits:** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. An editor feature profile which can be used to disable specific features.
  10. Description
  11. -----------
  12. 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.
  13. To manage editor feature profiles visually, use **Editor > Manage Feature Profiles...** at the top of the editor window.
  14. Methods
  15. -------
  16. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`String<class_String>` | :ref:`get_feature_name<class_EditorFeatureProfile_method_get_feature_name>` **(** :ref:`Feature<enum_EditorFeatureProfile_Feature>` feature **)** |
  18. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`bool<class_bool>` | :ref:`is_class_disabled<class_EditorFeatureProfile_method_is_class_disabled>` **(** :ref:`String<class_String>` class_name **)** const |
  20. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`is_class_editor_disabled<class_EditorFeatureProfile_method_is_class_editor_disabled>` **(** :ref:`String<class_String>` class_name **)** const |
  22. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`bool<class_bool>` | :ref:`is_class_property_disabled<class_EditorFeatureProfile_method_is_class_property_disabled>` **(** :ref:`String<class_String>` class_name, :ref:`String<class_String>` property **)** const |
  24. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`is_feature_disabled<class_EditorFeatureProfile_method_is_feature_disabled>` **(** :ref:`Feature<enum_EditorFeatureProfile_Feature>` feature **)** const |
  26. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_from_file<class_EditorFeatureProfile_method_load_from_file>` **(** :ref:`String<class_String>` path **)** |
  28. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_to_file<class_EditorFeatureProfile_method_save_to_file>` **(** :ref:`String<class_String>` path **)** |
  30. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`set_disable_class<class_EditorFeatureProfile_method_set_disable_class>` **(** :ref:`String<class_String>` class_name, :ref:`bool<class_bool>` disable **)** |
  32. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`set_disable_class_editor<class_EditorFeatureProfile_method_set_disable_class_editor>` **(** :ref:`String<class_String>` class_name, :ref:`bool<class_bool>` disable **)** |
  34. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`set_disable_class_property<class_EditorFeatureProfile_method_set_disable_class_property>` **(** :ref:`String<class_String>` class_name, :ref:`String<class_String>` property, :ref:`bool<class_bool>` disable **)** |
  36. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`set_disable_feature<class_EditorFeatureProfile_method_set_disable_feature>` **(** :ref:`Feature<enum_EditorFeatureProfile_Feature>` feature, :ref:`bool<class_bool>` disable **)** |
  38. +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. Enumerations
  40. ------------
  41. .. _enum_EditorFeatureProfile_Feature:
  42. .. _class_EditorFeatureProfile_constant_FEATURE_3D:
  43. .. _class_EditorFeatureProfile_constant_FEATURE_SCRIPT:
  44. .. _class_EditorFeatureProfile_constant_FEATURE_ASSET_LIB:
  45. .. _class_EditorFeatureProfile_constant_FEATURE_SCENE_TREE:
  46. .. _class_EditorFeatureProfile_constant_FEATURE_IMPORT_DOCK:
  47. .. _class_EditorFeatureProfile_constant_FEATURE_NODE_DOCK:
  48. .. _class_EditorFeatureProfile_constant_FEATURE_FILESYSTEM_DOCK:
  49. .. _class_EditorFeatureProfile_constant_FEATURE_MAX:
  50. enum **Feature**:
  51. - **FEATURE_3D** = **0** --- 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.
  52. - **FEATURE_SCRIPT** = **1** --- The Script tab, which contains the script editor and class reference browser. If this feature is disabled, the Script tab won't display.
  53. - **FEATURE_ASSET_LIB** = **2** --- The AssetLib tab. If this feature is disabled, the AssetLib tab won't display.
  54. - **FEATURE_SCENE_TREE** = **3** --- Scene tree editing. If this feature is disabled, the Scene tree dock will still be visible but will be read-only.
  55. - **FEATURE_IMPORT_DOCK** = **4** --- The Import dock. If this feature is disabled, the Import dock won't be visible.
  56. - **FEATURE_NODE_DOCK** = **5** --- The Node dock. If this feature is disabled, signals and groups won't be visible and modifiable from the editor.
  57. - **FEATURE_FILESYSTEM_DOCK** = **6** --- The FileSystem dock. If this feature is disabled, the FileSystem dock won't be visible.
  58. - **FEATURE_MAX** = **7** --- Represents the size of the :ref:`Feature<enum_EditorFeatureProfile_Feature>` enum.
  59. Method Descriptions
  60. -------------------
  61. .. _class_EditorFeatureProfile_method_get_feature_name:
  62. - :ref:`String<class_String>` **get_feature_name** **(** :ref:`Feature<enum_EditorFeatureProfile_Feature>` feature **)**
  63. Returns the specified ``feature``'s human-readable name.
  64. ----
  65. .. _class_EditorFeatureProfile_method_is_class_disabled:
  66. - :ref:`bool<class_bool>` **is_class_disabled** **(** :ref:`String<class_String>` class_name **)** const
  67. Returns ``true`` if the class specified by ``class_name`` is disabled. When disabled, the class won't appear in the Create New Node dialog.
  68. ----
  69. .. _class_EditorFeatureProfile_method_is_class_editor_disabled:
  70. - :ref:`bool<class_bool>` **is_class_editor_disabled** **(** :ref:`String<class_String>` class_name **)** const
  71. Returns ``true`` if editing for the class specified by ``class_name`` 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.
  72. ----
  73. .. _class_EditorFeatureProfile_method_is_class_property_disabled:
  74. - :ref:`bool<class_bool>` **is_class_property_disabled** **(** :ref:`String<class_String>` class_name, :ref:`String<class_String>` property **)** const
  75. Returns ``true`` if ``property`` is disabled in the class specified by ``class_name``. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by ``class_name``.
  76. ----
  77. .. _class_EditorFeatureProfile_method_is_feature_disabled:
  78. - :ref:`bool<class_bool>` **is_feature_disabled** **(** :ref:`Feature<enum_EditorFeatureProfile_Feature>` feature **)** const
  79. Returns ``true`` if the ``feature`` is disabled. When a feature is disabled, it will disappear from the editor entirely.
  80. ----
  81. .. _class_EditorFeatureProfile_method_load_from_file:
  82. - :ref:`Error<enum_@GlobalScope_Error>` **load_from_file** **(** :ref:`String<class_String>` path **)**
  83. Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's **Export** button or the :ref:`save_to_file<class_EditorFeatureProfile_method_save_to_file>` method.
  84. ----
  85. .. _class_EditorFeatureProfile_method_save_to_file:
  86. - :ref:`Error<enum_@GlobalScope_Error>` **save_to_file** **(** :ref:`String<class_String>` path **)**
  87. Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's **Import** button or the :ref:`load_from_file<class_EditorFeatureProfile_method_load_from_file>` button.
  88. ----
  89. .. _class_EditorFeatureProfile_method_set_disable_class:
  90. - void **set_disable_class** **(** :ref:`String<class_String>` class_name, :ref:`bool<class_bool>` disable **)**
  91. If ``disable`` is ``true``, disables the class specified by ``class_name``. When disabled, the class won't appear in the Create New Node dialog.
  92. ----
  93. .. _class_EditorFeatureProfile_method_set_disable_class_editor:
  94. - void **set_disable_class_editor** **(** :ref:`String<class_String>` class_name, :ref:`bool<class_bool>` disable **)**
  95. If ``disable`` is ``true``, disables editing for the class specified by ``class_name``. 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.
  96. ----
  97. .. _class_EditorFeatureProfile_method_set_disable_class_property:
  98. - void **set_disable_class_property** **(** :ref:`String<class_String>` class_name, :ref:`String<class_String>` property, :ref:`bool<class_bool>` disable **)**
  99. If ``disable`` is ``true``, disables editing for ``property`` in the class specified by ``class_name``. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by ``class_name``.
  100. ----
  101. .. _class_EditorFeatureProfile_method_set_disable_feature:
  102. - void **set_disable_feature** **(** :ref:`Feature<enum_EditorFeatureProfile_Feature>` feature, :ref:`bool<class_bool>` disable **)**
  103. If ``disable`` is ``true``, disables the editor feature specified in ``feature``. When a feature is disabled, it will disappear from the editor entirely.