How do you find the Usage of an output node. (basecolor, roughness, etc)

New Here ,
Jun 08, 2022 Jun 08, 2022

Copy link to clipboard

Copied

How do you get the usage type of an output node via python?

TOPICS
How to , Scripting

Views

47

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Adobe Employee , Jun 13, 2022 Jun 13, 2022
You need to do something like: node.getAnnotationPropertyValueFromId("usages") This returns an array of SDValueUsage objects.  

Likes

Translate

Translate
New Here , Jun 13, 2022 Jun 13, 2022
That was exaclty what I needed.  Thank you.I was able to get the name using...Node.getAnnotationPropertyValueFromId("usages").getItem(0).get().getName()

Likes

Translate

Translate
Adobe Employee ,
Jun 13, 2022 Jun 13, 2022

Copy link to clipboard

Copied

You need to do something like:

node.getAnnotationPropertyValueFromId("usages")

This returns an array of SDValueUsage objects.

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 13, 2022 Jun 13, 2022

Copy link to clipboard

Copied

LATEST

That was exaclty what I needed.  Thank you.

I was able to get the name using...

Node.getAnnotationPropertyValueFromId("usages").getItem(0).get().getName()

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines