Age | Commit message (Collapse) | Author |
|
Instead to use the ID of the object, now the parameter is an Enum with Selected object or New.
If use selected mode, the first grease pencil object selected is used. If none of the selected objects is a grease pencil object, a new object is created.
Small cleanup changes to the original patch.
Differential Revision: https://developer.blender.org/D9529
|
|
LibOverrides only support a small sub-set of PointCache features for now
(one cannot add new caches, baking in memory is not supported...).
Part of first step of T82503: support disk cache in liboverrides.
|
|
The orientation & depth settings are used to show the preview plane
that is used when adding the object.
|
|
Also use short for panel flag arguments to functions since it matches
the type in DNA, and remove a comment that isn't helpful.
|
|
This commit moves some of the logic around so that the logic in
panel_activate_state is clearly separated by the state being activated.
There are fewer nested and redundant checks, and it's easier to see
the progression of interaction with the panel handler.
|
|
Add a NULL check for the View3D's camera, because these
modes can be entered even without an active camera.
|
|
This commit makes the property editor switch to the physics tab instead
of the modifier tab when selecting physics modifiers. Since the modifier
isn't visible then, it's confusing to change the expansion, so this commit
also disables the modifier expansion for these modifiers.
Differential Revision: https://developer.blender.org/D9544
|
|
|
|
Add a new property `co_ui` to Keyframes, the modification of which will
apply to the keyframe itself as well as its Bézier handles.
Dragging the "Keyframe" slider in the properties panel now maintains the
deltas between the keyframe and its handles, just like moving the key in
the graph editor would.
Reviewed by @sybren in T81813.
|
|
|
|
Should not do anything in that case.
ref T82615
Maniphest Tasks: T82615
Differential Revision: https://developer.blender.org/D9532
|
|
This is more in line to other eyedropper usages throughout blender.
Affected operators:
- Sample Dyntopo detail
- Extract Face Set (as reported in T82615)
ref T82615
Maniphest Tasks: T82615
Differential Revision: https://developer.blender.org/D9531
|
|
|
|
When creating an armature from the skin modifier, resulting bones would
always be flagged BONE_CONNECTED.
Those bones cannot be transformed (just rotated).
Now only flag bones that really have a parent BONE_CONNECTED.
Maniphest Tasks: T82624
Differential Revision: https://developer.blender.org/D9534
|
|
Issue exposed by rB4c7b1766a7f1.
Main idea is that non-memfile first undo step should check into previous
memfile and tag the ID it is editing as `future_changed`.
That way, when we go back and undo to the memfile, said IDs are properly
detected as changed and re-read from the memfile.
Otherwise, undo system sees them as unchanged, and just re-use the
current data instead.
Note that currently only Sculpt mode seems affected (probably because it
is storing the mode switch itself as a Sculpt undo step instead of a
memfile one), but similar action might be needed in some other cases
too.
Maniphest Tasks: T82388
Differential Revision: https://developer.blender.org/D9510
|
|
|
|
|
|
When painting in the image editor on data images (Non-color, Raw) the
color mismatched between the sampled color and the actual effect that
the painting has on the image. The root cause is that the sampling is
color managed, but the painting still uses a fixed color management
pipeline with a lot of assumptions. Due to recent changes the drawing
of the image editor is color managed, but the painting isn't what made
these changes show up.
This patch is a work-a-round so that the sampled colors and the effect
the paint has on the texture matches. This isn't the correct solution
as that would be to migrate all the painting tools to use proper color
management.
Reviewed By: Pablo Dobarro
Differential Revision: https://developer.blender.org/D9411
|
|
There are two implementations of the Sample Color operation. One is used
by the paint texture and one by the image editor. The image editor
variant sampled from the ibuf directly, but the paint texture variant
was sampling from the screen front buffer. This can lead into incorrect
samples due to color pipeline.
This patch will use the image editor variant when sampling a color for
2d texture painting
Reviewed By: Pablo Dobarro
Differential Revision: https://developer.blender.org/D9408
|
|
Split out functionality needed for preview plane drawing.
|
|
|
|
|
|
|
|
These are generally only one or two word phrases and are not sentences.
This change slightly improves readability.
Note, the check when display labels:
```
Tip Label (only for buttons not already showing the label).
```
Could be improved here because there are a lot of false positives.
|
|
See https://developer.blender.org/D9499.
It's odd to include a C++ header (".hh") in C code, we should avoid that. All
of the Outliner code should be moved to C++, I don't expect this C header to
stay for long.
|
|
See https://developer.blender.org/D9499.
"View" leads to weird names like `TreeViewViewLayer` and after all they are
specific to what we call a "display mode", so "display" is more appropriate.
Also add, update and correct comments.
|
|
See https://developer.blender.org/D9499.
* Use C++17 nested namespaces.
* Use `_` suffix rather than prefix for private member variables.
Also: Simplify code visually in `tree_view.cc` with `using namespace`.
|
|
See https://developer.blender.org/D9499.
* Turn functions into member functions (makes API for a type more obvious &
local, allows implicitly sharing data through member variables, enables order
independend definition of functions, allows more natural language for
function names because of the obvious context).
* Prefer references over pointers for passing by reference (makes clear that
NULL is not a valid value and that the current scope is not the owner).
* Reduce indentation levels, use `continue` in loops to ensure preconditions
are met.
* Add asserts for sanity checks.
|
|
See https://developer.blender.org/D9499.
Also:
* Add `space_outliner/tree/common.cc` for functions shared between display
modes.
* I had to add a cast to `ListBaseWrapper` to make it work with ID lists.
* Cleanup: Remove internal `Tree` alias for `ListBase`. That was more confusing
than helpful.
|
|
See https://developer.blender.org/D9499.
Also remove unnecessary forward declaration.
|
|
|
|
See https://developer.blender.org/D9499.
|
|
See https://developer.blender.org/D9499.
* Add comments to explain the design ideas better.
* Follow code style guide for class layout.
* Avoid uninitialized value after construction (general good practice).
|
|
See https://developer.blender.org/D9499.
* Use `blender::Map` over `GHash`
* Use `blender::Vector` over allocated `ListBase *`
Benefits:
* Significantly reduces the amount of heap allocations in large trees (e.g.
from O(n) to O(log(n)), where n is number of objects).
* Higher type safety (no `void *`, virtually no casts).
* More optimized (e.g. small buffer optimization).
* More practicable, const-correct APIs with well-defined exception behavior.
Code generally becomes more readable (less lines of code, less boilerplate,
more logic-focused APIs because of greater language flexibility).
|
|
See https://developer.blender.org/D9499.
* Turn functions into member functions (makes API for a type more obvious &
local, allows implicitly sharing data through member variables, enables order
independend definition of functions, allows more natural language for
function names because of the obvious context).
* Move important variables to classes rather than passing around all the time
(shorter, more task-focused code, localizes important data names).
* Add helper class for adding object children sub-trees (smaller, more focused
units are easier to reason about, have higher coherence, better testability,
can manage own resources easily with RAII).
* Use C++ iterators over C-macros (arguably more readable, less macros is
generally preferred)
* Add doxygen groups (visually emphasizes the coherence of code sections,
provide place for higher level comments on sections).
* Prefer references over pointers for passing by reference (makes clear that
NULL is not a valid value and that the current scope is not the owner).
|
|
This introduces a new C++ abstraction "tree-display" (in this commit named
tree-view, renamed in a followup) to help constructing and managing the tree
for the different display types (View Layer, Scene, Blender file, etc.).
See https://developer.blender.org/D9499 for more context. Other developers
approved this rather significantly different design approach there.
----
Motivation
General problems with current design:
* The Outliner tree building code is messy and hard to follow.
* Hard-coded display mode checks are scattered over many places.
* Data is passed around in rather unsafe ways (e.g. lots of `void *`).
* There are no individually testable units.
* Data-structure use is inefficient.
The current Outliner code needs quite some untangling, the tree building seems
like a good place to start. This and the followup commits tackle that.
----
Design Idea
Idea is to have an abstract base class (`AbstractTreeDisplay`), and then
sub-classes with the implementation for each display type (e.g.
`TreeDisplayViewLayer`, `TreeDisplayDataAPI`, etc). The tree-display is kept
alive until tree-rebuild as runtime data of the space, so that further queries
based on the display type can be executed (e.g. "does the display support
selection syncing?", "does it support restriction toggle columns?", etc.).
New files are in a new `space_outliner/tree` sub-directory.
With the new design, display modes become proper units, making them more
maintainable, safer and testable. It should also be easier now to add new
display modes.
|
|
|
|
- scrolling would be restricted (usually, if the object to be renamed is
in view, this prevents scrolling away without finishing the rename
operation)
- renaming by typing and confirming with Enter was not possible (you
would have to escape, scroll to the object and use F2 again)
- other shortcuts like A and H are still active instead of being handled
as text input
Avoid all these issue by forcing the item into view using
outliner_show_active / outliner_scroll_view.
Maniphest Tasks: T82553
Differential Revision: https://developer.blender.org/D9521
|
|
Scrolling to an item after opening relevant parents can go wrong if said
parent e.g. the last in the list [as in: then the Outliner does not
scroll down all the way]
It stems from the fact that 'region->v2d.tot.ymin' is not up-to-date in
outliner_scroll_view after outliner_show_active opens up parents, 'tot'
will only update on a redraw.
Now calculate the trees height on the fly using
'outliner_tree_dimensions()'.
ref D9521
ref T82553
Maniphest Tasks: T82553
Differential Revision: https://developer.blender.org/D9523
|
|
|
|
Selection should be possible from the left gutter in object mode. When
in other modes the mode column displays icon buttons which should be
prioritized for selection only in those modes.
Introduced in rB2110af20f5e6.
|
|
For the `plane_depth` of type `PLACE_DEPTH_SURFACE` to take effect, a `snap_context` is needed.
But, even if a temporary `snap_context` was created for `plane_orient == PLACE_ORIENT_SURFACE`,
this context was not used for `plane_depth`.
So, use a temporary `snap_context` for `PLACE_DEPTH_SURFACE` (as it is done for `PLACE_ORIENT_SURFACE`).
Differential Revision: https://developer.blender.org/D9345
Differential Revision: https://developer.blender.org/D9435
|
|
|
|
Functionality was lost in the Python to C conversion from
850234c1b10a828678f1b91001f2731db807f7e2
|
|
|
|
Zeroed mouse coordinates were being used making projection fail.
|
|
|
|
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D9422
|
|
|
|
And remove Blender preference, which was expected to be set to match the system
preference for correct behavior. Instead just handle this automatically.
Differential Revision: https://developer.blender.org/D9402
|