PDA

View Full Version : intfields


revilo3D
03-07-2007, 05:47 PM
Hi guys,

Simply question.. im trying to create two intfields of which those values are used for the bake command. I have the gui side of it sorted. But I can't fiqure out how to then use the values I enter in the intfield for the bake command. I found something that said I need to name the intfield but I can't fiqure out how that is done either..

bakeResults -simulation true -t "1:25" -sampleBy 1 -disableImplicitControl true -preserveOutsideKeys true -sparseAnimCurveBake false -controlPoints false -shape true;

basically in yellow are the values I need to have driven by the two intfields I have made in the GUI..

Any help would be awesome ..

Thanks guys

Soviut
03-08-2007, 07:01 AM
If you havn't named your intFields, here's how. When creating your intField simply add the name at the end of the command line.

intField -value 0 MyFirstIntField;
intField -value 0 MySecondIntField;

Then you query your field values by putting your intField command into query mode.

$firstValue = `intField -query -value MyFirstIntField`;
$secondValue = `intField -query -value MySecondIntField`;

Then you just inject this into your bake results command using brackets to do string building.

bakeResults -simulation true -t ($firstValue + ":" + $secondValue) -sampleBy 1 -disableImplicitControl true -preserveOutsideKeys true -sparseAnimCurveBake false -controlPoints false -shape true;

revilo3D
03-08-2007, 08:51 AM
Thanks man, Thats spot on.

Im am still having trouble getting it to work though in my actual script.. but Ill have a play and see if I can get it going.

CGTalk Moderation
03-08-2007, 08:51 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.