Hi John,

I think the problem here is with the AEtemplate script that handles the
display of the compound's child attributes.

Notice that if you create your 'blend' attribute outside a compound, as a
top-level attribute, it'll show up ok in the AE. But you've already
discovered that there is nothing wrong with your node description....

Open the script /autodesk/MayaX/scripts/AETemplates/AEnewCompound.mel

Look at the enumeration of possible child attribute types after line 130
(immediately after $childType = `getAttr -type $childPlug`;) and you'll see
that the attribute type 'double' is missing from the list.

You have two choices:

1) either modify this script to include an option for 'double', like this:

                else if( $childType == "double" )
                {
                    // we use AEnewFloat() because there is no AEnewDouble()
                    string $childCtrl = AEnewFloat($childPlug,
$childAttrNice, $changedCommand);
                }


2) or change your 'blend' attribute to a float instead of a double.

I hope that helps....(am not in front of Maya so haven't tested this :) )

cheers,
Owen


On 5 June 2011 04:15, johnvdz <[email protected]> wrote:

> Hi all,
>
> i have a deformer but i want to get a Attr value i can key in the Attribute
> editor a bit like the Envelope value but everytime i add a value to my
> compound attr i get the attr but its dosnt show up as a keyable value in the
> node but it shows up as a line... and also i can get and set it using
> Get/setAttr so it works its just not in the Atribute editor.
>
> is there any tricks here. just a 0-1 value for every Attr i create within
> the node.
>
> here is what i have in the node initializer.
>
>
> cAttr     =      OpenMaya.MFnCompoundAttribute()
> nAttr     =      OpenMaya.MFnNumericAttribute()
> myDeformer.blend      =     nAttr.create( "blend", "b",
> OpenMaya.MFnNumericData.kDouble, 1.0 )
> nAttr.setKeyable(True)
>
> nAttr.setMin(0.0)
> nAttr.setMax(1.0)
>
> shapeFix.offsets    =     cAttr.create( "offsets", "off" )
> cAttr.setArray( True )
>  cAttr.addChild( myDeformer.blend )
>
>
> any tips would be great
>
>
> john
>
>
>
>
>
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to