Hey, I finally had time to look at that so here's the thing, all the 
channelBox commands are hard-coded to the mayaChannelBox, I had to modify 3 
differents files.

On windows :
C:\Program Files\Autodesk\Maya2013\scripts\startup\generateChannelMenu.mel
C:\Program Files\Autodesk\Maya2013\scripts\startup\selectedChannels.mel
C:\Program Files\Autodesk\Maya2013\scripts\startup\channelBoxCommand.mel

In the generateChannelMenu.mel :: generateChannelMenu proc had this :

global proc generateChannelMenu( string $parent, int $popupMenu ) { 
    setParent -m $parent; 
    global string $gChannelBoxName; 
    string $popUpMenuParent = `control -q -p $parent`; 
    string $toks[]; tokenize $popUpMenuParent "|" $toks; 
    $gChannelBoxName = $toks[size($toks)-1]; 

Then replace all the 'mainChannelBox' by '$gChannelBoxName' in all the 3 
files, add the line :

    global string $gChannelBoxName; 

If the string $gChannelBoxName is not declared in the proc.

Eveything works fine for me. I can send the files if needed. 

Thanks,

m.

Le vendredi 9 mai 2014 17:36:16 UTC+2, mAtt RINGOT a écrit :
>
> Hey guys,
>
> I know it's a really old post but does anyone found the way to fix that 
> rightClick issue ?
>
> I've having the same thing.. The right click is working but still refere 
> to the maya default channelBox... 
>
> If you select TranlateZ in the maya default channelBox and then right 
> click and key selected on rotateY in your created ChannelBox, it will key 
> the TranslateZ...
> I was thinking, is there a way to connect the current selection of the 
> created channelBox to the maya default channelBox ? It should fix the 
> issue...
>
> Thanks,
>
> m.
>
> Le mardi 7 septembre 2010 08:09:30 UTC+1, Phil S a écrit :
>>
>> This gets you a large chunk of the way...:
>>
>> import maya.cmds as cmds
>> import maya.mel as mm
>>
>> cmds.window()
>> cmds.formLayout( 'form' )
>> cmds.channelBox( 'dave' )
>> cmds.formLayout( 'form', e=True, af=(('dave', 'top', 0), ('dave', 'left', 
>> 0), ('dave', 'right', 0), ('dave', 'bottom', 0)) )
>> cmds.showWindow()
>>
>> cmds.popupMenu('someStupidMenu',p='dave',pmc=lambda *args: 
>> mm.eval('generateChannelMenu someStupidMenu 1'))
>>
>> unfortunately that last piece of the way may involve most of the work - 
>> I've only had a glance, but it looks like theres some weird UI name issue 
>> when it tries to build your custom menu and, unless theres a quick 
>> workaround, you may need to re-implement the generateChannelMenu mel 
>> command (might not be a bad idea anyway, doing evals of mel scripts in 
>> python always leaves a funny taste in my mouth). At least, for the most 
>> part, it should be a literal translation of the MEL found with a "whatIs 
>> generateChannelMenu", then just fix whatever's not working.
>>
>>
>> On Tue, Sep 7, 2010 at 4:47 PM, mt <[email protected]> wrote:
>>
>>> Hi Taylor,
>>>
>>> Using pyqt and pymel.
>>> Right click on the attribute names (allowing to key/lock/mute etc
>>> selected attrs)
>>>
>>>
>>>
>>> On Sep 7, 1:04 am, Taylor Carrasco <[email protected]> wrote:
>>> > Do you mean the attributes them selves (say the label for the 
>>> attribute or
>>> > the textfield, assuming youre using PyQt) -
>>> > Are you using Mel?
>>> >
>>> > We need some more info on this one here...
>>> >
>>> >
>>> >
>>> > On Tue, Sep 7, 2010 at 2:47 AM, mt <[email protected]> wrote:
>>> > > Do you guys know why a new channelBox created via script doesn't have
>>> > > a right-click attribute menu? Do I need to reimplement it, or is 
>>> there
>>> > > a better way of having it working like it does on the maya-default
>>> > > mainChannelBox?
>>> >
>>> > > --
>>> > >http://groups.google.com/group/python_inside_maya
>>>
>>> --
>>> http://groups.google.com/group/python_inside_maya
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/afa75552-9469-4d30-b6a1-da9b3e6b276f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to