View Full Version : Selection Handles, how to make your own ?
skillet 08-18-2004, 10:00 PM Hi
Is there a guide . Or can someone tell me how to go about creating your own custom selection handles. Seen plugs out there with various shapes and so forth . But I want to know how to do it.
So I could create a curve and or a shape , and have it become my seletion handle.
TIA
AW
|
|
CoolDuck_HRO
08-18-2004, 11:33 PM
Do you mean selection handles for your rigs?
If so, nurbs curves would be very suitable.
skillet
08-18-2004, 11:41 PM
Do you mean selection handles for your rigs?
Yes
If so, nurbs curves would be very suitable.
Yes but how ? Thus far I've been using the default Cross thingies. How do I turn that Curve into a selection handle ?
Not just a parent either .
umjetnik
08-19-2004, 12:42 AM
In general !! you create your curve or piece of geometry place it were you want position wise, then go into insert mode and point snap the pivot point to the joint or ik handle or whatever you want to control, then point constrain (= transforms) and orient (= rotations) the joint to the object or use the parent constraint which does both. Be sure to make the local roation axis are the same on your control object and joint/ik etc..and also freeze transform your control object before this, ie. zero out.
It can and does get more technical than this, but thats the jist of it....
skillet
08-19-2004, 01:01 AM
In general !! then point constrain (= transforms) and orient (= rotations) the joint to the object or use the parent constraint which does both. ......................
This approach is still using the "Obj and or curve" as your transform
which is a good tech and probably what I'll use :shrug:
I guess what I'm really after is a way to change the selection handle "icon" shape itself
Thank you for your input
wrend
08-19-2004, 02:54 AM
you have to write a plug with the API to change them at the level you want. curves/geom/implicits with a thought out selection priority scheme is usually fine though. people have posted packs of curve shapes if your interested.
frilansspion
08-19-2004, 05:47 AM
speaking of which, where ARE the implicit objects in maya anyways??
skillet
08-19-2004, 07:31 AM
you have to write a plug with the API to change them at the level you want. curves/geom/implicits with a thought out selection priority scheme is usually fine though. people have posted packs of curve shapes if your interested.
Ouch :eek:
I was hoping there was a way to go about it in the connection editor.
I'm out :drool: Peace
southparx
08-19-2004, 08:23 AM
speaking of which, where ARE the implicit objects in maya anyways??
here's the mel command to create implicit sphere:
createNode implicitSphere;
frilansspion
08-20-2004, 06:53 AM
neat-o! thanks southparx!
I guess there is no way to make existing geom into implicits? like if I would like to have controls in the shape of a head or hand for instance.
talickca
08-20-2004, 07:15 AM
I think you can just grid snap curves into any shape you want, arrows, and letters are very popular. Just a humble opinion
strarup
08-20-2004, 07:47 AM
Hi,
there is also the command... createNode implicitBox;
btw. at Rigging101 (http://www.rigging101.com/) you can get a script called "rig101 Wire Controllers", under the free stuff section, which will let you create different objects with curves, so you don't have to draw them yourself... :)
if you e.g. want to parent the shape of the curve to a joint, here is a little bit of code you can use... e.g. throw it on a shelfbutton... :)
just select a joint and the curve, and execute the code... :)
proc parentDaShape2joint()
{
string $daSel[] = `ls -sl -long`;
string $daJoint = "";
string $daObj[];
if((`size($daSel)` < 2 ) || ( `size($daSel)` > 2))
{
print("please select 1 joint and 1 object... \n");
}
else
{
if ((`objectType $daSel[0]` != "joint") && (`objectType $daSel[1]` != "joint"))
{
//if there is no joints selected...
print("you haven't selected any joints... \n");
}
else if ((`objectType $daSel[0]` == "joint") && (`objectType $daSel[1]` == "joint"))
{
//if there is 2 joints selected...
print("please only select one joint... \n");
}
else
{
if(`objectType $daSel[0]` == "joint")
{
//if the first selected item is a joint...
$daJoint = $daSel[0];
$daObj = `listRelatives -s $daSel[1]`;
parent -r -s $daObj[0] $daJoint;
}
else
{
//if the second selected item is a joint...
$daJoint = $daSel[1];
$daObj = `listRelatives -s $daSel[0]`;
parent -r -s $daObj[0] $daJoint;
}
}
}
}
parentDaShape2joint;
regards
Alex
MikeRhone
08-20-2004, 02:20 PM
Yuck. I am not very happy with implicit objects. You can't freeze transforms and have them zero-out nicely. (Unless they are grouped to themselves.)
Im also not a big fan of selection handles. They aren't very intuitive to look at like yuo have mentioned, but they also can have display issues when yuo try and control thier visibility through direct connections or expressions. The trick I is one step better...
Create a CV curve to be your controler.
Move/Scale/Rotate it into position.
Freeze transforms.
select the CV curves SHAPE node, and the bones transform node.
type parent -s -r into the script editor.
That should do it. Now whenever you select the curve or the bone, the bone will be selected. Basically it tells Maya that you want the curve and the bone to share the same tranform node. Its great for making intuitive selection handles IMO
Hope this helps...!
PS: Cheers to Ben Hindle for that tip.
strarup
08-20-2004, 07:28 PM
Hi Mike,
type parent -s -r into the script editor.that's also what the above code does... however it saves you a couple of manual steps, and also you don't have to worry about the selection order, the object and joint has been selected with... :)
I had completly forgotten about the freezing thingie... however I only freeze Rotation and scaling, since if I have placed the curve/object were I want it to be, it will ussually move away if the translation gets frozen, when the parent shape command get's executed...
I have modified the above code a bit... what I have added is that it freeze Rotation and Scaling, and also that it deletes the empty left over transform node of the object... just saves a couple of manually steps more... :)
new code... -->
proc parentDaShape2joint()
{
string $daSel[] = `ls -sl -long`;
string $daJoint = "";
string $daObj[];
if((`size($daSel)` < 2 ) || ( `size($daSel)` > 2))
{
print("please select 1 joint and 1 object... \n");
}
else
{
if ((`objectType $daSel[0]` != "joint") && (`objectType $daSel[1]` != "joint"))
{
//if there is no joints selected...
print("you haven't selected any joints... \n");
}
else if ((`objectType $daSel[0]` == "joint") && (`objectType $daSel[1]` == "joint"))
{
//if there is 2 joints selected...
print("please only select one joint... \n");
}
else
{
if(`objectType $daSel[0]` == "joint")
{
//if the first selected item is a joint...
$daJoint = $daSel[0];
//Freeze Rotation and Scale on the object...
makeIdentity -apply true -t 0 -r 1 -s 1 $daSel[1];
//get the shape of the object...
$daObj = `listRelatives -s $daSel[1]`;
//parent the shape of the object to the joint...
parent -r -s $daObj[0] $daJoint;
//delete the left over transform thingie of the object...
delete $daSel[1];
}
else
{
//if the second selected item is a joint...
$daJoint = $daSel[1];
//Freeze Rotation and Scale on the object...
makeIdentity -apply true -t 0 -r 1 -s 1 $daSel[0];
//get the shape of the object...
$daObj = `listRelatives -s $daSel[0]`;
//parent the shape of the object to the joint...
parent -r -s $daObj[0] $daJoint;
//delete the left over transform thingie of the object...
delete $daSel[0];
}
}
}
}
parentDaShape2joint;
regards
Alex
skillet
09-04-2004, 04:15 AM
Create a CV curve to be your controler.
Move/Scale/Rotate it into position.
Freeze transforms.
select the CV curves SHAPE node, and the bones transform node.
type parent -s -r into the script editor.
:thumbsup:
Sorry I'm a lttle late on this response
But this is exacly what I was looking for
Thanks to the rest of you as well for Great input and information
Later AW
CGTalk Moderation
01-19-2006, 12:00 AM
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-2012, Jelsoft Enterprises Ltd.