object visibility [SOLVED]
-
On 11/04/2015 at 03:25, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 14-16
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;---------
Is there an easy way to determine if a object is visible in a BaseView?By that i don't mean if it is in the view frustum. I merely want to know if it can be seen according to various filter settings.
I wrote a little SnapData plugin. And i don't want it to snap to invisible stuff.
-
On 13/04/2015 at 09:07, xxxxxxxx wrote:
Hello,
I'm afraid there is no very simple answer. To check if an object is covered by the viewport filters you can simply use CheckDisplayFilter(). To use this function you should use the BaseDraw handed over in the SnapStruct argument.
But if an object is visible in the editor you must also check it's "Visible in Editor" parameter and the parameters of all parent objects.
Best wishes,
Sebastian -
On 15/04/2015 at 02:13, xxxxxxxx wrote:
Thanks. CheckDisplayFilter() looks useful. Does it include Layers, too? It appears not.
I think an API function which combines all the visibility switches would be very nice to have.
Cheers,
Michael -
On 15/04/2015 at 06:36, xxxxxxxx wrote:
Hello,
CheckDisplayFilter() only checks the filter settings. To check if a layer is applie one can use GetLayerData().
Indeed, a API function to manage all this would be handy. We will try to improve the API.
best wishes,
Sebastian