2
$\begingroup$

I have a question about built in attribute names in Blender(Ver 5.0.0).

In the Shader Editor, the Attribute node can access some object properties simply by typing their names into the Name field. For example, typing "scale" works without defining any custom attribute.

I do not expect a complete list because the available attributes probably depend on the object type and may be defined when the object is created. However, I would like to know how to identify which built in attribute names are available. Any hints or pointers would be very helpful. Source code references are also welcome.

Thank you.enter image description here

New contributor
flash is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
$\endgroup$

1 Answer 1

3
$\begingroup$

There isn't a way to have a simple list of all the current available attributes (that could be very long), but there are multiple places that tell you either what to expect, or a part of what you do have.

The node's documentation is the first place to look for explanations of what each attribute type could let you access: Attribute Node - Blender 5.0 Manual.

E.g.:

Object:    The attribute name specifies a custom property name, or an RNA path to a built-in property (like the single property driver variables).

Built-in properties such as locations, rotation, scale, ...

If in Preferences > Interface > Display, you enable "Python Tooltips" and "Developer Extras", you will be able to see the properties' API name when hovering them, and even RMB RMB > Copy Data Path (⎈ Ctrl⇧ ShiftC) to copy them.

enter image description here

For geometry attributes, you can see a list of them in the mesh properties > Attributes panel:

enter image description here

And if you also captured geonodes attributes to use them outside of geonodes (i.e. in shaders), you can see them in the Spreadsheet editor:

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you so much for your answer. It was extremely helpful. I’m not entirely confident if this description is precise, but I think that what I was looking for are the property names at the end of the RNA paths exposed through the Python API, such as bpy.data.objects["Cube"].scale[0]. When I printed them out using a Python script, I found that there are a huge number of these properties. Thanks again for your help! $\endgroup$ Commented 14 hours ago

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.