Robert-N7 / abmatt

ANoob's Brres Material Tool for Mario Kart Wii
GNU General Public License v3.0
14 stars 3 forks source link

Feature request: Exporting object data without having to do a replacement #40

Closed Heath123 closed 3 years ago

Heath123 commented 3 years ago

If material data can't be included in the DAE/OBJ, can it at least be written to a text file or something, so you don't have to do the Replace thing and you can combine materials from different tracks/edit materials?

Robert-N7 commented 3 years ago

That is what the material library/scene material library is for, you can drag and drop materials onto the polygons... and if you double click on the material you can edit it.

Heath123 commented 3 years ago

I'm trying to make a Blender plugin, so it would be nice to be able to import the properties into Blender and edit them there

Robert-N7 commented 3 years ago

That makes more sense to me now, yes we could definitely work something out. I worry that including the data in the dae or obj would create errors in 3rd-party tools importing them, so a separate text file may be best.

Heath123 commented 3 years ago

From what I understand Blender Python scripts let you add custom properties to things like materials so I was thinking that it could import the data into that (via a temporary text file so other people can use the functionality in different scripts and things instead of it being specifically for my thing)

Heath123 commented 3 years ago

This is what I'm making: https://youtu.be/evf61IebDd4

Robert-N7 commented 3 years ago

That looks super cool, I'm working on being able to dump the material data into a json file. Will that work for you?

Heath123 commented 3 years ago

Sounds good, thank you

Heath123 commented 3 years ago

As long as I can match up the imported material with the properties and export it again, and the structure of JSON isn't a complicated nested thing that I can't convert to a UI that will be perfect

Robert-N7 commented 3 years ago

Ahhh, but the nature of brres materials is complex. There is multiple layers to each material, shader, shader stages, light channels, colors, matrices, animations, you get the picture. It would be easy enough to reload using my python packages... But I'm not sure about displaying every setting.

Heath123 commented 3 years ago

Ah, OK, in the worst case I can make a JSON editor so it's fine

Heath123 commented 3 years ago

Thank you! I'll try to make this work when the few final issues with model exporting are solved

Heath123 commented 3 years ago

Seems to work perfectly so far, thank you