Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
Tabs in middle of code (mostly for no reason / by accident).
|
|
This is rather a workaround to avoid main thread freeing all glyph caches
at the same time as sequencer uses fonts to draw text sequences.
Ideally we need to either make cache more local, or user-counted or to make
somewhat more global locks. All this ends up in a bigger refactor which is
better for 2.8. For the meantime let's make Blender more stable with a tiny
workaround.
Downside is that keeping zooming things up and down in interface during render
will increase memory usage by unused glyph caches. It's not too bad though,
all unused caches will be freed first time at area zoom after render.
Thanks Bastien for review!
|
|
Was hard-coded to 25 frames.
D2893 by @jooert
|
|
|
|
wmOrtho2_region_pixelspace and wmOrtho2_region_ui were doing exact same thing since rBSa86482f81cf3.
|
|
|
|
Caused new 2d views to initialize w/o scrollbars
|
|
|
|
When drawing 2D grid and 3D axes.
|
|
|
|
There were 2 issues:
- toolbars were set initialized in user-defaults
so their scroll & zoom level were set.
- initializing new 2d views included the scroll width,
which scaled the new views zoom level, especially when dragging out.
|
|
|
|
|
|
|
|
|
|
|
|
Also add depsgraph & physics
|
|
|
|
reached
There are a couple of things that I don't like here, but it seems like
the best way to handle this for now.
|
|
|
|
|
|
Make the UI API more consistent and reduce confusion with some naming.
mainly:
- API function calls
- enum values
some internal static functions have been left for now
|
|
|
|
2d & 3d cached text now draws pixel aligned now.
|
|
|
|
also correct some bad casts
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
|
|
View2D had some inconsistencies making it error prone in some cases.
- Inconstant checking for NULL x/y args.
Disallow NULL args for x/y destination pointers, instead add:
- UI_view2d_region_to_view_x/y
- UI_view2d_view_to_region_x/y
- '_no_clip' suffix wasn't always used for non-clipping conversion,
switch it around and use a '_clip' suffix for all funcs that clip.
- UI_view2d_text_cache_add now clips before adding cache.
- '_clip' funcs return a bool to quickly check if its in the view.
- add conversion for rectangles, since this is a common task:
- UI_view2d_view_to_region_rcti
- UI_view2d_region_to_view_rctf
|
|
use this for grease pencil stroke conversion to avoid float->int->float conversion.
|
|
- pass label strlen since in many cases its already known.
- use single linked list for cached text drawing.
- add BLI_link_utils.h for single linked list macros.
own tests give approx 22% overall speedup.
|
|
|
|
- deduplicate timecode_simple_string from image.c
- replace V2D_UNIT_SECONDSSEQ with V2D_UNIT_SECONDS
- avoid possible buffer overflow bugs (sprintf -> BLI_snprintf)
- remove option not to use timecode and split into 2 functions
Patch D227 by Andrew Buttery with own refactoring.
|
|
- move cache reset into view2d and comment about the rationale for resetting cache there.
- missed other places where view2d zoom level can change (smoothview, borderzoom, home and file reload)
- comment about DPI wasn't correct.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This also fixes a crash editing buttons longer then UI_MAX_DRAW_STR
|
|
rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
|
|
Currently only circle and square, might be easily
extended in the future.
New primitives are creating at cursor location.
This also implied adding 2d cursor to space clip.
Also fix set 2D cursor location which didn't work
in image editor's mask mode since 2.67.
TODO: draw_image_cursor better be moved to some
more generic file, but it's not so much
important for now and might be solved later.
Thanks Campbell for the review!
|
|
indent.
also indent case's within the switch (we already did both of these almost everywhere)
|
|
|
|
brush
size. Interpolated mouse coordinates should not get rounded to integers.
|