Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the option to add an attribute to the vertex format for every element in a 'bpy_prop_collection' #27

Open
bartteunis opened this issue Jan 3, 2022 · 2 comments

Comments

@bartteunis
Copy link
Member

A good example would be values of the vertex position and normal for the morph keys.
This is complex and likely requires an index into the collection.

@bartteunis bartteunis changed the title Add the option to add an attribute of all elements in a 'bpy_prop_collection' to the vertex format Add the option to add an attribute for every element in a 'bpy_prop_collection' to the vertex format Jan 3, 2022
@bartteunis
Copy link
Member Author

bartteunis commented Jan 3, 2022

Technically, what needs to happen here is that a vertex attribute gets added per element in the collection.
For e.g. shape keys, this would mean the following:

# The endpoint 
endpoint = mesh_data.shape_keys.key_blocks['Basis'].data
# Lookup of value as before
value = endpoint[vertex_index].co

Note how this does require the name of the key block/shape key to be known.

@bartteunis bartteunis changed the title Add the option to add an attribute for every element in a 'bpy_prop_collection' to the vertex format Add the option to add an attribute to the vertex format for every element in a 'bpy_prop_collection' Jan 3, 2022
@bartteunis
Copy link
Member Author

Another one is mat.node_tree.nodes['Principled BSDF'].inputs, i.e. the list of inputs of a shader node (or simply a node in general)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant