Age | Commit message (Collapse) | Author |
|
|
|
This commit renames the functions in "BKE_unit.h` to be consistent
with the naming in the rest of blenkernel.
bUnit_AsString -> BKE_unit_value_as_string_adaptive
bUnit_AsString2 -> BKE_unit_value_as_string
bUnit_ReplaceString -> BKE_unit_replace_string
bUnit_ApplyPreferredUnit -> BKE_unit_apply_preferred_unit
bUnit_ToUnitAltName -> BKE_unit_name_to_alt
bUnit_ClosestScalar -> BKE_unit_closest_scalar
bUnit_BaseScalar -> BKE_unit_base_scalar
bUnit_IsValid -> BKE_unit_is_valid
bUnit_GetSystem -> BKE_unit_system_get
bUnit_GetBaseUnit -> BKE_unit_base_get
bUnit_GetBaseUnitOfType -> BKE_unit_base_of_type_get
bUnit_GetName -> BKE_unit_name_get
bUnit_GetNameDisplay -> BKE_unit_display_name_get
bUnit_GetIdentifier -> BKE_unit_identifier_get
bUnit_GetScaler -> BKE_unit_scalar_get
bUnit_IsSuppressed -> BKE_unit_is_suppressed
Differential Revision: https://developer.blender.org/D8828
|
|
not active
Caused by {rB608d9b5aa1f1}
Prior to rB608d9b5aa1f1, the constraint was gotten using **context**
[CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint) -- which is
valid for bones on hidden layers].
After rB608d9b5aa1f1, the constraint is found (or isnt) using
`edit_constraint_property_get` [this is **not** valid for bones on
hidden layers because internally `BKE_pose_channel_active` checks if the
bone is on an active layer].
Some observations:
- Every operator using `edit_constraint_property_get` doesnt work for
bones on inactive layers [delete, moveup, movedown, move to index (drag
n drop nowadays)]
-- moveup, movedown, move to index check if they could find a constraint
beforehand though (dont crash)
-- delete crashes (doesnt check if a constraint could actually be found)
- Every operator using `edit_constraint_property_get` for constraint
data doesnt work for bones on inactive layers [stretchto_reset,
limitdistance_reset, childof_set_inverse, ...]
-- these all check if they could find a constraint beforehand though
(dont crash)
This is because the poll function is using **context** to get the
constraint, the operators themselves use
**edit_constraint_property_get** which leads to inconsistent/unexpected
results.
Possible solutions were:
- [1] let the delete operator just work with the context constraint
again (like prior to rB608d9b5aa1f1) -- allows for deleting constraints
on bones in inactive layers
- [2] check if we could get a constraint -- prevents the crash, but does
**not** allow for deleting constraints on bones in inactive layers
- [3] make the poll `edit_constraint_poll_generic` be as strict as the
operators -- dont use **context** to get the constraint, but something
like **edit_constraint_property_get**
- [4] make the operators be more graceful and let them act on bones on
hidden layers -- let **edit_constraint_property_get** actually use the
same **context**
This patch implements [4], so poll an doperators are now in sync.
- prevents reported crash
- also enables operators for bone constraints on hidden layers
- also enables drag and drop reordering of constraints on hidden layers
This might be a candidate for 2.90.1? (if it is, take care to include
prior "Refactor getting constraints" refactoring commit)
Note: Adding constraints also doesnt work for bones on inactive layers
[that was the case in 2.79 as well -- it is also using
`BKE_pose_channel_active`]
Maniphest Tasks: T80464
Differential Revision: https://developer.blender.org/D8805
|
|
This is the refactoring part of D8805 (should be no functional changes).
- exposes pose-related part of former 'get_constraints()' from
interface_templates.c to new ED_object_pose_constraint_list
- rename ED_object_constraint_list_from_context -->
ED_object_constraint_active_list
Also clarify comments on both of these.
ref T80464
ref https://developer.blender.org/D8805
|
|
Blender does string based searching in many different places.
This patch updates four of these places to use the new string
search api in `BLI_string_search.h`.
In the future we probably want to update the other searches as well.
Reviewers: Severin, pablovazquez
Differential Revision: https://developer.blender.org/D8825
|
|
This adds a generic string search library in `BLI_string_search.h`.
The library has a simple to use C api that allows it's users to
filter and sort a set of possible search results based on some
query string.
Reviewers: Severin
Differential Revision: https://developer.blender.org/D8825
|
|
Regression in a48d78ce07f4f which caused the meshes CustomData
to be written before it's layer values were updated for writing.
|
|
-1 is a valid value to pass as RNA float precision. We let the UI code
figure out an appropriate precision then. So don't fail the assert if
-1 is passed.
|
|
The point cache code needs a non NULL rbw pointer.
This could have been avoided if there was a sanity check in the convert
function, so added a check there as well.
|
|
|
|
|
|
|
|
Also check 'BASE_SELECTABLE' before selecting
which was only done for collections.
|
|
|
|
On systems with 512kb stack this happened at around 13k points.
This happened at times with grease-pencil, although callers that
frequently use complex polygons should be using BLI_polyfill_calc_arena.
|
|
|
|
|
|
|
|
This reverts commit 637a5c964a01f5e8733e972cb8a30341eb91058e.
I commited the previous commit because I wasn't building with openvdb.
Compiling with openvdb fix the clang-tidy errror.
|
|
This makes it easier to see what each sampler is supposed to be.
|
|
This was caused by rBe749643793809248dfc6ffd078be04aec3eeab82 which
removed the texture repeat from Image texture.
|
|
|
|
|
|
This removes from the UI all tools with missing icons and hides them
under a "Tools with missing icons" experimental option.
We agree on not making available by default tools in master without icons.
Having this experimental flag will allow to commit new tools as soon as the
technical design and implementation is finished so development can
continue, without adding broken icons to the UI.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D8831
|
|
|
|
Add support for object data instancing. This is used when the objects
are instances, for example when duplicated by a particle system, or
instanced by the duplication system (collection-duplicating empties,
vertex/face duplis, etc.)
Since Alembic already deduplicates data, this doesn't make the resulting
Alembic files any smaller. They will be faster to write, though, when
there is a lot of instanced geometry, as the deduplication system won't
have to do any comparisons.
This instancing support is still limited, in the sense that only object
data is instanced and all transforms are still written explicitly. A
future improvement could be to support instancing entire collection
hierarchies.
Blender's Alembic importer has no understanding of these Alembic
instances yet, and will thus happily duplicate the data on import.
The USD Alembic plugin seems to have problems understanding the
instancing. There might also be other software with similar issues.
Because of this, instancing can be turned off in the exporter (it's on
by default).
|
|
* Match menu items with Add Menu (order and naming e.g. Font -> Text)
* Use Icons
* Remove ellipsis from the name (policy is to use `...` only when triggering a window/popup)
No functional changes.
Thanks @HooglyBoogly for the help!
|
|
Split `ABCHierarchyIterator::get_alembic_parent()` into two functions:
- For a given export path, find the Alembic object
- Ensure that that object is usable as parent object (Alembic uses a
specific 'top' object as parent to indicate "no parent").
The new function is `public` as it will be used in an upcoming feature,
and is required to be public then.
No functional changes.
|
|
Split the `ABCHierarchyIterator::create_data_writer()` function into two
functions. This is to prepare for the creation of writers not just by
object type, but also by goal, for example writers that reference other
Alembic data instead of writing their own (i.e. instancing).
No functional changes.
|
|
This was caused by an incorrect mipmap size.
Also add debug checks for good mesure.
|
|
|
|
The context might be partialy freed, so use gpu::Context instead of
GLcontext.
|
|
|
|
The draw manager test case initialized ghost, gpu and draw manager. This
change splits the base test case to GPU specific and draw manager
specific test case.
The GPU test base test case will be used for low level GPU tests.
|
|
Memory leak is introduced as test cases reinitializes the GPU stack.
Added a call to GPU_backend_exit to fix this.
In GPU_backend_exit the GPU backend was destroyed but the pointer wasn't
reset for reuse. This patch also clears the pointer to be reused.
|
|
Using blender::draw::tests as namespaces.
|
|
Follow-up of 63dc72c3521, make parameter `const`.
No functional changes.
|
|
Extract the mesh instancing code from the mesh writing function into a
generic 'mark as instance' function on the abstract USD writer. This will
help in supporting non-mesh instances.
No functional changes.
|
|
Refactor `ED_object_parent_set`:
- Mark parameters `ob` and `par` as `const` so that it's clear the
function doesn't assign any other value to them.
- Rename `pararm` to `is_armature_parent`; I mis-read it as `param` all
the time, and it was very confusing.
- Replace repeated `if-else` statements with `switch` statements.
- Reorder preconditions to have some simple checks first.
- Flip condition on a huge `if`-statement to return early and unindent
the remainder of the function.
This function still requires splitting up into smaller functions, but at
least this is a step forward.
No functional changes.
|
|
The localized node-tree was freeing the materials ID properties twice.
This matches how animation data behaves, setting to NULL after freeing.
|
|
|
|
Also update old comment.
|
|
Use 'e' prefix, update comments.
|
|
This patch supports instantiating object data on append/link,
reported as a bug T58304.
This is an option, available when linking/appending,
similar to the existing "Instance Collections" option.
Reviewed by @sybren
Ref D8792
|
|
Move arguments to BLO_library_link_{begin/named_part/end} into
a single parameter struct, to ensure arguments always match.
This allows is to skip tagging ID's LIB_TAG_DOIT when it's not needed,
previously it was always cleared just in case it was needed.
This also makes it possible to remove BLO_library_link_named_part_ex
which was only used when tagging was needed.
|
|
This makes the GPUContext follow the same naming convention as the rest
of the module.
Also add a static getter for extra bonus style (no need for casts):
- Context::get()
- GLContext::get()
|
|
- Use the syntactic wrap/unwrap method to make code more readable.
- Update comment about hidden struct behind opaque types.
- Cleanup GPUDrawList type.
|
|
This is a cleanup.
|
|
This was left from a previous refactor.
|
|
This avoids unecessary complexity.
Also makes the GPUImmediate threadsafe by using a threadlocal imm variable.
|