-
Hi there, I am trying to write a custom texture plugin in python, and I am wondering how to access the mesh vertices and triangles in the Here is the context: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @qnzhou, One approach is to leverage
where It's not ideal to repeatedly call |
Beta Was this translation helpful? Give feedback.
-
In Python, you can't directly cast from a base class (in this case
This code checks if the This is a common pattern in Python when you need to work with derived classes through a base class reference. Note that this assumes that the |
Beta Was this translation helpful? Give feedback.
Hi @qnzhou,
One approach is to leverage
dr.dispatch
to achieve what you're after:where
other_args
could be other input you need to compute your evaluation.It's not ideal to repeatedly call
mi.traverse
so you could alternatively cache the mapping of shapes to vertices/faces