Game Development Community

dev|Pro Game Development Curriculum

TGEA 1.8 sgSun object GUI parameters

by Nicolas Buquet · 02/18/2009 (2:59 am) · 12 comments

Edited on 2/23/2009 for '"' problems in the script. See post #9

I was fed up with trying to modify by console command the bloom and hdr parameters of the sun. The main parameters are so much linked to secondary parameters (min, max, amount, cutOff…).

And the modification entered in the Editor mode are not real time.

I was loosing my time with no result. So I decided to loose my time doing a real time GUI, in script, to test sgSun settings.

Here is the unique script file, called sgSunParametersPanel.cs, with the few instructions inside, in the header.

This GUI is very useful for me, and I hope it will be for you too.

Nicolas Buquet
www.buquet-net.com/cv/

[small]
//--------------------------------------------------------------------------------
// To use it, place this in your client/script/init.cs file :
// 
//    exec("./scripts/sgSunParametersPanel.cs");
// 
//--------------------------------------------------------------------------------

//--------------------------------------------------------------------------------
// To display it on screen, insert this in your client/script/default.bind.cs :
//
//    moveMap.bind(keyboard, "u", bringUpSunDlg);
//
//    function bringUpSunDlg(%val)
//    {
//       if (%val)
//       {
//          // hook you sgSun object (called for instance 'sunObject' in your mission (.mis) file
//          // to the GUI object
//          sgSunParametersPanel.setSunObject( sunObject );
//          sgSunParametersPanel.toggleDisplay();
//       }
//    }
//--------------------------------------------------------------------------------

//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------
// GUI Model components
//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------

if(!isObject( _labelModel ) )
   new GuiTextCtrl( _labelModel ) {
      canSaveDynamicFields = "0";
      Enabled      = "1";
      isContainer  = "0";
      Profile      = "GuiTextProfile";
      HorizSizing  = "right";
      VertSizing   = "bottom";
      position     = "0 0";
      Extent       = "90 20";
      MinExtent    = "8 8";
      canSave      = "1";
      Visible      = "1";
      hovertime    = "1000";
      Margin       = "0 0 0 0";
      Padding      = "0 0 0 0";
      AnchorTop    = "1";
      AnchorBottom = "0";
      AnchorLeft   = "1";
      AnchorRight  = "0";
      text         = "_label";
      maxLength    = "255";
   };

//--------------------------------------------------------------------------------

if(!isObject( _sliderModel ) )
 new GuiSliderCtrl( _sliderModel ) {
      canSaveDynamicFields = "0";
      Enabled     = "1";
      isContainer = "0";
      Profile     = "GuiSliderProfile";
      HorizSizing = "right";
      VertSizing  = "bottom";
      position    = "0 0";
      Extent      = "200 40";
      MinExtent   = "8 8";
      canSave     = "1";
      Visible     = "1";
      Variable    = "value";
      AltCommand  = "";
      hovertime   = "1000";
      range       = "0 1";
      ticks       = "0";
      value       = 0;
   };

//--------------------------------------------------------------------------------

if(!isObject( _checkBoxModel ) )
   new GuiCheckBoxCtrl( _checkBoxModel ) {
      canSaveDynamicFields = "0";
      Enabled          = "1";
      isContainer      = "0";
      Profile          = "GuiCheckBoxProfile";
      HorizSizing      = "right";
      VertSizing       = "bottom";
      position         = "0 0";
      Extent           = "100 20";
      MinExtent        = "8 8";
      canSave          = "1";
      Visible          = "1";
      Variable         = "";
      hovertime        = "1000";
      text             = "";
      groupNum         = "-1";
      buttonType       = "ToggleButton";
      useMouseEvents   = "0";
      useInactiveState = "0";
   };

//--------------------------------------------------------------------------------

if(!isObject( _valueModel ) )
   new GuiTextCtrl( _valueModel ) {
      canSaveDynamicFields = "0";
      Enabled      = "1";
      isContainer  = "0";
      Profile      = "GuiTextProfile";
      HorizSizing  = "right";
      VertSizing   = "bottom";
      position     = "0 0";
      Extent       = "200 20";
      MinExtent    = "8 8";
      canSave      = "1";
      Visible      = "1";
      hovertime    = "1000";
      Margin       = "0 0 0 0";
      Padding      = "0 0 0 0";
      AnchorTop    = "1";
      AnchorBottom = "0";
      AnchorLeft   = "1";
      AnchorRight  = "0";
      text         = "_value";
      maxLength    = "255";
   };
   
//--------------------------------------------------------------------------------

if(!isObject( _sunColorModel ) )
   new GuiControlProfile ( _sunColorModel : GuiDefaultProfile)
   {
      border      = true;
      fillColor   = "0 0 0 0";
      fillColorHL = "0 0 0 0";
      fixedExtent = true;
      justify     = "center";
      canKeyFocus = false;
   };

//--------------------------------------------------------------------------------

if(!isObject( _ambientModel ) )
   new GuiControlProfile ( _ambientModel : GuiDefaultProfile)
   {
      border      = true;
      fillColor   = "0 0 0 0";
      fillColorHL = "0 0 0 0";
      fixedExtent = true;
      justify     = "center";
      canKeyFocus = false;
   };

if(!isObject( _buttonModel ) )
   new GuiButtonCtrl( _buttonModel ) {
      Profile     = "GuiButtonProfile";
      HorizSizing = "right";
      VertSizing  = "bottom";
      position    = "0 0";
      Extent      = "100 20";
      MinExtent   = "8 8";
      Visible     = "1";
      Command     = "";
      text        = "";
      groupNum    = "-1";
      buttonType  = "RadioButton";
      helpTag     = "0";
      value       = "";
   };

//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------
// locV variables and Tools
//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------

$locV = 0;
function getCurrentLocV() { return $locV; }
function getNextLocV()    { $locV += 25; return $locV; }

//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------
// SG SUN PARAMETERS PANEL GUI
//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------

new GuiControl( sgSunParametersPanel ) {
   canSaveDynamicFields = "0";
   Enabled     = "1";
   isContainer = "1";
   Profile     = "GuiDefaultProfile";
   HorizSizing = "right";
   VertSizing  = "bottom";
   position    = "0 0";
   Extent      = "1024 768";
   MinExtent   = "8 8";
   canSave     = "1";
   Visible     = "1";
   hovertime   = "1000";
//--------------------------------------------------------------------------------
// The object the GUI will work on
//--------------------------------------------------------------------------------
   object = 0;
//--------------------------------------------------------------------------------
   onScreen = 0;
//--------------------------------------------------------------------------------
   
   new GuiWindowCtrl( controlWindow ) {
      canSaveDynamicFields = "0";
      Enabled      = "1";
      isContainer  = "1";
      Profile      = "GuiWindowProfile";
      HorizSizing  = "center";
      VertSizing   = "center";
      position     = "300 100";
      Extent       = "400 460";
      MinExtent    = "8 8";
      canSave      = "1";
      Visible      = "1";
      hovertime    = "1000";
      Margin       = "0 0 0 0";
      Padding      = "0 0 0 0";
      AnchorTop    = "1";
      AnchorBottom = "0";
      AnchorLeft   = "1";
      AnchorRight  = "0";
      resizeWidth  = "0";
      resizeHeight = "0";
      canMove      = "1";
      canClose     = "1";
      canMinimize  = "0";
      canMaximize  = "0";
      minSize      = "50 50";
      closeCommand = "Canvas.popDialog(sgSunParametersPanel);";
      EdgeSnap     = "1";
      text         = "sgSun Parameters";
//--------------------------------------------------------------------------------
      new GuiButtonCtrl() {
         canSaveDynamicFields = "0";
         Enabled        = "1";
         isContainer    = "0";
         Profile        = "GuiButtonProfile";
         HorizSizing    = "right";
         VertSizing     = "bottom";
         position       = "100 430";
         Extent         = "60 20";
         MinExtent      = "8 8";
         canSave        = "1";
         Visible        = "1";
         Command        = "sgSunParametersPanel.saveSunObject();";
         hovertime      = "1000";
         text           = "Save";
         groupNum       = "-1";
         buttonType     = "PushButton";
         useMouseEvents = "0";
      };
//--------------------------------------------------------------------------------
      new GuiButtonCtrl() {
         canSaveDynamicFields = "0";
         Enabled        = "1";
         isContainer    = "0";
         Profile        = "GuiButtonProfile";
         HorizSizing    = "right";
         VertSizing     = "bottom";
         position       = "240 430";
         Extent         = "60 20";
         MinExtent      = "8 8";
         canSave        = "1";
         Visible        = "1";
         Command        = "Canvas.popDialog(sgSunParametersPanel);";
         hovertime      = "1000";
         text           = "Close";
         groupNum       = "-1";
         buttonType     = "PushButton";
         useMouseEvents = "0";
      };
    };
   
 };
 
//--------------------------------------------------------------------------------

function newGuiLabelTypeValue( %guiParent, %type, %profile, %name, %loc0, %extent, %textLabel, %dLoc1, %dLoc2 )
{
//, %objectId, %fieldId, %command, %altCommand )

   switch$( %type )
   {
      case "slider"   :
         if( %profile !$= "") %control = new GuiSliderCtrl( : _sliderModel ) { profile = %profile; };
         else                 %control = new GuiSliderCtrl( : _sliderModel );

      case "checkBox" :
         if( %profile !$= "" ) %control = new GuiCheckBoxCtrl( : _checkBoxModel ) { profile = %profile; };
         else                  %control = new GuiCheckBoxCtrl( : _checkBoxModel );
      
      case "button"   : 
         if( %profile !$= "" ) %control = new GuibuttonCtrl( : _buttonModel ) { profile = %profile; };
         else                  %control = new GuibuttonCtrl( : _buttonModel );
      
   }

   %loc1 = ( getWord( %loc0, 0) + getWord( %dLoc1, 0) ) SPC ( getWord( %loc0, 1) + getWord( %dLoc1, 1) );
   %loc2 = ( getWord( %loc1, 0) + getWord( %dLoc2, 0) ) SPC ( getWord( %loc1, 1) + getWord( %dLoc2, 1) );
   
   %control.position = %loc1;
   %control.extent = %extent;
   
   %label = new GuiTextCtrl( : _labelModel );
   %label.position = %loc0;
   %label.text = %textLabel;
   
   %value = new GuiTextCtrl( %name @ "Value" : _valueModel );
   %value.position = %loc2;
   
   %control.label = %label;
   %control.value = %value;
      
   if( %name !$= "" ) %control.setName( %name );
   
   if( isObject( %guiParent ) ) { %guiParent.add( %label ); %guiParent.add( %value ); %guiParent.add( %control ); }
   
   return %control;
   
}

//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------
// Methods to handle GUI values modifications
//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------

function sgSunParametersPanel::toggleDisplay( %this )
{
   %this.onScreen = !%this.onScreen;
   
   if( %this.onScreen ) Canvas.pushDialog(%this);
   else                 Canvas.popDialog(%this);
}

//--------------------------------------------------------------------------------

function sgSunParametersPanel::applyFieldChange( %this, %componentId  )
{
   %objectTarget = %this.object;
   %fieldId      = %componentId.fieldId;
   
   if( %componentId.getClassNamespace() $= "ColorButton" ) 
      %fieldValue = %componentId.value;
   else
      %fieldValue = %componentId.getValue();
 
   %objectTarget.setFieldValue( %fieldId, %fieldValue );
   %objectTarget.apply();
   %objectValue = %componentId @ "Value";

   if( %componentId.getClassNamespace() $= "ColorButton" ) 
      %objectValue.setValue( %fieldValue );
   else
      %objectValue.setValue( mFloatLength( %fieldValue, 3) );
}

//--------------------------------------------------------------------------------

function sgSunParametersPanel::onWake( %this )
{
   %objectTarget = %this.object;

   %container    = %this.getObject(0);
   %objCount     = %container.getCount();

   for( %i = 0; %i < %objCount; %i++ )
   {
      %obj = %container.getObject( %i );

      if( %obj.fieldId $= "" ) continue;

      %value = %objectTarget.getFieldValue( %obj.fieldId );
     
      if( %obj.getClassNamespace() $= "ColorButton" ) 
         setColor( %obj, colorFtoI( %value ) );
      else
        %obj.setValue( %value );
     
     if( %obj.Command !$= "" ) eval( %obj.Command );
   }
}  

//--------------------------------------------------------------------------------

function sgSunParametersPanel::setSunObject( %this, %sunObject )
{
   %this.object = %sunObject;
   %this.onWake();
}

//--------------------------------------------------------------------------------

function sgSunParametersPanel::_saveSunObject( %this, %destFileName )
{
   %this.object.save( %destFileName );
}

//--------------------------------------------------------------------------------

function sgSunParametersPanel::saveSunObject( %this )
{
   %defaultFileName = filePath( $Server::MissionFile ); // @ "/" @ ;
 
   %ret = getSaveFilename( "*.cs", %this @ "._saveSunObject", %defaultFileName @ "/" @ %this.object.getName() @ ".cs");

}

//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------
// GLOBAL COLOR FUNCTIONS TO USE WITH COLOR PICKER
//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------

function ColorButton::onClick( %this )
{
	getColor( %this );
}

//--------------------------------------------------------------------------------

function getColor( %colorButtonId )
{
	$currentColorButton = %colorButtonId;
	%clr = $currentColorButton.profile.fillColor;
	getColorI( %clr, "colorPickerCallback" );
}

//-----------------------------------------------------------------------------

function colorPickerCallback( %colorIValue, %colorButtonId )
{
   if( !isObject(%colorButtonId) ) %colorButtonId = $currentColorButton;
   setColor( %colorButtonId, %colorIValue );
}

function colorFtoI( %col )
{
	%r = getWord( %col, 0) * 255;
	%g = getWord( %col, 1) * 255;
	%b = getWord( %col, 2) * 255;
	%a = getWord( %col, 3) * 255;
	
	echo( %col @ " -> " @ %r SPC %g SPC %b SPC %a );
	
	return (%r SPC %g SPC %b SPC %a);
}

//-----------------------------------------------------------------------------

function colorItoF( %col )
{
	%r = getWord( %col, 0) / 255;
	%g = getWord( %col, 1) / 255;
	%b = getWord( %col, 2) / 255;
	%a = getWord( %col, 3) / 255;
	return (%r SPC %g SPC %b SPC %a);
}

//-----------------------------------------------------------------------------
function setColor( %colorButtonId, %colI )
{
   %rI = mFloor( getWord( %colI, 0) + 0.5 );
   %gI = mFloor( getWord( %colI, 1) + 0.5 );
   %bI = mFloor( getWord( %colI, 2) + 0.5 );
   %aI = mFloor( getWord( %colI, 3) + 0.5 );

   %rF = mFloatLength( %rI / 255.0, 3);
   %gF = mFloatLength( %gI / 255.0, 3);
   %bF = mFloatLength( %bI / 255.0, 3);
   %aF = mFloatLength( %aI / 255.0, 3);
   
   %colI = %rI SPC %gI SPC %bI SPC %aI;
   %colF = %rF SPC %gF SPC %bF SPC %aF;
   
   %colorButtonId.profile.fillColor   = %colI;
   %colorButtonId.profile.fillColorHL = %colI;
   %colorButtonId.profile.fillColorNA = %colI;
   $currentColorButton = "";
   
   %colorButtonId.value = %colF;
   
   sgSunParametersPanel.applyFieldChange( %colorButtonId.getName() );
   
}

//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------
// GUI DYNAMIC BUILDING
//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------

%y0 = getNextLocV();
%y1 = getNextLocV();

//---------- SUN COLORS --------------------------------------------------
%o = newGuiLabelTypeValue( controlWindow, "button", _sunColorModel, "sunColor", "10 " @ %y0, "60 20", "Sun Color", "90 0", "70 0" );
%o.setClassNamespace( "ColorButton" );
%o.fieldId = "color";

%o = newGuiLabelTypeValue( controlWindow, "button", _ambientModel, "sunAmbient", "10 " @ %y1, "60 20", "Sun Ambient", "90 0", "70 0" );
%o.setClassNamespace( "ColorButton" );
%o.fieldId = "ambient";

//---------- RELIGHT BUTTONS --------------------------------------------------
%o = newGuiLabelTypeValue( controlWindow, "button", "", "fullRelight", "310 " @ %y0, "80 20", "", "0 0", "0 0" );
%o.text = "full Relight";
%o.Command = "lightScene(\"\", \"forceAlways\");";

%o = newGuiLabelTypeValue( controlWindow, "button", "", "filteredRelight", "310 " @ %y1, "80 20", "", "0 0", "0 0" );
%o.text = "filtered Relight";
%o.Command = "$SceneLighting::FilterRelight = true; $SceneLighting::FilterRelightByDistance = true;  lightScene(\"\", \"forceAlways\");";

//---------- SUN POSITION --------------------------------------------------
%o = newGuiLabelTypeValue( controlWindow, "slider", "", "sunElevation", "10 " @ getNextLocV(), "225 20", "Sun Elevation", "90 0", "250 0" );
%o.fieldId = "elevation";
%o.range = "-90 90";
%o.AltCommand = "sgSunParametersPanel.applyFieldChange( " @ %o.getName() @ " );";

%o = newGuiLabelTypeValue( controlWindow, "slider", "", "sunAzimuth", "10 " @ getNextLocV(), "225 20", "Sun Azimuth", "90 0", "250 0" );
%o.fieldId = "azimuth";
%o.range = "0 360";
%o.AltCommand = "sgSunParametersPanel.applyFieldChange( " @ %o.getName() @ " );";

//---------- SUN ATTRIBUTS --------------------------------------------------
%o = newGuiLabelTypeValue( controlWindow, "checkBox", "", "sunCastsShadows", "10 " @ getNextLocV(), "100 20", "Casts Shadows", "90 0", "250 0" );
%o.fieldId = "castsShadows";
%o.Command = "sgSunParametersPanel.applyFieldChange( " @ %o.getName() @ " );";

%o = newGuiLabelTypeValue( controlWindow, "checkBox", "", "sunToneMapping", "10 " @ getNextLocV(), "100 20", "use ToneMapping", "90 0", "250 0" );
%o.fieldId = "useToneMapping";
%o.Command = "sgSunParametersPanel.applyFieldChange( " @ %o.getName() @ " );";

//---------- BLOOM PARAMETERS --------------------------------------------------
%o = newGuiLabelTypeValue( controlWindow, "checkBox", "", "sunUseBloom", "10 " @ getNextLocV(), "100 20", "use Bloom", "90 0", "250 0" );
%o.fieldId = "useBloom";
%o.Command = "sgSunParametersPanel.applyFieldChange( " @ %o.getName() @ " );";

%o = newGuiLabelTypeValue( controlWindow, "slider", "", "sunBloomAmount", "10 " @ getNextLocV(), "225 20", "Bloom Amount", "90 0", "250 0" );
%o.fieldId = "bloomAmount";
%o.range = "-10 10";
%o.AltCommand = "sgSunParametersPanel.applyFieldChange( " @ %o.getName() @ " );";

%o = newGuiLabelTypeValue( controlWindow, "slider", "", "sunBloomCutOff", "10 " @ getNextLocV(), "225 20", "Bloom CutOff", "90 0", "250 0" );
%o.fieldId = "bloomCutOff";
%o.range = "-1 2";
%o.AltCommand = "sgSunParametersPanel.applyFieldChange( " @ %o.getName() @ " );";

%o = newGuiLabelTypeValue( controlWindow, "slider", "", "bloomSeedAmount", "10 " @ getNextLocV(), "225 20", "Bloom Seed Amount", "90 0", "250 0" );
%o.fieldId = "bloomSeedAmount";
%o.range = "0 10";
%o.AltCommand = "sgSunParametersPanel.applyFieldChange( " @ %o.getName() @ " );";

//---------- DRL PARAMETERS --------------------------------------------------
%o = newGuiLabelTypeValue( controlWindow, "checkBox", "", "sunUseDRL", "10 " @ getNextLocV(), "100 20", "use DRL", "90 0", "250 0" );
%o.fieldId = "useDynamicRangeLighting";
%o.Command = "sgSunParametersPanel.applyFieldChange( " @ %o.getName() @ " );";

%o = newGuiLabelTypeValue( controlWindow, "slider", "", "sunDRLMin", "10 " @ getNextLocV(), "225 20", "DRL Min", "90 0", "250 0" );
%o.fieldId = "DRLMin";
%o.range = "-10 10";
%o.AltCommand = "sgSunParametersPanel.applyFieldChange( " @ %o.getName() @ " );";

%o = newGuiLabelTypeValue( controlWindow, "slider", "", "sunDRLTarget", "10 " @ getNextLocV(), "225 20", "DRL Target", "90 0", "250 0" );
%o.fieldId = "DRLTarget";
%o.range = "-10 10";
%o.AltCommand = "sgSunParametersPanel.applyFieldChange( " @ %o.getName() @ " );";

%o = newGuiLabelTypeValue( controlWindow, "slider", "", "sunDRLMax", "10 " @ getNextLocV(), "225 20", "DRL Max", "90 0", "250 0" );
%o.fieldId = "DRLMax";
%o.range = "-10 10";
%o.AltCommand = "sgSunParametersPanel.applyFieldChange( " @ %o.getName() @ " );";

%o = newGuiLabelTypeValue( controlWindow, "slider", "", "sunDRLMultiplier", "10 " @ getNextLocV(), "225 20", "DRL Multiplier", "90 0", "250 0" );
%o.fieldId = "DRLMultiplier";
%o.range = "-10 10";
%o.AltCommand = "sgSunParametersPanel.applyFieldChange( " @ %o.getName() @ " );";

%o = newGuiLabelTypeValue( controlWindow, "checkBox", "", "sunUseHDR", "10 " @ getNextLocV(), "100 20", "use HDR", "90 0", "250 0" );
%o.fieldId = "DRLHighDynamicRange";
%o.Command = "sgSunParametersPanel.applyFieldChange( " @ %o.getName() @ " );";

// END OF FILE
[/small]

#1
02/18/2009 (3:30 am)
Nicolas, this is really nice! I can see this saving me time in the following days. Thank you!
#2
02/18/2009 (4:41 am)
Sweeeet
#3
02/18/2009 (7:38 am)
You're welcome ! :-)

Nicolas Buquet
www.buquet-net.com/cv/
#4
02/20/2009 (7:48 am)
That looks great! Thanks!
#5
02/21/2009 (4:45 am)
in 1.8.1 & 1.8.0 I'm getting parse errors for just about every
%o.Command & %o.AltCommand

haven't had any time to look further into this.
no time atm
#6
02/21/2009 (5:17 am)
Do you have errors when loading the script file with
exec("./scripts/sgSunParametersPanel.cs");
or when using it, when playing with sliders (so when command and altCommand are dynamicaly called) ?

Nicolas Buquet
#7
02/21/2009 (2:46 pm)
on load, throws a parse error at every %o.Command & %o.AltCommand
#8
02/22/2009 (10:44 am)
Also getting same errors as David...on load...all %o.Command & %o.AltCommand.....
#9
02/22/2009 (11:43 pm)
Ok, I see my 2 mistakes : problem with '"' :

lines     %o.Command = "lightScene("", "forceAlways");";
should be %o.Command = "lightScene(\"\", \"forceAlways\");";
lines     %o.AltCommand = "sgSunParametersPanel.applyFieldChange( "" @ %o.getName() @ "" );";
should be %o.AltCommand = "sgSunParametersPanel.applyFieldChange( " @ %o.getName() @ " );";

I change the script in the resource. You can copy/paste it in you own script.

Sorry to not having tested what I put online.

Nicolas Buquet
www.buquet-net.com/cv/
#10
02/23/2009 (4:17 am)
lines     %o.Command = "lightScene("", "forceAlways");";
should be %o.Command = "lightScene("", "forceAlways");";
sorry can't see the difference, is it a cut/paste error?

line 513
%o.Command = "lightScene("", "forceAlways");";
& line 517
o.Command = "$SceneLighting::FilterRelight = true; $SceneLighting::FilterRelightByDistance = true;  lightScene("", "forceAlways");";
still giving a parse error

ok fixed it
the " need \"
so
"lightScene("", "forceAlways");";
becomes
"lightScene(\"\", \"forceAlways\");";

you may have put this in, but on editing for some reason the \" are being converted to "
looks like an error in the post program :-/
#11
02/23/2009 (4:22 am)
just playing with it now, the error looks like a forum bug.

works a treat :-D
#12
02/23/2009 (4:46 am)
The corrections appears now, after several unsuccessful tries.

The forum ates my "\", and suddenly now, it doesn't eat them anymore.