chunkified Posted November 12, 2006 Share Posted November 12, 2006 Hey, I'm coming from a MAXScript background and just starting to dabble with VEX and Hscript. I've got a problem while creating an interface for a digital asset. I've created sliders for rotation and translation of an Object node. Doing this creates expressions in the object nodes translation and rotation parameter fields, which creates the link between the sliders and parameters values. ( nothing out of the ordinary ) My problem arrises when trying to find an expression that i can link to a button that will either... (SEE ATTACHED IMAGE) Reset the sliders to their default values or Set a numerical value in one or more of the slider paramater fields... I've tried assigning the button the opparm function to change the parameters which hasn't worked :S (see below) "opparm ../L_foot_tx ( 0 )" "opparm L_foot_tx ( 0 )" It's probably something really stupid but can anyone point me in the right direction. Thanks Quote Link to comment Share on other sites More sharing options...
mtucker Posted November 13, 2006 Share Posted November 13, 2006 The opparm command requires a node as its first argument. So you want to do: opparm . L_foot_tx ( 0 ) I didn't actually try this out, but in theory it should work... Mark Quote Link to comment Share on other sites More sharing options...
Visual Cortex Lab Posted November 13, 2006 Share Posted November 13, 2006 The opparm command requires a node as its first argument. So you want to do:opparm . L_foot_tx ( 0 ) I didn't actually try this out, but in theory it should work... Mark yeha i can say it works .. i'm using it a lot after grasshopper big help on HDA ... Quote Link to comment Share on other sites More sharing options...
chunkified Posted November 15, 2006 Author Share Posted November 15, 2006 thanks for the replies! it worked! Quote Link to comment Share on other sites More sharing options...
michael Posted November 15, 2006 Share Posted November 15, 2006 just for clarification.... using the 'dot': opparm . blablabla ^ means "here"...as in "the place you run the command from" so this in a textport: /obj/Some Object -> opparm . t ( 1 1 1 ) is NOT the same as: /obj/OtherObject -> opparm . t ( 1 1 1 ) Quote Link to comment Share on other sites More sharing options...
Visual Cortex Lab Posted November 16, 2006 Share Posted November 16, 2006 talking about "opparm" in a otl script.... (i cant get it working in textport neighter..) what's wrong (read: how to do this) in the following code? opparm straw bend_X (`stamp("../copy1", "straw_scalex", 1)`) assuming the path of "straw" is correct... and "bend_X" parameter exists... hence opparm straw bend_X (0) works.... but i need to stamp the value this time... thanks in advance. upps... a further search in sesi forum linked me to this reply... I'm going to try it now I guess that's the problem... http://www.sidefx.com/index.php?option=com...ighlight=opparm cheers. ok... just tried.. and it doesnt work with my syntax above ... chadd straw bend_X actually add the channel... but once i write the "opparm" command above it -removes- such channel byt leaving the current channel value (like using -delete channel- from menu)...... any help is really appreciated. cheers Quote Link to comment Share on other sites More sharing options...
Visual Cortex Lab Posted November 16, 2006 Share Posted November 16, 2006 "opscript -g" gave me the answer... chblockbegin chadd -t 0 0 $arg1 grid_uniform_scale chkey -t 0 -v 1 -m 0 -A 0 -F 'stamp("../copy1", "straw_scalex", 1)' $arg1/grid_uniform_scale chblockend Quote Link to comment Share on other sites More sharing options...
Visual Cortex Lab Posted November 17, 2006 Share Posted November 17, 2006 seems like i cant get it working.. ... any help is appreciated... thanks EDIT: ... ok .. seems working... I was pointing at a wrong SOP path... 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.