Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
MAYA:MAYA ForumMAYA TutorialsMAYA

Re: 1 Slider, 2 Attributes

COW Forums : MAYA

VIEW ALL   •   ADD A NEW POST   •   PRINT
Share on Facebook
Respond to this post   •   Return to posts index   •   Read entire thread


Jacqueline JohnsenRe: 1 Slider, 2 Attributes
by on Jan 5, 2012 at 3:42:28 pm

Okay, so played around with it a bit. I got a better understanding of the formLayout and some experience with the procedures while making checkboxes and radiobuttons. So I finaly was able to get the slider! yay! But when I adjust the slider I get: // Error: Object's name 'mySliderGrp' is not unique.
Why? I added the name to the floatSliderGrp, then attached it to the form and then used it in the procedure. So it's unique right? I'm guessing the problem is the combination with the slider. Right? Probably because it only happens when I slide it.


if ( `window -exists MyWindow` ) {deleteUI MyWindow;}
window
-title "new window"
-widthHeight 300 50
MyWindow;
formLayout
-numberOfDivisions 100
myForm;
floatSliderGrp
-minValue -1
-maxValue 1
-label "Slider"
-changeCommand "DoubleSlider();"
mySliderGrp;
formLayout
-edit
-attachForm mySliderGrp "top" 0
-attachForm mySliderGrp "left" 0
myForm;
showWindow MyWindow;

global proc DoubleSlider() {
if (`floatSliderGrp mySliderGrp` == 0)
setAttr pCube1.ty 10;
else //(`floatSliderGrp mySliderGrp` == 2)
setAttr pCube1.ty 20;
// if (`floatSliderGrp mySliderGrp` == 3)
// setAttr pCube1.ty 30;
}




Besides that error I still need to fix the feedback of the slider. I think I have to first make a slider that automaticly adjusts itself to the ty of the cube? Do I still do it in the global procedure? is there any "Get value" function?
(I abondoned the blendshapes, hoping adjusting the height would be easier)

So yeah, strugling with point 3, so plx another nudge in the right direction. ^^


Posts IndexRead Thread
Reply   Like  
Share on Facebook


Current Message Thread:




LOGIN TO REPLY



FORUMSTUTORIALSMAGAZINESTOCKYARDVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2013 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]