GD0110.rst 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. GD0110: The exported tool button is not a Callable
  2. ==================================================
  3. ==================================== ======================================
  4. Value
  5. ==================================== ======================================
  6. **Rule ID** GD0110
  7. **Category** Usage
  8. **Fix is breaking or non-breaking** Breaking - If the property's type is changed to ``Callable``
  9. Non-breaking - If the ``[ExportToolButton]`` is replaced with ``[Export]``
  10. **Enabled by default** Yes
  11. ==================================== ======================================
  12. Cause
  13. -----
  14. A property of a type different from ``Callable`` is annotated with the
  15. ``[ExportToolButton]`` attribute.
  16. Rule description
  17. ----------------
  18. The ``[ExportToolButton]`` attribute is used to create clickable buttons in the inspector so,
  19. the property must be a ``Callable`` that will be executed when clicking the button.
  20. How to fix violations
  21. ---------------------
  22. To fix a violation of this rule, change the type of the property to ``Callable``.
  23. Alternatively, if you intended to export a normal property, replace the
  24. ``[ExportToolButton]`` attribute with ``[Export]``.
  25. When to suppress warnings
  26. -------------------------
  27. Do not suppress a warning from this rule. The exported property must be a ``Callable``
  28. so it can executed in the editor when clicking the button in the inspector.