C4DLounge.eu - Cinema 4D Gebruikers Forum  

Go Back   C4DLounge.eu - Cinema 4D Gebruikers Forum > Beginner hoekje - Beginner Corner > Beginners forum

Reply
 
Thread Tools Display Modes
  #1  
Old 4 Weeks Ago
Zebru Zebru is offline
Junior Member
 
Join Date: Feb 2019
Posts: 1
Default Python script sync with timeline

Hello!

I'm new to the forum so hopefully this is the right place to ask

I'm using the fOSC pluggin (https://github.com/fillmember/fOSC) to read an external timecode (basically, the frame number position of another program) in c4d.

This plugin stores the variable into a null object X position so Iíve written this code for it:

def main:
obj = op.GetObject()
frame = obj[c4d.ID_BASEOBJECT_REL_POSITION, c4d.VECTOR_X]
fps = doc[c4d.DOCUMENT_FPS]
time = c4d.BaseTime (frame, fps)
doc.SetTime(time)
c4d.EventAdd()

The thing is that the timeline cursor moves accordingly but the scene is not updated (EventAdd seems not to work) and moreover: this happens on a PC but on a MAC it works. And of course I have to use a PC

Someone has any idea on whatís going on?

Thank you very much in advance!

Zebru
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +2. The time now is 04:43.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Met trots gehost door Webdesign bureau Graphic Violence.
(c) C4DLounge.eu . All documents on this forum are owned by their respective creators and may not be sold or republished in any way.