Age | Commit message (Collapse) | Author |
|
Match naming of other wm_cursor_position_* functions.
|
|
|
|
This attribute exposes mesh vertex normals as a `vertex_normal`
attribute for use with nodes. Since the normal vector stored in
vertices is only a cache of data computable from the surrounding faces,
the attribute is read-only. A proper error message for attempting to
write this attribute is part of T85749. A write-only normal attribute
will likely come later, most likely called `corner_normal`.
The normals are recomputed before reading if they are marked dirty.
This involves const write-access to the mesh, protected by the mutex
stored in `Mesh_Runtime`. This is essential for correct behavior after
nodes like "Edge Split" or nodes that adjust the position attribute.
Ref T84297, T85880, T86206
Differential Revision: https://developer.blender.org/D10541
|
|
Because the search didn't run when the menu first opens, the attributes
appeared in a different order than after you typed anything into the
search field. This commit instead runs the search when the menu
is first opened, but it only sorts items without filtering.
|
|
Not needed anymore since 3a907e742507.
|
|
Continuation of work in 2e221de4ceee and 249e4df110e0 .
This prepares things so we can start porting the individual ID types to
the new code design. I already added some code for library IDs, because
they need some special handling during construction, which I didn't want
to break.
The `AbstractTreeElement::isExpandValid()` check can be removed once
types were ported and can be assumed to have a proper `expand()`
implemenation.
Also makes `TreeElementGPencilLayer` `final` which I forgot in
e0442a955bad.
|
|
Mistake in aa3a4973a30f. The expanded `ELEM()` check would include
`0 && te->idcode != 0`, which always evaluates to `false`/`0`. That
wouldn't cause the asset to fail, but the `te->idcode` part would never
be checked.
Fixed the error and cleaned up the check against "0" with a check
against `TSE_SOME_ID`, see b9e54566e3b1a.
|
|
Code to check if the Outliner tree-element type was the general ID one
would always check against "0" (explicity or even implicitly). For
somebody unfamiliar with the code this is very confusing. Instead the
value should be given a name, e.g. through an enum.
Adds `TSE_SOME_ID` as the "default" ID tree-element type. Other types
may still represent IDs, as I explained in a comment at the definition.
There may also still be cases where the type is checked against "0". I
noted in the comment that such cases should be cleaned up if found.
|
|
Use _fn as a suffix for callbacks.
|
|
The check for a null active object was after trying to retrieve the active
modifier from the object.
|
|
|
|
|
|
introduced during cleanup.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add `BKE_pose_apply_action(object, action, anim_eval_context)` function
and expose in RNA as `Pose.apply_action(action, evaluation_time)`.
This makes it possible to do the following:
- Have a rig in pose mode.
- Select a subset of the bones.
- Have some Action loaded that contains the pose you want to apply.
- Run `C.object.pose.apply_pose_from_action(D.actions['PoseName'])`
- The selected bones are now posed as determined by the Action.
Just like Blender's current pose library, having no bones selected acts
the same as having all bones selected.
Manifest Task: T86159
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D10578
|
|
This makes it easier to add an implementation that can
be used in Geometry Nodes.
There should be no functional changes.
|
|
Add an RNA function `activate_asset_by_id(asset_id: ID, deferred: bool)`
to the File Browser space type, which intended to be used to activate an
asset's entry as identified by its `ID *`. Calling it changes the active
asset, but only if the given ID can actually be found.
The activation can be deferred (by passing `deferred=True`) until the
next refresh operation has finished. This is necessary when an asset has
just been added, as it will be loaded by the filebrowser in a background
job.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D10549
|
|
Is based on Google style which was used in the Libmv project before,
but is now consistently applied for the sources of the library itself
and to C-API. With some time C-API will likely be removed, and it
makes it easier to make it follow Libmv style, hence the diversion
from Blender's style.
There are quite some exceptions (clang-format off) in the code around
Eigen matrix initialization. It is rather annoying, and there could be
some neat way to make initialization readable without such exception.
Could be some places where loss of readability in matrix initialization
got lost as the change is quite big. If this has happened it is easier
to address readability once actually working on the code.
This change allowed to spot some missing header guards, so that's nice.
Doing it in bundled version, as the upstream library needs to have some
of the recent development ported over from bundle to upstream.
There should be no functional changes.
|
|
Continuation of work in 2e221de4ceee and 249e4df110e0. Now the tree-element
types have to be ported one by one. This is probably the most straight forward
type to port.
|
|
|
|
|
|
scenarios
In general, I could not find a reason executing from the python console
should not do an Undo push. Running a script from the Text Editor does
this as well and this seems generally useful.
Without an Undo push, one can easily run into situations were IDs have
been added or removed and undo on would then cause trouble (e.g. first
selection then bpy.ops.object.duplicate() -- this crashed as reported in
T86293 -- duplicate does not get its own undo push because it is not the
last op in the list, wm->op_undo_depth is not zero). This has changed
with the Undo refactor, so in essence the root cause is the same as
T77557, Legacy Undo does not suffer from the crash (but misses
the generally useful undo push from the console still)
Now add Undo to CONSOLE_OT_execute bl_options ('UNDO_GROUPED' seems more
appropriate than plain 'UNDO' since pasting multiple lines of code will
call CONSOLE_OT_execute multiple times in a row).
Maniphest Tasks: T86293
Differential Revision: https://developer.blender.org/D10625
|
|
|
|
Gave warning on Windows platform. There are more of these cases.
|
|
|
|
These variables track the wmWindow.event_queue state,
however they were used in a way that wasn't correct.
- check_drag & check_click from wmWindow.eventstate
were used to track the click/drag status of events handled in
wmWindow.event_queue.
- Event's in the queue read from wmEvent.check_drag.
- Once a drag action was detected, wmWindow.eventstate.check_drag
was disabled.
Disabling drag in the event state would not change the drag state
for values already in the event queue.
Simplify logic by moving these values into the window,
so there is one place these variables are tracked.
|
|
- Only sort by the preset name (not it's directory).
- Remove redundant string conversion.
- Only call lower() once on the input.
- Don't assign the lambda to a variable for single use.
|
|
It is quite common to high framerate video with modern cameras. To make
it easier to edit this footage new framerate presets are added and the
soft limit increased.
Note there is a bug with preset ordering, Blender thinks "120" goes
before "24" this bug needs to be fixed before these changes can be
merged.
Differential Revision: https://developer.blender.org/D10553
|
|
Pythons sort function does not sort naturally,
to solve this a custom sort key is used.
This issue is apparent when trying D10553
|
|
The term queue isn't very descruptive on it's own, use:
- wmWindow.event_queue
- wmWindowManager.notifier_queue
|
|
|
|
Reserve `event` for wmEvent.
|
|
|
|
|
|
Following naming convention of most operators.
|
|
Using both evt and event together was confusing.
Renamed:
- event_state <- evt
- event_state_other <- oevt
- event_other <- oevent
- win_other <- owin
|
|
Because of D10469 we can now not force child windows onto parent's monitor and allow them to go where they wish.
Differential Revision: https://developer.blender.org/D10593
Reviewed by Ray Molenkamp
|
|
Windows 10 supports V100 on all consoles given
you enable the ENABLE_VIRTUAL_TERMINAL_PROCESSING
flag for the console.
This patch enables color logging only on windows
10 and only if the log is not being redirected
to a file.
Differential Revision: https://developer.blender.org/D10546
|
|
Now, if the Autokey is not enabled, a new frame is not created and it is used the last active one. If no active frame, a message is displayed and the operation is canceled.
This is a common request for 2D artists.
Also, grease pencil was not working as Blender does in other areas.
Reviewed By: pepeland
Differential Revision: https://developer.blender.org/D10557
|