Age | Commit message (Collapse) | Author |
|
* ID pointer returned by `wm_file_link_append_datablock_ex` was
improperly extracted from `WMLinkAppendDataItem` before append step.
* Code deleting linked IDs when their local matching version was re-used
did not properly clear `LIB_TAG_DOIT` beforehand.
|
|
This commit also add an experimental userPreferences to prevent proxies
conversions on file load, and reporting for amount of coverted proxies
(and possible issues).
Note that potentially linked proxies from other libraries are not
hamdled here (this feature seems to be broken anyway in master
currently?).
|
|
Some gestures were activating immediately on tweak events,
extend this to mouse-press and click-drag.
Without this change, box-select for example wouldn't be automatically
activated on mouse-press.
|
|
There is no reason to lock behavior into a specific configuration in
those calls, make them properly configurable like the rest of the
link/append code.
This also enable users of those functions to activate 'ID reuse'
behavior.
|
|
Option is now available to append operator, alsthough hidden and
disabled by default.
|
|
When we re-use a local ID, we need to delete the matching linked data.
|
|
|
|
in asset context, when user drag & drop a material several time, they
would still expect to re-use existing one instead of getting new copies
of it, even if this material is directly appended (and not an indirect
dependency of an object e.g.).
|
|
Flags controlling link/append code are split between two enums, one in
`DNA_space_types.h` and one in `BLO_readfile.h`.
This commit:
- Moves flags exclusively used in WM and BLO code to `eBLOLibLinkFlags`
in `BLO_readfile.h`. Flags in `eFileSel_Params_Flag` from
`DNA_space_types.h` are now only the ones effectively used by the
file browser editor code too.
- Fixes some internal utils in `readfile.c` still taking `short` flag
parameter instead of proper `int` one.
NOTE: there are a few other flags that could probably be moved to
`eBLOLibLinkFlags` (at the very least `FILE_LINK`, probably also
`FILE_AUTOSELECT` and `FILE_ACTIVE_COLLECTION`), since those are not
effectively used by the file browser, and control linking/appending
behavior, not filebrowser behavior.
However for now think it's safer to not touch that.
|
|
|
|
This commit adds to ID struct a new optional 'weak reference' to a
linked ID (in the form of a blend file library path and full ID name).
This can then be used on next append to try to find a matching local ID
instead of re-making the linked data local again.
Ref. T90545
NOTE: ID re-use will be disabled for regular append for the time being
(3.0 release), and only used for assets. Therefore, this commit should
not change anything user-wise.
Differential Revision: https://developer.blender.org/D12545
|
|
|
|
Currently, the drop indicator colors are hardcoded to white text on semi-transparent black background.
This patch makes the drop indicator use the tooltip theme settings, as they serve a similar purpose.
{F10530482, size=full}
All built-in themes seem to work well and got improved readability.
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D12588
|
|
This includes much improved GPU rendering performance, viewport interactivity,
new shadow catcher, revamped sampling settings, subsurface scattering anisotropy,
new GPU volume sampling, improved PMJ sampling pattern, and more.
Some features have also been removed or changed, breaking backwards compatibility.
Including the removal of the OpenCL backend, for which alternatives are under
development.
Release notes and code docs:
https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles
https://wiki.blender.org/wiki/Source/Render/Cycles
Credits:
* Sergey Sharybin
* Brecht Van Lommel
* Patrick Mours (OptiX backend)
* Christophe Hery (subsurface scattering anisotropy)
* William Leeson (PMJ sampling pattern)
* Alaska (various fixes and tweaks)
* Thomas Dinges (various fixes)
For the full commit history, see the cycles-x branch. This squashes together
all the changes since intermediate changes would often fail building or tests.
Ref T87839, T87837, T87836
Fixes T90734, T89353, T80267, T80267, T77185, T69800
|
|
Draw thumbnails as strip overlay. This works for movie and image strips.
To draw thumbnails, this overlay has to be enabled and strips must be
tall enough.
The thumbnails are loaded from source file using separate thread and
stored in cache.
Drawing code uses only images stored in cache, and if any is missing,
background rendering job is started. If job can not render thumbnail,
to prevent endless loop of creating job for missing image it sets
`SEQ_FLAG_SKIP_THUMBNAILS` bit of `Sequence` flag.
To prevent visual glitches during timeline panning and zooming, `View2D`
flag `V2D_IS_NAVIGATING` is implemented. If bit is set, drawing code
will look for set of evenly distributed thumbnails that should be
guaranteed to exist and also set of previously displayed thumbnails.
Due to volatile nature of cache these thumbnails can be missing anyway,
in which case no new thumbnails will be drawn for particular strip.
Cache capacity is limited to 5000 thumbnails and performs cleanup of
non visible images when limit is reached.
ref T89143
Reviewed By: ISS
Differential Revision: https://developer.blender.org/D12266
|
|
Expose a key-map preference "Fallback Tool (RMB)",
disabled by default.
The right mouse button uses the fallback tool
(currently visible selection tool in the toolbar),
instead of always tweaking.
When any selection tool is active, right mouse always tweaks.
To enable fallback selection on RMB, set the "Right Mouse Select Action"
to "Selection Tool".
Internal changes:
- Add fall-back key-maps, separate key-maps needed for when the tool is
run as a fall-back. This is needed so RMB-select can support fall-back
tools, so left-mouse can be used when it's the active tool and RMB
can be used as a fall-back action when another tool is active.
- Add options field to tools so tools without gizmos can enable the
full-back tool keymap.
- Support multiple key-maps for keymap handlers.
- Fall-back keymaps now co-exist with the tool-keymaps.
So both keymaps may be active at once - using different mouse buttons.
When gizmos are in use, a highlighted gizmo prioritizes the
tool-keymap over the fall-back keymap.
Resolves T83690.
Reviewed By: JulienKaspar
Ref D12493
|
|
Some selection operators return (PASS_THROUGH & FINISHED) so the tweak
event isn't suppressed from the PRESS event having been handled.
This is now restricted to events with a PRESS action.
Without this, using CLICK for selection was passing the event through
which could run other actions unintentionally.
|
|
This code path is not yet used so no harm, but that was a fairly nasty
potential crash-generator.
|
|
Change KeyMapItem.alt/ctrl/shift/oskey to integer types,
where -1 is used to ignore the modifier when matching key-map items.
It was only possible to set all modifiers to -1 at once from RNA
using the 'any' property.
Afterwards individual modifiers could be set back to true/false.
Although these key-map items could not be exported/imported.
Exposing the values directly avoids the need for cumbersome workarounds.
|
|
These were added in a1c8543f2acd7086d412cb794b32f96794b00659 (2007)
but never used.
Nor did they have any meaning in practice.
Note that versioning keymap items isn't needed as these values were
never set. The code-paths that set these values also set KM_MOD_FIRST
causing `keymap_event_set` to only ever assign values of 0 or 1.
These flags complicate further exposing KM_ANY (-1)
which is also a valid value for modifiers.
|
|
- Bend (Transform).
- Extrude to Cursor.
- Lasso Select (related operators such as node-cut links, mask.. etc).
- Rip Mesh / UV's.
- Vertex/Edge Slide.
|
|
Support waiting for input so operators that depend on the
cursor location are usable from menus / buttons.
Use an operator type flag which the user interface code checks for,
waiting for input when run from a menu item.
This patch only supports this feature, there are no functional changes.
The motivation for this change is discoverability since some actions
were either hidden or broken when accessed from menus
(where the behavior of the operator depended on the menu location).
In general, waiting for input is *not* an efficient way to access tools,
however there are over 50 operators with a "wait_for_input" property
so this isn't introducing a new kind of interaction,
rather exposing this in a way that does not need to be hard-coded into
each operator, or having modal callbacks added for the sole purpose
of waiting for input.
Besides requiring boiler plate code using a "wait_for_input" property
has the added down-side of preventing key shortcuts from showing.
Only the menu items will enable the property,
causing them not to match key-map items.
Reviewed By: Severin
Ref D12255
|
|
Adds an "Auto" option to blend thumbnail types that will automatically
use Screenshot if there is no camera and 3dview, or workbench render
with shading settings from the largest 3dview.
See D12407 for more details.
Differential Revision: https://developer.blender.org/D12407
Reviewed by Campbell Barton
|
|
When saving blend files close any menus that might be open, show
"waiting" mouse cursor right away, before creating preview.
See D12507 for more details.
Differential Revision: https://developer.blender.org/D12507
Reviewed by Campbell Barton
|
|
|
|
|
|
Add needed extra flag and utils to IDType to mark and check an ID type
as only appendable.
Note that this is only a loose user-level enforcement currently, in any
case you need to be able to link an ID to append it currently, so for
low-level code this does not really matter.
Currently only WorkSpace and Screen ID types are marked with the new
`IDTYPE_FLAGS_ONLY_APPEND` flag.
|
|
Mixing testing and actual action in a single function is just not a good
way to do things, and the 'testing' feature is not used anywhere
anymore, time to get rid of it.
|
|
This flag became a full duplicate of `IDTYPE_FLAGS_NO_LIBLINKING`, which
is a good thing (don't think we ever want to be able to link some data,
without being able to make it local...).
So we can now remove it and use `IDTYPE_FLAGS_NO_LIBLINKING` instead.
|
|
Scene and related pointer parameter can be NULL in link/append code, in
which case there is no instantiation of new objects/collections/obdata.
Link code in blendloader was already checking that, new instantiation
code in WM area from yesterday did not.
Issue introduced by rB3be5ce4aad5e.
|
|
This allows a hack to be removed that temporarily overwrote
the 3D views gizmo display flag.
Also reverse change from fb27a9bb983ce74b8d8f5f871cf0706dd1e25051
that runs poll on modal gizmo groups as there is some risk
that the poll function unlinks the gizmo.
|
|
Follow up to fix for T73684,
which allowed some modal gizmos to hide all others.
Also resolve an issue from 917a972b56af103aee406dfffe1f42745b5ad360
where shear the shear gizmo would be visible during interaction.
Internally there are some changes to gizmo behavior
- The gizmo with modal interaction wont draw if it's poll function fails.
- The WM_GIZMOGROUPTYPE_DRAW_MODAL_ALL flag now causes these gizmo
groups to draw when another group is being interacted with.
|
|
|
|
|
|
This commit fully refactors the way linked IDs are made local when
appended.
Previously, `BKE_library_make_local` was (ab)used for this task, but it
was missing some contextual data and doing complex processing to try to
work around this, with limited sucess. Further more, it was nearly
impossibe to extend (e.g. to get new append behaviors necessary for the
asset project).
The new code is a dedicated append step in WM linking process.
NOTE: BPY API (`libray.load()` context manager) uses its own code here,
which still relies on `BKE_library_make_local` for appending.
Unfortunately, merging those two different code paths is not trivial so
for now this API will remain unchanged.
Fix T55629: Append already linked Data is impossible.
|
|
Changing active side was introduced in {rB7ff6bfd1e0af} but was never
working for tools/operators other than the sculpt line mask tool.
While for most tools/operators this actually does not make sense, the
bisect tool/operator can actually benefit from it.
thx @campbellbarton for additional input!
Maniphest Tasks: T91320
Differential Revision: https://developer.blender.org/D12473
|
|
This was implemented in {rB14d56b4217f8} but was never working for
tools/operators other than the sculpt line mask tool.
To be precise, the preview actually snapped but the operations (e.g.
mesh bisect, vertex weight gradient) still happened "unsnapped" in
modal. For the sculpt line mask tool this wasnt a problem, because it
only draws a preview while modal, the actual mask was only applied
later.
This solves part one of T91320 (snapping), sculpting also introduced
flipping in {rB7ff6bfd1e0af} which does not make much sense for all
tools, but in bisect this could actually be supported, will add that in
a separate Diff.
ref T91320
Maniphest Tasks: T91320
Differential Revision: https://developer.blender.org/D12470
|
|
Addresses T76082.
Since the DirectX backend does not work for AMD gpus
(wglDXRegisterObjectNV() fails to register the shared OpenGL-DirectX
render buffer, displaying a pink screen to the user), the original
solution was to use SteamVR's OpenGL backend, which, as tested
recently, seems to work without any issues on AMD hardware.
However, the SteamVR OpenGL backend (on Windows) was disabled in
fe492d922d6d since it resulted in crashes with NVIDIA gpus (and still
crashes, as tested recently), so SteamVR would always use the
AMD-incompatible DirectX backend (on Windows).
This patch restores use of the SteamVR OpenGL backend for non-NVIDIA
(AMD, etc.) gpus while maintaining the DirectX workaround for NVIDIA
gpus. In this way, issues are still resolved on the NVIDIA side but
AMD users can once again use the SteamVR runtime, which may be their
only viable option of using Blender in VR.
Reviewed By: Julian Eisel
Differential Revision: https://developer.blender.org/D12409
|
|
Reuse temporary windows when they share the same single area type, not
because they share the same title.
See D12401 for more details.
Differential Revision: https://developer.blender.org/D12401
Reviewed by Campbell Barton
|
|
|
|
Line endings are already added.
|
|
Caused by {rB3e4d720ae483}.
Before above commit, this had a different path handling and
RNA_path_from_ID_to_struct() was always used [which kind of took care of
this]. Now this is only used if ptr represents an ID itself, so we are
"loosing" part of the path.
This patch adds the path back on the member_id in
wm_context_member_from_ptr() for everthing related to space_data, so
WM_context_path_resolve_property_full() can construct a full path even
for these.
Maniphest Tasks: T91225
Differential Revision: https://developer.blender.org/D12418
|
|
|
|
Avoids duplicating the image buffer when saving thumbnails.
|
|
Scaling didn't clamp above zero, see T89868.
|
|
This adds an option to use a capture of the entire main window as the
blend file preview thumbnail.
See D10492 for details and examples.
Differential Revision: https://developer.blender.org/D10492
Reviewed by Campbell Barton
|
|
Increase effective resolution of blend preview images from 128x128 to
256x256 for versions saved in the file system thumbnail cache.
See D10491 for details and examples.
Differential Revision: https://developer.blender.org/D10491
Reviewed by Campbell Barton
|
|
|
|
Use context members instead of not working well or failing due to:
- Missing "path" functions (in the case of edit-bones).
- Paths containing names (in the case of sequence-strips or pose-bones).
While technically correct it's not useful for shortcuts or
menu items to lookup data by name.
|
|
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.
|