__init__.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. # -- This line is 75 characters -------------------------------------------
  11. # The __init__.py files help guide import statements without automatically
  12. # importing all of the modules
  13. """DCCsi.sdk.substance.builder.__init__"""
  14. from azpy.env_bool import env_bool
  15. from azpy.constants import ENVAR_DCCSI_DEV_MODE
  16. # global space
  17. _DCCSI_DEV_MODE = env_bool(ENVAR_DCCSI_DEV_MODE, False)
  18. _PACKAGENAME = __name__
  19. if _PACKAGENAME == '__main__':
  20. _PACKAGENAME = 'DCCsi.SDK.Substance.builder'
  21. import azpy
  22. _LOGGER = azpy.initialize_logger(_PACKAGENAME)
  23. _LOGGER.debug('Invoking __init__.py for {0}.'.format({_PACKAGENAME}))
  24. # -------------------------------------------------------------------------
  25. #
  26. __all__ = ['bootstrap',
  27. 'atom_material',
  28. 'sb_gui_main',
  29. 'sbs_to_sbsar',
  30. 'sbsar_info',
  31. 'sbsar_render',
  32. 'sbsar_utils',
  33. 'substance_tools',
  34. 'watchdog',
  35. 'ui']
  36. #
  37. # -------------------------------------------------------------------------
  38. if _DCCSI_DEV_MODE:
  39. # If in dev mode this will test imports of __all__
  40. from azpy import test_imports
  41. _LOGGER.debug('Testing Imports from {0}'.format(_PACKAGENAME))
  42. test_imports(__all__,
  43. _pkg=_PACKAGENAME,
  44. _logger=_LOGGER)
  45. # -------------------------------------------------------------------------
  46. del _LOGGER