Re: [Maya-Python] Using MArrayDataBuilder in python API 2.0

2021-07-05 Thread [email protected]
Now I get it, Marcus. Good idea! So I did test with floats and got some results. The exact same code with kFloat also fails, but I found something that works with kFloats (but not with Points). Shortened version that works with kFloat: outPointsH = dataBlock.outputArrayValue(self.outPoints)

Re: [Maya-Python] Using MArrayDataBuilder in python API 2.0

2021-07-03 Thread Marcus Ottosson
Sure, yes the end result can be compound attributes, but what I'm wondering is whether compound attributes are the root cause of the problem, or if it's elsewhere. As a test, if you were to replace the compound attribute with a float, does it still cause trouble? If so, then we know to look more cl

Re: [Maya-Python] Using MArrayDataBuilder in python API 2.0

2021-07-03 Thread [email protected]
My initial goal was to be able to read specific vertex coordinates, for example in expressions. So If I want to connect to, say outPoints[3].outPointsX - then I think compound attributes are my only choice. On Friday, July 2, 2021 at 11:30:24 AM UTC+2 Marcus Ottosson wrote: > Compound attribut

Re: [Maya-Python] Using MArrayDataBuilder in python API 2.0

2021-07-02 Thread Marcus Ottosson
Compound attributes always makes life hard. Does it behave any different with plain float attributes? I.e. can the problem be isolated to the compound attributes? On Fri, 2 Jul 2021 at 10:01, [email protected] wrote: > I need a simple DG node that uses connected mesh and copies vertex > coordina

[Maya-Python] Using MArrayDataBuilder in python API 2.0

2021-07-02 Thread [email protected]
I need a simple DG node that uses connected mesh and copies vertex coordinates to output MPoint array. I am having trouble with setting this array with MArrayDataBuilder. It ether always stays zero-length or grows on every compute(). This surely must be simple to do, but I'm stuck. Can anybody he