Skip to content
Discussion options

You must be logged in to vote

All data in a material is stored as a parameter. So if you want to see what kind of data is stored in your material-instance I strongly recommend to study our samples, like:

 print("MATERIALS:")
    for index, material in enumerate(scene.materials):
        print("  MATERIAL (id:" + str(index+1) + ")")
        for key, value in material.properties.items():
            print("    %s: %s" % (key, value))

So you can reach each data-item like the diffuce color by its key and the value contains the data assigned to this. As far as I know colors are stored as Color3D, which looks like:

class Color3D(Structure):
    """
    See 'types.h' for details.
    """

    _fields_ = [
            #  Red…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@sourcehawk
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by kimkulling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants