Commit af0cbee2 authored by Weizhen Huang's avatar Weizhen Huang

make ini parser support refractive material

parent 000c4a6c
......@@ -116,6 +116,16 @@ void INIPlugin::parseIniFile(INIFile& _ini, BaseObjectData* _object) {
if ( _ini.get_entry( reflectance, _object->name() , "Reflectance" ) ) {
_object->materialNode()->set_reflectance(reflectance);
}
double indexOfRefraction;
if ( _ini.get_entry( indexOfRefraction, _object->name() , "IndexOfRefraction" ) ) {
_object->materialNode()->set_indexOfRefraction(indexOfRefraction);
}
bool isRefractive;
if ( _ini.get_entry( isRefractive, _object->name() , "isRefractive" ) ) {
_object->materialNode()->set_refractive(isRefractive);
}
bool visible;
if ( _ini.get_entry( visible, _object->name() , "Visible" ) ) {
......@@ -157,7 +167,13 @@ void INIPlugin::saveIniFile(INIFile& _ini, BaseObjectData* _object) {
_object->materialNode()->shininess());
_ini.add_entry( _object->name() ,
"Reflectance" ,
_object->materialNode()->reflectance());
_object->materialNode()->reflectance());
_ini.add_entry( _object->name() ,
"IndexOfRefraction" ,
_object->materialNode()->indexOfRefraction());
_ini.add_entry( _object->name() ,
"isRefractive" ,
_object->materialNode()->isRefractive());
_ini.add_entry( _object->name() ,
"Visible" ,
_object->visible() );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment