01-29-2008, 07:41 AM
ok so i cant find the script i had just now but heres the key functions youll need to script something for doing this.. so the goal is first to get the Sources objects copied , thats the standart copy() function .. ( for the purpose let say : For foo in "arrayofmeshes.count" do copy Ffxobjectsource1)..
then let say you dump those copied FFxobjectSource into "SourceArray"
the second goal is for each of those Object sources , you want to assign them each 1 of the meshes avalaible for emiting from right ? so something like : for foo in SourceArray Do append Arrayofmeshes[foo] SourceArray[foo].object .. that will add 1 of your mesh in 1 of your object sources ..
then you just open the ffx ui and pick add and select all your sources in the list ..
i didnt instance them ( instead of copy() , instance() ) as instance sources dont allow you to pick different objects.. maybe they should ..
So , because they are copies , that means youll also want to controll their changes all together ... So Use the SourceArray to to expose all the parameters of each source and to change them .. i suggest you create yourself shortcut functions .. something like that :
Fn AdjFuel =
(
for foo in Sourcearrsources do foo.fuel = Random 0 0
)
Fn AdjTemp=
(
for foo in Sourcearrsources do foo.temperature = Random 50 100
)
Fn AdjDensSm =
(
for foo in Sourcearrsources do foo.SmokeDensity = Random 2.00 3.00
)
etc..etc..
this way you can not only put all of them the same values but also add some randomness controlled ..
cheers,
then let say you dump those copied FFxobjectSource into "SourceArray"
the second goal is for each of those Object sources , you want to assign them each 1 of the meshes avalaible for emiting from right ? so something like : for foo in SourceArray Do append Arrayofmeshes[foo] SourceArray[foo].object .. that will add 1 of your mesh in 1 of your object sources ..
then you just open the ffx ui and pick add and select all your sources in the list ..
i didnt instance them ( instead of copy() , instance() ) as instance sources dont allow you to pick different objects.. maybe they should ..

So , because they are copies , that means youll also want to controll their changes all together ... So Use the SourceArray to to expose all the parameters of each source and to change them .. i suggest you create yourself shortcut functions .. something like that :
Fn AdjFuel =
(
for foo in Sourcearrsources do foo.fuel = Random 0 0
)
Fn AdjTemp=
(
for foo in Sourcearrsources do foo.temperature = Random 50 100
)
Fn AdjDensSm =
(
for foo in Sourcearrsources do foo.SmokeDensity = Random 2.00 3.00
)
etc..etc..
this way you can not only put all of them the same values but also add some randomness controlled ..
cheers,
<!-- w --><a class="postlink" href="http://www.cgfluids.com">http://www.cgfluids.com</a><!-- w -->

