Page MenuHome

Fix T87854: Add clamp option to Path Animation
ClosedPublic

Authored by Sebastian Parborg (zeddb) on May 14 2021, 7:31 PM.

Details

Summary

Previously, the "follow path constraint" and "follow parented curve" were clamped.
This restriction was lifted in rBcf2baa585cc8

Add back an option to get the old behavior in the "Path animation" settings.

@Sybren A. Stüvel (sybren) Should I just bump the file version or should I leave it in the "put stuff here until the next version bump" area?

Diff Detail

Repository
rB Blender

Event Timeline

Sebastian Parborg (zeddb) edited the summary of this revision. (Show Details)
Sebastian Parborg (zeddb) edited the summary of this revision. (Show Details)
Sebastian Parborg (zeddb) edited the summary of this revision. (Show Details)

The code looks good to me.

As for the versioning, I don't think it's a good idea to keep things in the "until the next version bump", so let's bump the file version. I don't know how this reflects on the files that have already been saved with some 3.0-alpha version, and what the policy is here. Maybe @Dalai Felinto (dfelinto) or @Campbell Barton (campbellbarton) can give us some guidance here?

This revision is now accepted and ready to land.May 20 2021, 1:12 PM
This revision now requires review to proceed.May 20 2021, 1:13 PM
Dalai Felinto (dfelinto) requested changes to this revision.May 20 2021, 2:13 PM

Regardless of 2.93/3.0 branches, the code as it is means it will run for every file, so any change you make will be lost. You need to do version bump. (increase BLENDER_FILE_SUBVERSION to 17).

Am I missing something here?

This revision now requires changes to proceed.May 20 2021, 2:13 PM

It was mostly just to check if we had some bulk rule for bumping file version now.
But you are correct, file version needs to be bumped.

I'll do that before I commit.

Is there any other things that I need to adress?

Am I missing something here?

My doubt was about what happens when:

  • The versioning code will be in the 2.93 checks, and
  • a file has already been saved with 3.0-alpha.

I think this means that the file won't be versioned (because it's newer than 2.93), so the CU_PATH_CLAMP won't be set.

Maybe we want to have the versioning code in both the 2.93 and the 3.0 versioning functions?

You could have the reverse issue now as well that you have a file where the user didn't want it to be clamped.
(Because it was created from scratch in 2.93 or 3.0)

We can't possibly make the right call for all the cases here.

My vote would just to have this in the 2.93 version.

I'm confused. I didn't expect this to be in the agenda for 2.93 since it doesn't seem to be addressing a critical issue. If you do need this in 2.93 you just need to be careful about version control when merging to master (for 2.93 itself is just a regular version bump).

We do something similar in versioning_290.c:
if ((!MAIN_VERSION_ATLEAST(bmain, 292, 14)) || ((bmain->versionfile == 293) && (!MAIN_VERSION_ATLEAST(bmain, 293, 1)))) {

This revision now requires review to proceed.May 20 2021, 4:54 PM

I just had a face-to-face chat with @Sergey Sharybin (sergey) about this, and he suggests:

  • Version such that 2.92 files opened in 2.93 work as before (so enable the clamp)
  • Treat files saved with some 3.0 build as fully made with 3.0, so don't version those.

This keeps things simple and predictable, so I agree with him here.

Update: I think we can just move the versioning code to the if (!MAIN_VERSION_ATLEAST(bmain, 293, 19)) { block; I don't think we need to bump the file version for this particular change, given that the actual change in behaviour was introduced earlier anyway.

Sounds good! I agree as well.

Do you want me to update the patch with those changes before you accept?

This revision was not accepted when it landed; it landed in state Needs Review.May 20 2021, 8:45 PM
This revision was automatically updated to reflect the committed changes.