How to control drawing order when using DisplayPipeline?

Hello everyone.
I have some problem controlling the drawing order when using DisplayPipeline:


The 2 rectangles are drawn in 2 seperated C# components.
I am wondering how can I control the order of these 2?

draw order.gh (3.1 KB)

Thank you guys!

Hi @11165

The easiest solution it is try to make one single component where doing both operations. Then you can easily control the drawing order.

If that is not possible then you can try to relate both c# components by adding a Boolean input coming out from the first c# component, just to be sure that the other component will be ran when having the information from the first one.

Other solutions would be to implement relays, but that is quite complex I would say.

Regards!

1 Like

Thanks man!
Your idea is great.
Simple but effective.

I tried using “connecting components” but that did not work.
Because [override DrawViewportWires] does not run as [RunScript]
image
DrawViewportWires belong to display pipeline and its order can not be affected by [RunScript]

Thank you anyway!