Python API and new material features

  • I've been looking into material management, and I'm seeing several holes in at least the documentation, if not the API. If anyone has information about this, I'd really appreciate it.

    1. Compound node CompoundData() method returns an object about which I can find absolutely no documentation. I'd really love to know more about its methods and how they work.

    2. Mysteriously, MateterialLayers have no Delete() method. Nor a SetName() method. Or really any action whatsoever. You can get information back from them, but not change them in any way. So it looks as if it's impossible manage layered materials in any sensible manner. If anyone knows of a way to eliminate existing layers, please let me know.

    3. What is ShaderTreeHash() for? I don't currently see a way to use this at all.

    And really, can we just have methods to manage materials? It just doesn't make sense to have to go to the node input level to do something as basic as replace one material with another. There also needs to be a distinction between materials and material zones. It was fine to just have Materials and ShaderTrees when there was one shader tree per material, but that's no longer the case.

  • Poser Ambassadors

    1. Material.DeleteLayer(x) where x is the index of the MaterialLayer

  • @Snarlygribbly Oh, thanks so much! That's not in the documentation at all. Oh, and I haven't forgotten about sending you my script to take a look at. I'm still trying to get it to a good point for viewing.