SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Animation / Mel Scripts & Programming / asign sliderFunction to costum window
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 30-07-2008, 11:18 PM   #1
Falott
Registered User
 
Falott's Avatar
 
Join Date: Jan 2005
Location: vienna
Posts: 1,095
Thanks: 3
Thanked 20 Times in 18 Posts
Default asign sliderFunction to costum window

first of all - please dont kick my ass. I know this is a very basic question where one usually would point to the docs.

fact is - maya´s helpfiles dont work. exept for some 1 example code every testWindow example file returns a error in the very first lines, like


window ExampleWindow1;
columnLayout;
button -label "Button 1";
button -label "Button 2";
rowColumnLayout -numberOfColumns 2;
text -label "Name:";
textField;
text -label "City:";
textField;
setParent ..;
checkBox -label "Lights ";
checkBox -label "Camera ";
checkBox -label "Action ";
showWindow ExampleWindow1;


// Error: line 1: Object's name is not unique: ExampleWindow1 //



or



window -width 200 -title "Test Window" ExampleWindow5;
columnLayout;
// Create the button.
//
string $button = ‘button -label "Initial Label"‘;
// Add the command.
//
string $buttonCmd;
$buttonCmd = ("button -edit -label \"Final Label\" " + $button);
button -edit -command $buttonCmd $button;
showWindow ExampleWindow5;

// Error: string $button = ‘button -label "Initial Label"‘; //
// Error: Line 5.22: Syntax error //



since I dont know if i did somehow wrong with copy'n pasting text from helpFiles to SE, I suppose the helpfiles are crap!





now to my problem:

I need a window with like 8 sliders and asign to each slider an offset value from IK_pointConstraints like

setAttr "ikRightLeg_pointConstraint1.offsetX";

with a min and a max value ofc.




I had a look at the Dann´s thread and at his script too. this is still rocket science for me. any hints are much appreciated. this is what I have so far


window ikOffsets;

// define sliders
frameLayout -label "ikRightLeg" -labelAlign "top" ....
.
.
.
.
.

showWindow ikOffsets;




XD

don´t beat me as I said, I´ll keep on working through F1
__________________
everything starts and ends in the right place at the right time.
Falott is offline   Reply With Quote
Old 30-07-2008, 11:50 PM   #2
Falott
Registered User
 
Falott's Avatar
 
Join Date: Jan 2005
Location: vienna
Posts: 1,095
Thanks: 3
Thanked 20 Times in 18 Posts
Default

i found a start which is more appropriate to fit my needs i think


window ikOffsets;

columnLayout -adjustableColumn true;

text -label "Slider";

intSlider -min -100 -max 100 -value 0 -step 1;


showWindow ikOffsets;


now i have to get ridd of this error

// Error: line 1: Object's name is not unique: ikOffsets //


+ I want an additional numeric input field for the same value the slider is working with.


still need help here
__________________
everything starts and ends in the right place at the right time.
Falott is offline   Reply With Quote
Old 31-07-2008, 12:07 AM   #3
Falott
Registered User
 
Falott's Avatar
 
Join Date: Jan 2005
Location: vienna
Posts: 1,095
Thanks: 3
Thanked 20 Times in 18 Posts
Default

some problems solved,
still todo: connect attr with slider..




$window = `window`;
columnLayout;
text -label "ikOffsets";

floatSliderGrp -label "ikRightLeg" -field true
-min -0.1 -max 0.1 -step 0.01 -value 0
-changeCommand "changeSlider" ikRightLegSlider;

floatSliderGrp -label "ikRightFoot" -field true
-min -0.1 -max 0.1 -step 0.01 -value 0
-changeCommand "changeSlider" ikRightFootSlider;

floatSliderGrp -label "ikRightToe" -field true
-min -0.1 -max 0.1 -step 0.01 -value 0
-changeCommand "changeSlider" ikRightToeSlider;

floatSliderGrp -label "ikRightToe_end" -field true
-min -0.1 -max 0.1 -step 0.01 -value 0
-changeCommand "changeSlider" ikRightToe_endSlider;




floatSliderGrp -label "ikLeftLeg" -field true
-min -0.1 -max 0.1 -step 0.01 -value 0
-changeCommand "changeSlider" ikLeftLegSlider;

floatSliderGrp -label "ikLeftFoot" -field true
-min -0.1 -max 0.1 -step 0.01 -value 0
-changeCommand "changeSlider" ikLeftFootSlider;

floatSliderGrp -label "ikLeftToe" -field true
-min -0.1 -max 0.1 -step 0.01 -value 0
-changeCommand "changeSlider" ikLeftToeSlider;

floatSliderGrp -label "ikLeftToe_end" -field true
-min -0.1 -max 0.1 -step 0.01 -value 0
-changeCommand "changeSlider" ikLeftToe_endSlider;




showWindow;
__________________
everything starts and ends in the right place at the right time.
Falott is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.