Page MenuHome

Incrementing the filename number changes the filenames starting number which changes context e.g. 2D to 3D
Closed, ArchivedPublic

Description

System Information
Operating system: Darwin-18.2.0-x86_64-i386-64bit 64 Bits
Graphics card: NVIDIA GeForce GT 750M OpenGL Engine NVIDIA Corporation 4.1 NVIDIA-12.0.21 355.11.10.50.10.103

Blender Version
Broken: version: 2.80 (sub 51), branch: blender2.7, commit date: 2019-03-21 23:13, hash: rB1ae6aaad43ad
Worked: (optional)

Short description of error
Using the plus sign to increment the filename number incrementally changes the original filename "2D_texturing" to "3D_texturing", etc. effectively replacing the first number in the filename incrementally.

I expected the filename "2D_texturing" to be "2D_texturing1" or "2D_texturing-1".

Exact steps for others to reproduce the error

  1. File -> Save
  2. Save filename as "2D_animation"
  3. File -> Save-as
  4. Click on [+] increment button next to file name, Cancel.

Result: Filename should now be "3D_animation" — which changes the context of the file.

Details

Type
Bug

Event Timeline

Does Blender also change the 2D content to 3D ?
/me ducks while confirming the bug.

A bit of testing shows that Blender is incrementing the last number in the filename.
Examples:
3d-content-1.blend -> 3d-content-2.blend
3d-content-1.1.blend ->3d-content-1.2.blend

If there is no number, then a digit is appended before the .blend extension
foo.blend -> foo1.blend

I would be tempted to call this a quirk rather than a bug, but others can decide
Behavior is confirmed.

Does Blender also change the 2D content to 3D ?

It actually changes the content all the way up to the 7th dimension and then things get a little weird 8^)

Yeah, appending a number manually and then incrementing from there it works as expected but otherwise, it overrides the first number in the filename which is a little wonky.

Generally speaking, it also doesn't take into account the latest in the filename number sequence — e.g. if untitled and untitled2 exist, it'll create untitled1 first, and then untitled3 after rather than untitled3 from the start — but that's more so a quirk than this in my opinion.


Sebastian Parborg (zeddb) triaged this task as Confirmed, Medium priority.Sat, Mar 23, 6:39 PM

@Brecht Van Lommel (brecht) I think it might be hard to do the right thing automagically in these cases. Is this something should look at?

I've been thinking about this a bit and tl;dr:
it is a paper cut and not a bug.

The design goal is incrementing a version number at the end of the filename, before the extension. If the version number doesn't exist, append one.

Rather than searching thru the entire filename looking for a number, we could limit the search to, say, 4 or 5 characters starting from the .blend extension. This would leave 2d-stuff.blend untouched, becoming 2d-stuff1.blend, but still allow foobar-1a.blend to become foobar-2a.blend.

Dealing with gaps in the numbering sequence is beyond the scope of this feature. We're not building an AI file renamer, we just want to bump a version number.

NOTE: I personally think incrementing numbers not at the end is a recipe for problems and should not be done. Keep it Simple.

The heuristic could be improved here, but I don't consider this a bug.