Age | Commit message (Collapse) | Author |
|
uiItemEnumR_string was ignoring name and icon args.
|
|
|
|
- remove MEM_guardedalloc.h from header files (include directly)
|
|
avoid the problem but when the view is zero pixels wide it still hung for some time.
|
|
cases.
|
|
[#20854] PROPERTIES STAMP: Rendering stamp flickers in output renders
Blenfont was not thread safe, that is why one thread can change
the font properties (size, dpi, color, etc) at the same time
that the stamp draw on the image, and then the problem.
To make blenfont thread safe I have to change two important things:
1) Every BLF_* function take one argument, the font id.
2) We have two new function to make font "thread safe":
BLF_load_unique
BLF_load_mem_unique
This two function are for case like stamp, that need and own font
that don't share the glyph cache, so can draw without problem
in a different thread.
Why the BLF_*_unique function ?
Because blenfont keep only one copy of a font and keep a list of
"glyph cache". Every glyph cache have size and dpi, so if two
different thread access the same font at the same time, they can
change value and finish with something like the stamp problem.
Why don't remove the glyph cache ?
Because if we do that, we finish with a font object for every size
and dpi, and the stamp is really a special case that happen in
the rendering process, so I really thing is better keep the
glyph cache and make this two new function to handle this
special case.
(When I say "font object" I mean have the same freetype font multiple
times just to have differents size and dpi)
As Matt point we still can have one case that two thread access
the BLF_*_unique function at the same time, but I am looking to
fix this with some class of thread lock.
For now I test and work fine, so if some one found problem, please
let me know.
Campbell I have to change the python api (python/generic/blf_api.c)
to the new syntax, so maybe you can take a look at this.
|
|
Only source/blender/editors/ dir, should not give errors on different platforms
Only removing: UI_*.h, ED_*.h, WM_*.h, DNA_*.h, IMB_*.h, RNA_*.h, PIL_*.h
|
|
|
|
|
|
a region with panels (e.g. file browser).
|
|
The problem was that wmPushMatrix/wmOrtho/.. and similar functions did not
work well for offscreen rendering. It would have been possible to make a
fake subwindow for this, but I decided to just remove this extra layer as
it does not seem to have much purpose and has been quite confusing when
trying to fix other bugs. The relevant matrices are already stored in
RegionView3D so there will be no increase in calls to glGetFloat, which may
have been a performance reason to use this system in the past.
|
|
relation to bug 19881:
* Clearly labelled the way that the scrollbar hiding works. Also see the report comments for an overview
* Added another pair of flags for another one of the cases in which scrollbars should also get ignored; when the entire contents of the view are visible, a pair of flags is now set in the view2d data (instead of for the scrollers tempdata only) for detecting this case too
* Fixed the potential for scrollbars without zoom handles shown to have those handles still considered. This still happened in the User Preferences window, but has now been disabled.
--
These changes still don't solve the bug though. Currently after the scrollbar operator passes through, the Outliner's activate-selection operators still fail to start.
|
|
This commit introduces a few cleanups and tweaks to the way that timecodes (i.e. the timing indications used instead of frame numbers) get displayed.
1. Custom Spacing of TimeCodes/Gridlines
Made the minimum number of pixels between gridlines/timecode indications a user-preference, instead of being a hardcoded constant. This allows to set the spacing tighter/looser than the defaults, and is also used for the other changes.
2. Default timecode display style, (now named 'minimal') uses '+' as the delimeter for the sub-second frames. This hopefully makes it a bit clearer what those values represent, as opposed to the '!', which can sometimes look too much like a colon.
3. Added various timecode display styles as user-preference. - These include always displaying full SMPTE, to showing milliseconds instead of frams for sub-second times, and also an option to just show the times as seconds only.
- When changing the timecode style, the spacing setting is automatically modified so that the timecodes are spaced far apart enough so that they won't clash (under most circumstances). This automatic modification is only done if the spacing is too tight for the style being set.
4. Unified the code for generating timecode strings between the View2D scrollbar drawing and the current frame indicator drawing.
|
|
Zoom widgets now only show if the scrollbar only shows scale markings (i.e. timegrids).
---
Also removed an empty header file.
|
|
Pushed limits for Graph Editor view extents to proper limits, and fixed clamping used in View2D code which was preventing height of View2D viewports from getting below 1.0
|
|
behind G_DEBUG.
|
|
continue redraw in
opposite direction
|
|
|
|
|
|
* The code to draw only visible items was not working, giving slow
performance with many files (bug #19469).
* Fix detailed list display on non-windows, would give overlapping text.
* Fix folders with many files not displaying all items, changed short to
int in various places, was overflowing.
* Recreate layout on area resizes, file view gets out of sync otherwise.
* Workaround for v2d height not being correct with image display due to
scrollers.
* Fix view2d code to compute minimum scroller size, this would make the
scroller go outside of its bounds.
|
|
zoomed in, needed to make view2d offset for pixel rounding dependent
on zoom level.
|
|
(http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Todo/UserInterface)
* Removed panel docking. "It is too easy to do by accident when reordering panels, is very hard to control and use, and has no real benefit."
* Scoll bars have minimum size now, so that the 'thumb' doesn't disappear in long lists.
|
|
* When resizing the window, the top position is now preserved,
instead of the center position.
* Fix zoom level not being preserved in various cases, when
changing both with and height. This replaces some earlier code
which did this at screen level but wasn't very reliable.
* Different tabs now each preserve their own scroll.
* When switching between tabs, it now scrolls to show as many
buttons as possible, instead of possibly showing empty space.
There is a trade-off here between doing that keeping the
buttons in the same place, no ideal solution exists I think.
* Change zooming in/out to be symmetric, for example doing
numpad + then - did not give the original zoom level back.
* Added some calls to avoid hanging tooltips when manipulating
the view.
Internals:
* Added V2D_KEEPOFS_X and V2D_KEEPOFS_Y to keep the top/bottom
rather than the center.
* Renamed V2D_KEEPZOOM to V2D_LIMITZOOM (seems more appropriate),
and make V2D_KEEPZOOM preserve the zoom level.
|
|
* Image window only show game properties in game mode.
* Fix image window render info drawing wrong with alpha enabled.
* Win32 editmode cursor now uses a different one than the system
cursor, that one is barely visible, especially in the new theme
colors.
* Center text in operator header print.
* Fix sequencer unlock shortcut key.
* Fix uv layer / vertex color active render button now graying out.
* Workaround to get default zoom level 1:1 again for new buttons
(will try to fix properly later, is due to scrollbars).
|
|
Added NULL check for View2D code for invalid style pointer (this underlying problem should get addressed at some point), and reinstated the reinitialisation hack for panel regions.
|
|
Notes:
- These may be taking up a bit too much room in some situations. Perhaps an option to turn these on/off is needed?
- I've added a quick hack in area.c -> ED_region_panels_init() to set the flags to make scrollbars show up in regions whose View2D data has already been initialised. This is primarily aimed at the Buttons Window in the 2.5 defaults file, which seems to have been saved in 2.5 or so
- The expand icons on either end of the scrollers don't really seem to be necessary? (or not working yet)
|
|
(19863 to 21513)
Highlights of the new NLA System (and related Animation System changes):
* NLA Data is stored in AnimData alongside Action and Drivers. The NLA stack is evaluated before the Action, with the Action always overriding the results of the stack.
* NLA Data is arranged in 'Tracks', which act like PhotoShop layers. These can be muted, protected, and/or made to be played back by themselves
* Within each track, there can be multiple 'Strips'. There are 3 types of strip -> Action Clip (references some action), Transition (blends between the endpoints of two strips), and Meta (container for several strips that occur sequentially)
* FModifiers can be applied to strips, and strips can have animated influence/time controls. Playback for strips can also be backwards now!
* Playback can now go in forward and backwards directions.
* Animation Editors have been polished (unfinished features added, existing features cleaned up and made more consistent)
Notes for BuildSystem Maintainers:
* Only scons has been actively tested. Makefiles should work fine.
* MSVC ProjectFiles are broken due to the very way they work.
* CMake status unknown...
Other notes:
* Hopefully I haven't made any mistakes while doing the merge. More files than expected were showing some weird conflicts, so you may have some broken code...
* Not all old files (with NLA) data load exactly the same anymore. However, the bulk of the files out there should be ok (I hope)
|
|
21470 to 21512
Next up, NLA-branch to 2.5 :)
|
|
* Default panel zoom level user preference, when creating
new button windows or pressing home-key to reset. Patch
by Matt D., thanks!
|
|
21330 to 21469
|
|
- Scrollers now only disappear for regions with a fixed total view, like
lists, buttons, channels. More or less infinite views keep scrollers to
indicate that you can still pan or zoom further.
- Nodes: put back SHIFT+D "Add duplicate"
(Also fixed duplicate objects menu name... it should be a bit more
descriptive)
|
|
More scroller work:
- Added subtle arrow widgets to denote a scroller can zoom the view.
- Made zoom symmetric (old convention to only zoom "one side" just
worked badly)
|
|
Upgrading text editor to draw new scrollbar too.
|
|
21301 to 21329
|
|
Cleanup of scroller drawing in 2D windows.
Before:
http://download.blender.org/institute/rt11.jpg
After:
http://download.blender.org/institute/rt12.jpg
Will add 'zoom' widget circles later, as mockupped here:
http://www.reynish.com/files/blender25/fcurve_scrollbar.png
Also note the scale values are inside scroller; drawing it
on top conflicts with current frame item and markers.
Currently scroller disappear entirely when view is total.
For Joshua:
To make sliders behave nicely, the boundbox (v2d->tot) has to
be refreshed on each change. I've added it in graph drawing
now, but it could be notifier based I guess... not sure what
the correct anim api call would be. Can discuss tomorrow!
On todo:
Layout config hints so people can make scroller positions swap.
|
|
|
|
Two bugfixes:
- When making 2d windows small (zero sized) the view2d data could get
corrupted with NaN values. Clipped values correctly to 1.
- Search menu (ctrl+alt+f) had wrong color for selected text in text
button
|
|
20669 to 20771
(sheesh, that took an hour, not including having to restart the whole process after TortoiseSVN bailed out midway through the first try)
|
|
so make them both use the same style and note down for future.
|
|
There were a few conflicts/missing files. Hopefully everything updated ok...
|
|
- Fix: text draw in fonts was slightly too low; it didn't calculate offset
correctly. Now it is aligned to have number characters in center.
- Fix: text clip was too wide, giving errors on extreme zoom in.
- Added boundbox-clipped default text drawing for view2d:
void UI_view2d_text_cache_rectf(View2D *v2d, rctf *rect, char *str)
(Note; also for previous commit, this cache immediately projects, so if
you change view2d while drawing, text is still on correct positions)
|
|
Added support for cached text drawing in View2D. Cache is needed to
prevent the viewmatrix being set/restored on each text drawing.
Adding a string:
void UI_view2d_text_cache_add(View2D *v2d, float x, float y, char *str)
Drawing:
void UI_view2d_text_cache_draw(ARegion *ar)
Nothing else needed; just make sure cache-draw is always called at end
of a view2d drawing function, to clear cache memory.
On todo for next: a version with a rectf boundary to clip text within.
|
|
In this commit, I've only setup the drawing code for the channels list. Only the drawing of the 'active action' dummy-line has been tested so far.
|
|
* Fix buttons jumping around when resizing and zoom. Part of this was
adding a tiny a 0.001f offset in UI_view2d_view_ortho, otherwise the
rounding is unpredictable (used to be 0.375f, but that was disabled).
* Fix various issues with zooming, panning panels. V2D_LOCKOFS_X/Y is
now taken into account in more places in the view2d code, to avoid
zooming into the center or panning out of the view.
* Remove "Free" align mode in buttons window (it's not really useful).
* View3D/Graph/Image editors now use the same PanelType system as the
buttons window, means some deprecated panel code could be removed.
* Some small visual tweaks for panels.
* View 2D Reset operator (Home key), to reset zoom and panning for panels.
* Added argument to set number buttons as sliders (slider=True for itemR).
* Ignore labels for button alignment (doesn't look right).
* Fix some use of context.main in py scripts, should get data from active
object instead.
* Fix autotexspace -> auto_texspace in py script.
|
|
scrollbars
|
|
1) Remove WITH_FREETYPE2 from code, so now blender always need freetype2
2) Remove the old bmfont
3) Remove ftfont and bFTGL library
4) Implement a new BLF_draw_default function for place that still need/use
the old BMF api.
I try to update both, scons and cmake, but I only can test with make, so
hope all work fine.
MSVC is broken, but I don't have Windows, things to search and fix are
any reference to WITH_FREETYPE2, FTGL and BMFONT (take in care that
blenkernel also have a BKE_bmfont.h, this don't have anything to do with bmfont).
Always have to link/include the freetype2 library
Remove any reference to libbmfont
Remove any reference to libftfont
Remove any reference to libbftgl (or libbFTGL)
|
|
Quick hack to enable zoom in buttons window again.
It uses bad old conventions for fixed panel width still, view2d has
to be tweaked for new system. But, it shows layout to work. :)
|
|
Grand cleanup:
- removal of FTF and ftfont dir
- removal of text.c which wrapped it
- wrapped old text drawing code temporarily, need to decide how 'style'
will behave per editor when you draw strings outside interface code....
wouldn't be very useful to set fonts locally all over?
|
|
- fixed pixel offset error for listview (outliner)
- removed a lot of old drawing code
- put back special widgets Normal, Curve, Colorband
|
|
Next part of UI drawing migration coding.
Now all calls go via the new wrapper; apart from some special types
(Colorband, HSV picking, Curve, Normal) they draw OK.
Also added new menu system, nicer shadow, and using same AA code.
Used dark theme suggestion from William btw. Don't get afraid, it'll all
be tweakable. :)
Next steps:
- move over all special button types
- make external calls for AA draw (nodes for example)
- remove old draw code
- make new colors save in theme
I also have to check on how to treat icons in buttons; this is a bit
cumbersome in cases.
Then the layout system comes back on agenda, will go over this with
Brecht tomorrow.
So; all WIP, be patient!
|