I’m working on an airplane that has a parented camera by its side that rotates around the ship till about 45 frames. Then i want to switch to a still camera from the ground. If I use the same camera, it moves with the plane, and I can’t undo the parenting, otherwise the 45 frames mess up. Any suggestions would be helpful. thanks.
Yes, you can use more than one camera. There are a few different ways of switching scenes like this. I’ll show you one I used recently. For a personal space animation project I wound up writing a small Python script to handle this.
I’m not sure if you’re familiar with Python, but, if not, it’s a programming language. Blender allows you to create and run scripts in Python.
To create a script you would open a new text window and then type in some Python code.
Here is a simplified version of the simple camera switching code I wrote. I adapted it to the number of frames you mentioned (45):
import Blender from Blender import Scene, Object s = Scene.getCurrent() c = s.getRenderingContext() curFrame = c.currentFrame() if curFrame<46: o = Object.Get('Camera') if curFrame>45: o = Object.Get('Camera.001') s.setCurrentCamera(o) s.update()
This script assumes two things: You have a camera named Camera and a second new Camera named Camera.001. If you have only one camera, just add a camera object and its name should be Camera.001. Position and angle the new camera where you want it to be.
Once you have those in place, you can copy and paste the above code into a text only file and call it something like cswitch.py. Then you can open that file in a Blender Text window.
Important to note: This script will not run by itself, nor will it run by placing the arrow over the text window and pressing ALT P (the way normal Python scripts are typically executed).
To make this script run we must go to the Script Links window. One way to get to that is by pressing F4 and clicking the document icon next to the pacman-looking image.
Next, click on Enable Script Links. Click the little world icon in that window. Click the New button. Select the script file (cswitch.py). This step assumes you have already loaded that script into a Blender text window.
Make sure the words to the left of the new script link say “FrameChanged.”
Provided all has gone well at this point you should now be able to switch between frames 45 and 46 and literally see the switching IF you have your active view set to the current Camera (NUMPAD 0 key to switch).
Also be sure to check out Gabio’s camera sequencer in the Blender Python forum. Excellent stuff there!
I hope that helped. Good luck with that
UPDATE: I posted a small .blend file at my website so you can see how this all works.
Also as a note to anyone else interested: please feel free to use and adapt the above code however you want
You legend Robertt! That’s a top little script. It worked great on my computer. And thanks for clearing up the How- to-execute-python-scripts-in-Blender issue for me. Til I read your mini tut that was something I never understood about Blender.