Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
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
|
|
Having this in blenkernel caused bad level calls to bf_editors_anim,
causing tests that use 'blenkernel' to require almost all libraries.
(complicating gtest linking & causing large binaries).
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
Needed for clan-format not to wrap onto one line.
|
|
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.
|
|
|
|
Unused since 2.4x.
|
|
|
|
There were at least three copies of those:
- OB_RECALC* family of flags, which are rudiment of an old
dependency graph system.
- PSYS_RECALC* which were used by old dependency graph system
as a separate set since the graph itself did not handle
particle systems.
- DEG_TAG_* which was used to tag IDs.
Now there is a single set, which defines what can be tagged
and queried for an update. It also has some aggregate flags
to make queries simpler.
Lets once and for all solve the madness of those flags, stick
to a single set, which will not overlap with anything or require
any extra conversion.
Technically, shouldn't be measurable user difference, but some
of the agregate flags for few dependency graph components did
change.
Fixes T58632: Particle don't update rotation settings
|
|
The cause is that FOREACH_OBJECT_IN_MODE_BEGIN assumed that the active
object is in the correct mode, which is wrong in this case. It also
only considered objects of the same type as active, which had to be
replaced with an explicit type parameter.
|
|
Bring back per-viewport localview. This is based on Blender 2.79.
We have a limit of 16 different local view viewports.
We are using both the numpad /, as well as the regular /.
Missing features:
* Hack to make sure lights are always visible.
* Make rendered mode with external engines to support this as well
(probably just need to support this in the RNA iterators).
* Support over 16 viewports by taking existing viewports out of local view.
The code can use a cleanup pass in the future to unify the test to see
if an object is visible (or we can use TESTBASE in more places).
|
|
Make it the convention to multiply by scaling factor inside the function, so
Python scripts that didn't add DPI scale start working correctly.
|
|
For now only `selected_pose_bones_from_active_object`, more options can
be added on demand.
Discussed this with Campbell Barton. We may need this only for selected
pose bones, time will tell.
|
|
New iterator CTX_DATA_BEGIN_FOR_ID, to restrict the loop to the specified object only.
This is not super efficient, but it should be fine for now.
I will talk to other developers. A more elegant solution would be to
have something like "active_object_selected_pose_bones" in the context.
|
|
|
|
This reverts commit 178530cc50e2fb4bd3faf4fff22392a58688bed1.
Those operators are called from the UI, which only takes into
consideration the active object for the parameters and whether to call
reset, update or calculate.
We can re-revert if needs be.
|
|
* POSE_OT_paths_clear
* POSE_OT_paths_calculate
* POSE_OT_paths_update
Despite my personal opinion on the matter, those operators were listed
as to be converted (see T54650).
They are called from the UI, where you only see the parameters for the
active object/armature.
I will commit and revert soon after, so we can quickly bring it back
once we re-visit this design.
|
|
This reverts commits:
* 2a2858b30dbbc19246446bcc89a7a4e7f67c7ce0
* 7cf8eed5e02a1f6525c3df2f404cb78db24adc98
Similar to ARMATURE_OT_layers_show we should keep this operator
single-object oriented. This one is a bit more tricky since we
may want to quickly see all the layers of all the armatures.
I will check with animators what is the best way to proceed here.
But overall I think it makes sense to have this only for the active
object.
|
|
This reverts commits:
* 29a281f9ef5b3a577e6d658892a704b509d718ef
* 3a8b56ce24c9228a885d3c44f4c22d90be04ae4c
This operator shouldn't behave multi-objects. This would only work
if all the selected objects had the same logic for their layers,
which may be likely for characters, but it won't be for mixing props and
characters.
|
|
That said, I think we should not support multi-object for either edit or pose armatures.
|
|
|
|
Otherwise the space button does not redraw.
|
|
|
|
Using CTX_DATA_BEGIN_WITH_ID here.
Unlike the edit mode counter-part this operator is well served with the
macro above. ARMATURE_OT_autoside_names needs to treat mirrored bones
separately, while for pose we don't handle those cases.
Be ware that using this macro makes the code smaller, however it also
tags every single (selected) pose to update, regardless of whether we
changed the names of the bones.
In this case it is fine since we most likely renamed all the bones.
But In other cases I'm still a bit wary of using CTX_DATA_BEGIN_WITH_ID
instead of BKE_view_layer_array_from_objects_in_mode_unique_data.
To be seen in upcoming commits. Stay tuned.
|
|
|
|
|
|
|
|
|
|
|
|
Terms get/set don't make much sense when casting values.
Name macros so the conversion is obvious,
use common prefix for easier completion.
- GET_INT_FROM_POINTER -> POINTER_AS_INT
- SET_INT_IN_POINTER -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER -> POINTER_FROM_UINT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Use debug_value = -1 to disable the use of the filtered depsgraph.
It's still useful to have this for benchmarking + until we're
confident the filtering works safely.
|
|
|
|
after use
|
|
This commit makes the motion path calculations use the
new Depsgraph Filtering API to obtain a more streamlined
copy of the full scene dependency graph, allowing for
faster calculations (as less data needs to be evaluated
for each frame being baked).
For example, in 01_020_A.anim.blend from the Spring production
files, the time needed to calculate paths on several bones
on Autumn went from 39.84 seconds (!) down to 9.90 seconds!
Currently, this works by just replacing the depsgraph instance
passed to the motion path calculation function. This filtered
instance contains just the ID's needed to evaluate the graph
to evaluate a specified target (i.e. the Object owning the pose).
Notes:
* By default, the filtering is not performed unless debug mode 555
is activated. Having a debug switch here allows comparing
performance and disabling it should thing it start crashing.
* It is necessary to pass in the original Scene instance (not the
COW one owned by the filtered depsgraph), otherwise changing the
current frame had no effect, due to the COW flushing from original
Scene to the new Scene overwriting the CFRA changes we make.
* The code here still needs cleaning up to debugging instrumentation, etc.
and also to optimise further (e.g. caching the filtered depsgraph
for faster updates when animating on existing paths, or fine-tuning
the exact set of nodes needed). I'm just committing this first,
since this was the quickly hacked-together test code I've been using
to check that this is all working.
* Further improvements could also be made to the time needed to
build the full graph instance (about 3.3 sec), by allowing partial
builds (e.g. by making a filtering proxy/wrapper around existing builders)
|
|
Make it easier to update the frame range for motion paths from
the Scene's current frame range (render or preview range)
|
|
collect timing data
This will be useful for checking on the progress of our optimisation
efforts, and to generate some nice stats for later.
|
|
After clearing motion paths from objects, those objects needed to be
tagged for copy on write so that the copied data (i.e. viewport)
recieve the changes (i.e. removed paths)
Reported by Hjalti
|
|
This puts the motion path in the same location as the transform gizmo,
which is less confusing especially if you have a custom bone shape where
the tail is not visible.
|