Age | Commit message (Collapse) | Author |
|
Surrounding includes with an 'extern "C"' block is not necessary anymore.
Also that made it harder to add any C++ code to some headers, or include headers
that have "optional" C++ code like `MEM_guardedalloc.h`.
I tested compilation on linux and windows (and got help from @LazyDodo).
If this still breaks compilation due to some linker error, the header containing
the symbol in question is probably missing an 'extern "C"' block.
Differential Revision: https://developer.blender.org/D7653
|
|
This is a common, unambiguous abbreviation
already used throughout the code-base.
|
|
|
|
This change fixes artifacts produced by these operations.
On a technical aspect this is done by porting all of the operations
to the new subdivision surface implementation which ensures that
tangent space used to evaluate modifier and those operations is
exactly the same (before modifier will use new code and the operations
will still use an old one).
The next step is to get sculpting on a non-top level to work, and
that actually requires fixes in the undo system.
|
|
|
|
Instead of using anonymous booleans flags, also allows to keep the same
behavior in all cases, without needing special handling from calling
code for our beloved oddballs object proxies...
|
|
This is in preparation of new object types. This only changes mesh_eval, we
may do the same for mesh_deform_eval and other areas in the future if there is
a need for it.
This previously caused a bug in T74283, that should be fixed now.
Differential Revision: https://developer.blender.org/D6695
|
|
than mesh"
This reverts commit f2b95b9eae2ee913c99cff7595527b18d8b49d0a.
Fix T74283: modifier display lost when moving object in edit mode.
The cause is not immediately obvious so better to revert and look at this
carefully.
|
|
This is in preparation of new object types. This only changes mesh_eval, we
may do the same for mesh_deform_eval and other areas in the future if there is
a need for it.
Differential Revision: https://developer.blender.org/D6695
|
|
|
|
|
|
|
|
This function exposes the already-existing static `object_moves_in_time()`
function, and optionally recursively checks the parent object for
animatedness as well.
I also added checking `AnimData::overrides` to
`BKE_animdata_id_is_animated()`. This ensures that, apart from the optional
recursion to the parent object, the function has the same functionality.
|
|
The function isn't used anywhere, and it's deceptively returning false
negatives. For example, `modifier_dependsOnTime()` will return `false`
for hook modifiers, even when the hook target is animated. Querying the
depsgraph for dependency on the time source would be a better approach.
|
|
This introduces object mode tagging for data which hasn't yet been
written back to the ID data.
Now when selecting other sculpt objects, the original objects data is
flushed back to the ID before writing a memfile undo step.
|
|
|
|
|
|
Parenting/constraints/delta-scaled all caused setting dimensions to fail.
Take the difference between the input scale and final scale into
account when applying the dimensions.
|
|
|
|
|
|
2.7x with hierarchy duplication set to "group".
Regression introduced by rB7fe3d1e7d718 (fixing T57934).
This effectively reverts rBrB7fe3d1e7d718, since changing the type of an
object is a very bad idea in general, and would need a careful and
complex check of all of its usages (many object usages assume a specific
type of object...).
Instead, we simply remove duplicollection on those objects, and give a
warning in case dupligroup was effectively used (in many reported cases,
dupligroup was a 'mistake setting', without actually instancing
aniything).
Note that the otehr idea to fix that versioning issue (to create a new
empty object for the instancing) is much less easy than it might look
(one would need to take into account potential animations, relations
between objects, etc.). Doable probably, but way overkill for a
corner-case 'bad' usage of the feature in the first place.
|
|
This restores the code that updates the sculpt session and PBVH from dependency
graph evaluation.
|
|
This commit extends dependency graph API with an argument which
denotes that all custom data layers are to be preserved. This
forces modifier stack re-evaluation with more inclusive mask.
Far from ideal, since this might fail in certain configurations
with indirectly used objects which might be missing layers needed
for the current object evaluation. But this is how it worked for
a long time, so should be good enough for until more sophisticated
solution is found.
In order to use this new behavior two things are to be passed:
- Pass keep_all_data_layers=True
- Pass a valid dependency graph.
The dependency graph is only needed if keep_all_data_layers=True
and is NOT to be passed if keep_all_data_layers=False.
If keep_all_data_layers=True the dependency graph MUST be passed.
Reviewers: mont29, brecht
Reviewed By: mont29
Maniphest Tasks: T64994, T64794
Differential Revision: https://developer.blender.org/D4940
|
|
One of the usecases is to create mesh from an object is a manner similar to
how Apply Modifiers does it, and have it in the bmain so it can be referenced
by other objects.
This usecase is something what went unnoticed in the previous API changes, so
here is a followup.
Summary of changes:
* bpy.meshes.new_from_object() behaves almost the same as before this change.
The difference now is that it now ensures all referenced data-blocks are
original (for example, materials referenced by the mesh).
* object.to_mesh() now creates free-standing Mesh data-block which is outside
of any bmain. The object owns it, which guarantees the memory never leaks.
It is possible to force free memory by calling object.to_mesh_clear().
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4875
|
|
When using multiple viewlayers and switching between them the selection
gets buggy. The reason for this is that the select_id is updated based
on the index in the viewlayer. This makes the select_id not unique as
objects might be shared or not shared at all.
This fix will update the select_id on all objects in main. This will be triggered in all the selection operators.
Reviewed By: sergey, brecht
Maniphest Tasks: T55617
Differential Revision: https://developer.blender.org/D4824
|
|
Useful to get the un-scaled rotation from a pose channel.
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
|
|
Use prefix now there isn't only the 3d version.
|
|
This introduces a new iterator, FOREACH_COLLECTION, that unlike the
FOREACH_SCENE_COLLECTION it iterates over all the Blender file
collections, including the scene master collection, as well the database
ones (bmain).
Reviewers: brecht
|
|
This behavior matches back-face culled mesh objects,
where the wire outline doesn't depend on the viewing angle.
Applying this before empty visibility check for view framing,
since it's strange if viewing all gives different results
depending on back-face culling.
|
|
As per the suggestion on T57064, this introduces two new options to duplicate collections.
We then have:
* Duplicate > Collection (New collection with linked content).
* Duplicate > Hierachy (Duplicate entire hierarchy and make all contents single user).
* Duplicate > Linked Hierarchy (Duplicate entire hierarchy keeping content linked with original).
Development TODO: `single_object_users` can/should use the new functions.
Reviewers: brecht, mont29
Subscribers: pablovazquez, billreynish, JulienKaspar
Differential Revision: https://developer.blender.org/D4394
|
|
Was caused by another fix in the area, and root to the wrong though that
transformation is only initialized from a fully evaluated dependency graph.
The latter one is not a case when changing transformation mode.
Solved by copying transform to an evaluated object.
|
|
No need to have iterator loop in the view layer evaluation,
this only makes it more difficult to have base flags covered
by the dependency graph.
Other good thing is that we don't need to worry about whether
base has been removed from the evaluated view layer or not.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4414
|
|
Resolves a common cause of confusion.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
More or less same code was being executed twice during ID copying.
Makes no sense to add yet another switch-by-ID-type to handle
specificaly runtime data during ID copying, we already have
BKE_xxx_copy_data() functions for that.
|
|
Issue is, ob->id.us is not relevant anymore here, since several
collection might be referencing it inside of a same scene, that is still
only one usage from user perspective...
Note that for now we are just counting scenes instantiating an object,
time will say wether we need more refined/complete check (as a reminder,
most [all?] other Object usages are *not* refcounting ones).
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
This removes a bunch of animation/driver evaluations and recalc flags that
should be redundant in the new depsgraph, and were incorrectly affecting
the evaluated scene in a permanent way.
Still two cases that could be removed if the depsgraph is improved, in
BKE_object_handle_data_update and BKE_cachefile_update_frame.
For physics subframe interpolation there are also still calls to
BKE_object_where_is_calc that should ideally be removed as well, though
they are not known to cause keyframing bugs.
Differential Revision: https://developer.blender.org/D4274
|
|
Some features are incompatible with multithreading and reliable evaluation
of dependencies. We are now removing them as part of a bigger cleanup to
fix bugs in keyframing and invalid animation evaluations.
* Dupliframes have been removed. This was a hack added before there were
more powerful features like the array modifier.
* Slow parent has been removed, never worked in 2.8. It was always
unreliable for use in production due to depending on whatever frame was
previously evaluated, which was not always the previous frame.
* Particle instanced objects used to have their transform evaluated at
the particle time. Now it always gets the current time transform.
* Boids can no longer do predictive avoidance of force field objects,
but still for other particles.
Differential Revision: https://developer.blender.org/D4274
|
|
Done using:
source/tools/utils_maintenance/c_sort_blocks.py
|
|
- When toggling a mode that doesn't support multi editing
only do this once of the active object.
- For sculpt mode create sculpt data since this is needed
for activating other sculpt objects on reload.
|
|
- Use non-rna button for adjusting dimensions.
- Make Object.dimensions RNA read-only since it never worked well.
This is mainly a UI editing feature.
|
|
|
|
Object visibility is now handled by the depsgraph iterator, but this API
was incomplete as it made no distinction for visibility of the object itself,
particles and generated instances.
The depsgraph iterator API now includes information about which part of the
object is visible, and this is used by Cycles to replace the old custom logic.
Cycles and EEVEE visibility should now be consistent, which unfortunately does
means some subtle compatibility breakage for both.
Fixes T58956, T58202, T59284.
Differential Revision: https://developer.blender.org/D4109
|
|
This commit makes it so curve path parent solving accepts an explicit
arguments for both time and curve speed flag, making it so we don't
have to mock around with scene's frame.
One unfortunate issue still is that if the instancing object is used
for something else, we might be running into a threading conflict.
Possible solution would be to create a temp copy of an object, but
then it will be an issue of preventing drivers from modifying other
datablocks.
At least the original issue is fixed now, and things behave same as
in older Blender version. Additionally, the global variable which
was defining curve speed flag behavior is gone now!
|
|
This is a second attempt to get the crash fixed. The original fix
worked, but it was reverted by d3e0d7f0825.
Now the logic goes as:
- All pointers which we can not have shared (the ones which are
owned by the runtime) are cleared.
- The rest of runtime stays untouched.
This seems to be enough to keep particles happy.
|
|
This restores the object->data to a non-modifier evaluated state.
So this allow us to change evaluated object modifier stack directly and
get BKE_mesh_new_from_object() for the evalauted object.
|