0
$\begingroup$

I have a button which calls image.open and a drop down menu which is the "image" property of an Image Texture node. For now, the user must click to open a new image and then select that image from the drop down menu.

How could I automatically set the opened image as the "image" property for the node upon opening it?

$\endgroup$

1 Answer 1

1
$\begingroup$

Your button should just open a file dialog on its own and after the user choosing the image do the function execution inside the operator's execute function.

See the Operator File Import operator_file_import.py template.

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .