daniel_arz
03-11-2005, 11:56 PM
Hello, I downloaded the Graph Attribute from http://www.robthebloke.org/mayaapi.html (http://www.robthebloke.org/mayaapi.html).
I added some error checking to make sure the attributes where being created successfully. The node compiles fine but I get these error messages after creating the node:
// m_aTime successfully added attribute...
// addChild succeeded to add oPosition...
// addChild succeeded to add oFloatinfo...
// addChild succeeded to add oEnumValue...
// addAttribute successfully added m_aGraph...
$node = `createNode "simpleNode"`;
// Result: simpleNode1 //
// Error: Could not find attribute named simpleNode1.graph[-1].graph_FloatValue //
// Error: Could not find attribute named simpleNode1.graph[-1].graph_Position //
// Error: No object matches name: simpleNode1.graph[-1].graph_Interp //
I'm guessing the problem lies in the AETemplate Mel proc supplied with the source code:
/// \brief This file defines the attribute editor for our simpleNode.
/// \param $nodeName - the name of the node instance to display.
///
global proc AEsimpleNodeTemplate( string $nodeName )
{
// the following controls will be in a scrollable layout
editorTemplate -beginScrollLayout;
// add a bunch of common properties
editorTemplate -beginLayout "Simple Node Attributes" -collapse 0;
// add ramp control for our compound attribute
AEaddRampControl "graph" ;
editorTemplate -endLayout;
// include/call base class/node attributes
AEdependNodeTemplate $nodeName;
// add any extra attributes that have been added
editorTemplate -addExtraControls;
editorTemplate -endScrollLayout;
}
I really want/need this attribute in my node :bounce: . Would anyone like to compile and give the node a try? You can downloade from the link (TOP) towards the bottom of the page.
Daniel
I added some error checking to make sure the attributes where being created successfully. The node compiles fine but I get these error messages after creating the node:
// m_aTime successfully added attribute...
// addChild succeeded to add oPosition...
// addChild succeeded to add oFloatinfo...
// addChild succeeded to add oEnumValue...
// addAttribute successfully added m_aGraph...
$node = `createNode "simpleNode"`;
// Result: simpleNode1 //
// Error: Could not find attribute named simpleNode1.graph[-1].graph_FloatValue //
// Error: Could not find attribute named simpleNode1.graph[-1].graph_Position //
// Error: No object matches name: simpleNode1.graph[-1].graph_Interp //
I'm guessing the problem lies in the AETemplate Mel proc supplied with the source code:
/// \brief This file defines the attribute editor for our simpleNode.
/// \param $nodeName - the name of the node instance to display.
///
global proc AEsimpleNodeTemplate( string $nodeName )
{
// the following controls will be in a scrollable layout
editorTemplate -beginScrollLayout;
// add a bunch of common properties
editorTemplate -beginLayout "Simple Node Attributes" -collapse 0;
// add ramp control for our compound attribute
AEaddRampControl "graph" ;
editorTemplate -endLayout;
// include/call base class/node attributes
AEdependNodeTemplate $nodeName;
// add any extra attributes that have been added
editorTemplate -addExtraControls;
editorTemplate -endScrollLayout;
}
I really want/need this attribute in my node :bounce: . Would anyone like to compile and give the node a try? You can downloade from the link (TOP) towards the bottom of the page.
Daniel
