Enable scripting for plugins
Bug #1040242 reported by
Sibi Antony
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Stellarium |
Fix Released
|
Wishlist
|
Sibi Antony |
Bug Description
As of now, the public slots of stellarium plugins are not available for scripting. The script console syntax highlighter recognizes the loaded plugins, but any attempt at using the plugin object fails with an error.
Related branches
Changed in stellarium: | |
importance: | Undecided → Wishlist |
tags: | removed: wishlist |
Changed in stellarium: | |
milestone: | none → 0.12.0 |
Changed in stellarium: | |
assignee: | nobody → Sibi Antony (sibi-antony) |
Changed in stellarium: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Patch attached. Since the plugins are loaded as a StelModule, the modules addition into script engine is deferred until the plugins are fully loaded. Only the currently enabled modules will be added into the script engine.
If the user script attempts to invoke a plugin object for which the plugin is not loaded, the script engine will throw a syntax error. To the script engine, this is identical to using a wrong class object/incorrect syntax. It is up to the user to verify the status of a plugin and invoke the APIs.