![]() Here is a script (not a generator) that will show how to set keys: import c4dĭef SetKey (thatTime, obj, parameterDesc, value):Ĭurve = track.GetCurve() # always presentĬurrentKey = curve.FindKey(thatTime) # returns dictionary "key" (Key), "idx" (Index) Okay, I still have no clue why you are using a generator, especially when you are making changes to objects outside of the generated hierarchy. SecondKey.SetInterpolation(curveSpline,c4d.ALIGNTOSPLINETAG_POSITION) #tag = text_enteredįirstKey.SetInterpolation(curveSpline,c4d.ALIGNTOSPLINETAG_POSITION) TrackSpline = c4d.CTrack(tag, c4d.DescID(c4d.DescLevel(c4d.ALIGNTOSPLINETAG_POSITION, c4d.DTYPE_REAL, 0), c4d.DescLevel(c4d.ALIGNTOSPLINETAG_POSITION, c4d.DTYPE_REAL, 0))) Issue with updating a “Trim Paths” offset property value.Безымянный.png 1920x1038 392 KB import c4d.Tomas Bumbulevičius on Using a Point Controller instead of 2 separate sliders giving me an error Adobe After Effects Expressions.eleni trick on Move project to another Mac and other Resolve version DaVinci Resolve.Ann Bens on Spam? Letters to the COW Team.Ann Bens on Exporting 2.0 Stereo (Left Total / Right Total) Audio Adobe Premiere Pro.KeyDict.SetGeData(curve, camera) # Link the current camera to the keyĬanon Introduces New Era for Its EOS Webcam Utility Software, Bringing New Possibilities to Subscribers KeyDict = curve.AddKey(frameTime) # Add a new key to the curve Stage.InsertTrackSorted(cameraTrack) # Insert the trackįps = doc.GetFps() # Get the document framerateĬurve = cameraTrack.GetCurve() # Reference the track curveįor curSample in samples: # Iterate through sample listįrame = curSample # Get the inpoint of the sampleĬameraName = curSample # Get the sample cameraĬurCamera = doc.SearchObject(cameraName) # Find that camera in the projectįrameTime = c4d.BaseTime(frame, fps) # Parse the key frame to c4d time If not cameraTrack: # If there is no camera track, create itĬameraTrack = c4d.CTrack(stage, c4d.STAGEOBJECT_CLINK) # Create a track Stage = stageList # Select the first scene objectĭCamera = c4d.DescID(c4d.STAGEOBJECT_CLINK) # Reference to a cameraLink propertyĬameraTrack = stage.FindCTrack(dCamera) # Reference the camera link track If len(stageList) is 0: # Check if there are stage objects selectedĬ4d.gui.MessageDialog('Select a stage object') # If not, returnĮlif len(stageList) > 1: # Check if there are more than one object selectedĬ4d.gui.MessageDialog('Select only one stage object') # If there are, return StageList = doc.GetActiveObjectsFilter(True, c4d.NOTOK, 5136) # Find selcted stage objects # Set the keyframes from the samples object to the stage object The samples parameter is simply a list of dict values to reference the camera name and his inpoint: After some depth search I found the way to keyframe the stage object, down is the code snippet if somone needs something similar. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |