quick hack for reloading script from disk when script is activated
This commit is contained in:
parent
d84cf2acb5
commit
370ad52620
|
@ -272,6 +272,16 @@ public class ScriptRunner extends VisPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setScriptActive(boolean active) {
|
public void setScriptActive(boolean active) {
|
||||||
|
/* Reload script from file */
|
||||||
|
if (scriptFile != null) {
|
||||||
|
String script = StringUtils.loadFromFile(scriptFile);
|
||||||
|
if (script == null) {
|
||||||
|
logger.fatal("Failed to load script from: " + scriptFile.getAbsolutePath());
|
||||||
|
} else {
|
||||||
|
updateScript(script);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (active) {
|
if (active) {
|
||||||
/* Free any resources */
|
/* Free any resources */
|
||||||
setScriptActive(false);
|
setScriptActive(false);
|
||||||
|
|
Loading…
Reference in a new issue