Working with objects/surfaces in Shaded View!

Hey all Maya developers!

I've got a very simple question:

What is the best way write a command tool that takes a object as input an reports back
as a true/false value if the object is visible in shaded view (a viewport with Smooth Shade
activated)

There's a tool called selectOnScreen by Bryan Ewert, something like that but I also need
to know if the object/surface is visible in shaded view ...

/Joda

Since there are so many ways to hide things in Maya, it might be a bit tedious. But you will probably need to run individual checks on each.

-Layer visibilty
-Hidden or not
-LOD node visibility
-child of a hidden node

Probably some others that I am not thinking of now, also.

--JeffD