channelbox sensitivity

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

 
Thread Tools Display Modes
  05 May 2018
channelbox sensitivity

I'm trying to make a slider window for reducing the sensitivity for the channelbox. I'm jus learning python so need a little help. here's the code i tried out.
import maya.cmds as mc
if mc.window(mywin, exists = True):
mc.deleteUI(mywin)
mywin = mc.window("win", t="test", w=300, h=100)
mc.columnLayout(adj=True)
sens = mc.floatSliderGrp(l = "chansens", pre = 4, dc= "mysen()" s = 0.0010, fmn = 0.0001, fmx = 1.0000, min=0.0001, max=1.0000, f = True)
mc.showWindow(mywin)
def mysen():
mysens = mc.floatSliderGrp(sens, q=True, v=True)
finsen = mc.channelBox(spd, q=True)
 
  05 May 2018
It would help a lot if you can tell us what does not work, or which error message appears.
__________________
www.renderwiki.com - www.openmaya.net
 
  05 May 2018
import maya.cmds as mcif mc.window(mywin, exists = True): mc.deleteUI(mywin)mywin = mc.window("win", t="test", w=300, h=100)mc.columnLayout(adj=True)sens = mc.floatSliderGrp(l = "chansens", dc="mysen()" pre = 4, s = 0.0010, fmn = 0.0001, fmx = 1.0000, min=0.0001, max=1.0000, f = True)mc.showWindow(mywin)def mysen(): mysens = mc.floatSliderGrp(sens, q=True, v=True) finsen = mc.channelBox(spd, q=True)# Error: line 1: invalid syntax #// Result: scriptEditorPanel1Window|TearOffPane|scriptEditorP anel1|formLayout42|formLayout44|paneLayout1|formLa yout45|tabLayout2|formLayout52|cmdScrollFieldExecu ter7 //this is the error i get. I cant understand where it is wrong.
 
  05 May 2018
I tried to adjust the script more trying to get the result following is the script.
import maya.cmds as mc
if mc.window(mywin, exists = True):
mc.deleteUI(mywin)
mywin = mc.window("win", t="test", w=300, h=100)
mc.columnLayout(adj=True)
sens = mc.floatSliderGrp(l = "chansens", dc="mysen()", pre = 4, s = 0.0010, fmn = 0.0001, fmx = 1.0000, min=0.0001, max=1.0000, f = True)
mc.showWindow(mywin)
def mysen():
myspeed = mc.floatSliderGrp(sens, q=True, v=True)
finsens = mc.channelBox(sens, spd=myspeed, e=True)
but now iam getting the error as
# Error: RuntimeError: file <maya console> line 11: Object 'win|columnLayout26|floatSliderGrp19' not found. #
 
  05 May 2018
Looks like you are using the name of your float slider as the name of the channel box control, i.e. where you have "sens" in your very last line. Try changing that to "mainChannelBox" and see if it works.
 
reply share thread



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
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 09:57 AM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.