So I’m trying to generate a output of points, in my case vectors, (X,Y,Z) and want to create as many or as few of them as the plugin internal code requires.
So I started with this:
numAttr = OpenMaya.MFnArrayAttrsData()
myNode.OutRaysArr = numAttr.create()
and that works until you get here :
myNode.addAttribute ( myNode.OutRaysArr )
and this is what I get :
// Error: line 1: (kInvalidParameter): Object is incompatible with this method
# Traceback (most recent call last):
# File "myNode.py", line 704, in myNodeInitializer
# myNode.addAttribute ( myNode.OutRaysArr )
# RuntimeError: (kInvalidParameter): Object is incompatible with this method //
// Warning: line 1: Failed to call script creator function //
what am I missing, I know I have to somehow tell it what kinds of “objects” I want to store in there, but the num.Attr.create() only takes one argument, and that would be “this” / “self”.
Any examples in python where you have outgoing connections to multiple outgoing points, or objects would be great !