[REQ] Rhino Material Browser support for XML mat files

Ask a question about usage of application or give us your feedback regarding new features and bug issues.

Moderator: christos

Post Reply
User avatar
bmscmoreira
Licensed User v1.5
Licensed User v1.5
Posts: 868
Joined: Wed May 13, 2009 5:24 pm
Location: Portugal
Has thanked: 4 times
Been thanked: 14 times
Contact:

Self explanatory - I think its not possible, but is there a chance the integrated material browser in Rhino can support XML material files and not just thea.mat files? Thanks!
christos
Thea Developer
Thea Developer
Posts: 927
Joined: Mon May 09, 2016 9:53 am
Has thanked: 25 times
Been thanked: 17 times

Hi,

You mean Thea XML mat files right ? They certainly can be added to the material browser...

However the downside is that to get a preview in the files list, the xml materials would have to be rendered and I don't think that's a good option. Imagine if you have 100 materials in a directory... It would take a long time just to see the preview, thus breaking the whole point of the material browser which is to quickly identify, choose a material and add it to the scene.

The .mat.thea materials don't have this issue.
User avatar
bmscmoreira
Licensed User v1.5
Licensed User v1.5
Posts: 868
Joined: Wed May 13, 2009 5:24 pm
Location: Portugal
Has thanked: 4 times
Been thanked: 14 times
Contact:

Thanks for the quick reply! I wouldn't mind having a plain text list to choose materials from. But (maybe I'm doing something wrong) I can't seem to be able to see the xml materials inside Rhino (i.e. I've placed a xml mat file in a custom folder, browsed to it using the integrated Thea material browser inside Rhino, but I don't see any material).
Thanks again!
christos
Thea Developer
Thea Developer
Posts: 927
Joined: Mon May 09, 2016 9:53 am
Has thanked: 25 times
Been thanked: 17 times

You're right. At the moment you can see only mat.thea files.

I meant I could extend the browser to also see xml materials. Sorry for the misunderstanding.
User avatar
bmscmoreira
Licensed User v1.5
Licensed User v1.5
Posts: 868
Joined: Wed May 13, 2009 5:24 pm
Location: Portugal
Has thanked: 4 times
Been thanked: 14 times
Contact:

Oh ok! Thanks. If it's not too time consuming (there are priorities I'm sure) it would be great.
Only reason I'm considering XML files is to edit them directly on a text editor to edit the texture paths in a more fast way than going through Thea.
christos
Thea Developer
Thea Developer
Posts: 927
Joined: Mon May 09, 2016 9:53 am
Has thanked: 25 times
Been thanked: 17 times

I see.

Well as I said the only reason I'm reluctant to add them is the preview. I made the extension earlier and it looked really ugly. XML materials got in between mat.thea and it was chaos :D
I really don't want to go to the route of "onDemandPreview" because this will slow down the browser by orders of magnitude.

Maybe if there was another category only for xml materials ? Or sorted at the end perhaps ? :think: I can certainly see the need for it, so I'll what can be done.
User avatar
nigec
Thea Beta Tester
Thea Beta Tester
Posts: 10519
Joined: Wed Jul 01, 2009 9:47 pm
Location: UK
Has thanked: 60 times
Been thanked: 52 times

You could do a bat file to convert it back to mat.thea

off the top of my head, put the bat file in the folder were the xml is.. and the saved mat needs the full path

Code: Select all

cd C:\Program Files\Thea Render
thea -matlab -loadmat  "mymat.xml" -savemat "C:\Temp\mymat.mat.thea" -exit
"Life is what happens to you while you're busy making other plans."
My Gallery
User avatar
bmscmoreira
Licensed User v1.5
Licensed User v1.5
Posts: 868
Joined: Wed May 13, 2009 5:24 pm
Location: Portugal
Has thanked: 4 times
Been thanked: 14 times
Contact:

Thanks! The batch sounds interesting. Maybe something can be worked out with the xml as well :D
User avatar
bmscmoreira
Licensed User v1.5
Licensed User v1.5
Posts: 868
Joined: Wed May 13, 2009 5:24 pm
Location: Portugal
Has thanked: 4 times
Been thanked: 14 times
Contact:

The batch works great! I can convert any number of xml files with just one click on the bat file! Thanks! A few notes: both paths need to be full paths, and the bat must be executed as admin.
User avatar
Rombout
Posts: 15255
Joined: Tue May 12, 2009 12:42 am
Location: Curacao, Netherland Antilles
Has thanked: 37 times
Been thanked: 324 times

I dont remember any windows coding, but isnt possible to add a short variable so you dont need to type the full path each time?

so for example;

Code: Select all

path = "c:/uers/data/thea/materials/metals/
cd C:\Program Files\Thea Render
thea -matlab -loadmat  "mymat.xml" -savemat 'path' -exit
Post Reply

Return to “Support & Feedback (Rhino)”