I created a blendshape with lots of inbetween targets, how can i query them? Thanks
I searched a bunch, and I couldn’t find anything… This is really strange.
I personally set up my combination shapes manually through combinationShape nodes that I create and drive myself. It gets past a few limitations in the Shape Editor, and gives me more control, and lets me store the connections independent of any given blendshape. (So I can save templates to re-use for different characters.)
I’d recommend doing the same thing for your in-betweens. Set them up yourself manually using a remapValue node. Also, if you try and export your shapes to a game engine, the in-betweens are not going to export (at least the last time I tried.) But if you store them as your own blendshape targets, and drive them manually with a remapValue node, they will export correctly.
And again, this gives you the benefit of being able to store those connections on a group node or something, that you can store as a template for future characters, instead of setting them up each time for new blendshapes. And you’ll be able to query them with Python, and see them in the channel box.
Here is an example where I remap 0.75 on target1 to drive a new target.
Nice, i think this solution will work. Thank alots , Clesage
Just found a way to get the inbetween target-values
Using blendshape targetItemIndexList, you will get the all the target-mesh, and the one start from index 5000-5999 is inbetween target-shape, inbetween value is inside the index’s number (5500 is 0.5, 5700 is 0.7)
That also explains why if you try to create 2 targets as in-betweens of the same value, you get this error:
// Error: file: /Applications/Autodesk/maya2017/Maya.app/Contents/scripts/others/doBlendShapeAddInBetweenTarget.mel line 52: Error: In-between target's maximum influence weighting cannot be the same as an existing in-between target - it must be unique. //
Hi illunara, can you tell me , how to use targetItemIndexList to get index list? thanks.
For example you have a scene like this
import pymel.core as pm
bs_node = pm.PyNode(“blendShape1”)
bs_node .targetItemIndexList(0, “pSphereShape1”)
it will return
Result: [5279, 5598, 6000]
And you can see the inbetween value is 0.279, 0.5598
You can use listconnection to get the orginal shape
illunara, thank you so much, it’s really useful.