Age | Commit message (Collapse) | Author |
|
|
|
Update doc-strings, add note for why this decision was made.
|
|
Running `bpy.ops.script.reload()` from Python was crashing
since the operator being called was it's self freed.
Change the reload operator to defer execution - as supporting
re-registration during execution is quite involved for a corner-case.
|
|
Useful for checking which operators are only for internal use.
|
|
|
|
`str.format` and `f-string` use was minimal.
Prefer using a single style of string formatting
unless an alternative is more widely adopted.
|
|
Contributed by @deadpin
Differential Revision: https://developer.blender.org/D7458
|
|
- Use addon keyconfig for registered tools so reloading the keymap
doesn't clear them.
- Ensure there is a default keymap, needed for addon keymaps
to be available in the user keyconfig.
|
|
|
|
|
|
|
|
In some cases the default data paths for blender does not exist.
For example on windows when using the portable install.
This would lead to errors when trying to lookup default paths in
is_path_builtin. Now we handle cases like this gracefully.
|
|
Also reduce scope of import.
|
|
Previously, you could delete presets that were part of the blender
default install. Now we check if the preset file resides in the bundled
file paths. If so, prevent deletion of the preset.
Reviewed By: Campbell
Differential Revision: http://developer.blender.org/D4522
|
|
Instead of checking for names that contain ".", only skip files
that start with a "." (since they're used for ".git" & ".arcconfig").
While other path names may fail to import, it's not the purpose of this
function to validate the path, have the caller must raise an error
instead of silently skipping them.
See D6140.
|
|
Append addon paths to the sys.path to avoid name
collisions with system modules.
|
|
|
|
The environment variable to locate system data-files was
ignored by toolbar icons.
Add bpy.utils.system_resource
to match Blender's internal data-file access.
|
|
Differential Revision: https://developer.blender.org/D5064
Reviewed By: brecht
|
|
Startup is the special case, so match against this instead of 'modules'.
|
|
This should really have been done together with API changes, simple
usage of grep does the trick to catch most places needing updates.
|
|
|
|
|
|
|
|
This mimics RNA style class registration,
keeping the same internal data types.
Currently there is a template which shows an example of adding a tool
group with a keymap.
Icon generation still needs to be exposed for general use.
|
|
When a keymap has an error loading, don't make it active
since it will be partially loaded and not usable.
|
|
App-templates & keymap names had their extensions removed twice.
Confusing for filenames containing dots.
|
|
(Part 1 was 00963afc14978b)
Does the following changes visible to users:
* Use panels and sub-panels for more structured & logical grouping
* Re-organized options more logically than before (see images in D4148)
* Use flow layout (single column by default).
* New layout uses horizontal margin if there's enough space.
* Change size of Preferences window to suit new layout.
* Move keymap related options from "Input" into own section.
* Own, left-bottom aligned region for Save Preferences button.
* Adjustments of names, tooltips & icons.
* Move buttons from header into the main region (except editor switch).
* Hide Preferences header when opened in temporary window.
* Use full area width for header.
* Don't use slider but regular number widget for UI scale.
* Gray out animation player path option if player isn't "Custom"
Internal changes:
* Rearrange RNA properties to match changed UI structure.
* Introduces new "EXECUTE" region type, see reasoning in D3982.
* Changes to panel layout and AZone code for dynamic panel region.
* Bumps subversion and does versioning for new regions.
RNA changes are documented in the release notes:
https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/Preferences_API
Design & implementation mostly done by @billreynish and myself.
I recommend checking out the screenshots posted by William:
https://developer.blender.org/D4148#93787
Reviewed By: brecht
Maniphest Tasks: T54115
Differential Revision: https://developer.blender.org/D4148
|
|
|
|
API is not ready for beta (likely to change).
|
|
Wraps `importlib.util`, avoids duplicate preset loading calls.
|
|
Currently the filenames are used when setting keymaps.
This hard coded naming meant the preset and setting function
need to be kept in sync.
Prefer to not have hard coded replacements which need to be duplicated.
|
|
This refactors loading of key configurations to clear and refill existing
ones, rather than adding a new one and then removing the old one.
This fixes broken loading of non-default configurations after recent changes,
and prepares for future changes to make it possible to dynamically change
key configurations based on user preferences.
|
|
Caused a crash on exit and isn't needed.
|
|
This should be purely an implementation change,
for end users there should be no functional difference.
The entire key configuration is in one file with ~5000 lines of code.
Mostly avoiding code duplication and preserve comments and utility
functions from the C code.
It's a bit long but for searching and editing it's also convenient to
have it all in one file.
Notes:
- Actual keymap is shared by blender / blender_legacy
and stored in `keymap_data/blender_default.py`
This only generates JSON-like data to be passed into
`keyconfig_import_from_data`, allowing other presets to load and
manipulate the default keymap.
- Each preset defines 'keyconfig_data'
which can be shared between presets.
- Some of the utility functions for generating keymap items still
need to be ported over to Python.
- Some keymap items can be made into loops (marked as TODO).
See: D3907
|
|
Added a module bpy.utils.toolsystem which only exposes ToolDef,
to avoid scripts referencing bl_ui internals.
|
|
|
|
|
|
Only include description in docstring.
Also avoid using op_get_rna.
|
|
|
|
Getting the instance leaks memory and was only meant to be used for
generating docs.
|
|
Conflicts:
source/blender/blenkernel/intern/collision.c
|
|
Differential Revision: https://developer.blender.org/D3668
|
|
Remove bpy.utils.register_module() & logic tracked RNA classes.
|
|
Instead of running code to create a keymap, store them as data.
This allows for keymaps to share content as well as running
transformations at load time.
|
|
|
|
|
|
|
|
|
|
|