Age | Commit message (Collapse) | Author |
|
Activating a gizmo used the windows eventstate which may have values
newer than the event used to activate the gizmo.
This meant transforms check for the key that activated transform
could be incorrect.
Support passing an event when calling operators to avoid this problem.
|
|
|
|
This avoids transform jumping which is a problem when tweaking values a
small amount. A fix for T40549 was made box-select used the location
when the key was pressed.
While it's important for box-select or any operator where it's expected
the drag-start location is used, this is only needed in some cases.
Since the event stores the click location and the current location,
no longer overwrite the events real location. Operators that depend on
using the drag-start can use this location if they need.
In some cases the region relative cursor location (Event.mval) now needs
to be calculated based on the click location.
- Added `WM_event_drag_start_mval` for convenient access to the region
relative drag-start location (for drag events).
- Added `WM_event_drag_start_xy` for window relative coordinates.
- Added Python property Event.mouse_prev_click_x/y
Resolves T93599.
Reviewed By: Severin
Ref D14213
|
|
Enables image user nodes to display the file alpha mode, similar to the
colorspace setting.
Also removes image_has_alpha in favor of using BKE_image_has_alpha, because it
did not check if the image actually had an alpha channel, just if the file format
was capable of supporting an alpha channel.
Differential Revision: https://developer.blender.org/D14153
|
|
Small fixes to the drawing of multi input sockets:
- Make the outline thickness consistent with normal node sockets,
independent from the screen DPI.
- Only highlight multi input sockets when they are actually selected.
- Skip selected multi inputs when drawing normal selected sockets.
Differential Revision: https://developer.blender.org/D14192
|
|
This commit improves the drawing of selected node links:
- Highlight the entire link to make it easier to spot where the link
is going/coming from.
- Always draw selected links on top, so they are always clearly
visible.
- Don't fade selected node links when the sockets they are connected
to are out out view.
- Dragged node links still get a partial highlight when they are only
attached to one socket.
Differential Revision: https://developer.blender.org/D11930
|
|
|
|
This was an oversight in rB06ac5992618a75c453e495e06af7c5faf30499a7.
|
|
|
|
This patch aims to fix the issues presented in T87829 and T95331,
namely precision issues while connecting two nodes when being too
close together in the node editor editors, in a few cases even
resulting in the complete inability to connect nodes.
Sockets are found by intersecting a padded rect around the cursor
with the nodes' sockets' location. That creates ambiguities, as it's
possible for the padded rect to intersect with the wrong node,
as the distance between two nodes is smaller than the rect is padded.
The fix in this patch is checking against an unpadded rectangle in
visible_node().
Differential Revision: https://developer.blender.org/D14122
|
|
This commit renames enums related the "Curve" object type and ID type
to add `_LEGACY` to the end. The idea is to make our aspirations clearer
in the code and to avoid ambiguities between `CURVE` and `CURVES`.
Ref T95355
To summarize for the record, the plans are:
- In the short/medium term, replace the `Curve` object data type with
`Curves`
- In the longer term (no immediate plans), use a proper data block for
3D text and surfaces.
Differential Revision: https://developer.blender.org/D14114
|
|
This patch reverses the dependency between `BLI_math_vec_types.hh` and
`BLI_math_vector.hh`. Now the higher level `blender::math` functions
depend on the header that defines the types they work with, rather than
the other way around.
The initial goal was to allow defining an `enable_if` in the types header
and using it in the math header. But I also think this operations to types
dependency is more natural anyway.
This required changing the includes some files used from the type
header to the math implementation header. I took that change a bit
further removing the C vector math header from the C++ header;
I think that helps to make the transition between the two systems
clearer.
Differential Revision: https://developer.blender.org/D14112
|
|
Use using instead of typedef, remove redundant string init,
use "empty", address qualified auto, use nullptr.
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
|
|
|
|
|
|
|
|
|
|
Differential Revision: https://developer.blender.org/D14050
|
|
|
|
Previously, node selection made no distinction between a frame node and
other nodes. So a frame node would be selected by their whole rect or
center (depending on box/lasso/circle select). As a consequence of this,
box and lasso could not pratically be started inside a frame node (with
the intention to select a subset of contained child nodes) because the
frame would be selected immediately and tweak-transforming started.
Circle selecting would always contain the frame node as well (making
transforming a subset of nodes without also transforming the whole frame
impossible).
Now change selection behavior so that for all selection modes only the
border [the margin area that is automatically added around all nodes,
see note below] of a frame node is considered in selection. This makes
for a much more intuitive experience when arranging nodes inside frames.
note: to make the area of interest for selection/moving more obvious,
the cursor changes when hovering over (as is done for resizing).
note: this also makes the resize margin consistent with other nodes.
note: this also fixes right resize border (was exclusive instead of
inclusive as every other border)
Also fixes T46540.
|
|
This Diff changes the computation of the input and output socket
position to being always aligned with its corresponding label.
Reviewed By: campbellbarton
Ref D14025
|
|
|
|
This fixes https://github.com/JacquesLucke/animation_nodes/issues/1827.
|
|
|
|
This removes a "narrow" update in `snode_autoconnect` in favor
of the more general update in `node_make_link_exec`.
|
|
This patch makes it possible to set the UI color of a node's
header bar and override the default from the node's typeinfo.
Currently the color is taken from the `.nclass`
member of the node's bNodeType->TypeInfo struct.
This is created once when registering the node.
The TypeInfo is used for both UI and non-UI functionality.
Since the TypeInfo is shared, the header bar for the node
can't be changed without changing all nodes of that type.
The Map Range node is shown as a `Converter` or blue color by default.
This patch allows this to be changed dynamically to `Vector` or purple.
This is done by adding a `ui_class` callback to node typeinfo struct.
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D13936
|
|
These were removed in rBbe3f3812dc4b, but it's preferred to keep them.
I had to do a bit of reorganizing, and I corrected the file type too.
|
|
|
|
Differential Revision: https://developer.blender.org/D13981
|
|
|
|
Correct corner radius of the node outline to prevent a noticeable gap in
some cases.
---
Currently we make a small mistake in the creation of the node outline:
We offset the rectangle describing the outline by the outline thickness,
but we don't adjust the corner radius accordingly.
Therefore the rounded corner of the outline and the node body are not
concentric which can sometimes lead to a visible gap at the corner.
How noticeable it is depends on the theme, the screen's dpi and the
line thickness set in the preferences.
Simply adjusting the corner radius for the outline to also be increased
by the outline thickness fixes this small issue.
| display, line thickness | **patch** | **master** |
| --- | --- | --- |
| 1080p, default/thin | {F12835304} | {F12835305} |
| retina, thin | {F12835306} | {F12835307} |
The issue was mentioned by @hitrpr
Reviewed By: Blendify
Differential Revision: https://developer.blender.org/D13955
|
|
Previously, macros were ifdefed using the cmake option `WITH_INTERNATIONAL`
However, the is unnecessary as withen the functions themselves have checks for building without internationalization.
This also means that many `add_definitions(-DWITH_INTERNATIONAL)` are also unnecessary.
Reviewed By: mont29, LazyDodo
Differential Revision: https://developer.blender.org/D13929
|
|
|
|
This fixes failing test cases when using `make test`.
See {D13615} for more information.
The fix will perform the id remapping one item at a time. Although not
really nice, this isn't a bottleneck.
The failing test cases is because space_node stores pointers multiple
times and didn't update all pointers. It was not clear why it didn't do
it, but changing the behavior more to the previous behavior fixes the
issue at hand.
I prefer to remove the double storage of the node tree pointers (in
snode and path) to reduce pointer management complexity.
|
|
During sprite fright loading of complex scenes would spend a long time in remapping ID's
The remapping process is done on a per ID instance that resulted in a very time consuming
process that goes over every possible ID reference to find out if it needs to be updated.
If there are N of references to ID blocks and there are M ID blocks that needed to be remapped
it would take N*M checks. These checks are scattered around the place and memory.
Each reference would only be updated at most once, but most of the time no update is needed at all.
Idea: By grouping the changes together will reduce the number of checks resulting in improved performance.
This would only require N checks. Additional benefits is improved data locality as data is only loaded once
in the L2 cache.
It has be implemented for the resyncing process and UI editors.
On an Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz 16Gig the resyncing process went
from 170 seconds to 145 seconds (during hotspot recording).
After this patch has been applied we could add similar approach
to references (references between data blocks) and functionality (tagged deletion).
In my understanding this could reduce the resyncing process to less than a second.
Opening the village production file between 10 and 20 seconds.
Flame graphs showing that UI remapping isn't visible anymore (`WM_main_remap_editor_id_reference`)
* Master {F12769210 size=full}
* This patch {F12769211 size=full}
Reviewed By: mont29
Maniphest Tasks: T94185
Differential Revision: https://developer.blender.org/D13615
|
|
This reverts commit 948211679f2a0681421160be0d3b90f507bc0be7.
This commit introduced some regressions in the test suite.
As this change is a core part of blender Bastien and I decided to revert
it as the solution isn't clear and needs more investigation.
The following tests FAILED:
62 - blendfile_liblink (SEGFAULT)
63 - blendfile_library_overrides (SEGFAULT)
It fails in (id_us_ensure_real)
|
|
During sprite fright loading of complex scenes would spend a long time in remapping ID's
The remapping process is done on a per ID instance that resulted in a very time consuming
process that goes over every possible ID reference to find out if it needs to be updated.
If there are N of references to ID blocks and there are M ID blocks that needed to be remapped
it would take N*M checks. These checks are scattered around the place and memory.
Each reference would only be updated at most once, but most of the time no update is needed at all.
Idea: By grouping the changes together will reduce the number of checks resulting in improved performance.
This would only require N checks. Additional benefits is improved data locality as data is only loaded once
in the L2 cache.
It has be implemented for the resyncing process and UI editors.
On an Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz 16Gig the resyncing process went
from 170 seconds to 145 seconds (during hotspot recording).
After this patch has been applied we could add similar approach
to references (references between data blocks) and functionality (tagged deletion).
In my understanding this could reduce the resyncing process to less than a second.
Opening the village production file between 10 and 20 seconds.
Flame graphs showing that UI remapping isn't visible anymore (`WM_main_remap_editor_id_reference`)
* Master {F12769210 size=full}
* This patch {F12769211 size=full}
Reviewed By: mont29
Maniphest Tasks: T94185
Differential Revision: https://developer.blender.org/D13615
|
|
|
|
|
|
There is probably a better solution that's possible, but the few other
things I tried didn't work, and the build error should be resolved for
the buildbots. This is similar to the "breaks" in the namespace for
functions declared in `ED_node.h`.
|
|
This commit moves code in all node editor files to the
`blender::ed::space_node` namespace, except for C API
functions defined in `ED_node.h`, which can only be moved
once all areas calling them are moved to C++.
The change is fairly straightforward, I just moved a couple
of "ED_" code blocks around to make the namespace more
contiguous, and there's the method for adding a pointer to
a struct in a C++ namespace in DNA.
Differential Revision: https://developer.blender.org/D13871
|
|
Route cause was data alignment mismatch between GPU and CPU. This
mismatch would not allow us to bind the UBO where data wasn't available
on the GPU.
Fixed by using float4 in stead of float2. This could eventually be
packed, but that would lead to less readable code.
|
|
|
|
This was the case for multi input sockets that have a link already.
Since we have multi input sockets, the way we use `socket_is_available`
is not really giving the expected result on these.
When used for input sockets the intention is to find a free socket
(either for noodle **replacement**, then it is always available, or just
the next free available socket).
Now I would think without the intention to replace an existing link, a
multi input socket should still be available.
From the inside of the function, the `replace` argument turns [namewise]
to `allow_used`, which sounds a little different (so one might argue
that if `allow_used` is `False` this should also trigger for already
connected multi input sockets).
In the end, this is an issue with the variable naming though, cant think
of a usecase where the patch change would really go against intentions.
Maniphest Tasks: T93413
Differential Revision: https://developer.blender.org/D13866
|
|
These operations (sorting and selecting all nodes) should generally
be handled by the node editor and not outside code. They were not
called outside of the node editor, so they can be moved to the editor's
`intern` header.
|
|
This file was added nine years ago, and was unused then.
Now with active tools we use a different approach to create
toolbars, so the file is not relevant.
|
|
Followup to the previous commit. Jeroen and I agreed the old naming was
confusing.
|
|
This reverts commit edee5a947b7ea3e1324aa334a22c7c9bbf47f5f7.
Fixes compilation error (Missing file BLI_float2.hh)
|