lock and unlock camera

3D Studio Max Plugin (Export Script Plugins developed by [gk] and KilaD; Integrated Plugin developed by Karba)
Forum rules
Please post only in English in this subforum. For alternate language discussion please go here http://render.otoy.com/forum/viewforum.php?f=18
Post Reply
Jorgensen
Licensed Customer
Posts: 872
Joined: Sun Jun 30, 2013 10:53 am

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
HOME octane standalone v3.07 | octane plugin for sketchup 3.07.0.14 | sketchup pro 2017 17.2.2555 64 bit | windows 10 pro 10.015063 build 15063 | i7-6700k @4.0 GHz | 32gb ram | 2x gtx 1070 | nvidia driver 382.33
Jorgensen
Licensed Customer
Posts: 872
Joined: Sun Jun 30, 2013 10:53 am

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
HOME octane standalone v3.07 | octane plugin for sketchup 3.07.0.14 | sketchup pro 2017 17.2.2555 64 bit | windows 10 pro 10.015063 build 15063 | i7-6700k @4.0 GHz | 32gb ram | 2x gtx 1070 | nvidia driver 382.33
User avatar
glimpse
Licensed Customer
Posts: 3740
Joined: Wed Jan 26, 2011 2:17 pm
Contact:

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 =)
Jorgensen
Licensed Customer
Posts: 872
Joined: Sun Jun 30, 2013 10:53 am

Hi Glimpse

where is the lock button?
HOME octane standalone v3.07 | octane plugin for sketchup 3.07.0.14 | sketchup pro 2017 17.2.2555 64 bit | windows 10 pro 10.015063 build 15063 | i7-6700k @4.0 GHz | 32gb ram | 2x gtx 1070 | nvidia driver 382.33
gueoct
Licensed Customer
Posts: 402
Joined: Mon Jul 11, 2011 3:10 pm

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!
Intel i7-970 @3,20 GHz / 24 GB RAM / 3 x EVGA GTX 580 - 3GB
User avatar
glimpse
Licensed Customer
Posts: 3740
Joined: Wed Jan 26, 2011 2:17 pm
Contact:

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.
gueoct
Licensed Customer
Posts: 402
Joined: Mon Jul 11, 2011 3:10 pm

glimpse wrote:... Maybe having something like active shade viewport, that You leave open and it updates everything You do might even fit better.
Exactly!
Intel i7-970 @3,20 GHz / 24 GB RAM / 3 x EVGA GTX 580 - 3GB
Post Reply

Return to “Autodesk 3Ds Max”