Thanks Janos,

Sadly I did not find the proper solution in that thread, but I've managed 
to make a workaround for this specific case. I assume that the SOuP copier 
node uses an int array to store the object indices, instead of a float 
array that the Maya particles use internally. Curious when this script will 
break next time, though... :)

Cheers,
Szabolcs


On Thursday, March 3, 2016 at 12:14:55 AM UTC+1, Janos Hunyadi wrote:
>
> Maybe this might be helpfull:
>
>
> http://soup-dev.websitetoolbox.com/post/advanced-particle-instancer-5539968?trail=15
>
> J
>
> On Tuesday, March 1, 2016 at 4:38:15 PM UTC+1, Szabolcs wrote:
>>
>> Hi,
>>
>> I'd like to query the datatype of an array used by a particle instancer 
>> node. There is a call in the API to check whether the specified attribute 
>> exists with the given datatype, but I have a hard time setting the actual 
>> type.
>> It requires a reference to OpenMaya.MFnArrayAttrsData.kIntArray and I 
>> suppose I have to use some kind of an MScriptUtil nightmare but I can't get 
>> it to work with createFromInt() or asIntPtr()
>>
>> I call OpenMaya.MFnArrayAttrsData.checkArrayExist()
>>
>> And the error message is:
>> # Error: TypeError: file 
>> S:\Maya_2015_DI\build\Release\runTime\Python\Lib\site-packages\maya\OpenMaya.py
>>  
>> line 4759: in method 'MFnArrayAttrsData_checkArrayExist', argument 3 of 
>> type 'MFnArrayAttrsData::Type &' # 
>>
>> Cheers,
>> Szabolcs
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/094ab366-8521-4a58-9b6e-6a14282fe7cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to