简体   繁体   中英

How to trigger script node update from Blender python?

I have a Blender model, that uses a script to generate a shader. This script takes as input the output of a Value Node, and uses this value to generate a pattern.

I would like to use a python Blender script to: - change the "Value" being fed into the script - perform the "script node update" as if I was pressing the button in the script node - render and save.

I'd be looping through a set of 20 "values" so want to do this in one click.

在此处输入图片说明

I found the simplest way to do what I wanted was to actually update the default value for the input parameters to the script node. This actually triggers the script to update at the same time.

nodeScript.inputs[2].default_value = 100

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM