Select elements from Dependent (child) Views & override

I’ve read lots of post to this similar Topic, but nothing to ever solidly answer “when those objects are in Child Views” that the Clockwork’s node Element.OwnerView seems to miss.

A great example I’ve read more commonly is selecting Revision Clouds that are on Dependent Views (Partial Plans). So here’s a great case scenario. I’m trying to find a way of not going into each of those views separately to run the script to override graphics. Attached script is where I’m currently at where I’m testing different avenues.
My ultimate goal is to be able to create a visual Cue based on Instance Parameters, then be able to Reset those overrides the same way they were selected to begin with.

Any help in this example to get all “Elements” (either if 2D or 3D) that are on Dependent Views when selecting by a given parameter to filter them out is much appreciated. Getting them when in Independent Views is the easy part.
Override RevCloud Color_for Dependent Views v2.dyn (57.3 KB)

Element.OwnerView gets the Parent view because that is the owner view. Child Views are just a cropped version of that view but are really the same (on the front end, the back end they are different).

Are you trying to get an elements owner view then check to see if its a parent view and if so then check to see what child view the element shows up in and swap it out for the parent view?

Check out this bit of code by Amy. It will get you started on getting the child views. From there you would just need to check if the element is visible. Depending on how you views are set up the element may be shown in more than one child view.

I’m just now getting my head wrapped around it. I guess too much reading for similar avenues that my subconsciousness had to clear up overnight (clear the cache, lol) to see things clearer now. Doing testing right now on @awilliams code, but I still can’t “Apply” the overrides to items in Child Views; it does it in the Parent View, but it doesn’t translate to the Child View when doing the “Override Per View”.

Please help correct the errors of my ways…

You are adding the child views to the end of the list rather than replacing the parent views. You will need to then figure out what child views the element is visible then add an extra element for each addition view (past one view). Once your lists align then it should work fine.

Going in circles to even only isolate the ones in child views :frowning:

Just had a thought do you want to change it in both views?

I am not a python pro so you may need to do some list management in your last script (not sure on this). This is also a bit overkill because it will change each cloud regardless if it is outside the crop region or not but it should work for you.

Awesome. I’ll try it, & report back. It makes since that gabbing it from both Parent & Child is the most logical approach without going SuperNerdy into Python Scripting.