Age | Commit message (Collapse) | Author |
|
|
|
This commit adds some new hashing based data structures to blenlib.
All of them use open addressing with probing currently.
Furthermore, they support small object optimization, but it is not
customizable yet. I'll add support for this when necessary.
The following main data structures are included:
**Set**
A collection of values, where every value must exist at most once.
This is similar to a Python `set`.
**SetVector**
A combination of a Set and a Vector. It supports fast search for
elements and maintains insertion order when there are no deletes.
All elements are stored in a continuous array. So they can be
iterated over using a normal `ArrayRef`.
**Map**
A set of key-value-pairs, where every key must exist at most once.
This is similar to a Python `dict`.
**StringMap**
A special map for the case when the keys are strings. This case is
fairly common and allows for some optimizations. Most importantly,
many unnecessary allocations can be avoided by storing strings in
a single buffer. Furthermore, the interface of this class uses
`StringRef` to avoid unnecessary conversions.
This commit is a continuation of rB369d5e8ad2bb7.
|
|
Make popover wider and image ID widget full width, like in textures properties.
Not ideal but at least the image name can be read now, until the ID widget
gets a more compact redesign.
Fixes T67748
|
|
|
|
|
|
This reverts commit a1d61c1c840227de326f3fff50a92d009bf83939.
Put by error
|
|
Added: Airbrush and Chisel
Changed: Marker
Design: @mendio
Subscribers: mendio
Differential Revision: https://developer.blender.org/D5774
|
|
|
|
|
|
|
|
Differential Revision: https://developer.blender.org/D5715
|
|
|
|
|
|
Differential Revision: D5635
|
|
Along with the new utility `BM_vert_weld_linked_wire_edges_into_linked_faces`
|
|
|
|
Rgression from rBaf4dcc6073fa.
paint_sample_color > imapaint_pick_face uses the the selection buffer
(DRW_select_buffer_sample_point) and to get flat colors [select_id_flat] we
need to be in SCE_SELECT_FACE mode. This was already fine if you had
'Face Selection Masking' turned on, but got colors including lighting
when turned of [select_id_uniform].
There was already an exception in 'select_cache_init' that turns on
SCE_SELECT_FACE for weightpaint, we just need this for texture paint
(vertex paint) as well... Also moved the logic into
select_id_get_object_select_mode.
Note we were also asserting here:
BLI_assert failed: /blender/source/blender/draw/engines/select/
select_engine.c:174, select_cache_init(), at 'e_data.context.select_mode
!= 0'
Note also this is not working correctly for vertexpaint (yet), but has
been discussed in T69752 and there is a solution by @mano-wii in P1032.
Reviewers: mano-wii
Subscribers: mano-wii
Maniphest Tasks: T69752
Differential Revision: https://developer.blender.org/D5775
|
|
This patch adds a new Vertex Color node. The node also returns the alpha
of the vertex color layer as an output.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5767
|
|
|
|
These two data structures reference strings somewhere in memory.
They do not own the referenced string. The string is considered
const.
A string referenced by StringRefNull can be expected to be
null-terminated. That is not the case for StringRef.
This commit is a continuation of rB369d5e8ad2bb7c2.
|
|
When reading a old .blend file (from before the new file browser
design), we wouldn't create the execute region for existing file
editors. This usually wasn't an issue, but it could become one when a
file browser was opened in a temporary screen before, and that screen
was still visible. Then code spawning the new file browser would re-use
the old file browser data, assuming the execute region was there.
Handle this in versioning code and let rest of the code keep sane
assumtions (e.g. that there always is a execute region, even if
invisible).
|
|
|
|
Differential Revision: https://developer.blender.org/D5776
|
|
Fixes T69531
|
|
Group related settings in columns:
* Align Inner, Inner Selected and Outline.
* Align Text, Text Selected and Item.
Place Shaded settings in its own sub-panel.
|
|
|
|
Convention is not to use parenthesis,
Details are included in tool-tip.
|
|
|
|
Many generic C++ data structures have been developed in the
functions branch. This commit merges a first chunk of them into
master. The following new data structures are included:
Array: Owns a memory buffer with a fixed size. It is different
from std::array in that the size is not part of the type.
ArrayRef: References an array owned by someone else. All elements
in the referenced array are considered to be const. This should
be the preferred parameter type for functions that take arrays
as input.
MutableArrayRef: References an array owned by someone else. The
elements in the referenced array can be changed.
IndexRange: Specifies a continuous range of integers with a start
and end index.
IntrusiveListBaseWrapper: A utility class that allows iterating
over ListBase instances where the prev and next pointer are
stored in the objects directly.
Stack: A stack implemented on top of a vector.
Vector: An array that can grow dynamically.
Allocators: Three allocator types are included that can be used
by the container types to support different use cases.
The Stack and Vector support small object optimization. So when
the amount of elements in them is below a certain threshold, no
memory allocation is performed.
Additionally, most methods have unit tests.
I'm merging this without normal code review, after I checked the
code roughly with Sergey, and after we talked about it with Brecht.
|
|
The local view check in the RNA didn't support instanced objects. Every
object has a copy of the local_view_bits from the base. This patch
changes the check to look at the local stored bits.
This patch removes the check if the object is part of the view_layer.
In the cases we are using it this check is not relevant. The `mesh_tissue`
add-on also uses it, and is not effected by this change.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5773
|
|
This patch allows the Voronoi node to operate in 1D, 2D, and 4D space.
It also adds a Randomness input to control the randomness of the texture.
Additionally, it adds three new modes of operation:
- Smooth F1: A smooth version of F1 Voronoi with no discontinuities.
- Distance To Edge: Returns the distance to the edges of the cells.
- N-Sphere Radius: Returns the radius of the n-sphere inscribed in
the cells. In other words, it is half the distance between the
closest feature point and the feature point closest to it.
And it removes the following three modes of operation:
- F3.
- F4.
- Cracks.
The Distance metric is now called Euclidean, and it computes the actual
euclidean distance as opposed to the old method of computing the squared
euclidean distance.
This breaks backward compatibility in many ways, including the base case.
Reviewers: brecht, JacquesLucke
Differential Revision: https://developer.blender.org/D5743
|
|
Private ID data (nodetrees and scene collections...) need special care
and handling of their copy flags, and checks must be adapted too.
In that case, issue came from the fact that even though those IDs have
to be copied outside of bmain, we may still require usercount handling.
That commit also fixes a somewhat related issue - we cannot use the
non-id private data copying flag for private IDs copying, due to
difference in handling of usercount again.
|
|
Set to Pixel.
|
|
It was using "screen_grab_size" as label.
|
|
Capitalize the first letter of a word, except articles and prepositions.
|
|
|
|
|
|
This is caused by rB1342d1879e12 and would also break the whole
"Connect" workflow [which relies on empties]
Reviewers: mont29, brecht
Maniphest Tasks: T69582
Differential Revision: https://developer.blender.org/D5772
|
|
|
|
|
|
During F-12 Rendering the passed screen was Null, but decoded as a
number. In stead of a Null a 0 will be send to cycles python wrapper.
|
|
This diff will add support for local view to Cycles rendered preview mode.
Currently the implementation shows same results as EEVEE does. This entails
a difference with Blender 2.79, where lights were automatically added to the
local view. {T69780} describes this should be solved before the next release.
This patch also solves missing `owner_id` issues when using the RNA CPP Api
from Cycles. Cycles didn't provide the `owner_id` making some functionality
fail, what then was worked around in Blender. It also fixes an issue in
`makesrna` where incorrect CPP code was generated when only `PARM_RNAPTR`
was provided.
An optional `view_layer` parameter is added to the `Object.local_view_get`
method to reduce lookups.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5753
|
|
Also renamed "compressibility" to "volume preservation"
Reviewed By: brecht
Maniphest Tasks: T69737
Differential Revision: https://developer.blender.org/D5757
|
|
|
|
Using geometry update doesn't work on armatures.
|
|
|
|
|
|
These are now set from DNA defaults.
|
|
|
|
|