Age | Commit message (Collapse) | Author |
|
Patch Tracker: http://projects.blender.org/tracker/?func=detail&aid=22339&group_id=9&atid=127
This patch implements the proposal outlined here:
http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal
Original patch by Matt Ebb.
Contributions by Nathan Letwory, Damien Plisson and Andrea Weikert
NOTE:
This is a work in progress commit, some work still needs to be done on the SCons and CMake files for this to work properly, but at least should compile and the files should be created in the right directory.
Commit discussed on IRC with Ton and Campbell.
|
|
removed last beos reference :)
|
|
|
|
[#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.
|
|
|
|
with new grid type but could probably crash with stamp render option too)
|
|
also removed some includes.
|
|
|
|
|
|
float buffer is used for rendering)
|
|
|
|
compiling, thanks to Sergey Sharybin for the patch. Note that the icons for linux cross might not be committed here, if not i'll add them in another commit
|
|
|
|
* Convert all code to use new functions.
* Branch maintainers may want to skip this commit, and run this
conversion script instead, if they use a lot of math functions
in new code:
http://www.pasteall.org/9052/python
|
|
* There's an unresolved error in transform_conversions.c which I've flagged in this commit. I'm not quite sure what the exact intentions of that code were (i.e. was the "void_pointer = 1" really intended)
|
|
Exact error with dash as sh "exit: 12: Illegal number: -1".
The rest are just changes to whitespace and polishing.
|
|
- BLF_lang_init used confusing IFDEF's, unlikely this was well tested. Split this into 3 functions for Apple/Win32/Unix, Unix uses BLI_gethome_folder(), cant test others, ideally they should use BLI_gethome_folder too but needs testing.
Possibly each os cant be made to use BLI_gethome_folder and the separate func's can be removed (please test).
- units, hectometers were displayed wrong.
|
|
particularly text including spaces. This gave some problems with placing
the cursor and selection, and clipping text inside buttons.
|
|
|
|
Was annoying to use a different editor for cmake only.
theeth says this should be ok with gsoc and merges from branches.
|
|
* bring back 'player' libtype, after investigation with ideasman.
scons/mingw works nicely, for some reason msvc fails to link still, will look further into it.
|
|
lzma.
I rename the original makefile of lzo (Makefile.bak) and a new one.
Also four new option for user-def.mk:
WITH_LZO, default true
WITH_LZMA, default true
NAN_LZO, default extern/lzo
NAN_LZMA, default extern/lzma
It's easy add support for system libs (using lzo and lzma from OS) but I don't
know if it have much sense.
Note that I can't test the "unsigned char" buffer because the OGL animation
is not working (right ?), but is the same code that for float also the new
Makefile work fine here (Linux), but maybe need some tweak on other OS.
|
|
A couple of new functions:
BLF_width_and_height - Merge of BLF_width and BLF_height in one call to avoid freetype2 stuff.
BLF_buffer - Set the buffer, size and number of channel.
BLF_buffer_col - Set the text color (the alpha is not used right now).
BLF_draw_buffer - Draw the text in the current buffer.
Also tweak a little the boundbox and draw function to avoid access the freetype2 and use the cache info.
By default the font size is 12, the UI still need work to allow change the font and size.
|
|
Directories intern/ and source/blender/ now compile warning
free again here with scons/gcc.
|
|
- changed the SDL and Freetype vars to match CMake's names
- removed unneeded freetype, SDL and ftgl includes
|
|
- set python to 3.1 on linux (dont use FindPackage for now)
- remove duplicate settings (disable cache for copied settings, was quite confusing)
- added an option WITH_INSTALL, when disabled scripts and language files wont be copied to the target dir (better for quick builds)
- remove .svn (was still CVS), and pyc/pyc files after copy
- copy the 'io' as well as 'ui'
|
|
|
|
As Joe point on a previous mail, glBitmap don't work nice
on all cards and also some of the things that we can do
with texture are hard (or need that blender check the font mode)
to implement.
|
|
also fixed smoke comparing a float's mem-location rather then its value.
|
|
|
|
The option of Texture or Bitmap font is working again, yes it's really
uuuuugly right now, but it work.
On the next commit I go to put this at the same level that texture font.
Change this from User Preferences -> Language -> Textued Fonts, save
the preferences and run blender again.
|
|
* Text window font size now supports full range 8-32, instead of
just 12 and 15. I added BLF_fixed_width to get the character
width of a fixed size font.
* Buttons do undo push on change again.
* Animated/Keyframe/Driver colors are now themable, with blend
value to blend with original color. Set this to 0.5 now to
give colors less constrast.
* Fix tooltip popping up with RMB menu open, and missing redraw.
* Autokeyframe now works for buttons.
* Driver expressions can be edited in place in a button now.
(still some refresh issues).
* Also made python driver default for the Add Driver function
in the RMB button. This way you don't have to open a Graph
editor if you just want to type an expression. Also, the
default expression then is the current value.
* Tooltips now show some extra info, not sure what is good to
have, but currently I added:
* Shortcut key for operator buttons.
* Python struct & property name for RNA buttons.
* Expression for driven values.
* Value for text/search/pointer buttons.
|
|
This are freetype2 options:
Unfitted - Scaled but un-grid-fitted kerning distances
Default - Scaled and grid-fitted kerning distances
We always use Unfitted, but the "Default" style give better result here,
so please test and if nobody complain we can set this style as the default.
|
|
Matt, I found the problem in one of my previous commit, so I revert
all my changes and now the font look good again.
Also remove all the options (kerning, overlap and user kerning), I want
to make this a little better.
|
|
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.
|
|
If this option is enable, the blenfont check for overlap characters, like
one of my previous commit but now it's optional and disable by default.
(This fix the "Fi" or other case when the characters are too close)
Enable/disable from:
Outliner -> User Preferences -> Styles -> Panel Font -> Overlap
(also for other styles, Group Label, Widget, Widget Label)
|
|
Two new function:
BLF_shadow: set the level (for blur) and the shadow color.
BLF_shadow_offset: set the x and y offset for shadow.
(this is the current position plus offset)
By default shadow is not enable in the font, so before draw the
text you need call BLF_enable(BLF_SHADOW), also remember disable
the option in the end.
|
|
(or like before).
|
|
The user value is 0 by default and the font kerning (the value
that come with the font) is enable, like always.
(the last was disable by mistake in a previous commit)
|
|
0.5 is the default value now, the range are from -5.0 to 5.0.
Note that we allow negative value, but the current draw code
always check for overlap characters.
|
|
This commit add two option to the blenfont library:
1) BLF_FONT_KERNING
This enable the kerning information that come with the
font, by default this option is disable and still don't
have a UI for change.
2) BLF USER_KERNING
This allow the user set a kerning value to by apply for
every character, by default this option is enable but all
the font have a kerning value of zero.
Ton I add this option to the style with a default value of 1.
Access from:
Outliner -> User Preferences -> Style -> FontStyle -> Kerning
|
|
Text drawing in 3D window fixed, using BLF default font (yes, nice AA'ed
fonts too :)
Solved it by gathering all strings that needs to be drawn for an object,
and then draw in end of object drawing, in pixelspace. Also cleaned up
some of the code for projecting 3d coords, much nicer now (mat stored in
region-view3d)
|
|
Fonts like Type 1, have one file with the glyph image and another
file with metrics and kerning information, this try to search if the font
have this information and load (try open the same file but with the .afm
and .pfm extension).
Also add a function to load the same information from memory, just in case
that in some point we add a font like this.
|
|
Now that we only work with Freetype2, I don't see any point to keep
wrapping the functions.
Also remove the reference code, it's something that we don't go to used.
|
|
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)
|
|
A little cleanup on the internal font, it's possible load the old
bmfont with: BLF_load_mem(name, NULL, 0) where name can be: helv,
helvb or scr.
Note that the internal font also support both draw, texture and bitmap,
by default always used texture.
Remove some old lang function that I left there and don't exist any more
because the locale are now in the RNA.
Small changes to Style's, so if we build without freetype2 by default
go back to the internal font, this is a little ugly (and have the old
problem of scale) but now blender always show text (need work a little
more there).
|
|
- font->blur was uninitialized
- Use Ctrl+Alt+Shift+P to run scripts from the 3d view not Pkey. (still useful for testing)
|
|
space_info.c
|
|
Fixed & upgraded tooltips to new drawing system.
Also fixed small error in menu shadows. Rounding of shadow below
menu went wrong.
|
|
Nicer implementation of blurred font draw, moved to blenfont
module. Set it with BLF_blur(value). Current kernels implemented
are 3 and 5 only. Blenfont module can extend this once.
|