I have kind of a tricky setup I'm trying to puzzle through. I have a "global control node" in my scene that's powered predominantly with Python. One of the things it does is pick a random image from a folder, analyze the image, and generate a selection of colors drawn from the image:
This works great in and of itself; I can poke the Randomize button and get a new color palette each time.
Throughout my scene, I would like to be able to refer to these colors, ideally in a nice user-friendly way. Sometimes I want to manually choose one of the colors, other times I want to say "give me a random color from the current 'scene palette'". So, I have a separate HDA I'm trying to build that can do this. Let's call this my ColorPicker node. It also is handled primarily with Python:
Where I'm having trouble is trying to figure out how to connect the two. I can create a callback on the ColorPicker whereby I specify the path to the "Controller" node so that it populates itself internally; but if I re-randomize the controller, all the child colorpicker nodes don't go along for the ride...I have to manually go refresh them all to get them to 'pull' new colors from the controller node.
I reasoned that maybe making a direction connection (via a channel reference or something) might cause the child ColorPicker nodes to update themselves when the Controller node is refreshed, but I'm having trouble figuring out how to do that efficiently...it seems that connecting multiparms programmatically doesn't work quite as simply as channel references, or at least I'm having trouble figuring out how to get this working.
I've also tried managing this with Context Options, but that's messy in a different way (Context Options don't have a Color type, so it's a little messier to see what I'm doing when I try to store a list of colors in a Context Option). My current multiparm on the Controller node is the best solution I've found to visualize a variable list of colors.
Anyway. This is a weird problem; I'm curious if anyone has ideas for how I might do this?