Files
test/source/blender/blenlib
Campbell Barton 8dbd406ea0 WM: various changes to file writing behavior
Saving with only a filename (from Python) wasn't being prevented,
while it would successfully write the file to the working-directory,
path remapping and setting relative paths wouldn't work afterwards
as `Main.filepath` would have no directory component.

Disallow this since it's a corner case which only ever occurs
when path names without any directories are used from Python,
the overhead of expanding the working-directory for all data saving
operations isn't worthwhile.

The following changes have been made:

- bpy.ops.wm.save_mainfile() without a filepath argument
  fails & reports and error when the file hasn't been saved.

  Previously it would write to "untitled.blend" and set the
  `G.main->filepath` to this as well.

- bpy.ops.wm.save_mainfile(filepath="untitled.blend")
  fails & reports and error as the filename has no directory component.

- `BLI_path_is_abs_from_cwd` was added to check if the path would
  attempt to expand to the CWD.
2021-12-16 16:27:35 +11:00
..
2021-10-06 14:54:05 +11:00
2021-03-29 19:11:17 -06:00
2021-07-20 11:12:24 +10:00
2021-01-11 14:59:05 +01:00
2021-01-11 14:59:05 +01:00
2021-01-04 17:38:11 +11:00
2021-10-18 12:13:10 +11:00
2021-10-20 09:19:21 +11:00
2021-01-04 17:38:11 +11:00
2021-01-15 12:17:11 +11:00
2021-01-11 14:59:05 +01:00
2021-12-13 16:22:20 +11:00
2021-07-07 13:42:46 +10:00
2021-10-03 13:44:44 +02:00
2021-09-24 14:42:48 +02:00