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

The PluginCafé is a discussion and support forum for MAXON Cinema 4D plugin developers.
For general information on Cinema 4D visit our corporate website.
All available resources can be found on our Developers' Blog.
Before posting, please make yourself familiar with the forum rules and conduct:
About This Forum;
Forum Rules & Conduct;
How to Post Questions;
Developer Support.
With regard to the new functionalities delivered with this board, please visit:
About Tags and Tagging;
Q&A New Fuctionality.
Please post your questions on using the Melange library in this forum.
General information on the Melange library can be found here.
The Melange documentation is available here.
Please use the following tags in your threads:
R19, R20 : the used Melange library version;
microsoft windows, apple macos : the development environment.
Cheers,
MAXON's SDK Team

Start discussing about programming, 3D, algorithms and follow-up in presenting your amazing works

25Topics

96Posts

Hi all
Update 1.2.3b
Only one version for C4D R13 to R20 ;)
The above-ground level can be specified in a different unit of measurement from that configured in the C4D preferences.
Parametric, Polygonal, Nurbs, Generator (array, atomarray etc...) objects can be moved.
I'm debugging for Null and Spline;)

On 31/08/2018 at 07:42, xxxxxxxx wrote:
I can't seem to figure out how to get
MSG_DOCUMENTINFO_TYPE_SAVE_BEFORE
to trigger.
I would like to save some info to an Annotation tag, but only right before the user saves the document.
Tried to put it in Message() but couldn't figure out if Message can stand by itself or if it has to be in a NodeData class?
class SampleClass(plugins.NodeData) :
def Message(self, node, type, data) :
if type == c4d.MSG_DOCUMENTINFO:
if data['type'] == c4d.MSG_DOCUMENTINFO_TYPE_SAVE_BEFORE:
print "Document is about to save"
return True
return True
Thanks