View Full Version : AETemplate auto connect bump

01 January 2011, 11:24 PM
I have created a custom mental ray shader with an normalCamera attribute and I'm now trying to
implement the AETemplate for that attribute. I've had a look at the default maya and mental ray AETemplates
for all shaders that use bumpmaps and I've copied in the custom call that they use. Here is a snippet of my AETemplate that contains the line that declares the attribute as well as the procedures that gets called:

editorTemplate -callCustom "ilBumpNew" "ilBumpReplace" "normalCamera";

global proc ilBumpNew (string $attrName)
setUITemplate -pst attributeEditorTemplate;
attrNavigationControlGrp -label "BumpMapping" -at $attrName ilBumpControl;
setUITemplate -ppt;

global proc ilBumpReplace (string $attrName)
attrNavigationControlGrp -edit -at $attrName ilBumpControl;

The code adds the correct look to the "bump mapping" controller and I get the texture selection window when clicking it, but when it comes time to actually connecting the texture to the normalCamera attribute it just ignores to add a bump2d/3d node
and directly connects "outValue" of the texture to "normalCamera".

It seems that I've missed some sort of vital procedure that actually tells maya to auto connect a bump node if I'm trying to connect a texture to the normalCamera attribute.

CGTalk Moderation
01 January 2011, 11:24 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.