Material Assign Preset

Announcements, requests and support regarding SkIndigo - the Sketchup / Indigo exporter.
Post Reply
9 posts • Page 1 of 1
roodyj
Posts: 1
Joined: Tue Mar 16, 2010 4:46 am

Material Assign Preset

Post by roodyj » Tue Mar 16, 2010 5:03 am

In the Material Editor, the Assign Preset button brings up a new window with preset picture icons for several different presets. I have downloaded materials from the Indigo library and would like to include these in the available preset icons. How do I do that?

Thank you,
Jim

User avatar
Whaat
Developer
Posts: 1827
Joined: Fri Dec 22, 2006 6:15 am
Location: Canada
Contact:

Re: Material Assign Preset

Post by Whaat » Sat Mar 20, 2010 2:06 am

roodyj wrote:In the Material Editor, the Assign Preset button brings up a new window with preset picture icons for several different presets. I have downloaded materials from the Indigo library and would like to include these in the available preset icons. How do I do that?

Thank you,
Jim
Hi roodyj,
This can't be done at the moment. This has been requested before so I will see if I can add it to a future release.

User avatar
tarikb
Posts: 125
Joined: Fri Aug 27, 2010 1:26 am

Re: Material Assign Preset

Post by tarikb » Sat Aug 28, 2010 12:51 am

It would be wery usefull to do that :) Also, it would be great to add name next by material. Thanks
Skindigo
i7 5820K @3.3Ghz | GTX 660 Ti 3gb

User avatar
snorky
Indigo 100
Posts: 331
Joined: Fri Apr 17, 2009 8:54 pm
Location: Parma, Italy

Re: Material Assign Preset

Post by snorky » Sat Aug 28, 2010 1:24 am

Whaat wrote:
roodyj wrote:In the Material Editor, the Assign Preset button brings up a new window with preset picture icons for several different presets. I have downloaded materials from the Indigo library and would like to include these in the available preset icons. How do I do that?

Thank you,
Jim
Hi roodyj,
This can't be done at the moment. This has been requested before so I will see if I can add it to a future release.
manual method....
on ...\Plugins\skindigo directory
open presets.html
add a line like

Code: Select all

<img id="fluor34wwarm" src="fluor34wwarm.jpg" onclick="tellSU(this.id)" title="34W Fluorescent Tube (warm)">
id is material's internal name, src is a preview thumb (jpg, 250x250), title is the name that will appear when mouse go over the picture.
on \Plugins directory
open skindigo.rb (sorry Whaat... if you don't like it, I will remove all immediately)
look for a string like

Code: Select all

when "fluor34wwarm"
apply_34WTFW(sm)
add another string like

Code: Select all

when "material's internal name"
apply_NAME(sm)
looking for a string like

Code: Select all

def apply_34WTFW(material)
...
...
end
add another string like

Code: Select all

def apply_NAME(material)
'insert the material settings'						
end
that's all....

isn't simple... but works!
:mrgreen:

User avatar
Whaat
Developer
Posts: 1827
Joined: Fri Dec 22, 2006 6:15 am
Location: Canada
Contact:

Re: Material Assign Preset

Post by Whaat » Sat Aug 28, 2010 6:29 am

no problem...I doubt very many are brave enough to start tweaking the code anyway. 8)

User avatar
Pibuz
1st Place 100
Posts: 2646
Joined: Tue Dec 11, 2007 7:58 am
Location: Padua, Italy
3D Software: SketchUp

Re: Material Assign Preset

Post by Pibuz » Sat Aug 28, 2010 7:45 pm

Hi Snorky! Smart workflow you have built here! Interesting topic!
Why don't you make a complete tut?

(and post it at indigo-italia too?)

User avatar
snorky
Indigo 100
Posts: 331
Joined: Fri Apr 17, 2009 8:54 pm
Location: Parma, Italy

Re: Material Assign Preset

Post by snorky » Mon Aug 30, 2010 9:59 pm

Pibuz wrote:Hi Snorky! Smart workflow you have built here! Interesting topic!
Why don't you make a complete tut?

(and post it at indigo-italia too?)
a full tutorial? hehehhe no for 2 reasons
- little free time
- I hope in a future version of skindigo
:mrgreen:

User avatar
Pibuz
1st Place 100
Posts: 2646
Joined: Tue Dec 11, 2007 7:58 am
Location: Padua, Italy
3D Software: SketchUp

Re: Material Assign Preset

Post by Pibuz » Mon Aug 30, 2010 10:07 pm

C'MOOOOOOOOOON MAAAAAAAN!

Coen Naninck

Re: Material Assign Preset

Post by Coen Naninck » Wed Oct 19, 2011 9:21 pm

Or better yet, someone should just download the entire Indigo Materials library, then fetch all the info using above's method, and finally add some custom code (headers and clearfix's) to separate the different materials. Then post it here. It can be further customized by creating an HTML <option></option> list which shows the materials by category. Or even better, using DataTables to sort in any way you like (i.e. by material, material property (Glossy, Oren Nayar, Etc.), etc.).

I would be able to do this with the HTML skills I have. I imagine it's not all that difficult. Just don't have time to do it now. But, I will wait for Whaat's next release and see if I can cook something up in the meantime. Those steps above sure will save a lot of time though. I've been looking for a way to start giving back here so this might be it. :)

EDIT: I forgot to add, once this is posted here (the HTML file plus any linked files) it can be given a version which says "All Indigo materials up to such and such date.". And then update it periodically when new materials come out.

EDIT 2: I wish I had time to do this, this seems like a fun project to me! I've already got a bunch of ideas to make this a really cool toy.

Post Reply
9 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 22 guests