Page MenuHome

Python API: Add new properties to "node_shader_utils.py"
Needs ReviewPublic

Authored by Alex Strand (astrand130) on Tue, Sep 1, 9:43 PM.

Details

Summary

Adds more properties to "node_shader_utils.py" including the upcoming emission strength parameter.

Depends on D4971

Needed for updating python based exporters.

Diff Detail

Event Timeline

Alex Strand (astrand130) retitled this revision from Add new properties to "node_shader_utils.py" to Python API: Add new properties to "node_shader_utils.py".Wed, Sep 2, 5:11 AM
Alex Strand (astrand130) planned changes to this revision.Wed, Sep 9, 11:06 AM

Planning to extend ShaderImageTextureWrapper to use the Seperate RGB node for masking.

Updated diff to support changing to alpha socket after creation of the texture wrapper. (I will leave channel packing for the future)

I committed the emission strength part of this along with D4971.

Updated diff to support changing to alpha socket after creation of the texture wrapper.

I'm not sure what this means. How is alpha different than other sockets that it needs this?

release/scripts/modules/bpy_extras/node_shader_utils.py
837

Can you explain the reason for this change?

I committed the emission strength part of this along with D4971.

Updated diff to support changing to alpha socket after creation of the texture wrapper.

I'm not sure what this means. How is alpha different than other sockets that it needs this?

It's the alpha output of the texture node, not the Principled BSDF. Previously it was rather difficult to tell the wrapper to output alpha instead of color as it had to be initiated at the creation of the wrapper and the texture node. With this change you can now switch to the alpha socket of the texture after the creation of the wrapper.

Reverted normal map strength change

release/scripts/modules/bpy_extras/node_shader_utils.py
837

Leftover from testing an issue with the normal map strength in the Obj exporter... Let me revert that.

(Fixed odd end of file issue in the previous diff)

Alex Strand (astrand130) marked an inline comment as done.Sat, Sep 19, 4:36 AM