Rename the names of the materials
-
I wonder if it is possible to create a function to rename the names of the materials in the whole scene based on the file name or some other string that we can provide. Thanks.
-
Check the Code index in this forum, or the Plugins index in the Plugins forum, and look under author TIG.
Sounds like something he would have already written.
If not you can get ideas from his code.
-
I wrote a
material.name="newname"
extension to the Material class [ http://forums.sketchucation.com/viewtopic.php?p=293701#p293701 ]... BUT from v8M1 it is now a built-in method.
So to change all materials' names you simply need something like this...
model=Sketchup.active_model prefix=model.title+"-" ### or any other text you'd like model.materials.each{|mat|mat.name=prefix+mat.display_name}
-
TIG I'm so grateful for your help.
But if I like to complete clean old names, and serialize by numbers?Thanks again. This is great to me.
Advertisement