Age | Commit message (Collapse) | Author |
|
Ref T92709
|
|
This commit improves the scaling of some ui widgets when
zooming by making the radius of the rounded corners
dependent on the element's zoom level.
Needed to fix T92278 without padding issues, see D13125.
Reviewed By: Hans Goudey, Julian Eisel
Differential Revision: https://developer.blender.org/D12842
|
|
|
|
Somehow, the file from T71329 has an empty curve profile. While that may
be a problem in itself, it's reasonable to avoid asserts or crashes when
loading or drawing such a CurveProfile. This commit just makes sure the
table always has a single vertex, and adds some checks in drawing code.
|
|
|
|
|
|
|
|
|
|
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
|
|
|
|
Passing 4x arguments for the rectangle,
mixed in with round-box radius & color wasn't very readable.
Instead, pass a `rctf` as the first argument to UI box drawing functions.
|
|
The new GPU_SHADER_2D_WIDGET_BASE shader allows us to draw
many complex shapes with anti-aliasing.
One thing it can do is draw an opaque rounded rectangle with colors
that differ between its interior and outline.
In order to do the above in a single pass I recently added an "_ex"
version of UI_draw_roundbox that exposes most of that shaders features.
This simplifies interface_draw.c by removing redundancy in the calling
of this shader by using this new uber "_ex" version.
Ref D10189
|
|
Marked unused 2017 f69678482c849d873b9686cd6068946205db7c2b)
Remove since this remains unused,
split from D10189 to allow reverting if we ever need it back.
|
|
Simplification and changes to the Navigation gizmo. Better indication of negative axes, consistent use of color and size to indicate orientation, ability to be resized.
Differential Revision: https://developer.blender.org/D9744
Reviewed by Campbell Barton
|
|
If there was a control point at an extreme position when drawing a curve
profile (in the bottom corner), the fill's trianglulation could fail, giving
a misleading view of the curve. This is because the extra points added to
create a closed shape were exactly on the border of the view.
This commit adds a small margin to those points, so the triangulation
doesn't fail because the line overlaps itself.
Another possible solution is to use a different algorithm to fill
the polygon, such as scanfill, which is used by curve objects.
This seemed simpler, and seems to work fairly robustly.
Differential Revision: https://developer.blender.org/D9989
|
|
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
|
|
We want to move away from using `uiBut.a1`/`a2`, which is a hard to
reason about design.
Part of T74432.
Also correct comment.
|
|
This patch fixes assert on grid drawing. `for` loops are used instead
of `while` loops to make sure the number of lines is exact. The old
code draws lots of unnecessary lines offscreen. This bug is fixed as
well. See the patch for a comparison without a scissor test.
Differential Revision: https://developer.blender.org/D8745
|
|
|
|
|
|
We now use GPU_blend for enabling / disabling blending and explicitly
set the blend equation.
|
|
|
|
|
|
|
|
This is a first step into removing uniforms from GPU_batch and Imm.
|
|
The same changes as rB570044e9f412 and rB0ab21bf06ae0.
|
|
The same changes as in rB570044e9f412.
|
|
Continuing the work from rB49f088e2d093.
Differential Revision: https://developer.blender.org/D8561
|
|
|
|
Disable antialiasing which caused artifacts.
Differential Revision: https://developer.blender.org/D8497
|
|
|
|
*_LEN follows names elsewhere in Blender more closely than "_N_"
|
|
|
|
|
|
|
|
|
|
This was caused by missing GL blend. This patch also fix the broken
strip appearance under timeline zoom.
|
|
Under the hood the CurveProfile widget (used for bevel custom profiles)
uses a bezier curve, but right now though it only supports two of the
bezier curve handle types, vector and auto. This patch adds support for
free handles and adds all of the logic for editing them.
This is the first step to the ability to import and export curve objects
in the widget.
There's some code cleanup in curveprofile.c. Movement for handles and
control points is abstracted to functions there rather than happening
in interface_handlers.c.
An "Apply Preset" button is also added, which solves a confusing issue
where you apply a preset, then change the number of samples and the
preset doesn't change. The button makes it clear that the preset needs
to be reapplied.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D6470
|
|
This means all the antiailasing is done inside the fragment shader.
We use a Signed Distance Field to draw the 2D rounded boxes. This ensure
the best quality for AA.
This reduce the averge Batch for widget to 16 verts instead of ~600 and
reduce overshading a lot.
Theme Emboss alpha and tria alpha needs to be changed after this refactor.
The shadow drawing is left unchanged and still use geometry.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D7833
|
|
|
|
Adding a set of larger icons for use in informational dialogs.
Differential Revision: https://developer.blender.org/D6859
Reviewed by Campbell Barton
|
|
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.
|
|
|
|
Normal UI widget and 3D navigation gizmo where clipping at high DPI.
|
|
Extend options are currently stored per curve. This was not clearly
communicated to the user and they expected this to be a setting per
CurveMapping.
This change will move the option from `Curve` to `CurveMapping`. In
order to support this the API had to be changed.
BPY: CurveMap.evaluate is also moved to CurveMapping.evaluate what
breaks Python API. Cycles has been updated but other add-ons have
not. After release of 2.81 we can merge this to master and adapt
the add-ons.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D6169
|