Jump to content

Exporting Multiple Chans From A Dop Fractured/glue Object In Chops


redpaw

Recommended Posts

I have a simulation that uses a rbdGlue object to break up an object.

it contains objects labeled as shard_# grouped up properly in a sop network,

but now I want to make a semi generic script/control to look at the

glue object given, get the number of objects inside of it, and export a separate

chan file for each piece one at a time.

can anybody give me a quick hint as to what command I can use, script wise, to get a list of the objects contained in a RBDFractured/glue object?

I'm not really concerned with the idea of writing a loop to change the input

of the dynamics CHOP each time and then write out the chan file..

I just need to be able to get even the count of how many objects are being passed in

so I can populate my 'for each' loop with proper names.

the only other solution is to build a separate output CHOP chain for each object separately and thats a LOT

of nodes when I could do it with a simple loop script..

anybody?

thanks in advance

-redpaw

Link to comment
Share on other sites

doesent work.. is that command scripting language ? and if so might it be for a version of houdini I don't have yet?

I'm stilll on 8.1.704 right now so no fun new python stuff yet for me..

any other ideas anyone?

-j

Link to comment
Share on other sites

No, that is in the expression language. However, your path must be to a SOP I think.

hmm yah thats not going to work on both counts.. I need this to happen in an hscript command

although I guess I could point it all the way back to the SOP level thats feeding the glue object if I had to.

-thanks.

Link to comment
Share on other sites

Ok, so maybe I'm missing something here.. but when I run that command in the textport all I get is an error

"Unknown command: 0"

I'm running this to test, on a merge node in sop

`argc(primgrouplist("/obj/model/merge1"))`

and into the merge node are 3 sphere prims.

and if I run

`primgrouplist("/obj/model/merge1")`

I get

Command '' not specific enough <double back ticks, not quote

:-/ I am still confused.

Link to comment
Share on other sites

Ugh.. thanks..

why is it ALWAYS the stupidly simple stuff that I get caught up on.. I hope its not just me..

<insert whine about why there are no good (non simplified) scripting / expression tutorials / examples anywhere>

seriously I would kill for ONE file that has a bunch of big complex expressions to see how other people do things..

Link to comment
Share on other sites

Lots of expression related stuff in the on-line houdini help. Check out this link in the hdocs:

hdox://houdini/content/commands/commands_and_expressions.html

The good old Expression Cookbook is still in there. Look for the link about the third of the way down. It's worth it to go to each and every link though.

Link to comment
Share on other sites

AAAAhhh..

I can't believe I've never seen any of these pages in the hdox before.....

sigh.. changed my settings to hdox window left/right instead of up/down... maybe now I won't forget all this other stuff is here..

thanks

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...