Age | Commit message (Collapse) | Author |
|
The file selection parameters (e.g. `context.space_data.params`) are
expected to be unset in certain cases. Reading 2.4 files seems to be one
of them. Hence, code using it should check it's set first. Also added an
assert to a File Browser UI template printing a message when the
parameters are unset, to help debugging the issue.
|
|
Only the "changed" state from the last edit-object was used,
this meant the operator would not perform the necessary update
with multi-object edit-mode.
Use "changed" & "changed_multi" naming convention.
|
|
|
|
Even though lights were part of `SceneStats`, they were not used when
rBfd10ac9acaa0 was committed.
This patch adds the light count back into the statistics. When a light is
the active object, it will display the total number of lights in the
scene, as well as how many lights are currently selected.
{F10141354}
Reviewed By: #user_interface, Severin, Blendify, harley
Maniphest Tasks: T88512
Differential Revision: https://developer.blender.org/D11387
|
|
This reverts commit 0b903755a9908344e9fcb4a33b4f0340abeb9386.
This caused T86030, left-mouse selection override clicking,
which is used for creating a full revolution.
|
|
For T78995 we want to change the data structure of keylists to
improve performance. (Probably a Vector with bin-search capabilities).
This patch hides the internal structure of the keylists behind `AnimKeylist`
structure. This allows us to change the internals without 'breaking' where it is
being used.
The change adds functions to create, free, find and walk over the
keylist.
Reviewed By: sybren
Maniphest Tasks: T78995
Differential Revision: https://developer.blender.org/D11974
|
|
Currently when dropping an asset the first material slot is always updated.
This patch changes that logic to update the active material slot.
In future the behavior will be updated to use the material slot of the face under the cursor.
That requires better feedback tot he user.
Reviewed By: Severin
Maniphest Tasks: T90372
Differential Revision: https://developer.blender.org/D12056
|
|
|
|
Setting normals from faces wasn't weighting the faces contribution
by the corner angle, giving lop-sided results in some cases.
This removes the epsilon check for CLNORS_VALID_VEC_LEN,
in favor of matching the behavior of vertex normals exactly.
|
|
Because mesh vertex and face normals are just derived data, they can
be calculated lazily instead of eagerly. Often normal calculation is
a relatively expensive task, and the calculation is often redundant
if the mesh is deformed afterwards anyway.
Instead, normals should be calculated only when they are needed. This
commit moves in that direction by adding a new function to tag a mesh's
normals dirty and replacing normal calculation with it in some places.
Differential Revision: https://developer.blender.org/D12107
|
|
Don't include active strip in this operator.
This was confusing due to name of operator and inconsistent with other
editors.
|
|
Caused by {rBbbb2e0614fc3}
Since above commit only the playhead is updated as an overlay in
animation playback (was moved out of drawing of the main region for
perfomance reasons).
The driver value "debug" visualization is very useful to have during
playback though but was left in main region drawing as part of
`draw_fcurve` (thus does not update in realtime anymore).
Moving `graph_draw_driver_debug` into the overlay is not feasible
because it requires animation filtering which has significant overhead
which needs to be avoided in the overlay which is redrawn on every UI
interaction.
Now tag the whole main region for updates in the Driver Editor during
playback instead (which will make the Drivers Editor as slow during
playback as before rBbbb2e0614fc3 -- but with realtime updates of the
debug visualization).
Maniphest Tasks: T87041
Differential Revision: https://developer.blender.org/D12003
|
|
Add a context menu dedicated to asset operations to the Asset Browser.
There are two separate context menus to keep things separated well and
avoid confusing if-else logic (similar to D12057 & D12059). Their polls
make sure they are displayed for the right contexts only.
Also (to be committed as followup cleanup): Remove now unused special
handling for assets in file delete operator.
Differential Revision: https://developer.blender.org/D12062
|
|
Originally the operator name was drawn next to the dragging content.
After that there was an option to add custom, static text with the
dragging content. This patch allows dynamic text to be drawn.
The custom text was implemented as out parameter of the poll function
what made the code unclear. This patch introduces a tooltip function
that separates tooltip generation from the poll function.
NOTE: the text should always be returned in its own memory block. This
block will be freed after it is copied in the drag struct.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D12104
|
|
These functions do not change their source or input mesh, so it can
be passed with const, which means in one case that a function doesn't
have to be responsible for freeing its argument mesh, which is a clearly
better separation of concerns.
|
|
|
|
- Remove BKE prefix for static functions
- Make specific intermediate functions static
- Avoid unecessary "_to_mesh_nomain" suffix
|
|
This naming change was agreed on during the asset workshop. See
https://code.blender.org/2021/06/asset-browser-workshop-outcomes/#terms-definitions.
|
|
They are now always shown in the top-level of the Outliner context menu.
Having them in the ID Data submenu was just a hassle to work with, and
often confusing to users - even if technically correct (the asset status
is part of the ID data).
Part of T82680.
|
|
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 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.
|
|
|
|
|
|
Also remove early return as it duplicates cleanup calls.
|
|
|
|
|
|
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.
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
Macros `SEQ_ALL_END` and `SEQ_ALL_BEGIN` no longer use `seq->tmp`.
Therefore they are safe to use regardless from where they are called.
|
|
When using "Clear Asset" from the Asset Browser but with an asset
selected that is not stored in the current file, we can show a more
informative error message.
|
|
The viewer node in geometry node trees only supports geometry nodes.
This patch ensures that when ctrl shift clicking on a node, it will only
link to geometry sockets.
Differential Revision: https://developer.blender.org/D12055
|
|
Followup to rB3834dc2f7b38 (where getting the proper particle system was
fixed for the Adjust Last Operation panel in the Properties Editor). But
since this operator can also be called from the 3DView, get a current
particle system there as well.
Without this, _all_ particle systems would be copied when executing from
the 3DView (which was never really intended [operator description uses
singular] -- it just happens to use `copy_particle_systems_to_object`
internally as well -- same as the `Copy Active/All to Selected Objects`
operators)).
ref. T83317
Maniphest Tasks: T83317
Differential Revision: https://developer.blender.org/D12033
|