Stroboscope Layer inside of Paste Canvas works!

I’ve got Stroboscope Layer to work inside of Paste Canvas!

After invoking “git grep timeloop” I have found this line:


synfig-core/src/synfig/Makefile.am:     valuenode_timeloop.cpp \
synfig-core/src/synfig/context.cpp:        (*context)->get_name() == “timeloop”))
synfig-core/src/synfig/valuenode.cpp:#include “valuenode_timeloop.h”

Looking into synfig-core/src/synfig/context.cpp I have found a special case for TimeLoop layer:

	while(!(context)->empty())
	{
		// If this layer is active, and
		// it either isn't already set to the given time or
		//           it's a time loop layer,
		// then break out of the loop and set its time
		if((*context)->active() &&
		   (!(*context)->dirty_time_.is_equal(time) ||
			(*context)->get_name() == "timeloop"))
			break;

		// Otherwise, we want to keep searching
		// till we find either an active layer,
		// or the end of the layer list
		++context;
	}

After that it was simple to make Stroboscope Layer work inside of Paste Canvas as expected:

---------------------- synfig-core/src/synfig/context.cpp ----------------------
index 28d8e41..4da071e 100644
@@ -321,11 +321,13 @@ Context::set_time(Time time)const
 	while(!(context)->empty())
 	{
 		// If this layer is active, and
-		// it either isn't already set to the given time or
-		//           it's a time loop layer,
+		// it either isn't already set to the given time
+		//        or it's a stroboscope layer,
+		//        or it's a time loop layer,
 		// then break out of the loop and set its time
 		if((*context)->active() &&
 		   (!(*context)->dirty_time_.is_equal(time) ||
+			(*context)->get_name() == "stroboscope" ||
 			(*context)->get_name() == "timeloop"))
 			break;
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: