Page 1 of 1

lock and unlock camera

Posted: Tue Nov 12, 2013 7:35 am
by Jorgensen
Hi

I really miss two simple buttons, one that lock the current view and one that unlocks the view.

I have found this script to do the job:
setTransformLockFlags $ #all
setTransformLockFlags $ #none
but one have to selecet the camera and target manuel to lock the view, before running the script.

I guess that the script should select the active camera and it's target and lock them.
I know how to add a script to a toolbar, but not how to write it properly :-/

Can anyone help?

Thanks

Re: lock and unlock camera

Posted: Sun Nov 17, 2013 2:11 pm
by Jorgensen
In case others could use this:
-- lock active camera and its target
(
activeCam = getActiveCamera()
setTransformLockFlags activeCam #all
setTransformLockFlags activeCam.target #all
)
-- unlock active camera and its target
(
activeCam = getActiveCamera()
setTransformLockFlags activeCam #none
setTransformLockFlags activeCam.target #none
)

By miauu from http://www.scriptspot.com

Re: lock and unlock camera

Posted: Sun Nov 17, 2013 5:28 pm
by glimpse
isn't that the same what 'lock button' does? =)

I always use it while modeling - start rendering some previews while changing model & switching through viewports in progress of doing so =)

Re: lock and unlock camera

Posted: Tue Nov 19, 2013 7:39 am
by Jorgensen
Hi Glimpse

where is the lock button?

Re: lock and unlock camera

Posted: Tue Nov 19, 2013 9:42 am
by gueoct
The Lock Button is O.K.ish i don“t quite see the sense in it.

What would make more sense is a "Lock Active View/Camera" like in Max Render Window.

While working i need to lock OctaneViewport to a certain Camera AND see a current update!

Re: lock and unlock camera

Posted: Tue Nov 19, 2013 2:15 pm
by glimpse
Jorgensen wrote:where is the lock button?
lock.jpg
so, once You're happy with Your camera, just press the button and it will lock the view, so You can get out of Your camera in a vieport and work on the model, while Octane is still rendering =) it will not update the model, unless You press 'update render geometry', the one before lock button.

One thing that I noticed is that some differences appear in render window once You get out of camera view, probably because Octane applies imager settings not from camera, but from render settings (not sure though =) but that's not a big deal, 'cos once You're happy with the result & let's say want to save the image), just switch to the camera and tone mapping is applied again.
gueoct wrote:While working i need to lock OctaneViewport to a certain Camera AND see a current update!
You'll see all of the changes You do on material side, but not on camera or lighting /if You use octane sun system) & geometry.

but I agreee with You on that, taht it's not perfect. In some cases it works in some it don't. Maybe having something like active shade viewport, that You leave open and it updates everything You do might even fit better.

Re: lock and unlock camera

Posted: Thu Nov 21, 2013 6:56 pm
by gueoct
glimpse wrote:... Maybe having something like active shade viewport, that You leave open and it updates everything You do might even fit better.
Exactly!