scripting_constants.py 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. We are deprecating this file and moving the constants to area specific files. See the EditorPythonTestTools > consts
  6. folder for more info
  7. """
  8. import os
  9. import azlmbr.paths as paths
  10. """
  11. Constants for window and tab names
  12. """
  13. SCRIPT_CANVAS_UI = "Script Canvas"
  14. NODE_PALETTE_UI = "Node Palette"
  15. NODE_INSPECTOR_UI = "Node Inspector"
  16. ASSET_EDITOR_UI = "Asset Editor"
  17. SCRIPT_EVENT_UI = "Script Events"
  18. VARIABLE_MANAGER_UI = "Variable Manager"
  19. """
  20. Constants for Variable Manager
  21. """
  22. RESTORE_DEFAULT_LAYOUT = "Restore Default Layout"
  23. """
  24. String constants for Node Palette
  25. """
  26. NODE_CATEGORY_MATH = "Math"
  27. NODE_STRING_TO_NUMBER = "String To Number"
  28. NODE_TEST_METHOD = "test_method_name"
  29. """
  30. Constants for Node Inspector
  31. """
  32. NODE_INSPECTOR_TITLE_KEY = "Title"
  33. """
  34. Constants for Asset Editor
  35. """
  36. SAVE_ASSET_AS = "SaveAssetAs"
  37. DEFAULT_SCRIPT_EVENT = "EventName"
  38. DEFAULT_METHOD_NAME = "MethodName"
  39. PARAMETER_NAME = "ParameterName"
  40. """
  41. Constants for QtWidgets.
  42. Different from window/tab names because they do not have spaces
  43. """
  44. NODE_PALETTE_QT = "NodePalette"
  45. NODE_INSPECTOR_QT = "NodeInspector"
  46. TREE_VIEW_QT = "treeView"
  47. EVENTS_QT = "Events"
  48. EVENT_NAME_QT = "EventName"
  49. VARIABLE_PALETTE_QT = "variablePalette"
  50. VARIABLE_MANAGER_QT = "VariableManager"
  51. GRAPH_VARIABLES_QT = "graphVariables"
  52. ADD_BUTTON_QT = "addButton"
  53. SEARCH_FRAME_QT ="searchFrame"
  54. SEARCH_FILTER_QT = "searchFilter"
  55. PARAMETERS_QT = "Parameters"
  56. """
  57. General constants
  58. """
  59. BASE_LEVEL_NAME = "Base"
  60. SAVE_STRING = "Save"
  61. NAME_STRING = "Name"
  62. WAIT_FRAMES = 200
  63. WAIT_TIME_1 = 1
  64. WAIT_TIME_3 = 3
  65. WAIT_TIME_5 = 5
  66. VARIABLE_TYPES = ["Boolean", "Color", "EntityId", "Number", "String", "Transform", "Vector2", "Vector3", "Vector4"]
  67. VARIABLE_TYPES_DICT = {
  68. "Boolean": "Boolean",
  69. "Color": "Color",
  70. "EntityId": "EntityId",
  71. "Number": "Number",
  72. "String": "String",
  73. "Transform": "Transform",
  74. "Vector2": "Vector2",
  75. "Vector3": "Vector3",
  76. "Vector4": "Vector4"
  77. }
  78. ENTITY_STATES = {
  79. "active": 0,
  80. "inactive": 1,
  81. "editor": 2,
  82. }
  83. """
  84. File Paths
  85. """
  86. SCRIPT_EVENT_FILE_PATH = os.path.join(paths.projectroot, "ScriptCanvas", "test_file.scriptevent")
  87. SCRIPT_CANVAS_COMPONENT_PROPERTY_PATH = "Configuration|Source"