Created
December 9, 2016 16:09
-
-
Save madeindjs/7bd8c47fd06e753408dd6d4e00054e56 to your computer and use it in GitHub Desktop.
A Sketchup script to do boring stuff tu improve my 2015 library to 2016
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit materials | |
Sketchup.active_model.materials.to_a.each do |mat| | |
case mat.name | |
when / Ext/ | |
Sketchup.active_model.materials.remove(mat) unless mat.deleted? | |
when / Int/ | |
mat.name = "! Int" | |
when "! RAL 7012" | |
mat.color = Sketchup::Color.new 87, 93, 94 | |
mat.texture = nil | |
when "! RAL 7042" | |
mat.color = Sketchup::Color.new 142, 146, 145 | |
mat.texture = nil | |
when "! Teintage des vitres" | |
mat.color = Sketchup::Color.new 255, 255, 255 | |
mat.texture = nil | |
end | |
end | |
Sketchup.active_model.definitions do |definition| | |
definition.name.gsub! "Joue", "Cheek" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment