Moving Rhino cameras using Rhino Python editor doesn't move enscape views

Hi,
when trying to move the rhino origin (geometry and views) from the old origin to the new origin, it moves all views and geometry correctly except views created through enscape. Wondering if anybody else has dealt through this?
Thanks
Here is the script

import rhinoscriptsyntax as rs 

def move_named_views(vect):

    named_views = rs.NamedViews()

    for view in named_views:

        rs.RestoreNamedView(view)

        camera,target = rs.ViewCameraTarget(rs.CurrentView())

        camera += vect

        target += vect

        rs.ViewCameraTarget(rs.CurrentView(),camera,target)

        view = view.replace(" ","\r")

        view = "MovedView_" + view

        print(view)

        rs.Command('-_namedView S ' + view + ' ENTER',True)

def MoveEverythingInFile():

    oPt=rs.GetPoint('Current "origin" - Point to move all geometry FROM')

    if not oPt: return

    nPt=rs.GetPoint('New "origin" - Point to move all geometry TO')

    if not nPt: return

    

    objs=rs.AllObjects(include_lights=True,include_grips=True)

    if objs==None: return

    tVec=nPt-oPt

    rs.EnableRedraw(False)

    rs.MoveObjects(objs,tVec)

    move_named_views(tVec)

MoveEverythingInFile()

fyi, I edited your post to enclose your code in tripple backticks so that your code is correctly formatted in your post. I don’t know about Enscape, though.

1 Like

thank you