Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

68 lines (60 sloc) 1.967 kB
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place - Suite 330, Boston, MA 02111-1307, USA, or go to
# This file is part of su2yafaray
# Authors, see su2yafaray.rb
class YafarayMaterial
# #'mirror_color' =
attr_reader :mat
def initialize(su_material)
@@options.each do |key, value|
YafarayMaterial.module_eval do
define_method(key) {@mat.get_attribute(@dict,key,value) }
define_method("#{key}=") { |new_value| @mat.set_attribute(@dict,key,new_value) }
def name
return mat.display_name.gsub(/[<>]/, '*') #replaces <> characters with *
def has_texture
has_texture = false
has_texture = true if @mat.texture!=nil
end #end class YafarayMaterial
Jump to Line
Something went wrong with that request. Please try again.