Index: osgVisual/trunk/include/sky_Silverlining/visual_skySilverLining.h
===================================================================
--- osgVisual/trunk/include/sky_Silverlining/visual_skySilverLining.h	(revision 181)
+++ osgVisual/trunk/include/sky_Silverlining/visual_skySilverLining.h	(revision 182)
@@ -65,6 +65,7 @@
 	 * @param viewer_ : Pointer to the applications viewer
 	 * @param configFileName : Filename of the XML configfile to read the configuration from. Currently not used because skySilverlining currently does not need any configuration parameters.
-	 */ 
-	visual_skySilverLining(osgViewer::Viewer* viewer_, std::string configFileName);
+	 * @param disabled : Flag to the caller which indicates if the sky was enabled or disabled by the XML configuration file.
+	 */ 
+	visual_skySilverLining(osgViewer::Viewer* viewer_, std::string configFileName, bool& disabled);
 
 	/**
Index: osgVisual/trunk/src/core/visual_core.cpp
===================================================================
--- osgVisual/trunk/src/core/visual_core.cpp	(revision 181)
+++ osgVisual/trunk/src/core/visual_core.cpp	(revision 182)
@@ -77,6 +77,10 @@
 #ifdef USE_SKY_SILVERLINING
 	// Initialize sky
-	sky = new visual_skySilverLining( viewer, configFilename );
-	sky->init(distortedSceneGraph, rootNode);	// Without distortion: distortedSceneGraph=NULL
+	bool disabled = false;	// to ask if the skyp is disabled or enabled
+	sky = new visual_skySilverLining( viewer, configFilename, disabled );
+	if(disabled)
+		sky = NULL;
+	if(sky.valid())
+		sky->init(distortedSceneGraph, rootNode);	// Without distortion: distortedSceneGraph=NULL
 #endif
 
@@ -404,17 +408,20 @@
 {
 
-	// Sky settings: 	
-	sky->setTime(15,30,00);
-	sky->setVisibility(50000);
-	sky->addWindVolume( 0.0, 15000.0, 25.0, 90.0 );
-	
-	//sky->addCloudLayer( 0, 20000, 20000, 600.0, 1000.0, 0.5, CUMULONIMBUS_CAPPILATUS );
-	//sky->addCloudLayer( 1, 5000000, 5000000, 600.0, 7351.0, 0.2, CIRRUS_FIBRATUS );
-	//sky->addCloudLayer( 2, 50000, 50000, 600.0, 7351.0, 0.2, CIRROCUMULUS );
-	///sky->addCloudLayer( 2, 100000, 100000, 600.0, 2351.0, 0.75, STRATUS );
-	sky->addCloudLayer( 3, 50000, 50000, 1300.0, 700.0, 0.07, CUMULUS_CONGESTUS );
-	//sky->addCloudLayer( 1, 100000, 100000, 3500.0, 2000.0, 0.30, STRATOCUMULUS );
-
-	//sky->setSlotPrecipitation( 1, 0.0, 0.0, 0.0, 25.0 );
+	// Sky settings: 
+	if(sky.valid())
+	{
+		sky->setTime(15,30,00);
+		sky->setVisibility(50000);
+		sky->addWindVolume( 0.0, 15000.0, 25.0, 90.0 );
+		
+		//sky->addCloudLayer( 0, 20000, 20000, 600.0, 1000.0, 0.5, CUMULONIMBUS_CAPPILATUS );
+		//sky->addCloudLayer( 1, 5000000, 5000000, 600.0, 7351.0, 0.2, CIRRUS_FIBRATUS );
+		//sky->addCloudLayer( 2, 50000, 50000, 600.0, 7351.0, 0.2, CIRROCUMULUS );
+		///sky->addCloudLayer( 2, 100000, 100000, 600.0, 2351.0, 0.75, STRATUS );
+		sky->addCloudLayer( 3, 50000, 50000, 1300.0, 700.0, 0.07, CUMULUS_CONGESTUS );
+		//sky->addCloudLayer( 1, 100000, 100000, 3500.0, 2000.0, 0.30, STRATOCUMULUS );
+
+		//sky->setSlotPrecipitation( 1, 0.0, 0.0, 0.0, 25.0 );
+	}
 
 
Index: osgVisual/trunk/src/sky_Silverlining/visual_skySilverLining.cpp
===================================================================
--- osgVisual/trunk/src/sky_Silverlining/visual_skySilverLining.cpp	(revision 181)
+++ osgVisual/trunk/src/sky_Silverlining/visual_skySilverLining.cpp	(revision 182)
@@ -19,7 +19,7 @@
 using namespace osgVisual;
 
-visual_skySilverLining::visual_skySilverLining(osgViewer::Viewer* viewer_, std::string configFileName)
-{
-	OSG_NOTIFY( osg::ALWAYS ) << "Initialize visual_skySilverlining..." << std::endl;
+visual_skySilverLining::visual_skySilverLining(osgViewer::Viewer* viewer_, std::string configFileName, bool& disabled)
+{
+	OSG_NOTIFY( osg::ALWAYS ) << "Initialize visual_skySilverlining...";
 
 	atmosphereInitialized = false;
@@ -35,4 +35,15 @@
 		cloudLayerSlots.back().slot_id = i;
 	}
+
+	// Check if the module is en- or diabled by XML configuration.
+	xmlDoc* tmpDoc;
+	xmlNode* config = util::getModuleXMLConfig( configFileName, "sky_silverlining", tmpDoc, disabled );
+	if( disabled)
+		OSG_NOTIFY( osg::ALWAYS ) << "..disabled by XML configuration file." << std::endl;
+	else
+		OSG_NOTIFY( osg::ALWAYS ) << std::endl;
+	if(config)
+		xmlFreeDoc(tmpDoc); xmlCleanupParser();
+
 }
 
