Age | Commit message (Collapse) | Author |
|
|
|
|
|
While it might be handy to have type-less functionality which is
similar to how C++ math is implemented it can not be easily achieved
with just preprocessor in a way which does not have side-effects on
wrong usage.
There macros where often used on a non-trivial expression, and there
was at least one usage where it was causing an actual side effect/bug
on Windows (see change around square_f(sh[index++]) in studiolight.c).
For such cases it is handy to have a function which is guaranteed to
have zero side-effects. The motivation behind actually removing the
macros is that there is already a way to do similar calculation. Also,
not having such macros is a way to guarantee that its usage is not
changed in a way which have side-effects and that it's not used as an
inspiration for cases where it should not be used.
Differential Revision: https://developer.blender.org/D7051
|
|
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
|
|
Addresses T74331
|
|
Avoid accessing inline since it's often used multiple times.
In some cases it was already defined.
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
Don't use BKE_view_layer_context_active_PLACEHOLDER which is marked
as "never use this".
In fact, it isn't needed to lookup for camera in the tracking function
at all: camera object is always explicitly passed to it.
|
|
|
|
Also rename struct members to 'launch_event', since it's more
descriptive and was called this in some places.
|
|
This should only be used to change and recalculate region sizes in a DPI
independent way. To get the size with DPI applied, ARegion.winx/y should
be used instead.
Added note on this in comment.
|
|
This patch contains the work that I did during my week at the Code Quest - adding support for tiled images to Blender.
With this patch, images now contain a list of tiles. By default, this just contains one tile, but if the source type is set to Tiled, the user can add additional tiles. When acquiring an ImBuf, the tile to be loaded is specified in the ImageUser.
Therefore, code that is not yet aware of tiles will just access the default tile as usual.
The filenames of the additional tiles are derived from the original filename according to the UDIM naming scheme - the filename contains an index that is calculated as (1001 + 10*<y coordinate of the tile> + <x coordinate of the tile>), where the x coordinate never goes above 9.
Internally, the various tiles are stored in a cache just like sequences. When acquired for the first time, the code will try to load the corresponding file from disk. Alternatively, a new operator can be used to initialize the tile similar to the New Image operator.
The following features are supported so far:
- Automatic detection and loading of all tiles when opening the first tile (1001)
- Saving all tiles
- Adding and removing tiles
- Filling tiles with generated images
- Drawing all tiles in the Image Editor
- Viewing a tiled grid even if no image is selected
- Rendering tiled images in Eevee
- Rendering tiled images in Cycles (in SVM mode)
- Automatically skipping loading of unused tiles in Cycles
- 2D texture painting (also across tiles)
- 3D texture painting (also across tiles, only limitation: individual faces can not cross tile borders)
- Assigning custom labels to individual tiles (drawn in the Image Editor instead of the ID)
- Different resolutions between tiles
There still are some missing features that will be added later (see T72390):
- Workbench engine support
- Packing/Unpacking support
- Baking support
- Cycles OSL support
- many other Blender features that rely on images
Thanks to Brecht for the review and to all who tested the intermediate versions!
Differential Revision: https://developer.blender.org/D3509
|
|
Was happening when there was an image assigned to the track.
Another pair programming session with Clement.
|
|
Pair programming with Clement.
|
|
Adds a `text` parameter to `bpy.types.uiLayout.template_ID()` which
causes a label to be added, as usual. Adding the label also makes the
template respect the `bpy.types.uiLayout.use_property_split` option.
Also fixes wrong layout being used in the template-ID, although I think
that didn't cause issues in practice.
Sergey requested this for usage in the Movie Clip Editor.
|
|
flipped to bottom
While flipping the header to bottom works in the MCE (because MCE doesnt
allow overlapping UI) we need to take the regions visible rect into
account for the Image Editor.
Also correct clickable scubbing area (poll for frame_change) in the
Image Editor and the MovieClip Editor not taking UI_DPI_FAC into
account.
Maniphest Tasks: T70905
Differential Revision: https://developer.blender.org/D6090
|
|
|
|
D5932 by @a.monti with edits
|
|
|
|
There was a mix of old and new constants. Now have one list of WM_CURSOR_*
cursor types, using GHOST standard cursors when available and otherwise falling
back to our custom cursors.
Ref D5197
|
|
This gives better idea of what's going on with your track. Example:
{F693806}
Color of keyframes are configurable from theme editor of clip editor.
Reviewers: keir, brecht, Severin
Differential Revision: https://developer.blender.org/D2772
|
|
Differential Revision: https://developer.blender.org/D5716
|
|
The rumors says that immBegin() will assert fail on 0 count. Not sure where exactly
that happens (can't reproduce that), but early output can't hurt.
|
|
|
|
A regression since refactor from yesterday which made it so path is displayed at
a frame where marker is disabled.
|
|
|
|
Split into set of smaller functions, making it easier to tweak behavior.
Should be no functional changes.
|
|
|
|
|
|
|
|
Solves stability issues with possibly doing destructive changes to the
tracking setup. Locking interface is the simplest and most reliable way
to avoid crashes.
It is still possible to run non-destructive changes such as clip view
navigation. More operations can be marked as safe if needed.
Fixes T67012: Software closes when a processing marker is deleted
|
|
There are no functional changes as far as users are concerned,
just allows to mark operator as safe to be run from a locked
interface.
|
|
|
|
|
|
Previously there was already "draw_shape" property,
but it was doing nothing. This commit renames the
property to "display_shape". Furthermore, different
shapes like SQUARE and DIAMOND are supported now.
Currently, the shapes are drawn using the shader that also
draws keyframes. In the future we might want to separate
this.
The new shapes are not used anywhere yet, but they can
be used by addon developers and will probably be useful
when we want to support different kinds node systems later.
For example, different shapes can be used to distinguish
between data and control flow.
Differential Revision: https://developer.blender.org/D2829
|
|
Scale pixel-input by pixel size for zoom operators.
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5219
|
|
T68035 by @luzpaz
|
|
We would not take into account the user "Zoom Axis" setting in certain
2D space viewports. In addition to this, the "Scale Zoom" didn't work
consistently in these spaces either.
Reviewed By: Brecht
Differential Revision: http://developer.blender.org/D5132
|
|
This change ensures that operators which needs access to evaluated data
first makes sure there is a dependency graph.
Other accesses to the dependency graph made it more explicit about
whether they just need a valid dependency graph pointer or whether they
expect the graph to be already evaluated.
This replaces OPTYPE_USE_EVAL_DATA which is now removed.
Some general rules about usage of accessors:
- Drawing is expected to happen from a fully evaluated dependency graph.
There is now a function to access it, which will in the future control
that dependency graph is actually evaluated.
This check is not yet done because there are some things to be taken
care about first: for example, post-update hooks might leave scene in
a state where something is still tagged for update.
- All operators which needs to access evaluated state must use
CTX_data_ensure_evaluated_depsgraph().
This function replaces OPTYPE_USE_EVAL_DATA.
The call is generally to be done in the very beginning of the
operator, prior other logic (unless this is some comprehensive
operator which might or might not need access to an evaluated state).
This call is never to be used from a loop.
If some utility function requires evaluated state of dependency graph
the graph is to be passed as an explicit argument. This way it is
clear that no evaluation happens in a loop or something like this.
- All cases which needs to know dependency graph pointer, but which
doesn't want to actually evaluate it can use old-style function
CTX_data_depsgraph_pointer(), assuming that underlying code will
ensure dependency graph is evaluated prior to accessing it.
- The new functions are replacing OPTYPE_USE_EVAL_DATA, so now it is
explicit and local about where dependency graph is being ensured.
This commit also contains some fixes of wrong usage of evaluation
functions on original objects. Ideally should be split out, but in
reality with all the APIs being renamed is quite tricky.
Fixes T67454: Blender crash on rapid undo and select
Speculation here is that sometimes undo and selection operators are
sometimes handled in the same event loop iteration, which leaves
non-evaluated dependency graph.
Fixes T67973: Crash on Fix Deforms operator
Fixes T67902: Crash when undo a loop cut
Reviewers: brecht
Reviewed By: brecht
Subscribers: lichtwerk
Maniphest Tasks: T67454
Differential Revision: https://developer.blender.org/D5343
|
|
Curve drawing was attempting to draw reprojection error curve when it was
not visible.
Worst thing is that the imm was not informed about vertices, so the code
was causing an assert in debug mode. Probably, it is also what have caused
random crashes after recent changes.
|
|
|
|
Was causing lack of proper viewport update when camera solve assigned
new focal length to the camera.
|
|
Quite straightforward after previous refactor: now speed and error curves
are handled in the same exact manner.
|
|
Make it generic enough to support iterating over reprojection error
in the same manner as coordinate speed.
|
|
|
|
Such reload can no longer happen directly and is to be done via dependency
graph.
Eventually, the movie cache will become shared across all copies of the
clip, but even then we still need to have dependency graph mechanism because
we need to update FFmpeg animation handle (which can not be shared across
the copies).
|
|
Before this the message could be too generic which was simply saying
that console is to be checked. This isn't very useful in cases when
we know that reconstruction is failed because of lack of good keyframes
or failure of initial reconstruction if there is no enough parallax
on the selected keyframes.
|
|
Editing Context
Previously when switching modes, the code didn't check if we were in the
correct view for the masking mode.
Reviewed By: Sergey
Differential Revision: http://developer.blender.org/D5288
|
|
It is possible that undo will change current scene frame and that was
not synchronizing current frame from scene to movie clip user.
Reported as a part of T66519.
Reviewers: brecht
Reviewed By: brecht
Maniphest Tasks: T66519
Differential Revision: https://developer.blender.org/D5280
|