Hi,
Currently I'm trying to solve the following situation:
We have some assets coming from speedtree for an environment. At the moment each of the individual shapes for all of those assets have corresponding textures with the same name. Say we have a poly shape called G_leaves_Shape
we have a corresponding texture called leaves.tx
.
The way we are assigning those textures currently is through userdata. We set a string userdata by stripping the G_
prefix and _Shape
suffix on all shapes (they're always the same) and set the remainder (leaves
) as a userdata attribute which we are then referencing in our aiImage nodes. This is however not baked in the source alembics, but rather happens in the render DCC (in this case Katana).
Now, we wanted to make use of the alembic procedural which makes time-to-first-pixel a lot faster and uses less memory. As we however do not have the needed userdata baked on the alembics I was wondering if there's any way to set the basename of a mesh node via regex with operators. name
always gives me the full path (eg /root/world/geo/tree1/G_leaves/G_leaves_Shape
), but I only need the basename (eg G_leaves_Shape
).
From what I can tell I can strip the pre- and suffix from the name
of each node with a string_replace
operator already. Now I'd only need to set an arbitrary attribute referencing the shape name. Is this possible?
Also as a side question: Is there a straight forward way to bake the effect of operators to inspect the results they have in an ass file for debugging purposes?
Thanks,
Julius