THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/03/2011 at 01:13, xxxxxxxx wrote:
went back to my editor to scene cam script, for a fresh look
Only thing I can't seem to get working is the editor camera UNDO?
Move editor camera in C4D window
SHIFT CMD Z - Undoes
Same keys - no undo?
Written for CINEMA R12.032
Description-UK: Set active Editor Camera to selected Scene Camera view
# Transfer scene camera settings, if selected, to Editor Camera
from c4d import gui
def main() :
doc.StartUndo() # Start the Undo buffer
adraw = doc.GetActiveBaseDraw()
editorcamBC = adraw.GetEditorCamera()
selected_obj = doc.GetActiveObject()
if selected_obj is None or selected_obj.GetType() != c4d.Ocamera:
gui.MessageDialog("No Scene Camera selected")
if adraw.GetProjection()!=0: # checkk to see if perspective view is selected
gui.MessageDialog("Please select a Perspective view")
if (editorcamBC.GetType() == selected_obj.GetType()) and (adraw.GetProjection()==0) :
doc.EndUndo() # End the Undo buffer
Just a little note...
It was mentioned that this script just emulates the 'Link Active Object'
This goes one better - as you can jump the Editor Cam from Scene Cam to Scene Cam
AND continue editing the Ed Cam
If you Link to Object and move the Ed Cam - you also move the Linked Object / Scene Cam
Not what's wanted
ie This script allows you to flit around all the scene cameras and freely adjust the editor cam view without affecting the selected Scene Cam. Works best with key shortcut assigned to script.
On 05/03/2011 at 01:19, xxxxxxxx wrote:
Is it a bug
or just bad code?
On 05/03/2011 at 01:25, xxxxxxxx wrote:
Hm, seems like it's not possible to add an undo for the EditorCamera ..
On 05/03/2011 at 02:34, xxxxxxxx wrote:
At least I now know its not me !
On 07/03/2011 at 07:31, xxxxxxxx wrote:
deepshade ,you had already made this script very well!
Maybe we should not need to undo this, we just need to move our mouse or select other view, I think.
**** And when we need the camera view ,we just click the button of your plugin again.
I only can speak a little English, I hope you can understand what I said:)
Good luck for you.
On 07/03/2011 at 11:11, xxxxxxxx wrote: