Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-03-15WM: fallback to regular writing if auto-save can't access undo dataCampbell Barton
While this is very unlikely, always write the autosave file, even if the `memfile` undo data is unexpectedly NULL. Also use CLG for logging warnings.
2021-03-15Cleanup: refactor auto-save timer usageCampbell Barton
- Split out auto-save file writing from timer code. - Add wm_autosave_timer_begin so there are both begin & end functions. - Replace WM_event_add_timer/WM_event_remove_timer with begin/end calls.
2021-03-15Cleanup: remove unused auto-save read functionCampbell Barton
Also make wm_autosave_location a static function.
2021-03-15Cleanup: replace 'timer_ended' with 'timer_end'Campbell Barton
The previous naming made it seem as if the timer had already ended where as this function ends the timers.
2021-03-15Writefile: only include recovery info in auto-save & quit.blendCampbell Barton
Previously all blend files included the path they were saved, causing files distributed publicly to include users local paths. This also included developers home directories for startup & userprefs defaults & app-templates bundled with Blender. Now recovery information is only written for auto-save & quit.blend since this is the only time they're intended to be used.
2021-03-15Cleanup: rename G_FILE_RECOVER -> G_FILE_RECOVER_READCampbell Barton
No functional changes, make room for a write equivalent.
2021-03-12Cleanup: set the window manager to the updated context on loadCampbell Barton
While this happened to be corrected by code that runs afterwards, leaving this in an invalid state could cause problems in the future.
2021-03-11Fix regression in 2cc5af9c553cfc00b7d4616445ad954597a92d94Campbell Barton
The check for undo-depth increment/decrement assumed a newly loaded window manager would have a different pointer. This broke bl_animation_fcurves test indirectly, the change to undo-depth caused the redo panel to attempt to popup in background mode - which isn't supported. Now the pointer is unchanged, the undo-depth is assumed to match the value used when calling the operator. The undo-depth is now properly maintained between file loads, which is an improvement on the original behavior which reset it.
2021-03-11Fix T86431: Keep memory location of the window manager on file loadCampbell Barton
Keep the pointer location from the initial window-manager between file load operations. This is needed as the Python API may hold references to keymaps for e.g. which are transferred to the newly loaded window manager, without their `PointerRNA.owner_id` fields being updated. Since there is only ever one window manager, keep the memory at the same location so the Python ID pointers stay valid. Reviewed By: mont29 Ref D10690
2021-03-11WM: keep the current state when a blend fails to loadCampbell Barton
Previously many operations would run on file load, even if the file did not load. Pre/post load handlers were called, timers canceled, all undo data freed, editors exited ... etc. Now keep the blend file in it's current state. This simplifies updating this area of code as there is one less possible situation to account for.
2021-03-11Cleanup: split file read and setup into separate stepsCampbell Barton
Currently file loading performs almost all reloading logic even in the case loading the file fails, causing the file to be in a state that isn't well defined: undo is cleared, timers are canceled & scripts are re-registered.
2021-03-11Cleanup: file loading/recover checksCampbell Barton
- Don't set G.relbase_valid until the file is loaded. - Remove unnecessary string pointer comparison. - Remove unused filename being passed to 'setup_app_data'.
2021-03-05Cleanup: Use boolean in WM_cursor_waitAntonio Vazquez
2021-03-04Fix Saving startup file changing paths of the current fileCampbell Barton
Saving the startup file now uses "Save Copy", so paths are preserved.
2021-03-04Fix T86231: Saving startup file always remaps relativeCampbell Barton
2021-02-22UI: Remove Blend Thumb PassepartoutHarley Acheson
Removal of 'camera frame' around blend file thumbnail images. Differential Revision: https://developer.blender.org/D10490 Reviewed by Brecht Van Lommel
2021-02-21Fix memory leak when loading previous preferences from splash screenJulian Eisel
When opening a Blender version for which there are no preferences, the splash shows a button like "Load 2.92 Settings". Using this could cause a memory leak of the storage for recently opened files.
2021-02-16Fix reloading preferences ignoring 'script_directory'Campbell Barton
Reloading preferences didn't update Python's `sys.path` to account for the modified `script_directory`. This meant the operator to load settings from a previous version required a restart to initialize Python when this directory was set.
2021-02-10Fix T85395: Texture paint external edit wrong projection on reapplyPhilipp Oeser
Caused by rB5b34d11b55e0. Above commit restored the view matrices in ED_view3d_draw_offscreen _before_ they can be stored in the ImBuff (see ED_view3d_draw_offscreen / texture_paint_image_from_view_exec). Now make restoring the view matrices optional and dont do this in case of reprojection, so the used matrices can still be saved in the ImBuff later. Reviewed By: campbellbarton Maniphest Tasks: T85395 Differential Revision: https://developer.blender.org/D10331
2021-01-26Fix T85011: "Allow Execution" reloads the wrong file when recoveringCampbell Barton
Support custom revert actions, necessary for recover operations to be able to reload the file with scripts enabled.
2021-01-26WM: add "use_scripts" to recover auto-save/session operatorsCampbell Barton
Support recovering blend files with scripts enabled, needed to fix T85011, can be useful in general too. Adding this also resolves an assert in BKE_autoexec_match, since it ran even when scripts were enabled.
2021-01-26WM: return success from WM_recover_last_session, minor cleanupCampbell Barton
- Return success from WM_recover_last_session - Avoid setting global variables is already called in WM_file_read. While it didn't cause any problems, these assignments ran even when recovering the session failed to load the file. - Return OPERATOR_CANCELLED when the operator fails. Returning success is needed to fix T85011.
2020-12-13UI: Improved Script Execution WarningYevgeny Makarov
New dialog box layout with large alert icon for the Python script execution warning popup. Differential Revision: https://developer.blender.org/D9390 Reviewed by Hans Goudey
2020-12-06UI: Alert Dialog Helper FunctionYevgeny Makarov
Shared helper function to create a split layout with an alert icon for popup dialogs. Differential Revision: https://developer.blender.org/D9486 Reviewed by Julian Eisel
2020-12-04Cleanup: Use LISTBASE_FOREACH macro in windowmanager internHans Goudey
Also decrease the scope of variables related to the loops.
2020-11-22Fix T82918: File menu "Save Copy" shows "Save As" in File BrowserJulian Eisel
Use a dynamic name/description based on the set properties. This makes it more clear what's going on and avoids confusion, as explained in the report.
2020-11-03Fix C operators can't set default display or sort type for File BrowserJulian Eisel
`WM_operator_properties_filesel()` allows C operators to set a display or sort type for the File Browser to use. But the File Browser would always override that because of an invalid `_is_set()` check. (The operators don't actually set the value, they only set the property's default value.) The only operator affected by this is "Recover Auto Save". It is supposed to show a vertical list ordered chronologically. It used settings from the previous File Browser usage before this patch. Operators using the File Browser should generally use `FILE_DEFAULTDISPLAY`/`FILE_SORT_DEFAULT` now, except if they have a reason not to. See comments at their definition. ---- This makes it so operators that set a different display or sort type don't change the sort or display type for the next File Browser operation. So using "Recover Auto Save" entirely isolates display and sort type from other operations. Differential Revision: https://developer.blender.org/D8598 Reviewed by: Bastien Montagne
2020-10-31Cleanup: clang-formatLukas Stockner
2020-10-29UI: Improvements to Close File DialogYevgeny Makarov
Improved alignment of items on the File Close Dialog. Differential Revision: https://developer.blender.org/D6938 Reviewed by Hans Goudey
2020-10-28UI: Misc Label and Description ChangesYevgeny Makarov
Various changes to some labels and descriptions to be more accurate, clear, or less confusing. Differential Revision: https://developer.blender.org/D8394 Reviewed by Hans Goudey
2020-10-18Fix for T81400: Block Width CorrectionsHarley Acheson
Scale widths of popovers and dialogs with Text Style font point changes. Differential Revision: https://developer.blender.org/D9132 Reviewed by Hans Goudey
2020-10-15Cleanup: use defined sizes when accessing file date/timeCampbell Barton
Also add static assert for struct size assumption.
2020-10-14UI: Show more information in open file tooltipJuanfran Matheu
This shows the file's full path, its modification date, and its size in the tooltips for the open recent fiels menu. When no file path is set, the original operator description is used. Differential Revision: https://developer.blender.org/D9028
2020-10-13UI: Monochrome Alert Icons and use the Question icon in the Quit dialogYevgeny Makarov
Change to monochrome version of the large alert icons and use 'Question' for the the Quit Confirm dialog box. Differential Revision: https://developer.blender.org/D9062 Reviewed by Pablo Vazquez
2020-10-04Preferences: use the users temp directory in background modeCampbell Barton
This choice was made when preferences were not read in background mode, so the temp dir needed to be initialized with something. See bc9848f7e67c3e695403179f8bcdb78b0e5764a3. Now preferences are always read there is no reason to ignore this particular preference in background mode. Anyone wanting to do background renders that ignore their preferences can run with factory startup.
2020-10-03Cleanup: remove unused temp directory initializationCampbell Barton
This last worked in v2.27 (2003) where all paths were initialized to "/" which was still checked to initialize the temp directory. This hasn't been the case since 932e9e831647604e0b129b55e5ab035 where it changed to "/tmp/", then an empty string (current default).
2020-10-03readfile: always run setup_app_data after updating defaultsCampbell Barton
When blend files were loaded with app-templates, setup_app_data was running before defaults were updated. This is likely to cause problems with order of initialization so always update the startup file beforehand.
2020-10-03Cleanup: run UserDef versioning from readfile.cCampbell Barton
Now versioning UserDef is run in readfile.c, as is done for other Blender data. Previously versioning was mixed with other run-time initialization, so it needed to be called later by the window manager.
2020-10-02Fix userpref.blend using version from startup.blendCampbell Barton
Version patching userpref.blend wasn't using the correct version, causing settings not to be properly updated. This seems the likely cause of T70196 and similar bugs.
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-02WM: add use_factory_startup option to read homefile operatorCampbell Barton
There was no way to reset the current file to factory settings without reloading the preferences (which disables & re-enables add-ons), this slows down resetting files and can complicate tests.
2020-08-26Cleanup: better naming and no bad level access in BLI_winstuffBrecht Van Lommel
2020-08-17Cleanup: split BPY_run_string_ex into two functionsCampbell Barton
Using a boolean to select between eval/exec behavior wasn't very readable.
2020-08-17Cleanup: move Python script execution into BPY_extern_run.hCampbell Barton
This commit renames 'execute' to 'run' because: - This follows Python's "PyRun" which these functions wrap. - Execution functions can use either exec/eval modes, making naming awkward (for future API refactoring).
2020-08-17Cleanup: split BPY_extern_python into it's own headerCampbell Barton
Currently BPY_extern.h includes too much mixed functionality.
2020-08-07Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete)Sybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenlib` module. Not all warnings are addressed in this commit. No functional changes.
2020-08-01Cleanup: use term init instead of initialize/initialiseCampbell Barton
The abbreviation 'init' is brief, unambiguous and already used in thousands of places, also initialize is often accidentally written with British spelling.
2020-07-13Fix T78037: fresh install of blender 2.83.0 not able to save user startup file.Bastien Montagne
Simply remove that check ob userdef's themes, we are never read any userdef from startup file anymore, so this check makes no more sense. To be backported to 2.83.
2020-06-30Fix T77825: autosave missed too often while sculptingBrecht Van Lommel
Previously if a modal operator is active, which might leave Blender in a state where it's not safe to autosave, it would try again in 10s. Now try again in 10ms so it's much less likely to be missed, since overhead of such a timer is negligble anyway. Also remove the debug print that was added to investigate a bug at some point.
2020-06-23Cleanup: rename Library.filepath to filepath_absCampbell Barton
Make it clear that this is the absolute path, allow the 'name' to be renamed to 'filepath'. Rename is safe since this is only for run-time.