Here’s a solution for finding the centre of an object which uses inkscape in combination with synfig. I will be using this vector file.
If you’ve already prepared your scene in another program e.g. inkscape this becomes easier. If not then you’re on your own! Make sure you have your units in Synfig set to px (probably can be done using synfig’s units but I’m not going to work that out).
In inkscape turn on “Snapping centres of bounding boxes”. Draw guides on the x and y axis and snap them to the centre of the object. Double-click on the guide and it’ll tell you the x/y position of the centre of the object (332.296,332.708px).
Write this down somewhere, but also note that inkscape’s 0,0 point is at the top-left of the screen. Now save it as an .sif file from Inkscape.
In Synfig first put your cog in a group layer. We can’t type in new origin values without it moving the whole group so we’ll use guides, enable snapping to guides, and then move the origin handle the grid point.
Synfig’s 0,0 point is at the centre of the screen, so we need convert the x/y placement of the guides in inkscape to match the coordinates system of Synfig. I don’t know if there’s an automated way of doing this so I did it manually by drawing guides in Inkscape to get the centre of the document and measuring the distance from them to the cog’s centre.
The updated guide positions for Synfig are at -119.38x200.08px. However, even though my units in Synfig are set to px the guides are still set to be in units. See here for more details: https://wiki.synfig.org/Canvas_MetaData_Panel . 1 unit = (image width in pixels)/(image area width) (see here for more details https://wiki.synfig.org/Unit_System). The document is 903x1065 and has an image area from -7.52689 - 7.52689, so 1 unit is 903/15.05378 = 59.984934017 .
With that info we can find out where to place our guides! The x guide should be at 200.08/59.984934017 = 3.334666667 and the y guide at -119.381÷59.984934017 = -1.989683333.
With the guides now showing where the middle of the cog is I should be able to drag the origin offset handle (the light purple handle) to the guides and it’ll snap to them. Well, yes and no. The origin offset handle itself will snap to the guides but of course the one we want to snap is the position handle itself (the green one). However if it is moved the whole group, objects and all, are moved.
I remember that in earlier versions of synfig I could hold Ctrl and click on the position handle to move it but I think the offset handle/light purple dot has replaced it(?).
So, I can now use this quite long method to get the centre of an object. I’d just have to repeat this for every object that I wanted to find the centre of…
Here’s my file if you want to try yourself
cogs_compressed.sifz (121.7 KB)