Blender Git Loki

Git Commits -> Revision be025ea

Revision be025ea by Dalai Felinto (master)
January 4, 2012, 21:40 (GMT)
This patch creates an interface for ["Text"] properties in Font objects.

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.*

Commit Details:

Full Hash: be025ea31985f7614106b47a519d6e678a19fb95
SVN Revision: 43145
Parent Commit: 049ab98
Lines Changed: +172, -11

7 Modified Paths:

/release/scripts/startup/bl_ui/space_logic.py (+25, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+17, -0) (Diff)
/source/blender/editors/object/object_edit.c (+12, -2) (Diff)
/source/blender/makesrna/intern/rna_property.c (+9, -8) (Diff)
/source/blender/makesrna/RNA_enum_types.h (+2, -0) (Diff)
/source/gameengine/Converter/KX_ConvertProperties.cpp (+94, -0) (Diff)
/source/gameengine/Ketsji/KX_FontObject.cpp (+13, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021