Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
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:
Hi all
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
Run Script 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.
On 05/03/2011 at 01:19, xxxxxxxx wrote:
Is it a bug or just bad code?
Anyone?
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:
cheers Nux
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:
Thanks Macant