A mode to replicate containers based on a nested Python dictionary or list would be useful. You can currently dump out a list of keys or items into a table and replicate that way, or replicate by number and set the expression to
len(list)
or
len(dict.keys())
, and then attempt to grab the correct item programmatically from within the seperate container, but it feels a bit kludgey. Perhaps instead, there’s a replicate by python option in the drop down. This could activate 2 fields. The first would be a field that would look for a list or dict returned by a python expression, that would control the main replication. However the second would be a field that would be the name of a custom parameter to assign the nested object to automatically (whether it’s a primitive data type, or list/dict). This would be a very fast way to unroll complex data storage objects that need to map to actual operators in touch.
For example, if I had a Dictionary for output mappings like
{'screen1':{'sources':['input1'],'screen2':{'sources':['input2','input2']}}
, I could use 2 layers of replicators. For the first, I would hook in the main dict, and then assign the subitems to the new custom parameter of Screenmapping. This would give me 2 containers representing each screen. Then each screen container would already have
screencontainerop.Screenmapping
assigned, so
screencontainer2.Screenmapping
would return the dict
{'sources':['input2','input2']}
. At this point, a second replicator within the screen container could point to
Screenmapping.sources
as it’s main input, and then create a container handing that input and so on.
Obviously screen mapping you could handle in a much different way, but if you try to think about nested object oriented data, it’s hard to convert that into meaningful operators without multiple layers of scripts that can be confusing to debug later.