Sitni Sati Forums
[MAXScript]Object Source - Printable Version

+- Sitni Sati Forums (https://forum.afterworks.com)
+-- Forum: Products (https://forum.afterworks.com/forumdisplay.php?fid=4)
+--- Forum: FumeFX [max] (https://forum.afterworks.com/forumdisplay.php?fid=8)
+--- Thread: [MAXScript]Object Source (/showthread.php?tid=1247)



[MAXScript]Object Source - nickw - 10-31-2011

Hi,
I try to add objects to an Object Source using MAXScript, but it returns an error
Code:
src = $'FFX Object Src001'
src.object = (selection as array)

-- Runtime error: Array parameter size fixed, cannot dynamically alter: Object

Am I missgin something?

Thanks


Re: [MAXScript]Object Source - jrand - 10-31-2011

This is a generalized variant of what I use:


Code:
theObjectSourceObj = $FFX_Object_Src001
theObjects = selection as array
for i in 1 to theObjects.count do theObjectSourceObj.AddObject theObjects[i]

You need to use the supplied 'AddObject node' function, this can be iterative as I have shown above. There are a few other object functions as well, check out the maxscript section in the Fume help. One of Fumes greatest strengths is its useful script access. Smile


Re: [MAXScript]Object Source - nickw - 11-01-2011

pfff.
Of course.
I m such a ..... lol

Thanks John.

Ruben