Created
November 30, 2015 08:27
-
-
Save zeffii/39f56a3debdd4b54b9b8 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 | |
ng = bpy.data.materials['Material'].node_tree | |
mapping = ng.nodes['Mapping'] | |
def list_props(node): | |
ignored = {'bl_icon', 'bl_static_type', 'type'} | |
for i in node.bl_rna.properties: | |
if i.identifier in ignored: | |
continue | |
if hasattr(i, 'default'): | |
name = i.identifier | |
setattr(node, name, i.default) | |
list_props(mapping) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment