Age | Commit message (Collapse) | Author |
|
Follow our code style guide by using C-comments for text descriptions.
|
|
Define enum `eContextResult` and use its values for returns, instead of
just returning 1, 0, or -1 (and always having some comment that explains
what -1 means).
This also cleans up the mixup between returning `0` and `false`, and `1`
and `true`. An inconsistency was discovered during this cleanup, and
marked with `TODO(sybren)`. It's not fixed here, as it would consititute
a functional change.
The enum isn't used everywhere, as enums in C and C++ can have different
storage sizes. To prevent issues, callback functions are still declared
as returning`int`. To at least make things easier to understand for
humans, I marked those with `int /*eContextResult*/`.
This is a followup of D9090, and is intended to unify how context
callbacks return values. This will make it easier to extend the approach
in D9090 to those functions.
No functional changes.
Differential Revision: https://developer.blender.org/D9095
|
|
|
|
|
|
This is to modernize the API:
- Add meaningful name to all textures (except DRW textures).
- Remove unused err_out argument: only used for offscreen python.
- Add mipmap count to creation functions for future changes.
- Clarify the data usage in creation functions.
This is a cleanup commit, there is no functional change.
# Conflicts:
# source/blender/gpu/GPU_texture.h
|
|
Use creation + update function instead.
|
|
For the man rationale behind this design, see 49f088e2d093. Further,
this removes users of uiBut.a1/uiBut.a2, which is a very ugly design
choice (hard to reason about).
Note that I had to do rather ugly, specific exceptions for the number
buttons in `ui_def_but_rna()`. But once all users of a1/a2 are removed,
this special handling shouldn't be needed anymore.
I also had to move a sanity check out of the button definition. It's now
moved into a new debug only sanity checking function executed when
finishing the layout definition (block end).
|
|
This replace `GPU_clear()` by `GPU_clear_color()` and `GPU_clear_depth()`.
Since we always set the clear value before clearing, it is unecessary
to track the clear color state.
Moreover, it makes it clearer what we clear the framebuffer to.
|
|
|
|
We now use GPU_blend for enabling / disabling blending and explicitly
set the blend equation.
|
|
|
|
Also order sizeof(..) first to promote other values to size_t.
|
|
|
|
|
|
|
|
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.
This patch has been generated by P1561 followed by `make format`.
Differential Revision: https://developer.blender.org/D8466
|
|
The data member `new` was conflicting with the `new` keyword
when `BKE_screen.h` was included in C++ files.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D8459
|
|
|
|
Caused by rB63ee3db96107.
While above commit corrected the clip offset, it also removed logic to
ensure a marker on a particular frame. This is needed though, otherwise
changes on a particular frame are applied to the marker being returned
by 'BKE_tracking_marker_get' which can be a completely different marker
if none exist for that frame yet.
This patch partly reverts rB63ee3db96107 and reintroduces the framenr
for the MarkerUpdateCb and uses that to ensure a marker on that frame.
Candidate for backporting to 2.83 LTS?
Reviewers: sergey, jacqueslucke
Subscribers:
|
|
The abbreviation 'init' is brief, unambiguous and already used
in thousands of places, also initialize is often accidentally
written with British spelling.
|
|
|
|
Remove use of GL* constants and types inside the codebase. There is still
a few occurence to get rid of.
|
|
|
|
Leak was silent as it was an opengl handle.
|
|
|
|
|
|
|
|
Clang Tidy reported a couple of false positives. I disabled
those `NOLINTNEXTLINE`.
Differential Revision: https://developer.blender.org/D8199
|
|
The unit being "pixels".
Before this change the solve errors were unitless in the UI.
With this change in place, the UI is now clear on that the unit of the
reprojection errors is pixels (px).
Differential Revision: https://developer.blender.org/D8000
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/space_clip` module.
No functional changes.
|
|
Clip editor
This revision affects the menu under: Clip > Track > Detect Features > Placement.
A bit of UI that was probably missed when the legacy GP was renamed to Annotation
{F8647693}
In this state, it may be confusing for the user.
Reviewed By: Blendify
Differential Revision: https://developer.blender.org/D8139
|
|
Using 'name' for the full path of a file reads badly,
especially when id.name is used in related code.
|
|
View2DScrollers used the memory manager to allocate memory. This isn't a
problem but in a upcoming change the scrollers will be drawn more often
than it used to (See {D8066}). To limit the number of allocations and
frees this patch will use the stack for allocation.
Reviewed By: Campbell Barton
Differential Revision: https://developer.blender.org/D8076
|
|
|
|
It didn't work correctly when there in no continuously solved camera
segment (aka there is a single isolated frame with solved camera).
Basically, don't start drawing curve segment until it's known there
is enough points for at least one segment.
On user level it seemed to be fine, but it was assert failure in
debug builds.
|
|
This rename was done time ago but still missing in some areas.
|
|
This change was done time ago but it was still missing in some operators.
|
|
There was no reason to use a short here,
this was just a convention from existing code.
|
|
- 'coords' is an abbreviation for coordinates, not 'cords'.
- Rename 'moves' to 'coords_len'.
|
|
Also avoid possible accumulation of floating point error.
|
|
|
|
This patch enables TBB as the default task scheduler. TBB stands for Threading Building Blocks and is developed by Intel. The library contains several threading patters. This patch maps blenders BLI_task_* function to their counterpart. After this patch we can add more patterns. A promising one is TBB:graph that can be used for depsgraph, draw manager and compositor.
Performance changes depends on the actual hardware. It was tested on different hardwares from laptops to workstations and we didn't detected any downgrade of the performance.
* Linux Xeon E5-2699 v4 got FPS boost from 12 to 17 using Spring's 04_010_A.anim.blend.
* AMD Ryzen Threadripper 2990WX 32-Core Animation playback goes from 9.5-10.5 FPS to 13.0-14.0 FPS on Agent 327 , 10_03_B.anim.blend.
Reviewed By: brecht, sergey
Differential Revision: https://developer.blender.org/D7475
|
|
In preparation for {D7475}
|
|
Allows to support distortion models which needs to know actual
image dimensions to apply or inverse camera intrinsics.
|
|
Fix from 8a5a306a8313 caused tweaking to fail in the clip editor,
as it wasn't using same convention of other selection operators that
returned the pass-through flag to allow tweaking too.
|
|
Tasks: move priority from task to task pool {rBf7c18df4f599fe39ffc914e645e504fcdbee8636}
Tasks: split task.c into task_pool.cc and task_iterator.c {rB4ada1d267749931ca934a74b14a82479bcaa92e0}
Differential Revision: https://developer.blender.org/D7385
|
|
Use BLI_path_ prefix, more consistent names:
BLI_parent_dir -> BLI_path_parent_dir
BLI_parent_dir_until_exists -> BLI_path_parent_dir_until_exists
BLI_ensure_filename -> BLI_path_filename_ensure
BLI_first_slash -> BLI_path_slash_find
BLI_last_slash -> BLI_path_slash_rfind
BLI_add_slash -> BLI_path_slash_ensure
BLI_del_slash -> BLI_path_slash_rstrip
BLI_path_native_slash -> BLI_path_slash_native
Rename 'cleanup' to 'normalize', similar to Python's `os.path.normpath`.
BLI_cleanup_path -> BLI_path_normalize
BLI_cleanup_dir -> BLI_path_normalize_dir
BLI_cleanup_unc -> BLI_path_normalize_unc
BLI_cleanup_unc16 -> BLI_path_normalize_unc16
Clarify naming for extracting, creating numbered paths:
BLI_stringenc -> BLI_path_sequence_encode
BLI_stringdec -> BLI_path_sequence_decode
Part of T74506 proposal.
|
|
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.
|
|
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.
|