PDA

View Full Version : Scripted plugin parameters issue


Chunks
12-09-2011, 07:20 PM
Is there a tab type for arrays?

I'm trying to figure out if there's a tab type I can use that I can stuff an array of controllers in. It would just be amazingly easier for me to effectively have a 2-dimensional array as a parameter, but I'm running into issues on that.

denisT
12-09-2011, 09:24 PM
Is there a tab type for arrays?

I'm trying to figure out if there's a tab type I can use that I can stuff an array of controllers in. It would just be amazingly easier for me to effectively have a 2-dimensional array as a parameter, but I'm running into issues on that.

there is no a type "tab of arrays". but usually there is a workaround.
in your case it might be an array of List Controllers, where every List controller is an array of controllers.
another solution is to have an array of custom (scripted) modifiers every one of which has an array of controllers (custom tab parameter).

lo
12-09-2011, 09:46 PM
another solution is to have an array of custom (scripted) modifiers every one of which has an array of controllers (custom tab parameter).

In this type of 'dummy' scripted plugins, is there a reason for choosing a modifier instead of other type like atmospheric, render effect, etc? Is the modifier class the most light-weight class, or was the choice random?

denisT
12-09-2011, 09:58 PM
In this type of 'dummy' scripted plugins, is there a reason for choosing a modifier instead of other type like atmospheric, render effect, etc? Is the modifier class the most light-weight class, or was the choice random?

it might be any not NODE type. I use EmptyModifier. Atmospheric, Render effect, some other can confuse me just by its name. Also EmptyModifier has minimum delegated parameters... That's my point.

lo
12-10-2011, 10:00 AM
I decided to put it to the test. Material and Texturemap are also out of the question because they require at least 1 rollout definition.
TrackViewUtility is the big winner.
Surpisingly, SimpleMod is slower and heavier than Modifier.

plugin SimpleMod simpleModPlugin
name:"SimpleModTest"
classID:#(0x1656c8f2, 0x64fbb001)
( parameters main ( param1 type:#boolTab tabLength:10 ) )

plugin Modifier modifierPlugin
name:"ModifierTest"
classID:#(0x1856c8f2, 0x66fbb001)
( parameters main ( param1 type:#boolTab tabLength:10 ) )

plugin TrackViewUtility TrackViewUtilityPlugin
name:"TrackViewUtilityTest"
classID:#(0x351d6188, 0x7834c1eb)
( parameters main ( param1 type:#boolTab tabLength:10 ) )

plugin RenderEffect RenderEffectPlugin
name:"RenderEffectTest"
classID:#(0x14e8884, 0xee2055f)
( parameters main ( param1 type:#boolTab tabLength:10 ) )

plugin Atmospheric AtmosphericPlugin
name:"AtmosphericTest"
classID:#(0x2d15c61b, 0x55d0a3ae)
( parameters main ( param1 type:#boolTab tabLength:10 ) )

for p in #(simpleModPlugin, modifierPlugin, TrackViewUtilityPlugin, RenderEffectPlugin, AtmosphericPlugin) do
(
gc()
local ts = timestamp()
local mem = heapfree
for i = 1 to 5000 collect p()
format "% - time: %ms, memory: % bytes\n" p.name (timestamp()-ts) (mem-heapfree)
)

SimpleModTest - time: 80ms, memory: 3587360L bytes
ModifierTest - time: 32ms, memory: 1484824L bytes
TrackViewUtilityTest - time: 2ms, memory: 128L bytes
RenderEffectTest - time: 34ms, memory: 1566080L bytes
AtmosphericTest - time: 34ms, memory: 1487064L bytes

EDIT: TrackViewUtility is disqualified, because it's a static class. Modifier wins.

CGTalk Moderation
12-10-2011, 10:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.