Create Detailed Xpresso Node Preset
This post has already been read 1610 times!
In this lesson we will try to figure out creating detailed xpresso node preset with total frame count / seconds current frame / second outputs via C.O.F.F.E.E. Script in Cinema 4D…
Although there is a useful Time node in Cinema 4D Xpresso it still does not give total frame count directly. Manually if we want to calculate total frame count in scene, we should multiply End value with a FPS. So let’s say our scene’s time is 3 seconds. And our FPS is 30. We should multiply these values to find out total frame count in scene.
So to make things simple I decided to create a simple basic Time node preset for me to help my future projects and wanted to share with you.
The only thing we need to create a C.O.F.F.E.E. node in our Xpresso editor. After delete default input, output values. ( We don’t need them in our case.)
Add those values as “Real” Type : current_second / current_frame / totalframes / totalseconds.
And now it’s time to add our script in our C.O.F.F.E.E. node;
var doc = GetActiveDocument();
var t = doc->GetTime();
totalseconds = doc->GetMaxTime()->GetSecond();
current_second = float(t->GetSecond());
current_frame = t->GetFrame(doc->GetFps());
totalframes = (doc->GetFps())*totalseconds;
Now you can save your preset for future uses by creating new x-pool edit menu, or if you have previous preset folder you can simply drag and drop your node under this folder.