Age | Commit message (Collapse) | Author |
|
Split out undo API from ED_util.h into ED_undo.h
|
|
- Use a single undo history for all operations.
- UndoType's are registered and poll the context to check if they
should be used when performing an undo push.
- Mode switching is used to ensure the state is correct before
undo data is restored.
- Some undo types accumulate changes (image & text editing)
others store the state multiple times (with de-duplication).
This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`.
- Each undo step stores ID datablocks they use with utilities to help
manage restoring correct ID's.
Needed since global undo is now mixed with other modes undo.
- Currently performs each undo step when going up/down history
Previously this wasn't done, making history fail in some cases.
This can be optimized to skip some combinations of undo steps.
grease-pencil is an exception which has not been updated
since it integrates undo into the draw-session.
See D3113
|
|
BLF is a low level module, which might (and is) used without Blender.
Thanks Campbell for review!
|
|
Steps to reproduce were:
* Open Blender (no need for factory settings, "Promt Quit" needs to be enabled)
* Edit the file (e.g. translate some object)
* Quit Blender but don't skip quit promt
* Press "Save & Quit"
* Save the file
Not sure if Windows supports the "Save & Quit" behavior, so this may not have
applied to Windows.
|
|
D566 by @januz
Use Blender native dialog when OS dialog's aren't supported.
|
|
Also minor cleanup.
|
|
|
|
Sync API changes from 2.8 to master.
|
|
Bug in recent refactor.
|
|
This is fully unreadable to have lots of boolean arguments scattered across the
whole argument list. What does `false, true, true` mean in terms of behavior?
Replace those with bitfield which has advantage of having more human readable
meaning.
|
|
|
|
When saving templates had wrong return value.
|
|
This was meant to be used for less general macros but was never used.
Rename BKE_BIT_TEST_SET to SET_FLAG_FROM_TEST
|
|
|
|
User preferences are now only loaded on...
- Initial startup.
- Factory-settings.
- Setting app-templates.
|
|
Own error in 7398b3b7
|
|
Fix some cases that still assumed there to be a global DPI, instead of a per
window DPI that needs to be set before reading U.dpi.
|
|
BLO_update_defaults_userpref_blend() was being run when no user preferences
were loaded from memory.
|
|
|
|
Changing from a loaded app-template back to Default (none set)
would scan paths for a file with no name. Harmless but silly.
|
|
|
|
Handle this in the operator
|
|
|
|
Useful for batch conversion and tests.
|
|
Allow auto-execution to be enabled,
also move this to user-prefs versioning code.
|
|
This adds the ability to switch between different application-configurations
without interfering with Blender's normal operation.
This commit doesn't include any templates,
so its mostly to allow collaboration for the Blender 101 project
and other custom configurations.
Application templates can be installed & selected from the file menu.
Other details:
- The `bl_app_template_utils` module handles template activation
(similar to `addon_utils`).
- The `bl_app_override` module is a general module
to assist scripts overriding parts of Blender in reversible way.
See docs:
https://docs.blender.org/manual/en/dev/advanced/app_templates.html
See patch: D2565
|
|
This is already called by wm_init_userdef, in old code
different initialization methods were used but now it's not needed.
Confusing since prefs are loaded in this function that don't initialize temp.
|
|
Logic in this function is a bit scattered,
minor changes to avoid confusion.
Also rename 'from_memory' to 'use_factory_settings'.
|
|
No reason startup/prefs would ever be blend-file relative.
|
|
|
|
Previously it would always load into 'U' global.
Needed for loading & merging template preferences.
|
|
|
|
|
|
Internal change needed for template support.
Loading the user preferences first so it's possible
for preferences to control startup behavior.
In general it's useful to load preferences before data-files,
so we know security settings for eg.
|
|
Not user visible, needed for switching templates.
|
|
Print in cosole a warning when we skip autosave due to runnning modal op.
Related to T49974.
|
|
Obscure regression in own commit from b34929786.
While this could be considered correct, it introduces a crash so disable the update call.
|
|
|
|
Operator would call `WM_file_read()` directly whith G.main->name as filepath, which
gets freed whith main during new reading of file... Now use a local copy instead.
|
|
- BKE_blender_version.h (only version defines & versionstr).
- BKE_blender_copybuffer.h (currently only used for view3d copy/paste).
- BKE_blender_undo.h (global undo functions).
- BKE_blendfile.h (high level blend file read/write API).
|
|
dedicated source files.
This commit adds a new `wm_files_link.c` which contains everything related to append/link code,
moved from `wm_operators.c` (rather small currently, but will expand quite a bit with future reload & asset works).
It also moves all load/save .bland files (and related userpref/startup stuff) from `wm_operators.c`
to `wm_files.c` (some helper funcs were already there).
This also makes `wm_operators.c` significantly lighter.
|
|
option is disabled.
See rB935e241fa6ea095493 for details of the issue, but first fix caused regression T47632.
So for now handling the issue in a localized way, this is not a real solution (since this could happen
in other cases), but will do for 2.77.
This commit is to be backported to 2.77.
|
|
prefs.
Now store the multisample setting each window was created with.
|
|
So scripts can call Save-As without adjusting 'Recent Files'.
Uses same logic and file reading,
|
|
|
|
have it.
|
|
Use BPY_execute_* prefix for all Python execution commands
|
|
When load-ui was disabled, resetting factory settings kept existing UI too.
|
|
This brings back old (slower), higher quality method.
Useful since graphics cards often use a faster MSAA which only oversamples edges.
|
|
Reduce code-paths so improvements to 3D view render apply to sequencer too.
|