David Gary Posted September 24, 2003 Share Posted September 24, 2003 Hi This is not a question about Vex but hscript. And since it's the coders corner... (what about creating a dedicated hscript section in the forum? ). I'm looking for a simple way to get the list of the currently selected objects. I found somewhere in the codex section a script using the opselect function . But this function is not listed in the manuals and doesn't exist anymore ( i'm using H6) All i can do for the moment is query the -p flag with opget but it returns a long code. There must be an easy way to do that Any help appreciated. What do you think about the minimalistic textport? Is there a way to launch a decent text editor. Has such a thing already been written. ( i'm on Windows...) Quote Link to comment Share on other sites More sharing options...
anakin78z Posted September 24, 2003 Share Posted September 24, 2003 yeah, someone did write a better textport... you may find it in the codex section. as far as opselect, it works fine for me. You may be thrown off by the fact that it's an expression, not a command. so in a textport try: echo `opselect("/obj")` and you should get a list of selected objects. Cheers! -J Quote Link to comment Share on other sites More sharing options...
David Gary Posted September 25, 2003 Author Share Posted September 25, 2003 Excellent! :) Perfect diagnosis, doc! What seems bizarre ( to me ) is the mix between hscript and expressions. (aren't they two different languages?) Thx a lot!! Quote Link to comment Share on other sites More sharing options...
anakin78z Posted September 25, 2003 Share Posted September 25, 2003 Yeah, I have no idea why some things are expressions and some things aren't. Interestingly enough you can run expressions in hscript by surrounding it with ` , and you can use hscript commands in expressions by using the execute() expression. Here's a funny bit: Director -> exhelp execute string execute (string command) This expression will execute the given houdini command (enclosed in quotes) eg. execute("list") is the same as typing list in the text port ---- Director -> list Unknown command: list Oh those silly sidefx guys. -J P.S. I attached a hipfile that uses opselect in an expression. You gotta hit play to see it work. Just select any one of the boxes on object level. opselect.hip.gz Quote Link to comment Share on other sites More sharing options...
David Gary Posted September 25, 2003 Author Share Posted September 25, 2003 Simply EXCELLENT. ( good idea: $F-$F !! to update at each frame. thx again !! 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.