forked from bartvdbraak/blender
edit on recent font UI changes.
don't show the text objects body in the ui - this could be pages of text and even though it only draws part of this, it still allocates and frees the string on every draw.
This commit is contained in:
parent
e039a631a9
commit
cda279b525
@ -20,6 +20,7 @@
|
||||
import bpy
|
||||
from bpy.types import Header, Menu, Panel
|
||||
|
||||
|
||||
class LOGIC_PT_properties(Panel):
|
||||
bl_space_type = 'LOGIC_EDITOR'
|
||||
bl_region_type = 'UI'
|
||||
@ -48,7 +49,12 @@ class LOGIC_PT_properties(Panel):
|
||||
sub.prop(prop, "name", text="")
|
||||
row.prop(prop, "type", text="")
|
||||
# get the property from the body, not the game property
|
||||
row.prop(ob.data, "body", text="")
|
||||
# note, dont do this - its too slow and body can potentually be a really long string.
|
||||
# row.prop(ob.data, "body", text="")
|
||||
if prop.type == 'STRING':
|
||||
row.label("*See Font Object*")
|
||||
else:
|
||||
row.prop(prop, "value", text="", toggle=True)
|
||||
else:
|
||||
props = layout.operator("object.game_property_new", text="Add Text Game Property", icon='ZOOMIN')
|
||||
props.name = 'Text'
|
||||
|
Loading…
Reference in New Issue
Block a user