In Search of Render

I wanted to start a running thread regarding my team’s current objective. As the first step in creating the scripting engine, we are trying to solve the following issue, brought up in this thread.

We’re currently trying to locate the render() function, and also isolate how values are recalculated. We’ve followed a few paths, and this is what we have so far. Any input would be MUCH appreciated.

PART 1: Locating the render() function.
render(), it turns out, is a pure virtual function on the Target abstract class. There are a few other classes derived from Target, and these have their own render functions. the Render object appears to have some connection to the Target class, as well.

PART 2: Following set_time
The set_time function is called on context, and that loops through all layers in the context. It modifies a parameter for storing the time on the Layer object. Parameters are stored in std::map objects, which are typedef’d to ParamList and DynamicParamList.

We reached the end of the line on everything for the set_time path except two things. One or both of those almost certainly link to the recalculation of parameters, though that code does not live in Layer. One of these is a mutable bool flag, dirty_time_, which is modified in four places on Layer. However, its value is never CHECKED on Layer. That would indicate that either it is depreciated (unlikely), or is being monitored by another function.

The other loose thread is the fact that Layer has multiple signals, one of which is for when a parameter changes. Since the time is being stored as a parameter, that may also be linked to calling a render.

I’ll try and keep this up to date as we keep looking, and again, any input or assistance would be most welcome.

From what I remember this signal is used only in UI application.

I think this will help: … sp=sharing
I did this when implemented Cairo render. I don’t know if it is still valid since latest changes from Ivan.

Wow, Carlos, that helps IMMENSELY! I’ll send this right on to my team.

I’m glad it helps.
Now I think on it I would make public all my Synfig stuff on google drive. I have not more free time to code and that situation will continue for some long time, so I would donate all that work with the community.
Let me check first if there is something of junk to remove there and then it will be published in a separated post in the general forum.

That would be fantastic. As I mentioned in my other recent post, we’re going to need to rewrite some aspects of the rendering system for a) efficiency reasons, and b) to pave the way for frame-by-frame (or, at least, a more complete frame-by-frame). I can see some significant areas where it can be made more efficient. (Again, those changes are intended to live in our fork. It’s up to ya’ll if you want to integrate them into the base project.)

Check here