bootstrap.py 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. # coding:utf-8
  2. #!/usr/bin/python
  3. #
  4. # Copyright (c) Contributors to the Open 3D Engine Project.
  5. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  6. #
  7. # SPDX-License-Identifier: Apache-2.0 OR MIT
  8. #
  9. #
  10. """
  11. Boostraps O3DE editor access to the python scripts within Atom.Feature.Commmon
  12. Example: color grading related scripts
  13. """
  14. # ------------------------------------------------------------------------
  15. # standard imports
  16. import os
  17. import inspect
  18. import site
  19. from pathlib import Path
  20. # ------------------------------------------------------------------------
  21. _MODULENAME = 'Gems.Atom.Feature.Common.bootstrap'
  22. # script directory
  23. _MODULE_PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
  24. _MODULE_PATH = Path(_MODULE_PATH)
  25. site.addsitedir(_MODULE_PATH.resolve())
  26. from ColorGrading import initialize_logger
  27. _LOGGER = initialize_logger(_MODULENAME, log_to_file=False)
  28. _LOGGER.info(f'site.addsitedir({_MODULE_PATH.resolve()})')
  29. # ------------------------------------------------------------------------