Hi bitli, Niall, Georg,
(BTW, welcome back Georg
)
I understand your request, and can see the necessity for the features that you want. I'll think on a way to implement this functionality, but please understand that this isn't an easy task. The problem here is that we cannot allow a module or script to change any module settings permanently. For example, if your script changes settings of the DSLR_RAW module, then it should restore the original settings (the existing settings before your script runs) before terminating execution, and it should do that in a completely transparent way.
PixInsight is governed by solid software design principles and a strictly defined and maintained software architecture. I know some users don't believe in these things or don't see their value, but they are the real strength of PixInsight. Two of these principles are
modularity and
encapsulation. If I'd simply allow free changes to module settings from other modules, then both principles would be betrayed and that would be the beginning of a general catastrophe.
So I need to design a special interface for modules and scripts to ensure that no platform rules can be violated under any circumstance. For example, a script would gain global write access to module settings in a way similar to this:
// Request write access to global settings of the FITS module
Settings.beginGlobalChange( 'FITS' );
// Modify some global settings of the FITS module
Settings.writeGlobal( "FITS/FITSBottomUp", DataType_Boolean, false );
...
// Do your stuff here with custom modified FITS settings
...
// Finished working with custom FITS settings, inform the platform
Settings.endGlobalChange( 'FITS' );
// Now the original FITS settings have been restoredIf your script terminates without the necessary calls to
Settings.endGlobalChange(), an exception is thrown, the user is informed about the error, then all the original settings are restored.
This feature should also be available to modules, with equivalent static member functions of the
pcl::Settings class. In the case of a module,
pcl::Settings::BeginGlobalChange() and
pcl::Settings::EndGlobalChange() will only be callable from reimplementations of
pcl::ProcessImplementation::ExecuteOn() or
pcl::ProcessImplementation::ExecuteGlobal().
That's it, more or less. This needs some work but count on it implemented in a 1.6.x version.