Query Viewport Solo status of an object
-
On 27/02/2018 at 03:15, xxxxxxxx wrote:
Hello!
Is there a status bit to query if an object is visible in Viewport Solo mode or not?We have objectxy.GetEditorMode() to check if an object is visible. I'm looking for something similar, but regarding Solo mode.
I've written a simple "Select All" script that selects only what is actually visible in the viewport, and would like to respect it the Solo mode, too.
Thanks a lot!
-
On 28/02/2018 at 04:05, xxxxxxxx wrote:
Hi Tupaia, thanks for writing us.
Actually in order to properly check the visibility status for an object, whilst C++ API comes with the CheckEditorVisibility(), Python API comes not.
In order to replicate the same functionality you can setup something like:
- check object visibility referred to layer (BaseObject::GetLayerData());
- check object visibility referred to its status in the Object Manager (BaseObject::GetEditorMode()) - ps beware to check with regard to the its visibility in the hierarchy;
- check object visibility referred to the view (GeListNode::GetNBit(NBIT_EHIDE));
- return checklayer and checkeditor and checkview.Hope this could help.
Best, Riccardo
-
On 15/03/2018 at 06:18, xxxxxxxx wrote:
Thank you, Riccardo! Will check it out soon.
Best regards