SketchUP Export To ogre

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
greetzyl
Gnoblar
Posts: 6
Joined: Tue Jul 10, 2007 3:01 pm

SketchUP Export To ogre

Post by greetzyl »

here is the example:
require 'sketchup.rb'

#-----------------------------------------------------------------------------

def exportTextures

ss = Sketchup.active_model.selection

tw = Sketchup.create_texture_writer

ss.each do |ent|

case ent.typename

when "Face"
tw.load(ent, true)
retval = tw.write(ent, true, "C:\\greetzyl.jpg"
end
end
end
# Add some menu items to access this
if( not file_loaded?("zyl_texture.rb") )
plugins_menu = UI.menu("Tools")
plugins_menu.add_item("Export to Textures") { exportTextures }
end

#-----------------------------------------------------------------------------
file_loaded("zyl_texture.rb")

Post Reply