question about custom node creation with python

23 views
Skip to first unread message

casf01

unread,
Jul 7, 2017, 8:08:32 AM7/7/17
to Python Programming for Autodesk Maya
Hello, first post here :)

I'm new to maya ( coming from max) and I'm currently learning how to make custom node with python in maya so I decided to build a normalize vector node.  I managed to get it working and it wasn't overly complex to do but...I have some questions regarding how I could improve it.

1 - I built it using maya old api, I wasn't able to port it to the new api, is there any info about how to migrate stuff ?

2 - both my input are double3 in the initialize even thought there declared as MVector in the node class
NormalizeNode.valueIn = nAttr.create("valueIn","In", om.MFnNumericData.k3Double,0.0)

So when I expand my input I get Value In 0, Value In 1 and Value In 2.  How can I change this it be X,Y,Z ?  I tried used the kVectorArray but that didn't worked.


Thanks 
Fred

casf01

unread,
Jul 7, 2017, 10:45:54 AM7/7/17
to Python Programming for Autodesk Maya
nvm, I managed to find the solution for both question :)

I had to build each axis and then combine then
Reply all
Reply to author
Forward
0 new messages