Age | Commit message (Collapse) | Author |
|
Context members of the file space would not be shown in the context API
docs.
|
|
Since recently it's possible to query the active file (as object, not
just the name), but it's quite useful for scripting to have access to
all selected files.
This introduces `bpy.context.selected_files`, returning a list of file
objects representing files in the File Browser.
|
|
Use BLI_str_quoted_substr_range instead of in-line
quote extraction to resolve:
- Bone names containing quotes caused flip to fail.
- Missing NULL check if a matching quote could not be found.
|
|
Rely on BLI_str_quoted_substrN to detect if the prefix exists since
this function exists early there is no need to check before calling.
|
|
Image Editor
When changing to another texture paint slot, the texture displayed in
the viewport changes accordingly (as well as the image displayed
in the Image Editor).
When changing the active texture in the Node Editor though, only the
texture displayed in the viewport changes.
This was mentioned in T88788 and I am not 100% sure this is desired in
all scenarios (or at all), it should be seen in tandem of D11497. This
change makes it so that the Image Editor changes to the image we changed
to in the Node Editor (keeping them in sync).
If this is not desired in all cases, this could be made an option.
ref T88788
ref D11496
ref D11497
Maniphest Tasks: T88788
Differential Revision: https://developer.blender.org/D11498
|
|
active paint slot
When changing to another texture paint slot, the texture displayed in
the viewport changes accordingly (as well as the image displayed
in the Image Editor).
When changing the active texture in the Node Editor though, only the
texture displayed in the viewport changes.
This _can_ be confusing because you can end up painting on a texture
that you are not looking at in the viewport (so you dont have any
feedback whatsoever). Not 100% sure this is desired in all scenarios,
but this change makes it so that the active paint slot changes to the
one that uses the texture we chaged to in the Node Editor (keeping them
in sync).
If this is not desired in all cases, this could be made an option.
ref T88788
ref D11496
Maniphest Tasks: T88788
Differential Revision: https://developer.blender.org/D11497
|
|
This was left over from when changing the image set the faces texture.
|
|
Support axis constraints for the measure tool.
Press X, Y or Z to restrict the dimension to that axis,
it's also possible to toggle between orientations matching transform.
Reviewed By: campbellbarton
Ref D10872
|
|
This makes it possible to calculate orientation from functions
that don't have the context.
|
|
Many callers expanded a PointerRNA argument,
so add a version of these functions that takes a PointerRNA.
|
|
Assigning a shortcut to bone layers for example,
raised a Python exception when used.
|
|
Only append RNA_path_from_ID_to_struct to context attributes if those
paths resolve to ID types.
Also simplify creating RNA paths by adding utility functions:
- WM_context_path_resolve_property_full
- WM_context_path_resolve_full
Part of fix for T90723.
|
|
Selection was already accessible but not active.
Add utility functions:
- ANIM_nla_context_track to access the active track,
following the convention of ANIM_nla_context_strip.
- ANIM_nla_context_*_ptr versions of these functions,
needed to for creating context members to access the ID pointer.
Part of fix for T90723.
|
|
This is an alternative to context.scene.sequence_editor.active_strip
which could be verbose, especially with additional None checks.
Part of fix for T90723, extracted from D12297.
|
|
Now if the frame does not exist in destination layer, the frame type of merge layer is used.
For existing frames in destination layer, the existing type is not changed.
|
|
Besides helping to avoid buffer overflow errors this reduces complexity
of BLI_str_utf32_as_utf8 which needed a special loop for the last 6
characters to avoid writing past the buffer bounds.
Also add BLI_str_utf8_from_unicode_len which only returns the length.
|
|
This patch just clamps and rounds node contents and socket locations
so they don't appear to jiggle around when you move them. This issue
happens because node sizing and positioning are in floats while text
content must be pixel-aligned.
See D11684 for more details and comparisons.
Differential Revision: https://developer.blender.org/D11684
Reviewed by Julian Eisel
|
|
The overlay was drawn twice on top of each other making it hard to see,
hard to theme, and making it more prominent in the wrong areas (before
frame 0, not even start frame). The comment in the code was also wrong
since it said "frame one" but it was 0.
Checked with the Animation module team that it's better to use start/end
frame range instead of frame 0.
There is a TODO note to de-duplicate this section eventually so I left it there.
This fix is currently done for Grease Pencil and Mask modes, but it should
also be fixed for the regular Dopesheet mode (in line 244 if anyone wants to do it).
|
|
Caused by recent lazy render result passes allocation change.
|
|
Reason was that the notifier did not set the NS_VIEW3D_SHADING
subtype, which the VR view listens for for a shading update.
In the case of "toggle xray", a notifier was absent altogether.
|
|
Add mode to overwrite strips on overlap instead of resolving overlap.
When overlap is created, 3 things can happen:
- On partial overlap, handles of overlapped strip are moved
- On complete overlap with smaller strip, overlapped strip is split
- On complete overlap with larger strip, overlapped strip is removed
This mode can be enabled in header.
Reviewed By: fsiddi, mano-wii
Differential Revision: https://developer.blender.org/D11805
|
|
Caused by {rB1a81d268a19f}.
This caused e.g. ALT-clicking the 'Link' button to not propagate to
other selected objects (same as the 'Copy To Selected' context menu
entry).
If these are not unique across IDs, checks in ui_selectcontext_begin()
or copy_to_selected_button() could fail.
Now offset by ID pointer.
thx @JacquesLucke for clarification on the POINTER_* macros (and why
not to use them)!
Maniphest Tasks: T90907
Differential Revision: https://developer.blender.org/D12321
|
|
Various changes to reduce risk of out of bounds errors in utf8 seeking.
- Remove BLI_str_prev_char_utf8
This function could potentially scan past the beginning of a string.
Use BLI_str_find_prev_char_utf8 instead which takes a limiting
string start argument.
- Swap arguments for BLI_str_find_prev_char_utf8 so the stepping
argument is first and the limiting argument is last.
This matches BLI_str_find_next_char_utf8.
- Change behavior of these functions to return it the start or end
pointers instead of NULL, which complicated use of these functions
to calculate offsets.
Callers that need to check if the limits were reached can compare
the return value with the start/end pointers.
- Return 'const char *' from these functions
so they don't remove const from the input arguments.
|
|
|
|
These buttons were in Meshes but not for Grease Pencil. This patch add them in order to keep consistency.
Reviewed By: HooglyBoogly
Maniphest Tasks: T90973
Differential Revision: https://developer.blender.org/D12328
|
|
Change Area Move snapping locations to even 12ths, rather than current
eights and thirds, so snap distances are consistent sizes. Also adds
snapping at minimum and maximum locations.
see D11938 for details and illustrations.
Differential Revision: https://developer.blender.org/D11938
Reviewed by Hans Goudey
|
|
Solution similar to the one seen in {rBb94ab93dfb82}.
The idea is to find the window and region under the cursor to use in the
operator.
Reviewed By: brecht
Maniphest Tasks: T90817
Differential Revision: https://developer.blender.org/D12310
|
|
The window and region find utility can be used in other eyedropper
operators.
|
|
This better matches other functions like `BKE_screen_find_area_xy`.
|
|
|
|
|
|
Also add gizmo group example to the tool-template.
|
|
These update calls are already performed by
ED_object_add_type_with_obdata.
|
|
Newly created objects would not become visible until
another action forced a depsgraph update.
|
|
|
|
|
|
|
|
|
|
|
|
Error in 452cc0193255c9e80ca4f163a2d524ed6bb17ef1
|
|
Remove redundant code for drawing text strings that contain only ASCII.
See D12293 for much more detail.
Differential Revision: https://developer.blender.org/D12293
Reviewed by Campbell Barton
|
|
Missed in {rB0d36439f95c0}.
|
|
The code assumed that when a node group is is at the highest
level in the node editor, then it is embedded into another data
block and can't be referenced by other node groups. This is true
for shader and compositor nodes, but not for geometry nodes.
|
|
Variable was wrongly set to 0.
Caused by {rB7192e57d63a5}.
|
|
We now use a for_each function with callback to iterate through all sequences in the scene.
This has the benefit that we now only loop over the sequences in the scene once.
Before we would loop over them twice and allocate memory to store temporary data.
The allocation of temporary data lead to unintentional memory leaks if the code used returns to exit out of the iteration loop.
The new for_each callback method doesn't allocate any temporary data and only iterates though all sequences once.
Reviewed By: Richard Antalik, Bastien Montagne
Differential Revision: http://developer.blender.org/D12278
|
|
Having settings such as "extend" saved between executions causes
keymaps that don't include this setting to remember the value
between execution.
No longer store this setting for selection operations & remove
redundant values from the key-maps, see: T90275.
|
|
|
|
Remove BLI_str_utf8_as_unicode_and_size and
BLI_str_utf8_as_unicode_and_size_safe.
Use BLI_str_utf8_as_unicode_step instead since it takes
a buffer bounds argument to prevent buffer over-reading.
|
|
- New operator property to toggle edge panning in the keymap:
This is disabled by default to avoid edge-panning in cases where it
gets distracting, such as adding a new node. Only the explicit
translate operator(s) (GKEY or drag) have this enabled now.
- Restore the initial view rect on edge pan cancel:
The initial view rect is now stored in the edge pan operator data.
When an operator with edge panning is cancelled it can now call the
`UI_view2d_edge_pan_cancel` function to restore the original View2D
rect.
- Less delay in node editor scrolling:
Delay is useful when scrolling through long lists, such as in the
outliner, but makes node scrolling feel sluggish and unresponsive.
The lower scroll speed here makes a faster response the better option.
- Zoom influence feature:
Somewhat slower scrolling in UI-space when zoomed out. With the 0.5
zoom influence factor nodes behave as if zoom factor is halved,
otherwise it gets too fast when zoomed out. Previously scrolling would
always be constant-speed in UI space, now it's half-way between UI
space and node (view) space.
|
|
Before this patch attempting to remove a particle modifier programmatically
through Python would fail, because it deleted the modifier associated with
the currently active particle system instead of the one passed as an argument
to `bpy.types.ObjectModifiers.remove()`.
This fix adds an additional argument for the particle system to
`object_remove_particle_system`. This allows to specify which particle system
and its associated modifier shall be removed. In case of
`particle_system_remove_exec` it will remain the currently active particle
system, whereas `object_remove_particle_system` passes the particle system
of the modifier. Hence, the correct modifier will be removed.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D12234
|