Spireite
01-06-2007, 03:29 PM
Hey,
OK so you solve one problem and then two rear their ugly heads!!
1)
Im having difficulty with creating my custom locator using one of my custom commands.
Ive had no difficulty in createing my other nodes which are derived from MPxNode using:
MObject oRoadSelect = dgMod.createNode("RoadSelect");
MFnDependencyNode RdSelDepNodeFn(oRoadSelect);
this works fine for all my nodes yet when i use
MObject oCarLocator = dgMod.createNode("CarLocator");
MFnDependencyNode CarDepNodeFn(oCarLocator);
it compiles fine and pluigs in fine yet when i run the command all the nodes but the locator are created but in Maya if i type createNode CarLocator; maya creates my locator nice and simple.
2)
Again having no difficulty creatin connections between the standard attributes using
dgMod.connect(tRoadTransform.findPlug("Speed"), RdSelDepNodeFn.findPlug("Speed"));
this again works for every connection so far however when i try to connect
dgMod.connect(tRoadTransform.findPlug("worldSpace"), RdSelDepNodeFn.findPlug("Road1"));
I get an error message saying
// Error: Connection not made: '' -> 'RoadSelect1.Road1'. Data types of source and destination are not compatible. //
now the worldspace attribute from the a curveShape node is a typed attribute therfore i created my Road1 attribute to be a typed attribute as well. But the realy strange thing is that i can connect them fine using the connection editor in maya but apparently not with the api using the above method.
Completely Stumped on both counts!!
Suggestions to either question or both are warmly accepted!!
Thanks
OK so you solve one problem and then two rear their ugly heads!!
1)
Im having difficulty with creating my custom locator using one of my custom commands.
Ive had no difficulty in createing my other nodes which are derived from MPxNode using:
MObject oRoadSelect = dgMod.createNode("RoadSelect");
MFnDependencyNode RdSelDepNodeFn(oRoadSelect);
this works fine for all my nodes yet when i use
MObject oCarLocator = dgMod.createNode("CarLocator");
MFnDependencyNode CarDepNodeFn(oCarLocator);
it compiles fine and pluigs in fine yet when i run the command all the nodes but the locator are created but in Maya if i type createNode CarLocator; maya creates my locator nice and simple.
2)
Again having no difficulty creatin connections between the standard attributes using
dgMod.connect(tRoadTransform.findPlug("Speed"), RdSelDepNodeFn.findPlug("Speed"));
this again works for every connection so far however when i try to connect
dgMod.connect(tRoadTransform.findPlug("worldSpace"), RdSelDepNodeFn.findPlug("Road1"));
I get an error message saying
// Error: Connection not made: '' -> 'RoadSelect1.Road1'. Data types of source and destination are not compatible. //
now the worldspace attribute from the a curveShape node is a typed attribute therfore i created my Road1 attribute to be a typed attribute as well. But the realy strange thing is that i can connect them fine using the connection editor in maya but apparently not with the api using the above method.
Completely Stumped on both counts!!
Suggestions to either question or both are warmly accepted!!
Thanks
