Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config-initialized engine modules #101

Closed
febret opened this issue Jul 31, 2014 · 0 comments
Closed

Config-initialized engine modules #101

febret opened this issue Jul 31, 2014 · 0 comments

Comments

@febret
Copy link
Member

febret commented Jul 31, 2014

In config files, add possibility of initializing engine modules as such:
config file

config:
{
    modules:
    {
        stereoSwitcher:
        {
            class = "CameraStereoSwitcher";
            blah = true;
        }
    };
}

This will call python _stereoSwitcher = CameraStereoSwitcher.create("stereoSwitcher")

create call can use the passed string as the module name, and to lookup config
settings for the module. The _ in front of the module object variable is to assure it does not get destroyed on runtime cleanups (see https://github.com/uic-evl/omegalib/blob/master/src/omega/PythonInterpreter.cpp#L450)

Initialization reads both application and system config files.

This feature can be used to add functionality to app through config files, such as Camera control modules etc. This system is better than adding module initialization to default_init since that script is only executed for applications launched through orun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant