Age | Commit message (Collapse) | Author |
|
Some DNA headers already did this, most did not. Even though many of them would
be included in C++ files and thus compiled as C++. This would be confusing and
developers may think they have to add `extern "C"` too a whole lot of
(indirect) includes to be able to use a C header in C++.
However, this is a misconception.
`extern "C"` does not cause code to be compiled with C rather than C++! It only
causes the linker to not use C++ function name mangling. See
https://stackoverflow.com/a/1041880.
Because extern DNA headers don't have function declarations, using `extern "C"`
actually should not have any effect. On the other hand, adding it causes no
harm and avoids confusion. So let's just have it consistently in C header
files.
Differential Revision: https://developer.blender.org/D9578
Reviewed by: Bastien Montagne, Sybren Stüvel
|
|
Don't allocate StripElem for movieclip, scene and mask strips. This
struct is not handled in seq_dupli function. This caused field to be
uninitialized in COW datablock.
StripElem is not allocated when adding strip with operator and it is
not needed for these strip types.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9600
|
|
Move RNA enums and utility functions closer to operator definition.
No functional changes.
|
|
No functional changes.
|
|
Split up the Euler filter function into two more functions. The Euler
filter operator works in two stages (find channels that define the X/Y/Z
Euler rotations, and perform filtering on those channels), and each
stage now has its own function. This makes it clearer which data are
used in which part of the code, and makes future improvements easier.
No functional changes.
|
|
|
|
Fix copy-paste error of error message prefix, so that the Quaternion
function no longer says it's a Matrix function error.
|
|
Replace `* /` with `*/` to actually end the comment. As it was, the code
compiled but caused an "`/*` in comment" warning.
No functional changes.
|
|
|
|
This is actually a user interface issue, introduced on 0688309988e5.
but->tip is checked for NULL in other parts, and rightly so, since here
it crashes Blender.
On a side note I don't know how to reliably reproduce the original bug
whose fix introduced this issue. That got on the way of seeing whether
this is the correct fix, if it happens outside greasepencil operators.
Maybe it is an operator that is missing a tooltip? Impossible to tell
without more information from said commit. That said since this happened
during the end of bcon3 and we are not in bcon4 I'm going ahead with
this NULL check commit.
Patch reviewed by Philipp Oeser and Sergey Sharybin.
|
|
Move proxy operator functions to own file.
No functional changes.
|
|
Code was rewritten to work on per-sequence basis returning reference to
created strip.
There should be no functional changes.
Selection logic is left as is for now. I could simplify it, but it
belongs to operator, not split logic.
Reviewed By: sergey
Differential Revision: developer.blender.org/D9592
|
|
|
|
In cases where "Allow" is followed by an infinitive, a noun needs
to directly follow it. But it makes more sense to follow it with a
gerund instead.
|
|
My last cleanup commit for this function missed this case. It likely
happens because the panel's block size doesn't update properly somewhere.
Short of investigating that right now, it makes sense to return early
in this case anyway.
|
|
This option joins any stroke with an end near the actual stroke. Now it is not limited to the last stroke, any stroke in the same layer for the actual frame can be joined. The join can join two strokes drawing a third stroke.
If the end and the start of the result stroke are very small, the stroke is changed to be cyclic automatically.
There is a limit distance to join the stroke, if the distance is greater than this value, the strokes are not joined. Actually, a constant, threshold distance is used, but we could expose
as a parameter in the UI in the future.
The tool can be used with freehand drawing or with primitives.
Note: Great part of the patch is just a refactor of the old code to make it accessible and to keep code organized.
Reviewed By: mendio
Maniphest Tasks: T82377
Differential Revision: https://developer.blender.org/D9440
|
|
|
|
The existing panel drawing function was a bit convoluted with dependent
conditions in different scopes, redundant and unecessary computations,
and un-helpful naming.
This commit separates the function into two parts, the backdrop and the
widgets. It also improves naming and uses const where possible, and in
general cleans up the code.
There are some slight visual changes, mostly with the placement of the
drag icon, which moves a bit downward to be centered with the triangle
icon. The black rectangle displayed while dragging is also removed.
|
|
The logic for separator-spacers (used here for right-alignment) didn't take
region scaling into account. Usually that's not an issue because they are
otherwise only used in headers which can't zoom.
|
|
The logic for separator-spacers (used here for right-alignment) didn't take
region scaling into account. Usually that's not an issue because they are
otherwise only used in headers which can't zoom.
|
|
|
|
During some operators like rotate in grease pencil edit mode the
hierarchy lines in the outliner would draw twice as thick. Set the width
before drawing the lines in the outliner.
Differential Revision: https://developer.blender.org/D9589
|
|
The error was introduced in rBf470a02afaea, but the problem is in
`ED_transform_calc_orientation_from_type_ex`
|
|
Some modes were always using `"Global"` orientation as the default.
|
|
This is an addendum to previous boolean fix, where the object
transformation was "cleaned". Now the operand one is too.
This fixes the issue shown in the video in T82301 when you move
a column around the XY plane with the top and bottom faces
supposedly coplanar with a cube. The transformation matrix when
you do that has a tiny offset in the z component.
|
|
|
|
Scaling of forces needs more work. Before making changes to them it would be nice to have a setup, that works physically correct across multiple modifiers (cloth, rigid bodies, fluid).
This will be a to do for 2.92.
|
|
|
|
Active tile could be NULL when it was on the second tile before
switching back and forth between the Image/UDIM.
In the future we might also check that the active_tile_index is always
valid.
|
|
The root cause of this bug is that the function that updates the PBVH
normals is drw_sculpt_generate_calls. As now both the overlays and
mesh can be drawn without using pbvh drawing, the normals were not
updating. This patch forces a normals updates also in the no PBVH
drawing code path of the overlays. This was affecting both shading and
sculpt surface sampling in both flat and smooth shading modes.
Having the sculpt normals being updated by the drawing code is a wrong
design which also causes other issues like:
Brushes that sample the surface and do multiple stroke steps between
redraws will sample invalid normals, creating artifacts during the
stroke clearly visible in some brushes.
Brushes that do not need to sample the surface update the normals on
each redraw. This affects performance a lot as in some cases, updating the
normals takes more time than doing the brush deformation. If flat shading
is being used, this is only necessary to do once after the stroke ends.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D9535
|
|
|
|
Pie menu had inconsistent behavior for dragging & releasing the key
compared to clicking on the button.
This was caused by the `onfree` argument being set to true,
preventing the button from running callbacks such as setting
up undo data & auto-keyframe
This argument should only be used when freeing the button,
set this to false as is done for regular menus.
|
|
|
|
- Shortcuts were being shown in the undo history.
- Multi-line tool-tips now only use the first line.
|
|
|
|
ICON_GREASEPENCIL was defined as an object data icon when it was used as
a mode icon. This caused it to draw green in the outliner.
|
|
The datablock shown in the file browser was the draw mode icon rather
than the datablock icon.
|
|
|
|
|
|
|
|
Error in cb9de95d61b32f90788875f20e046095bb6310ad
|
|
|
|
|
|
Also minor comment formatting changes.
|
|
|
|
This brush needs to be disabled for dyntopo as it stores its custom data
and deforms from original coordiantes.
Reviewed By: sergey
Maniphest Tasks: T82542
Differential Revision: https://developer.blender.org/D9516
|
|
Note that I chose to modify the label of the main `Bake` button instead
of adding an extra label line, as that would disturb the UI in a
annoying way.
|
|
|
|
|
|
|