How to ger object color to update automatically?

Just getting into this stuff a bit… sorry for the GH/V8 noob question…

I have a collection of curves from which I am getting the color attributes.

If I go into the Rhino window and change the colors, the GH doesn’t automatically update. How does one make it update immediately without having to call “Recompute”?

Hi,
https://developer.rhino3d.com/api/rhinocommon/rhino.rhinodoc/modifyobjectattributes

Hope this helps,
Farouk

Not what I was looking for…

This seems to work:
image

-wim

Query model objects either gets me all objects, named, grouped or by layer… How do I get a specific subset of those (i.e. some of the curves but not all)?

Assuming it’s not by layer, name, or group, doing that would require the logic of that specific subset to be coded into the Grasshopper definition. Perhaps @AndyPayne has ideas…
-w

No big deal, for now I will just use “Recompute” to update, or I will put them on a layer. I think we do need some object type and/or selected objects filters maybe…

So there are two different ways you can filter for this content. The first is using the Group By component which will group all of the objects together using a specific attribute or user text as the sorting criteria. So, that would simply look like this image below. You can then select the items in the tree that you’re interested in.


The second way would be to filter the objects by a specific filter. In this case, I’m using the Match Text filter to select only the objects whose display colour matches 255,0,0 (ie. red). That would look like this.

Here are the files in case you’re interested.
Circles.3dm (76.2 KB)
FilterByColour.gh (11.7 KB)

3 Likes

OK, thanks Andy, I obviously have a lot to learn about this stuff, will have a look next week…