]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
From CoTech 51: change default preferences
authorvsr <vsr@opencascade.com>
Fri, 29 Mar 2013 15:55:03 +0000 (15:55 +0000)
committervsr <vsr@opencascade.com>
Fri, 29 Mar 2013 15:55:03 +0000 (15:55 +0000)
resources/SalomeApp.xml.in
src/Material/Material_ResourceMgr.cxx
src/Material/resources/SalomeMaterial.xml

index 2d8e9c623844e540b915aef8d6472c179ab00b91..fbd07f25b349c6226079ebe5523e1d3cda0b4e72 100644 (file)
@@ -58,7 +58,7 @@
     <parameter name="base_vectors_length" value="1"  />
     <parameter name="marker_scale"        value="3"  />
     <parameter name="geom_preview"        value="true"  />
-    <parameter name="material"            value="Plastic" />
+    <parameter name="material"            value="[ Default ]" />
     <parameter name="predef_materials"    value="true" />
     <parameter name="edge_width"          value="1" />
     <parameter name="isolines_width"      value="1" />
index 60748c526dac8ed31e1abda0a5babb19147d6835..59ca3b65fa3532e0d3d5155a5c81ca3d9d9c51dc 100644 (file)
@@ -140,6 +140,11 @@ QStringList Material_ResourceMgr::materials( MaterialType theType, bool theSort
     qSort( slglobal );
     qSort( sluser );
   }
+  // special processing for default material (to make it first in the list)
+  if ( slglobal.contains( "[ Default ]" ) ) {
+    slglobal.removeAll( "[ Default ]" );
+    slglobal.prepend( "[ Default ]" );
+  }
 
   // combine the materials to obtain result list
   QStringList result;
index a8588b66f8ca79afde3f42968daf1513bddbb668..7cf7a863885c3b4274701a2499ffc344d3cd2b63 100644 (file)
     <parameter name="emissive-color"             value="#000000" />
     <parameter name="transparency"               value="0.0" />
   </section>
+  <section name="[ Default ]">
+    <parameter name="physical"                   value="false" />
+    <parameter name="front_shininess"            value="0.13" />
+    <parameter name="back_shininess"             value="0.13" />
+    <parameter name="ambient"                    value="true" />
+    <parameter name="ambient-color"              value="#333333" />
+    <parameter name="front_ambient-coefficient"  value="0.3" />
+    <parameter name="back_ambient-coefficient"   value="0.25" />
+    <parameter name="diffuse"                    value="true" />
+    <parameter name="diffuse-color"              value="#000000" />
+    <parameter name="front_diffuse-coefficient"  value="0.5" />
+    <parameter name="back_diffuse-coefficient"   value="0.4" />
+    <parameter name="specular"                   value="true" />
+    <parameter name="specular-color"             value="#ffffff" />
+    <parameter name="front_specular-coefficient" value="0.3" />
+    <parameter name="back_specular-coefficient"  value="0.3" />
+    <parameter name="emissive"                   value="false" />
+    <parameter name="emissive-color"             value="#000000" />
+    <parameter name="front_emissive-coefficient" value="0" />
+    <parameter name="back_emissive-coefficient"  value="0" />
+ </section>
   <section name="Plastic" >
     <parameter name="front_shininess"            value="0.0078" />
     <parameter name="back_shininess"             value="0.0078" />