jim c Posted February 20, 2013 Share Posted February 20, 2013 I'm trying to export some chops data from one series of objects (motion data t[xyz] and r[xyz]) to another. The two sets of objects have the same name but are in different container objects. There are also some other objects that named similar to the ones I want to match, but I don't want anything to be assigned to them. So in the source container I've got /obj/sp -myrig_ctrl1 -myrig_ctrl2 -myrig_ctrl3 -myrig_ctrl1_bone -myrig_ctrl2_bone in my dest container I've got something similar /obj/bx -myrig_ctrl1 -myrig_ctrl2 -myrig_ctrl3 -myrig_ctrl1_bone -myrig_ctrl2_bone I want to fetch data from sp/myrig_ctrl1, sp/myrig_ctrl2, and sp/myrig_ctrl3 I then want to export to the same set of node in bx. The problem is that I can't seem to figure out how to pattern match this in a way that works without picking up the _bone nodes in the destination, *unless* I manually enter each destination node in the path of the Export CHOP. Such as myrig_ctrl1/t[xyz] myrig_ctrl1/r[xyz] Now if it were only 3 or 4 nodes this would be OK, but I've 60 or more to do, which is pretty tedious. Is there an easier way to accomplish this? Quote Link to comment Share on other sites More sharing options...
edward Posted February 20, 2013 Share Posted February 20, 2013 Try using an Export CHOP instead. You can specify the subnet as your node. ie. /obj/bx ... just make sure your CHOP channels are labelled like myrig_ctrl1/t[xyx], myrig_ctrl1/r[xyx], etc. Quote Link to comment Share on other sites More sharing options...
jim c Posted February 20, 2013 Author Share Posted February 20, 2013 OK, thanks. That's what I was using, and that's where I ran into problems. Maybe I'll post a simple test file in a bit. Quote Link to comment Share on other sites More sharing options...
jim c Posted February 20, 2013 Author Share Posted February 20, 2013 Here's a sample of what I'm talking about. The only way I could get it to work without the bone nodes getting picked up in the export was to manually type in the paths in the Export node. I'd like to avoid that if I can. rig-test-to-chops.hipnc Quote Link to comment Share on other sites More sharing options...
edward Posted February 21, 2013 Share Posted February 21, 2013 The problem is that I can't seem to figure out how to pattern match this in a way that works without picking up the _bone nodes in the destination, *unless* I manually enter each destination node in the path of the Export CHOP. Sorry, missed this part. What about using a Delete CHOP with an appropriate pattern to remove the unwanted channels before exporting? Quote Link to comment Share on other sites More sharing options...
jim c Posted February 21, 2013 Author Share Posted February 21, 2013 Edward, yes, I tried that, and that works for the src channels. But how to I prevent the export from assigning data to the destination and picking up stuff I don't want? I would have thought it tries to match src name to dest name, but it seems pretty random what it does *unless* you explicitly lay out the mapping by hand. Initial fetch, work fine, has extra bone elements Use delete chop to get rid of the bone elements Try to export to /obj/bx/myrigctrl* ... chaos ensues... So it's the last step that I'm stumped on and was hoping there was some way to control that was easier. Quote Link to comment Share on other sites More sharing options...
edward Posted February 21, 2013 Share Posted February 21, 2013 How about setting the Node parameter to be "/obj/bx" and then for Path (and/or Channels?) use `run("chopls " + opinputpath(".") + " t[xyz]")` (with the backquotes, untested!) ... this gives you the list of input channels. Quote Link to comment Share on other sites More sharing options...
jim c Posted February 21, 2013 Author Share Posted February 21, 2013 Thanks, I'll try this, that makes sense. Can you (by you I mean any user) make that expression a preset for Export's Path channel? Quote Link to comment Share on other sites More sharing options...
malexander Posted February 21, 2013 Share Posted February 21, 2013 Use a Rename CHOP to rename the channels from "*" to "bx:*" and export that. This worked for me on your file using file2->rename1 (export rename1), where rename1 is the new Rename CHOP I added. 2 Quote Link to comment Share on other sites More sharing options...
jim c Posted February 22, 2013 Author Share Posted February 22, 2013 Mark, that worked great! THanks for that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.