Age | Commit message (Collapse) | Author |
|
This will be helpful for some cleanups I'd like to do, including
removing the unecessary C API for OpenVDB and unifying some
attribute transfer code.
|
|
These operators shouldn't be available in the Asset Browser.
https://developer.blender.org/T83556
Added a comment to each operator poll assignment to explicitly mention
the intention. That should also remind devs to decide if the operator
should apply for both file & asset browsing when copy & pasting operator
definition code.
|
|
The operator to drop file paths into the File Browser was just checking
if there's an active window. This wasn't really an issue since the
operator was only used as drop-operator for the File Browser. But the
operator would show up in the operator search. Plus, for asset browsing,
we'll also have to check the file browsing mode, so the more specific
poll function will be needed.
|
|
|
|
|
|
* Early exit instead of complex if-else blocks.
* Avoid iterating over entire file list.
* Use `true`/`false` for boolean values.
* Declare variables in smaller scopes.
|
|
The Windows-specific "Register File Association" operator would show in
the search menu of other platforms. Decided to not disable it at
compile-time, like we do it with "Toggle System Console" (another
Windows-only operator), because that would require workarounds for the
translation tools. Instead the operator poll function always returns
false on unsupported platforms now.
|
|
The operator was register as a "file" operator, which are by convention
used for File Browser operators only. Move it to the "preferences"
operators, where it's displayed in the UI too.
|
|
This allowed custom ID-properties to share a name-space
with regular properties which won't work well as the names may collide.
|
|
The define that was tested no longer exists.
|
|
This partially reverts cb0b017d8f51: We can't store the asset handle in
the drag data, because the file pointer it wraps may be freed as the
Asset Browser generates its file list.
|
|
This isn't used at all in the current File and Asset Browser design.
|
|
|
|
|
|
In `BKE_appdir.h`, include `<stddef.h>` as that defines `size_t`. This
follows the "include what you use" principle, and makes it possible to
use `BKE_appdir.h` without having to bother with its dependencies.
No functional changes.
|
|
Also remove early return as it duplicates cleanup calls.
|
|
|
|
|
|
Registering a property could remove the existing property,
then fail to parse one of the arguments of the new property -
leaving the struct without a property.
Now freeing the existing property is deferred until immediately
before the new property is registered.
|
|
This gives useful context in errors,
also remove newline endings from exceptions.
|
|
|
|
- Use `default` instead of `def` abbreviation.
- Rename `BPYPropArrayLength` to `BPyPropArrayLength`
in keeping with other local structs.
- Remove _PyArg_Parser.fname value accidentally left in
(harmless as it's not used).
|
|
Needed in siturations when the input argument is needed for exception messages.
|
|
Macros were used for expanding shared logic for some properties.
Replace this with Python converters & a funciton that handles
deferred registration.
Add generic converter functions for RNA enums:
- pyrna_enum_value_parse_string
- pyrna_enum_bitfield_parse_set
|
|
After doing an import, the bounding box of the stroke was not calculated and any operation related to brushes (Sculpt, Weight Paint and Vertex Paint) was not working as expected because the bounding box of the stroke was wrong.
This problem was solved automatically after any edit operation, but must be solved in the import process.
|
|
This commit resolves these RNA warnings:
```
offset: "", WARN (bpy.rna): ...\source\blender\python\intern\bpy_rna.c:1505 pyrna_enum_to_py: current value '65536' matches no enum in 'FloatProperty', 'offset', 'subtype'
project_limit: "", WARN (bpy.rna): ...\source\blender\python\intern\bpy_rna.c:1505 pyrna_enum_to_py: current value '65536' matches no enum in 'FloatProperty', 'project_limit', 'subtype'
falloff_radius: "", WARN (bpy.rna): ...\source\blender\python\intern\bpy_rna.c:1505 pyrna_enum_to_py: current value '65567' matches no enum in 'FloatProperty', 'falloff_radius', 'subtype'
```
|
|
In the graph editor, Mirror Keys by Value would convert the value to mirror
over, to account for different units for linear & rotational properties.
The conversion was done in the different direction, though, resulting in
values that were too large by a factor of (180/pi)^2.
|
|
|
|
These should have been removed earlier but were forgotten.
|
|
It was somewhat arbitrary to have this one pass enabled that adds a bit of
additional memory and render time overhead, even though it's not necessarily
more important than others.
|
|
Before this, all asset view templates showing the same asset library
would show the same assets, even if they should show different ID types.
That was a major limitation since the design did forsee that this
template can be put anywhere in the UI to display various sub-sets of
assets.
Initially I did the ID type filtering close to the asset-list reading,
because I wanted to optimize reading so that we would only actually read
asset information from disk of the ID type to be shown. But this will be
quite complex and I'm not sure if I'll get to work on this anytime soon.
So this commit moves the filtering to the template display level solving
this limitation.
Note: This also adds the code to filter by tags, together with the ID
type. But it's not actually used anywhere yet.
|
|
From what I can tell there is no reason anymore to do this. The design
has changed since this was added.
|
|
Was already doing some sanity checks, but wasn't checking if the passed
property actually is a collection property, which is important.
|
|
This iterator was introduced before `AssetHandle` existed, so it was
dealing with the file data directly. Now we want as little code as
possible to deal with the file data, all access should happen via the
`AssetHandle`.
|
|
Was mixing 4 and 2 space indent in a single file.
|
|
When `BLI_task_parallel_mempool` does not use threading, the
`userdata_chunk` is allocated locally simulating a TLS.
However `func_reduce` is not called so the original chunk is ignored.
`task_parallel_iterator_no_threads` is another function that doesn't call
`func_reduce`. It also ignores `userdata_chunk_local` in the main iterator.
The solution in these cases is not to create a `userdata_chunk_local`.
This fixes T90131
Differential Revision: https://developer.blender.org/D12067
|
|
The preview was always using frame 1, but maybe the object has changed and it's better create preview using the current frame.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D12018
|
|
Introduced in 3964785a1458
|
|
These functions are unused currently..
Reviewed By: deadpin, jbakker
Differential Revision: https://developer.blender.org/D11968
|
|
Add overlay option to disable grid drawing.
Reuse drawing code from other editors (timeline editor)
Add argument `display_minor_lines` to function
`UI_view2d_draw_lines_x__discrete_frames_or_seconds`
This way minor line drawing can be disabled and so it doesn't cause
too much visual noise. Also spacing seems to be too fine, so VSE uses 3x
what is defined in preferences.
Reviewed By: fsiddi, Severin
Differential Revision: https://developer.blender.org/D11790
|
|
Snapping by default goes against convention, so this setting was
re-evaluated. Also snapping by default can conflict with new image
transform system, see T90156
There wasn't consensus, so disable snapping by default to follow
established convention.
ref T89665
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D12054
|
|
Calculate frequency of time/frame label drawing, such that labels have
at least 10px margin and don't overlap.
Change timecode format:
- Use at least `mm:ss` format
- Don't display frames if all labels would end with +00
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D11792
|
|
The channel box selection was offset for grease pencil layers.
This is a proposed fix by @yann-lty
Before:
{F10227973}
After:
{F10227974}
Reviewed By: #grease_pencil, antoniov
Maniphest Tasks: T89952
Differential Revision: https://developer.blender.org/D11962
|
|
|
|
Missing length check on the size argument before copying it
into a fixed size buffer.
|
|
Oversight in 2453dc1b0ecad21a84b45e8c900a16cc42fa12f1.
|
|
- Multi-dimensional boolean, int and float vector types are supported.
- A sequence of int's for the "size" is used to declare dimensions.
- Nested sequences are required for default arguments.
Now it's possible to define matrix properties, for e.g:
bpy.props.FloatVectorProperty(size=(4, 4), subtype='MATRIX')
|
|
Add array conversion functions that take dimension arguments.
- PyC_AsArray_Multi (version of PyC_AsArray).
- PyC_Tuple_PackArray_Multi_* (version of PyC_Tuple_Pack_*).
|
|
|
|
When viewing font files in the File Manager, this patch uses the font's
family and style names to show the same type of string shown to users
in operating system lists. For example "Book Antiqua Regular" instead
of "BKANT.ttf"
see D12020 for details and examples.
Differential Revision: https://developer.blender.org/D12020
Reviewed by Campbell Barton and Julian Eisel
|