Age | Commit message (Collapse) | Author |
|
Rotation and scale was done around the wrong center (always around mouse
position) in paint_draw_tex_overlay [on the other hand,
paint_draw_cursor_overlay already got the center right].
Now make the center dependent on UnifiedPaintSettings "draw_anchored".
Maniphest Tasks: T102312
Differential Revision: https://developer.blender.org/D16418
|
|
|
|
The color-band needs to do some special, rather awkward updating of the
UI state when certain values are changed. As @lichtwerk noted in the
report, this was done to the wrong buttons. Now lookup the proper
buttons, and don't assume that `uiItemR()` only adds a single button
(which often isn't the case).
|
|
|
|
The new Xcode 14.1 brings the new Apple Clang compiler which
considers sprintf unsafe and geenrates deprecation warnings
suggesting to sue snprintf instead. This only happens for C++
code by default, and C code can still use sprintf without any
warning.
This changes does the following:
- Whenever is trivial replace sprintf() with BLI_snprintf.
- For all other cases use the newly introduced BLI_sprintf
which is a wrapper around sprintf() but without warning.
There is a discouragement note in the BLI_sprintf comment to
suggest use of BLI_snprintf when the size is known.
Differential Revision: https://developer.blender.org/D16410
|
|
Differential Revision: https://developer.blender.org/D16305
|
|
|
|
Upon closer inspection, looks like `UI_BLOCK_NUMSELECT` was previously
set for all code paths and 99e5024e97f1 removed it from one.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
As instances are often generated geometries, we cannot rely on the data
provided by `DupliObject::ob`.
Use `DupliObject::ob_data` when possible.
This required a major refactor in the code as the output variables are
now gathered in context and easier to access.
|
|
`nearest_world_tree_co` allows null parameter, so the `index` variable
isn't really needed and doesn't even need to be initialized.
|
|
All cache needed is already stored in `Mesh.runtime`.
|
|
|
|
Missed in rBff4f14b21a42.
|
|
As instances are often generated geometries, we cannot rely on the data
provided by `DupliObject::ob`.
Use `DupliObject::ob_data` when possible.
This required a major refactor in the code as the output variables are
now gathered in context and easier to access.
|
|
`nearest_world_tree_co` allows null parameter, so the `index` variable
isn't really needed and doesn't even need to be initialized.
|
|
All cache needed is already stored in `Mesh.runtime`.
|
|
The operator was acting on non selected items (wasnt checking SpaceFile
bookmarknr for being -1) which could end up removing items even.
Now sanatize this by introducing proper poll (which returns false if
nothing is selected).
Fixes T102014.
Maniphest Tasks: T102014
Differential Revision: https://developer.blender.org/D16385
|
|
The operator was acting on non selected items (wasnt checking SpaceFile
bookmarknr for being -1) which could end up removing items even.
Now sanatize this by introducing proper poll (which returns false if
nothing is selected).
Fixes T102014.
Maniphest Tasks: T102014
Differential Revision: https://developer.blender.org/D16385
|
|
It could be changed, but currently curves.bounds_min_max
relies on the initial value of its arguments. Split from D16331.
|
|
Use the node topology cache and avoid modifying the node tree
in a non-threadsafe way to improve the predictability of using
the helper function. Replaces the implementation from
e0d40471364aafca967b6ebd52.
|
|
|
|
Also use typed enum for the event handler flag.
|
|
Since these values are only ever 0/1, use bool type.
|
|
|
|
Don't draw channels region when height is 0.
|
|
Currently there are both "EDGERENDER" and "EDGEDRAW" flags, which are
almost always used together. Both are runtime data and not exposed to
RNA, used to skip drawing some edges after the subdivision surface
modifier. The render flag is a relic of the Blender internal renderer.
This commit removes the render flag and replaces its uses with the
draw flag.
|
|
This fixes T102218, where baked f-curves would display incorrectly when normalized.
This bug was a result of the code making no effort to determine the y-range of baked f-curves, so it fell back to a default that looked horrible.
I've added specific handling for finding the y-range of each f-curve (I extracted this functionality out to a new function, `fcurve_scene_coord_range_get`, for organization purposes). In addition, a minor optimization was made to eliminate redundant range-checks when in preview range mode.
{F13838304}
Reviewed By: sybren
Maniphest Tasks: T102218
Differential Revision: https://developer.blender.org/D16363
|
|
|
|
Regression in [0], however the primary purpose of that code was to
cycle away from the active object (behavior which was intentionally
removed, see: T96752).
This broke weight-paint + pose-selection (Ctrl-LMB)
when the GPU depth picking preference was disabled.
Causing selection to pick the mesh object instead of the pose bones.
This de-selected the armature, making the pose bones unselectable
instead of selecting the pose bone as intended.
Adding the old code back (restricting it to weight-paint mode)
fixes the bug but reintroduces fairly involved logic unnecessarily.
Instead, prioritize bone selecting when in weight-paint & pose mode
(previously this was only done in pose-mode).
[0]: b1908f2e0b23988627772f6a6d968d8351dca6d7
|
|
There is no need to use path joining logic here.
|
|
C++ doesn't support taking the temporary address of a temporary array,
use inline functions instead.
Also change array joining functions to return the length of the string
instead of returning the pointer (matching BLI_path_join).
|
|
Part of T102224
|
|
|
|
Steps to reproduce were:
* Right click in 3D View (context menu) press up or down arrow.
Or:
* Ctrl+Shift+O (Open Recent menu) press up or down arrow.
|
|
The goal is to improve clarity and readability, without
introducing big design changes.
Follows the recent obmat to object_to_world refactor: the
similar naming is used, and it is a run-time only rename,
meaning, there is no affect on .blend files.
This patch does not touch the redundant inversions. Those
can be removed in almost (if not all) cases, but it would
be the best to do it as a separate change.
Differential Revision: https://developer.blender.org/D16367
|
|
**Problem**
Currently multiple input sockets are created when a new node group is
made from selected nodes. Some of these are linked from the same source.
It is not convenient to sort out and remove multiple input sockets that
represent the same input. These inputs usually have meaningless names
like 'value', 'x', etc.
**Solution**
Create common input sockets for each link starting from the same input.
Move links inside the new group's node tree and reroute it to connect
the common input socket to the original nodes. This is done by building
up a mapping between the incoming link sources to the input interfaces
created for them. The input interfaces are reused by the rest of the
links having the same source.
This patch also changes the way the input sockets get their names.
Output socket names of the group nodes usually are specific and are
given consciously. Use the output socket names from group nodes instead
of the inputs where the links point to.
Differential Revision: https://developer.blender.org/D15802
|
|
Would only appear when more than 4 asset libraries were loaded, because
small buffer optimization would hide the issue.
|
|
Adds a listener to the node add menu so that it refreshes as assets get
loaded asynchronously.
Followup to cf985180551d, also see 99e5024e97f1 and the previous commit.
|
|
Needed to dynamically load assets as menu items, see cf985180551d and
99e5024e97f1. The next commit will add the listener for the node add menu.
|
|
This allows us to asynchronously load items into the menu, see
cf985180551d. All menus spawned from Python using the `wm.call_menu`
operator will be affected by this. We could avoid that and only refresh
the menu we need to, but it's worth trying to get this to work as a
general menu feature.
This is a slightly risky change, so keeping an eye open for bugs.
|
|
This patch builds on the work from bdb57541475f to add node group
assets directly in the node editor add menu. Assets are added after
separators to distinguish them, but otherwise they look like any other
node. The catalog trees from all configured libraries are used to build
the menu hierarchy. Only catalogs with matching asset types are used
though.
There are a few limitations of this initial version. For now this only
supports geometry nodes. Support for other built-in node systems just
requires some refactoring of the corresponding add menu though. Lazy
loading will be added in a followup commit. For now there is a label
the first time the menu is opened.
Like the search menu integration, re-saving asset library files in 3.4
is required, if it hasn't been done already.
Implementation wise, there is a some ugly code here. A lot of that is
because the asset system isn't complete. The RNA API doesn't work well
yet, and the system isn't built to interact with multiple libraries at
once. It's also ugly because of the way we combine automatic menu
generation with builtin menus. As noted in a code comment, these two
systems could be merged completely so that the menus for builtin nodes
are also generated in the same way.
Differential Revision: https://developer.blender.org/D16135
|