View Full Version : dragAttrContext?
03-14-2003, 06:53 AM
I'm trying to create a hotkey that will toggle the channel box selection between custom attributes and activate the middle-mouse drag 'slider' control. I have run into a couple of problems...
My first step has been to select an attribute manually and try to activate the slider with MEL. All I can determine is that when dragging, the current context is 'dragAttrContext'. My first problem is that when I try to 'setToolTo dragAttrContext' it says that context isn't found (I can set move/scale/rotate this way). On top of this, the contextInfo command tells me that this context doesn't exist. Is there any way to do what I'm trying to do?
The next problem will be to figure out how to select a desired attribute through MEL. I suspect this involves 'selectionConnection" which usually confuses me.
Thanks for any advice on this.
01-23-2005, 07:10 PM
I was trying to do the same thing you were, but for a slightly different purpose - I wanted eithe the MJPolyTools or Byrons Poly Tools to co straight to the dragAttrContext-style of moving a new edge loop after every split operation, instead of me having to go to the channelBox and select the channel every time....
I was unable to ever get dragAttrContext to work - I couldn't set the channel in the channelBox, and I couln't seem to access the dragAttrContext in any way at all.
I ended up making a draggerContext that would modify the attribute based on mouse-position, and it worked ok. It seems a little like a duct-tape solution to me, though.
01-23-2005, 10:08 PM
Hey guys. I have been trying to do the exact same thing and I too found out that it was quite hard to select an attribute in the channelbox through MEL.
I know the method seems a bit weird but I think that the draggerContext might be the only way around if you don't wanna get too deep intro select UI layouts and stuff.
My goal was also to jump straight to the sliding attribute after making a loopSplit in my own script - http://www.cgtalk.com/showthread.php?t=200924 (http://www.cgtalk.com/showthread.php?t=200924)- and while complaining a bit about how tough if was to do all the draggerContext work instead of just selecting an attribute in the channelbox, i realized all the other possibilities with draggerContext, so it's fine for me :D right now I have implimented a sideSlider while dragging with MMB and a normal slider while dragging with LMB and some other features like magnet snapping and scaling multipliers using the modifiers.
I dont remember if I got this features implimented into MJPolyTools 1.4 when I updated it but It is in my script at the moment :)
Scotta. The conclusion must be to use draggerContext I believe.
01-23-2006, 11:00 PM
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.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.