scripting_constants.py 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. """
  2. Copyright (c) Contributors to the Open 3D Engine Project.
  3. For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. SPDX-License-Identifier: Apache-2.0 OR MIT
  5. Holds constants used across both hydra and non-hydra scripts.
  6. """
  7. import os
  8. import azlmbr.paths as paths
  9. """
  10. Constants for window and tab names
  11. """
  12. SCRIPT_CANVAS_UI = "Script Canvas"
  13. NODE_PALETTE_UI = "Node Palette"
  14. NODE_INSPECTOR_UI = "Node Inspector"
  15. ASSET_EDITOR_UI = "Asset Editor"
  16. SCRIPT_EVENT_UI = "Script Events"
  17. VARIABLE_MANAGER_UI = "Variable Manager"
  18. """
  19. Constants for Variable Manager
  20. """
  21. RESTORE_DEFAULT_LAYOUT = "Restore Default Layout"
  22. """
  23. String constants for Node Palette
  24. """
  25. NODE_CATEGORY_MATH = "Math"
  26. NODE_STRING_TO_NUMBER = "String To Number"
  27. NODE_TEST_METHOD = "test_method_name"
  28. """
  29. Constants for Node Inspector
  30. """
  31. NODE_INSPECTOR_TITLE_KEY = "Title"
  32. """
  33. Constants for Asset Editor
  34. """
  35. SAVE_ASSET_AS = "SaveAssetAs"
  36. DEFAULT_SCRIPT_EVENT = "EventName"
  37. DEFAULT_METHOD_NAME = "MethodName"
  38. PARAMETER_NAME = "ParameterName"
  39. """
  40. Constants for QtWidgets.
  41. Different from window/tab names because they do not have spaces
  42. """
  43. NODE_PALETTE_QT = "NodePalette"
  44. NODE_INSPECTOR_QT = "NodeInspector"
  45. TREE_VIEW_QT = "treeView"
  46. EVENTS_QT = "Events"
  47. EVENT_NAME_QT = "EventName"
  48. VARIABLE_PALETTE_QT = "variablePalette"
  49. VARIABLE_MANAGER_QT = "VariableManager"
  50. GRAPH_VARIABLES_QT = "graphVariables"
  51. ADD_BUTTON_QT = "addButton"
  52. SEARCH_FRAME_QT ="searchFrame"
  53. SEARCH_FILTER_QT = "searchFilter"
  54. PARAMETERS_QT = "Parameters"
  55. """
  56. General constants
  57. """
  58. BASE_LEVEL_NAME = "Base"
  59. SAVE_STRING = "Save"
  60. NAME_STRING = "Name"
  61. WAIT_FRAMES = 200
  62. WAIT_TIME_3 = 3
  63. WAIT_TIME_5 = 5
  64. VARIABLE_TYPES = ["Boolean", "Color", "EntityId", "Number", "String", "Transform", "Vector2", "Vector3", "Vector4"]
  65. ENTITY_STATES = {
  66. "active": 0,
  67. "inactive": 1,
  68. "editor": 2,
  69. }
  70. """
  71. File Paths
  72. """
  73. SCRIPT_EVENT_FILE_PATH = os.path.join(paths.projectroot, "ScriptCanvas", "test_file.scriptevent")
  74. SCRIPT_CANVAS_COMPONENT_PROPERTY_PATH = "Configuration|Source"