Eric, if I understand you correctly, that's honestly what I'd rather do.
Seems so much simpler to leave the shape keys in place and simply update
whatever data they contain. But I simply don't know how to script this.
I just haven't done much scripting with mesh attributes like this. How
do I get the positions attribute from one shape key and apply it to another?
On 6/17/2015 6:21 PM, Eric Thivierge wrote:
Hey Tim,
Any reason you're not using scripting to regenerate these and not just
use copy / paste? You can script the creation of the shape nodes and
then copy the "positions" attribute over.
Another thing you could do is apply ICE Ops to copy the values of
shapes on one mesh to another. Don't forget that ICE isn't always for
Live operators, but you can design ops that are only there for
utilities and then get frozen off. Especially when you use the
ApplyICEOp() command which takes a compounds execute port (it has to
have one) and connects it directly and then you can script the hook
ups of get data nodes or you can fill in the reference inputs that
point to the right objects / properties.
You can update data in shape keys through scripting or ICE.
Eric T.
--------------------------------------------
Eric Thivierge
http://www.ethivierge.com
On Wed, Jun 17, 2015 at 3:48 PM, Tim Crowson
<tim.crow...@magneticdreams.com
<mailto:tim.crow...@magneticdreams.com>> wrote:
I'm working on a tool for updating shapeKeys inside a mesh's Shape
cluster. I can't use GATOR to transfer the shapes (that creates a
new Shape cluster anyway, which I don't want). My original intent
was to:
1. compare my rig model with my shapes model, storing any
animation or expressions on shape keys
2. delete shape keys out of my rig model
3. copy over the updated shape keys (same names) from the shapes model
4. re-apply anim/expressions
The problem I'm having is between steps 2 and 3. I am not sure
what the best method is for transferring shape keys. GATOR just
dumps the whole lot into a new Shape cluster, which I don't want.
So I'm falling back on Application.CopyPaste(). Now this works
fine when dragging and dropping via the mouse. But for some
reason, when firing the exact same command in code, it bombs and
throws an error on that command. However, if instead of deleting
specific shape keys, I delete the entire parent Shape cluster,
then CopyPaste() works just fine. It's almost like the CopyPaste()
command fails when fired from code AND a Shape cluster already
exists. But clearly, I can't just delete the Shape cluster, as we
might have custom shapes inside it that aren't in whatever model
we're sourcing from for the update..
Any ideas?
Honestly this would all be much easier (I think) if there was a
way to update point data inside a shape key, but I can't tell if
that's possible or not, hence my current method of deleting and
re-applying anim/expressions.
--
*Tim Crowson
*/Lead CG Artist/
*Magnetic Dreams, Inc.
*2525 Lebanon Pike, Bldg C, Suite 101, Nashville, TN 37214
*Ph* 615.885.6801 <tel:615.885.6801> | *Fax* 615.889.4768
<tel:615.889.4768> | www.magneticdreams.com
<http://www.magneticdreams.com>
tim.crow...@magneticdreams.com <mailto:tim.crow...@magneticdreams.com>
/
/
--
Signature