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?
""" Ed2SceneCam .2 Written for CINEMA R12.032 Name-UK: Ed2SceneCam Description-UK: Set active Editor Camera to selected Scene Camera view """ # Transfer scene camera settings, if selected, to Editor Camera import c4d 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") return False else: if adraw.GetProjection()!=0: # checkk to see if perspective view is selected gui.MessageDialog("Please select a Perspective view") return False if (editorcamBC.GetType() == selected_obj.GetType()) and (adraw.GetProjection()==0) : doc.AddUndo(c4d.UNDOTYPE_CHANGE_SMALL,editorcamBC) editorcamBC.SetData(selected_obj.GetData()) editorcamBC.Message(c4d.MSG_UPDATE) editorcamBC.SetMg(selected_obj.GetMg()) c4d.EventAdd() doc.EndUndo() # End the Undo buffer if __name__=='__main__': main()
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.