def load_settings(self, path): """ Loads the pipeline configuration from a given filename. Usually this is the 'config/pipeline.ini' file. If you call this more than once, only the settings of the last file will be used. """ self.settings = load_yaml_file_flat(path)
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ # pylint: disable=invalid-name # This file includes all modules from the native module. import importlib from rpcore.rpobject import RPObject from rplibs.yaml import load_yaml_file_flat # Read the configuration from the yaml file modulepath = load_yaml_file_flat( '/$$rp/config/pipeline.yaml')['pipeline.native_module'] # Store a global flag, indicating whether the C++ modules were loaded or the python # implemetation of them NATIVE_CXX_LOADED = modulepath != 'rpcore.pynative' # The native module should only be imported once, and that by the internal pipeline code # assert __package__ == "rpcore.native", "You have included the pipeline in the wrong way!" # Classes which should get imported classes_to_import = [ "GPUCommand", "GPUCommandList", "ShadowManager", "InternalLightManager", "PSSMCameraRig",
of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ import importlib from rplibs.yaml import load_yaml_file_flat modulepath, _, classname = ( load_yaml_file_flat('/$$rp/config/pipeline.yaml')['pipeline.loader_class'] .rpartition('.')) module = importlib.import_module(modulepath) RPLoader = getattr(module, classname) __all__ = ("RPLoader",)