-
-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script for converting .props.txt material files to .json files #288
base: master
Are you sure you want to change the base?
Conversation
I would love for this functionality to just be native to the program instead of requiring a script to do this. It's not a safe assumption that the user has Python installed. I would imagine this PR is not likely to be accepted for this reason. |
It's easy to save json directly from UModel, this format is very simple. I just chose the txt because it's more "readable". The question is - how useful this would be. And of course having external Python script adds some flexibility to the json schema, for those who knows how to use the provided data. |
JSON is equally readable in my opinion and, most importantly, is highly portable. Virtually every language has mature libraries for JSON parsing, many of them built-in. Right now, the user has to write a little script to parse the I have another couple suggestions while we're on the subject of these properties files. I would like to have it so that the property files are written out for My next suggestion would be to include the type name of the material inside the props file itself. I'm writing a program right now that is converting these |
Why props could be useful for textures? It's easy to add, but it will result in probably too many files in exported folders, and in my opinion - useless files. Textures doesn't have many useful settings, plus UModel doesn't read them all - just those which are needed for rendering (e.g. size, pixel format etc). |
As I mentioned above, I'm making an addon for Blender that will transform UE1/UE2 materials into Blender shader graphs. Getting all the other information about the textures makes it possible to replicate the materials accurately in Blender (for example, the detail material, UV extension mode etc.). At the very least it should be an option that can be enabled. For a normal user I understand that it's too many useless files to write out, but for power users it's very useful. |
@JediKnightChan This script fails if there is a line like this in the props.txt file:
|
Later versions of UE have enabled-by-default Python support, which allows to automatically create material instances and set references to them on meshes. However, .props.txt files generated by umodel are in difficult format, which doesn't allow python programmers to work with them easily. This script allows to convert .props.txt file into a human- and python-readable JSON format.