Page 1 of 1

python command to look through camera

Unread postPosted: Thu Mar 02, 2017 2:31 am
by jim204
Hi,

I was wondering if there is a python command that would do the same thing as hitting "spacebar" in the browser on a selected camera.

Thanks,
Jim

Re: python command to look through camera

Unread postPosted: Thu Mar 02, 2017 10:19 am
by fjutel
Hi Jim,

Currently it's not possible to set a camera in 3d view using python.

Regards,

Re: python command to look through camera

Unread postPosted: Thu Aug 10, 2017 10:39 am
by Vincent
Hello,

Is it possible now to use python in 3.5 to go back to a specific camera? It will save some time switch to the free cam and the render_cam for example.

Thanks.

Vincent

Re: python command to look through camera

Unread postPosted: Thu Aug 17, 2017 10:01 am
by bvaldes
Hi,

It's still not possible. The 3dview's camera is not accessible in python so we can't control it by code.

Regards

Re: python command to look through camera

Unread postPosted: Thu Nov 22, 2018 3:56 pm
by stheroux
Hi Benoit,

Trying my luck on the 2017 post, is it still the case we cannot access 3dview camera in python ?
If so, i will make a feature request.

Thanks
Sylvain

Re: python command to look through camera

Unread postPosted: Thu Nov 22, 2018 4:11 pm
by bvaldes
Hi,

Unfortunately, this is still not possible. You can create a feature request.
Sorry for the inconvenience.

Regards

Re: python command to look through camera

Unread postPosted: Thu Nov 22, 2018 4:35 pm
by stheroux
Done, thanks for the update.
Sylvain

Re: python command to look through camera

Unread postPosted: Thu Nov 22, 2018 7:14 pm
by mdkai
On the contrary it would be possible to script a workaround

Have an extra camera which jumps to position and orientation (and even more settings like FOV) of any other camera and keep it instead of the regular perspective cam.
If there are more cameras just read them as a list to cycle forward or backwards ...

Not the perfect solution but could be done easily..
Cheers
Kai

Re: python command to look through camera

Unread postPosted: Wed Jul 15, 2020 12:19 pm
by superdkk
is it still the case we cannot access 3dview camera in python ? 2020year!!

Re: python command to look through camera

Unread postPosted: Thu Jul 16, 2020 8:45 am
by sam
Hello,

In 2020, the 3d view still doesn't create a camera item to control the free view. So yes, it is still the case.
Thank you,