Age | Commit message (Collapse) | Author |
|
In big files, ie typical production files, resizing the outliner area would be
very slow. The outliner tree would be rebuilt then, which can easily be avoided.
|
|
Channels aren't visually changed by playing back an animation so there
is no need to do this. As rendering channels is using a lot of logic
(filtering animation data, converting fcurves to samples etc) it has an
noticeable overhead.
This change has no functional limitation. Users are still able to do
everything during animation playback. There are other mechanisms in
place that take care of that.
Spring 02_020_A.anim.blend went from 11.8 to 12.0 on a Ryzen 1700. I
didn't test with scenes but it should be more noticeable with more
complex scenes.
Reviewed By: Brecht van Lommel
Differential Revision: https://developer.blender.org/D8073
|
|
So no need to check this specific case.
|
|
Function used int for everything.
|
|
|
|
|
|
|
|
Functionality here has become confusing over time,
this removes duplicate, similar functions, preferring to set the mode
instead of toggle, enter, exit.
Mode switching utility function behaved differently regarding undo,
'ED_object_mode_toggle' for example didn't skip the undo push
where 'ED_object_mode_set' did.
Some callers chose these functions based on the intended undo behavior,
even when toggling didn't make sense.
There was also ED_object_mode_generic_enter which was similar to
ED_object_mode_set, instead of the reverse of ED_object_mode_generic_exit.
Simplify object mode switching internals:
- Replace ED_object_mode_generic_enter with ED_object_mode_set.
- Remove ED_object_mode_toggle as nearly all callers needed to check
the current mode so toggling would set the mode argument correctly.
- Use ED_object_mode_set for the object mode switching operator
to simplify logic.
- Add ED_object_mode_set_ex which has an argument to disable undo,
needed when loading undo data needs to set the mode.
- Remove unused ED_object_mode_exit.
|
|
|
|
Properly align every involved edge when performing 'tolerant' area joins.
Differential Revision: https://developer.blender.org/D7859
Reviewed by Brecht Van Lommel
|
|
This implements a general system to implement drag and drop, subpanels,
and UI animation for the stack UIs in Blender. There are NO functional
changes in this patch, but it makes it relatively trivial to implement
these features for stacks.
The biggest complication to using panels to implement the UI for lists
is that there can be multiple modifiers of the same type. Currently there
is an assumed 1 to 1 relationship between every panel and its type, but
there can be multiple list items of the same type, so we have to break
this relationship. The mapping between panels and their data is stored
with an index in the panel's runtime struct.
To make use the system for a list like modifiers, four components
must be added:
1. A panel type defined and registered for each list data type, with a
known mapping between list data types and panel idnames.
1. A function called by interface code to build the add the panel
layouts with the provided helper functions.
- UI_panel_list_matches_data will check if the panel list needs to
be rebuilt.
- UI_panels_free_instanced will remove the existing list panels
- UI_panel_add_instanced adds a list panel of a given type.
3. An expand flag for the list data and implementations of
get_list_data_expand_flag and set_list_data_expand_flag.
4. For reordering, the panel type's reorder callback. This is called
when the instanced panels are drag-dropped. This requires
implementing a "move to index" operator for the list data.
Reviewed By: Severin, brecht
Differential Revision: https://developer.blender.org/D7490
|
|
* Simplify workspace API a bit
* Comment on behavior of workspace-layout relations where exposed in API
* Remove annoying getters/setters
* Avoid lookups if we can early exit
* A NULL check is removed in `direct_link_workspace()` that I don't see
a need for. Am not 100% sure though, fingers crossed.
In general these changes should improve readability and make things
easier to reason about.
|
|
view_layer should never be NULL.
|
|
Allow use of the full width of visible borders when dragging to resize areas.
Differential Revision: https://developer.blender.org/D7823
Reviewed by Brecht Van Lommel
|
|
The operators to open the Preferences, Driver Editor, or Info Log window did
not work when executed from another operator or the Python console. Should work
for all of these now.
I considered using operator properties instead, so the position could be set by
a script, with some fallback (e.g. current window center). But decided that's
not really worth the boilerplate and decreased code readability. Can still be
done if there's a need for it.
|
|
|
|
|
|
|
|
Re-apply changes from 54ea3562406c633dc69f59697cca3cd1cded3bcd,
with a poll function that uses the same active object as the operator,
matching other mode switching functions.
|
|
|
|
This was caused by the sRGB viewport changes. The fix is to modify the
alpha values manually. The shader was also missing a srgb fix.
|
|
Avoid noisy diff's & conflicts.
|
|
|
|
This fixes crash in the free mesa driver for amd gpus. This crash seems to
only happen on linux.
|
|
|
|
Reviewers: lichtwerk, sybren
Differential Revision: https://developer.blender.org/D7702
|
|
Previously the playback mode "Frame Dropping" would not drop the correct
number of frames which would lead to slow playback.
For example, the playback target is 60fps. However we can only muster
around 32 fps.
The delta frames from the last step is in this case ~1.98 or so.
With the previous code, we would floor this. That would lead us to step
forward one frame each time, effectively playing back the animation at
half the speed as we will try to render every frame.
To fix this we simply save the remaining fraction from the previous
frame and use it to compute the current frame step.
Reviewed By: Sybren
Differential Revision: http://developer.blender.org/D7694
|
|
|
|
This was because of the use of uninitialized buffers for TAA.
This patch is a quick fix for the issue which is a missing tagging for a
complete viewport update.
|
|
|
|
- Changing API for time values from float to double for better precision.
- Fixing minor mistakes in the documentation.
- Fixing minor unnecessary large memory allocation.
|
|
While dragging panels, the region size would change which would feel glitchy.
See D7462 for a demo of the issue.
|
|
|
|
The problem comes from the fact by no data being modified when switching
viewlayers.
To follow what the external render engines do, we completely reset the
viewport by freeing the GPUViewport to avoid any cached data from being
kept.
|
|
|
|
Although we still dynamically hide scrollbars, they don't change the
region size anymore. They are simply drawn on top of the region content.
Because of this, some hacks introduced by fa28e50ac2a7 are no longer
necessary.
Without these hacks, the scrollbar visibility is evaluated much more
often (cheap operation) which should be more reliable and possibly solve
some glitches.
Also replaces integers passed as booleans.
Fixes T75782.
|
|
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.
Differential Revision: https://developer.blender.org/D7320
|
|
These headers are not needed right away, but will be in the upcoming
commit.
|
|
Part of T74432.
Mostly a careful batch rename but had to do few smaller fixes.
Also ran clang-format on affected files.
|
|
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432.
Now the area and region naming conventions should be less confusing.
Mostly a careful batch rename but had to do few smaller fixes.
Also ran clang-format on affected files.
|
|
Continuation of b2ee1770d4c3, now non-single word variables are also
renamed.
Part of T74432.
Also ran clang-format on affected files.
|
|
|
|
|
|
Needed for upcomming fix for T66494.
ref T66494 / D7281
|
|
Rename:
- WM_modalkeymap_add to WM_modalkeymap_ensure
- WM_modalkeymap_get to WM_modalkeymap_find
|
|
|
|
Issues exposed by 'bl_run_operators.py' utility.
|
|
Also pass some args as 'const'.
|
|
|
|
|