viewport.setType() for a xref scene camera

Hello guys,

I cant find a way to set viewport to a specific camera which is in xref scene.
viewport.setType $cameraname not working. but when this camera is set as active then i can access it by getActiveCamera(). Do you know any workaround to make it active ?
Thanks for reading.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
zahid hasan's picture

Thanks Pixamoon. i am very

Thanks Pixamoon. i am very excited to get an answer after days.

pixamoon's picture

`

Hi,

try this:

c = getNodeByName "cameraname"
-- or
c = $cameraname
viewport.setType c.actualBaseObject

Best,
Pixamoon

zahid hasan's picture

I tried this but

I tried this but C=getNodeByName "cameraname" returns undefined. Maybe this will work if my camera is a xref object and not in a xref scene.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.