THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/09/2004 at 05:15, xxxxxxxx wrote:
Cinema 4D Version: 8.100
Language(s) : C.O.F.F.E.E ;
I'm trying to animate procedurally PointObjects (meshes and splines), changing the points' coordinates via COFFEE. The code updates the coordinates with op->SetPoints(), and calls op->Message() with MSG_POINTS_CHANGED and MSG_UPDATE.
It works very well, but the animation is visible only in the editor and no movements happens in preview.
Have some suggestions?...
On 21/09/2004 at 11:52, xxxxxxxx wrote:
Where do you change the points, i.e. in what function? Have you verified that the code is called during rendering? (You can try inserting println() to test this.)
On 22/09/2004 at 01:02, xxxxxxxx wrote:
I made various attempts with a COFFEE expression and with a COFFEE node in an Xpresso (the most interesting for me). In both cases the points are changed in the main() function and now:
1. With the COFFEE expression it works well, in editor and in rendering.
2. With the COFFEE node in Xpresso it works only in editor, not in rendering.
3. In both cases the code is called during rendering (println() placed at the end of the code outputs strings on the console).
On 24/09/2004 at 09:09, xxxxxxxx wrote:
I tried using an ExpressionPluginTag, updating the points in the Execute() function. As in the Xpresso case, the animation is visible in the editor but not in rendering.
On 25/09/2004 at 02:31, xxxxxxxx wrote:
After a lot of trying, it seems a more general problem. It appears that references to scene objects behave differently in editor and in rendering.
For example, I wrote an ExpressionPluginTag that mantains a spline attached on a PolygonObject's vertex. The plugin class has a member that store the reference to the object on which the spline has to be attached. The reference works well in editor, but is lost during the rendering. I tried to reassign him in the Execute function, using sometime like
objReference = doc->FindObject(PolygonObjectName);
and it works in rendering. But if in scene there are two or more splines with my tag, only the first works well, while the others fails the FindObject() and so doesn't works (only in render, in editor it's all ok).
In my plugin both MultipleAllowed() and DisplayAllowed() returns TRUE. I made some attempts modifying also the Copy() function, and it seems have an effects on rendering, but I never saw the plugin works at 100%.
Unfortunately the lack of COFFEE documentation doesn't help...