Add a driver and shortcut option on the eye icon

Nearly all the buttons within Blender allow to add a driver and assign a shortcut, some of them do not, as the eye icon, the buttons of the add-ons, and the icons of collections.

It is a pity, since the eye icon is central, that it used to support drivers and that all the other icons around do.

Could we add the driver option on it -for both objects and collections-?

The screen icon has support for the animation system

Yes, and the ones of the objects support drivers too.

What is the interest of letting them support animation and drivers but not the eye icons?
I try to find a workaround to link the visibility of some objects and it is frustrating to get stuck because of this restriction:
https://pasteall.org/blend/0dc2596a55d7412780487cc2d96f2fbe

Linking automatically the eye and screen icons in both ways could do the job too.

The eye icon is a per-viewlayer property, whereas the monitor icon is global. Since the animation system supersedes the viewlayer (ie animation and drivers are the same regardless of active viewlayer), the eye icon has no power beyond that and cannot be used as part of the animation system. It’s just a toggle for the current viewlayer, a sort of local visibility override if you will.

I hope that clears it up. I personally think there is a lot of room for improvement regarding collections and visibility in general, so please don’t take my answer as a form of “that’s how it works, deal with it”. In fact I think there should be work done in that area as soon as possible to iron out those kinks. It’s obviously unclear to a lot of people where eye and monitor differ just looking at how many messages mention it.

I agree:

I understand the logic and assume that what I try to do is a hack.
The option to add a driver would allow these ‘misuses’ and would not interfere with the standard functions.

Nonetheless, the Collection system was a revolution for me; it is very logic and practical.

1 Like

When you think of it, most of the annotation part of the ‘MeasureIt’ and ‘MeasureIt-ARCH’ could be spared through this simple driver option that is missing. It would have many advantages, too.

The only advantage of these annotation from the add-ons is the possibility of ‘MeasureIt’ to track to the 3D viewport. It could become a standard constraint.

Is it easier to create these add-ons than to offer a possibility to connect the visibility of several objects?

I’m not familiar with these addons. What would you like exactly ? to link visibility and renderability by default ? I would agree with that, the question are whether or not it’s feasible technically (I assume it is), and how to present it to the user.

Actually, the only thing missing is the option to add a driver on the eye-icon (and copy data path).

The render and screen icons do not matter for what I need; I had thought to try and use the screen-icon in order to link several objects’visibility (eye), and therefore started looking to ways to influence the eye from the screen-icon; but it is a workaround that does not work.

I heard through a tutorial that other people would also like, as I do, to have this option on the collection’s icons too.

Ah, right… the collection toggles cannot be animated, to be honest I don’t know why. I think I remember @dfelinto had a patch for that at some point ?

I’m not sure why you want to use the eye. Does the screen not fulfill your needs ?

No and I spend much time trying to find a workaround on which I can invest on the long term.
I build this anatomy atlas within Blender (https://www.z-anatomy.com/) and need a system to add labels and definitions to the structures.

The atlas is meant to be used by students and healthcare professionals.
It has to be straightforward.

The labels must disappear with the structure.
Ideally, they should be able with a single shortcut to show all the labels, and with another, to open the definition of each of them separately. Standard text objects would be more convenient; it would allow to search for the structure through the outliner, to see its place in the hierarchy, group them and select their collection, to have more options on the text edition, etc.

Can you expand on why the screen icon doesn’t work for you ?

That’s a cool project… however Blender is really not made for “presenting” content, so if you want your atlas to be accessible to Blender-illiterate people, maybe the best is to offer it online (webGL) or through a dedicated application.

If I understand correctly you are using annotations for labels right now ? and this annotation system is supplied by the addon “measureIt” ? text objects are not super flexible but they can have materials, just like any other object, and you can control your visibility through there. My suggestion would be to create an interface, in the form of an armature with control sliders (or simply as custom properties in the sidebar) that control visibility of the different structures. You can then link those to a group node that turns your material into a transparent shader when it’s off, and reverts to the regular material when it’s on.

What would you think of this ? how are users supposed to interact with the atlas ? would you rather have everything in one place, or let the user navigate the scene and click on structures to show them ?

I don’t have time to download and check for myself, maybe later

Cheers

Somebody already told me about the hack consisting in animating the alpha of the material of the labels and definitions; it leaves a bunch of dead end issues:
they would still be selectable and visible in solid viewport shading, they would not disappear when hiding the structure with ‘H’ …

Absolutely, they would still be selectable. I understand how that’s a problem… it really shows that Blender is not a showroom, and there may be a more appropriate package for you to present your atlas in. I’m thinking of a game engine, something like this could be made rather simply in Godot for instance, and it would be lightweight.
If I may ask, what nature is the funding for making this ? maybe there is room for an additional fee in order to pay for a little standalone ‘showroom’ executable that would work exactly as you’d like.
Now if you’re making this on your own time, I see why you’re trying to make it work in Blender.

By the way, you touch on an important topic : since the hotkey H (in 2.80) is bound to the eye icon in Blender 2.8+, people expect it to behave like the old eye icon, when in reality the closest equivalent is the screen icon. The eye icon is actually… something new. This is all very misleading.

There is no funding but the unemployment subsidy;
I do not have the skills and can not afford to pay somebody to create a whole application.
I posted a job offer for somebody who could write the adequate scripts that would allow me to link certain objects visibility through drivers on Blender Artist (it awaits approval).

Another useful script would be the one that allows to constraint an object towards the 3D viewport (without a camera). Since the standard ‘MeasureIt’ addon achieves to do it with text, it should be possible with text objects too.

I see. Have you considered making this in Blender 2.7x’s game engine ? I reckon you can do that kind of thing rather easily (navigation, hiding and showing objects) but of course you’d have to give up on collections

It’s getting over my head and since I don’t have a solution, I’ll leave you to other contributions

Cheers,

Hadrien

I started looking to the UPBGE that now supports Eevee and Collections, but it leads to a drastic augmentation of the weight and the whole file seems unbearable, at least in one piece:

This is something for which the development would gladly accept patches. It is not even very hard to implement, since we have a similar logic already to handle invisible objects in the dependency graph.

1 Like

TIL that enabling and disabling selection can be used as a driver, but it cannot be keyframed or driven
Disable Selection
Disable Selection driver