Im trying to make a preset system for stored nodegroup inputs. It’s a list of all the inputs which contain name, factor and color. This is repeated over and over. Prior to bl5, we could store this easily at bpy.types.Scene.my_settings and simply add a new by doing scene.my_settings[“setting 01"] = [" name”, 0.244,[1,0.34,1,1]] etc etc
It basically looks like this per setting
my_dict = {
'key1': 'some string storage',
'key2': ['some', 'list', 'storage'],
'key3': 5
}
I’m confused how would go around by using pointerproperty and perhaps another pointerproperty inside the other.
I basically want to give each dict set a name and store them as described earlier. Then either recall them by a uilist or a simply enumproperty.
I’ve searched Google for some hours now I don’t see any info or articles about not using the prior dicht approach.
EDIT
Here is a more expanded description with code examples
The real data looks like this, although that 1st input im going to change to a list of 2, just like i did here below
presetItem = {
0: ('Compositing Nodetree', "Group"),
1: (0.8167939186096191, 'Area Top Dow', (0.052555330097675323, 0.42742449045181274, 0.7770897150039673, 1.0)),
2: (1.0, 'Enivornment', (0.0, 0.0, 0.0, 1.0)),
3: (1.0, 'Interior Light', (0.0, 0.0, 0.0, 1.0)),
4: (1.0, 'Light Front', (0.43450042605400085, 0.11602850258350372, 0.010636990889906883, 1.0)),
5: (1.0, 'Light Front R', (0.0, 0.0, 0.0, 1.0)),
6: (1.0, 'Light Rim Back L', (0.016390008851885796, 0.13765928149223328, 0.25482141971588135, 1.0)),
7: (3.0, 'Light Rim Front L', (0.6231090426445007, 0.17952165007591248, 0.03514079377055168, 1.0)),
8: (1.0, 'Lightgroup_004', (0.5569474697113037, 0.1895488053560257, 0.015195346437394619, 1.0)),
9: (0.045801520347595215, 'Mesh Light Back', (0.0, 0.0, 0.0, 1.0)),
10: (0.15267175436019897, 'Mesh Lights Front', (0.0, 0.0, 0.0, 1.0)),
11: (0.0, 'Top Lights Dow', (0.0, 0.0, 0.0, 1.0)), 12: (0.0, 'hedlights', (0.0, 0.0, 0.0, 1.0))
}
im basically trying to create this, but than using pointerproperty and collectionproperty.
{
"presetItem 01" : {
0: ('Compositing Nodetree', "Group"),
1: (0.8167939186096191, 'Area Top Dow', (0.052555330097675323, 0.42742449045181274, 0.7770897150039673, 1.0)),
2: (1.0, 'Enivornment', (0.0, 0.0, 0.0, 1.0)),
3: (1.0, 'Interior Light', (0.0, 0.0, 0.0, 1.0)),
4: (1.0, 'Light Front', (0.43450042605400085, 0.11602850258350372, 0.010636990889906883, 1.0)),
5: (1.0, 'Light Front R', (0.0, 0.0, 0.0, 1.0)),
6: (1.0, 'Light Rim Back L', (0.016390008851885796, 0.13765928149223328, 0.25482141971588135, 1.0)),
7: (3.0, 'Light Rim Front L', (0.6231090426445007, 0.17952165007591248, 0.03514079377055168, 1.0)),
8: (1.0, 'Lightgroup_004', (0.5569474697113037, 0.1895488053560257, 0.015195346437394619, 1.0)),
9: (0.045801520347595215, 'Mesh Light Back', (0.0, 0.0, 0.0, 1.0)),
10: (0.15267175436019897, 'Mesh Lights Front', (0.0, 0.0, 0.0, 1.0)),
11: (0.0, 'Top Lights Dow', (0.0, 0.0, 0.0, 1.0)), 12: (0.0, 'hedlights', (0.0, 0.0, 0.0, 1.0))
},
"presetItem 02" : {
0: ('Compositing Nodetree', "Group"),
1: (0.8167939186096191, 'Area Top Dow', (0.052555330097675323, 0.42742449045181274, 0.7770897150039673, 1.0)),
2: (1.0, 'Enivornment', (0.0, 0.0, 0.0, 1.0)),
3: (1.0, 'Interior Light', (0.0, 0.0, 0.0, 1.0)),
4: (1.0, 'Light Front', (0.43450042605400085, 0.11602850258350372, 0.010636990889906883, 1.0)),
5: (1.0, 'Light Front R', (0.0, 0.0, 0.0, 1.0)),
6: (1.0, 'Light Rim Back L', (0.016390008851885796, 0.13765928149223328, 0.25482141971588135, 1.0)),
7: (3.0, 'Light Rim Front L', (0.6231090426445007, 0.17952165007591248, 0.03514079377055168, 1.0)),
8: (1.0, 'Lightgroup_004', (0.5569474697113037, 0.1895488053560257, 0.015195346437394619, 1.0)),
9: (0.045801520347595215, 'Mesh Light Back', (0.0, 0.0, 0.0, 1.0)),
10: (0.15267175436019897, 'Mesh Lights Front', (0.0, 0.0, 0.0, 1.0)),
11: (0.0, 'Top Lights Dow', (0.0, 0.0, 0.0, 1.0)), 12: (0.0, 'hedlights', (0.0, 0.0, 0.0, 1.0))
},
"presetItem 03" : {
0: ('Compositing Nodetree', "Group"),
1: (0.8167939186096191, 'Area Top Dow', (0.052555330097675323, 0.42742449045181274, 0.7770897150039673, 1.0)),
2: (1.0, 'Enivornment', (0.0, 0.0, 0.0, 1.0)),
3: (1.0, 'Interior Light', (0.0, 0.0, 0.0, 1.0)),
4: (1.0, 'Light Front', (0.43450042605400085, 0.11602850258350372, 0.010636990889906883, 1.0)),
5: (1.0, 'Light Front R', (0.0, 0.0, 0.0, 1.0)),
6: (1.0, 'Light Rim Back L', (0.016390008851885796, 0.13765928149223328, 0.25482141971588135, 1.0)),
7: (3.0, 'Light Rim Front L', (0.6231090426445007, 0.17952165007591248, 0.03514079377055168, 1.0)),
8: (1.0, 'Lightgroup_004', (0.5569474697113037, 0.1895488053560257, 0.015195346437394619, 1.0)),
9: (0.045801520347595215, 'Mesh Light Back', (0.0, 0.0, 0.0, 1.0)),
10: (0.15267175436019897, 'Mesh Lights Front', (0.0, 0.0, 0.0, 1.0)),
11: (0.0, 'Top Lights Dow', (0.0, 0.0, 0.0, 1.0)), 12: (0.0, 'hedlights', (0.0, 0.0, 0.0, 1.0))
},
}
its a basically a preset system when using lightgroups, makes it super easy to make setups and then toggle between them
This is done by using the addon “Lighrgroup Helper”, which ive adjust so we can alter the color per light as well. The idea came from this scene, i got a hige list of lights and really liked some setups. So i started doing some code test. THe base parts like storre all inputs and restoring them works. Now i just need a nice panel or just an emum prop to show the presets

