object visibility [SOLVED]
On 11/04/2015 at 03:25, xxxxxxxx wrote:
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:
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.
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.
On 15/04/2015 at 06:36, xxxxxxxx wrote:
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.