Camera Lock Script?
aaráribel caađo
Posts: 686
Once I settle in on a camera angle, I like to lock my rendering camera down by locking the translation and rotation transforms. It's not a huge effort, I'd really love a script to have one-clock lock/unlock of transforms. Unfortunately, when I open up the scripting window, I'm completely lost. I don't know how to target the camera or how to switch between lock and unlocked modes for transforms. Has anybody written such a script? Or, if not, would it be easier to write than I think?
Comments
change true to false throughout for an unlock script
Thanks Richard, that's excellent
Here's a couple of icons for this...
Rename them CameraLock.dsa.png/CameraUnlock.dsa.png (if that's what you named the scripts) and drop them along side the scripts.
Just curious, can I include this camera lock script in a commercial product as a very useful tool but not the primary purpose of the product? Thank you.
Here's a version with undo and unlock support you can use
If you want to use it as two separate scripts to lock / unlock, change the last line
Omniflux, thank you very much!
Guys if it's ok with you, I'm merging the codes into another old camera project. We will rename it project since there are a lot of us on it.
@Omniflux here is the shell for the project.
New version of CamLock2022 has been released. Check out the related video.
CamLock2022v2 allows you to easiy lock your Beauty/Production camera during scene composition.
Updated with "Camera Locked" scene indicator.
Files linked below
https://sites.google.com/site/mcasualsdazscripts9/camlock2022v2
Click image below for video tutorial
Cool. Thanks.
Be sure to grab the new version it has the camera locked scene indicator.
Got it, thanks Tugpsx, nice update!
I did a Create Custom Action to save it to the Scripts Menu, then, because I use it a lot, I gave it a keyboard shortcut: "Window>Workspace>Customise find the script's entry under Custom on the left, right-click on it, Change Keyboard Shortcut, and press the combo you want."
Glad you are enjoying the update. The shortcuts do come in handy. Thanks for sharing.
Hi there
I posted CamLock2022V2 on its own google-sites site page
this way : https://sites.google.com/site/mcasualsdazscripts9/camlock2022v2
i will also make a thread for it in the freebies forum
Nice idea. Didn't work for me. Perhaps it is because I still use 4.12
2022-05-09 17:56:40.663 WARNING: Script Error: Line 80
2022-05-09 17:56:40.663 WARNING: TypeError: Result of expression 'wLockBtn.clicked.scriptConnect' [undefined] is not a function.
@gitka1
Yes, Function::scriptConnect isn't available in DS versions older than Jan. 2021, it was introduced when Function::connect was deprecated.
Just for you, here is a modified version that I believe will work with 4.12. Please respond if it does!
@Omniflux thanks for the update and addressing the issue.