Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-15BGE : Fix for T43724 and T41599 addObject() with KX_FontObject andPorteries Tristan
overlay scene GetGameObjectType is overwritten in KX_FontObject to differentiate a font object into AddNodeReplicaObject function. Now, in this function, we add fonts in the appropriate list. Reviewers: campbellbarton, moguri, dfelinto, lordloki Reviewed By: lordloki Subscribers: lordloki Projects: #game_logic, #game_engine Differential Revision: https://developer.blender.org/D1130
2014-04-30Change naming slightly, it conflicts with DrawText function define onAntony Riakiotakis
windows on MinGW
2013-11-04BGE Rasterizer Cleanup: Removing RAS_IRenderTools and moving the ↵Mitchell Stokes
functionality to RAS_IRasterizer. RAS_OpenGLRasterizer is a bit of a mess now with references to Ketsji and other modules it shouldn't be accessing.
2013-07-20edit to r58425, BLI_math is available here, better not copy,paste from ↵Campbell Barton
linearrgb_to_srgb. also remove redundant check in AUD_FFMPEGReader::seek.
2013-07-20* Compile fix for overloaded pow() function. Thomas Dinges
2013-07-20BGE fix [#35563] Object colour setting for objects and fonts not using ↵Daniel Stokes
colour management like materials
2013-03-25code cleanup:Campbell Barton
- remove unused defines. - quiet some shadow warnings. - bevel, ifdef out some asserts that are too common. - style
2012-10-22style cleanupCampbell Barton
2012-09-16style cleanupCampbell Barton
2012-09-16code cleanup: make local game engine functions staticCampbell Barton
2012-08-04code cleanup:Campbell Barton
- replace (strcmp(vfont->name, FO_BUILTIN_NAME) == 0) with (BKE_vfont_is_builtin(vfont)). - reduce some double promotions.
2012-03-24style cleanup: follow style guide for/with/if spacingCampbell Barton
2012-03-09style cleanup: comment blocksCampbell Barton
2012-02-25style cleanup, use { on newline after function definition.Campbell Barton
spelling 'impliment' -> 'implement'
2012-02-10bge font objects: fix for difference in size when object has a parentDalai Felinto
for after 2.62 I would like to try if using doubles would help to increase the precision here. Also now that the mipmap patch is reverted we may want to look at this problem from a different perspective. RES could be calculated taking the object size in relation to the camera (i.e. size and distance, ignoring rotation). That may solve both problems of wrong resolution and lack of smoothness. For the time being users still need to use object.resolution to fine tune the rendered text.
2012-01-05BGE Font Object: fix for relative path not working AND packed fonts not workingDalai Felinto
[I don't think anyone has ever reported those, what makes me slightly sad but carry on ;)] Those fixes introduce a more generic function to load a font before calling BLF_load. I think it should move to be part of Blender util routines or BLF itself. For the time being here will make it. Once we get <builtin> font working we go for this. Thanks Diego Borghetti for the usual assistance with blf.
2012-01-05This patch creates an interface for ["Text"] properties in Font objects.Dalai Felinto
Interface: http://www.pasteall.org/pic/show.php?id=23785 Simple test file: http://www.pasteall.org/blend/10616 (I'll commit this to the text suite later) Code Explanation: --------------- (1) it adds a toggle to add/remove a "Text" gameproperty. - internally this property is just another game property (so we can find it within the game.properties lookup). - the property itself has no 'value', the interface shows the content of ob.data.body instead (why? because gameproperties are per object, while the text is per data). (2) at BGE converter time it sets the current value of the object.data.body to the ["Text"] property. (3) if you change object.text (bge text property) it automatically convert ["Text"] to a CStringValue. *** that means if the original property was a CIntegerValue, it will be converted to CStringValue forever *** * the only to do I can think of is to add a warning at doversion time if user has ["Text"] property for a Font object * * when that happens we print a warning in console/popup.*
2011-12-31Changing KX_FontObject to look for a "Text" game property instead of a ↵Daniel Stokes
"text" property to match with bitmap font usage.
2011-12-30use PyUnicode_From_STR_String in the game engine in more places.Campbell Barton
2011-12-30cucumber merge, multiline font object:Dalai Felinto
revisions: 38384,38387,38403,38404,38407,42997,42998 #42998 by dfelinto BGE Font Object - fix for offset (scaling also has to be taken into account here) #42997 by dfelinto Font Object Multiline fix. The offset was totally wrong when object had scale[1] != 1 #38407 by kupoman Changing the "text" property of a KX_FontObject now changes the text. This allows for control of a FontObject through logic bricks. #38404 by kupoman KX_FontObject now supports the x and y offset options. #38403 by kupoman KX_FontObject now makes use of the font's line spacing option, and correctly accounts for rotation and font size when applying the spacing. #38387 by kupoman The KX_FontObject text attribute is working again. #38384 by kupoman Primitive support for the new line character added to KX_FontObjects. The line spacing is fixed, and does not work when the FontObject is rotated. Also, the text attribute has been temporarily disabled, as it needs some updating to support the multiline changes.
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-02-25doxygen: gameengine/Ketsji tagged.Nathan Letwory
2011-02-23doxygen: prevent GPL license block from being parsed as doxygen comment.Nathan Letwory
2011-01-05BGE: Font Object support to animated (object) colorsDalai Felinto
implemented the support for animated colors and a workaround for non animated colors. To be cleaned if/when this bug is fixed: [#25487] BGE: Object Color only works when it has a keyed frame * also increased the size of the text. Now it supports 280 (or 140 unicode) chars.
2010-12-17minor warnings removed.Campbell Barton
2010-12-17BGE Font: increasing the limit of the text object to 140Dalai Felinto
2010-12-16SVN maintenance.Guillermo S. Romero
Plus some typo fixes in comments.
2010-12-16Patch:[#25163] BGE support for Blender Font objects - unicode supportDalai Felinto
Problem/Bug: ------------ There were no way to have proper unicode characters (e.g. Japanese) in Blender Game Engine. Now we can :) You can see a sample here: http://blog.mikepan.com/multi-language-support-in-blender/ Functionality Explanation: -------------------------- This patch converts the Blender Font Objects to a new BGE type: KX_FontObject This object inherits KX_GameObject.cpp and has the following properties: - text (the text of the object) - size (taken from the Blender object, usually is 1.0) - resolution (1.0 by default, maybe not really needed, but at least for debugging/the time being it's nice to have) The way we deal with linked objects is different than Blender. In Blender the text and size are a property of the Text databock. Therefore linked objects necessarily share the same text (and size, although the size of the object datablock affects that too). In BGE they are stored and accessed per object. Without that it would be problematic to have addObject adding texts that don't share the same data. Known problems/limitations/ToDo: -------------------------------- 1) support for packed font and the <builtin> 2) figure why some fonts are displayed in a different size in 3DView/BGE (BLF) 3) investigate some glitches I see some times 4) support for multiline 5) support for more Blender Font Object options (text aligment, text boxes, ...) [1] Diego (bdiego) evantually will help on that. For the time being we are using the "default" (ui) font to replace the <builtin>. [2] but not all of them. I need to cross check who is calculating the size/dpi in/correctly - Blender or BLF. (e.g. fonts that work well - MS Gothic) [3] I think this may be related to the resolution we are drawing the font [4] It can't/will not be handled inside BFL. So the way I see it is to implement a mini text library/api that works as a middlelayer between the drawing step and BLF. So instead of: BLF_draw(fontid, (char *)text, strlen(text)); We would do: MAGIC_ROUTINE_IM_NOT_BLF_draw(fontir, (char *)text, styleflag, width, height); [5] don't hold your breath ... but if someone wants to have fun in the holidays the (4) and (5) are part of the same problem. Code Explanation: ----------------- The patch should be simple to read. They are three may parts: 1) BL_BlenderDataConversion.cpp:: converts the OB_FONT object into a KX_FontObject.cpp and store it in the KX_Scene->m_fonts 2) KetsjiEngine.cpp::RenderFonts:: loop through the texts and call their internal drawing routine. 3) KX_FontObject.cpp:: a) constructor: load the font of the object, and store other values. b) DrawText: calculate the aspect for the given size (sounds hacky but this is how blf works) and call the render routine in RenderTools 4) KX_BlenderGL.cpp (called from rendertools) ::BL_print_game_line:: Draws the text. Using the BLF API *) In order to handle visibility of the object added with AddObject I'm adding to the m_scene.m_fonts list only the Fonts in a visible layer - unlike Cameras and Lamps where all the objects are added. Acknowledgements: ---------------- Thanks Benoit for the review and adjustment suggestions. Thanks Diego for the BFL expertise, patches and support (Latin community ftw) Thanks my boss for letting me do part of this patch during work time. Good thing we are starting a project in a partnership with a Japanese Foundation and eventual will need unicode in BGE :) for more details on that - www.nereusprogram.org - let's call it the main sponsor of this "bug feature" ;)