-
-
Save Theverat/985f1948bd934187eaa7444d0dbbd2f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
roughness_sockets = 0 | |
textured_roughness_sockets = 0 | |
for node_tree in bpy.data.node_groups: | |
if not "luxcore" in node_tree.bl_idname: | |
continue | |
for node in node_tree.nodes: | |
if node.outputs and not node.outputs[0].is_linked: | |
continue | |
for input in node.inputs: | |
if input.enabled and "roughness" in input.name.lower(): | |
roughness_sockets += 1 | |
if input.is_linked: | |
textured_roughness_sockets += 1 | |
if roughness_sockets: | |
print("%d roughness sockets, %d are textured (%d%%)" % | |
(roughness_sockets, textured_roughness_sockets, | |
float(textured_roughness_sockets) / roughness_sockets * 100)) | |
else: | |
print("No roughness sockets") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment