GetViewCamera only accepts the view manager views so you can't use that. i
tried quickly to instance many different view types and only object view
types seem to go under there so it might be safe bet... you can always test
for the type before you do anything anyways...

from siutils import si
si = si()                    # win32com.client.Dispatch('XSI.Application')
from siutils import log        # LogMessage
from siutils import disp    # win32com.client.Dispatch
from siutils import C        # win32com.client.constants

layout = si.Desktop.ActiveLayout
for view in layout.Views:
    if view.Type == "Object View":
        log(view.Name)


On Thu, Dec 20, 2012 at 4:39 PM, Chris Gardner <[email protected]>wrote:

> Or is there a nicer way of getting to the camera known as "default"
> from an object view?
>
> cheers,
> chrisg
>
>
> On 21 December 2012 11:23, Chris Gardner <[email protected]> wrote:
> > Hi all,
> >
> > I'm trying to script some stuff with object view windows (specifically
> > the "default" camera that appears in each view).
> >
> > It would appear that each object view appears as "Views.View1",
> > "Views.View2", etc and then you can muck about with it's cameras from
> > from there.
> >
> > Are object views the only things that appear in the "Views.list"
> > container? Is it safe to assume that each View will relate to object
> > views in the order that they're created?
> >
> > thanks for any thoughts,
> > chrisg
>

Reply via email to