Skip to content

Conversation

@pgilfernandez
Copy link

@pgilfernandez pgilfernandez commented Oct 4, 2025

Merge circle "horizontal radius" and "vertical radius" into a single double "radius" with "x" and "y" values:

Screenshot 2025-10-04 at 16 09 14

It breaks indeed compability with old Friction files... I guess this needs more work to ensure old projects are able to be updated to the new "circles"...

Related with issue #529

@pgilfernandez pgilfernandez marked this pull request as draft October 4, 2025 14:19
@pgilfernandez
Copy link
Author

I'm stuck at the moment I need to check the version when opening a file so that if it's old it loads the old circle radius variables and store them as the new format... it's the very first time I do something like this, could you help me or drop me a clue where or how to do it?

thanks

@rodlie
Copy link
Member

rodlie commented Oct 6, 2025

We can look into this after v1.0. I don't want to mess with the file format at this point.

You will not be able to add this feature without breaking file format compat, so you will need to handle old and new, and that might be tricky.

See

    void prp_writeProperty_impl(eWriteStream& dst) const;
    void prp_readProperty_impl(eReadStream& src);

in StaticComplexAnimator.

But, I think the easiest way to handle this is to keep

qsptr<QPointFAnimator> mHorizontalRadiusAnimator;
qsptr<QPointFAnimator> mVerticalRadiusAnimator;

and switch between mHorizontalRadiusAnimator/mVerticalRadiusAnimator and mRadiusAnimator based on file format version. If old file format get values from the old variables, if new just ignore or something like that.

@rodlie rodlie added this to the 1.1.0 milestone Oct 6, 2025
@pgilfernandez
Copy link
Author

Yes, I agree this is something for v1.1, I'll continue exploring it, thanks for the tips

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants