Creating a custom region

hi all,


as I understand it, everything that gets patched within the custom region is available here through the helper node “custom region patch”. (which manages the content).

how do I access the content of the custom region patch?
Is it possible to manipulate the content here before outputting the region’s data?

Maybe the other way around. I would like to create the following region. Is this possible with gamma?

ideally the user patch within the region can be completely disabled or enabled by the region logic itself.

@joreg could you provide a simple example of how building custom regions work? This is a pretty cool feature. But totally hidden. I know the grey book says the workflow still needs some love… I would be interested if something like this could be done already:

The “SceneToggle” activates scenes that come into the users’ view. And “Scene” just adds the layers to corresponding scene-object. scene-objects are managed by my scenecontroller. It moves them around, preloads and deactivates non visible scenes.

I would like to integrate the cach region, the upper and lower BW node into one custom region. The region in- and outputs my project wide context datatype. (inside, it could also provide additional data for the skia and stride objects, like in-and out animation times, the scene name and so on…

Hi schlonzo, sorry for the late reply!
Here is some documentation on building regions in general:

Does that cover your needs? Or is something missing?

Yep, I already went through that, I also had a look at those regions mentioned in the grey book. Still, I do not understand how it works. Nodes placed in the region are available as “objects” and I don’t know how to process them.

Would you care to provide a basic helppatch?

Regarding your last question about Scene region: To me it looks like something that the customRegion API can’t do yet and the other solutions are a bit cumbersome to use still.

  • What you’d like to have is a region with named pins inside the region, right? At least named outputs for Layer and Entity? For that you can try to define a delegate in C# to get named outputs in your region. But you’d need to use that approach together with the “UserPatch” trick in order to get a stateful region. And this sounds very challenging.
  • Of course you can also use CustomRegion API and search for the first outputBCP that has the desired type and collect the data this way (fetch first outputBCP of type Layer, feed that into BW_Scene, fetch first outputBCP of type Entity, feed that into another pin of BW_Scene…). The CustomRegion API doesn’t offer pins inside the region yet. Is that something you would prefer to work with in this case?

Nodes placed in the region are available as “objects” and I don’t know how to process them.

You can’t. The user might have patched a small or funny or big patch inside your region, you don’t know and you can’t reflect over the nodes inside the region. Via the custom region API all you can do is control the data that flows into the region and out of the region.

regarding the questions further up:

yes. that’s the point. you can

  • modify the data that flows into the region (be it via links crossing the region border or via input BCPs)
  • modify the data that flows out of the region via output BCPs

Yes, that would be helpful. I want to be able to create the inputs multiple time inside the region, to have direct access to the region’s values without having a lot of cables.

Making the CustomRegion API more versatile is planned, but we currently promise when this gets shipped.
Let me attach two patches that address your first two posts in this thread, in order to show you what can be done right now with two different approaches.
MyCustomRegion.vl (13.7 KB)
AddToDictionary.vl (14.5 KB)

Super! Thank’s a lot, that explains everything.
I’m looking forward, this is a very handy feature!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.