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
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2014-04-28 00:33:05 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-04-28 00:33:05 +0400
commitf328f45e22abafbb4eb88fc441c9b3707624901f (patch)
tree3fc136ad5b0a41913d604230866df2fd562d8a73
parent8dcb1e9f70762e3542fcee5fea81c0a947229c17 (diff)
Fix T39692: Text fields in datablocks editor are broken
Make RNAPointer props un-editable here, we simply cannot handle this. Also correct previous commit, asking for autonaming for all items was a bit extreme, this is only needed for enums!
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index b5d44812e73..09e971ff491 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -755,17 +755,28 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, Spa
if (tselem->type == TSE_RNA_PROPERTY) {
ptr = &te->rnaptr;
prop = te->directdata;
-
- if (!(RNA_property_type(prop) == PROP_POINTER && (TSELEM_OPEN(tselem, soops)))) {
- uiDefAutoButR(block, ptr, prop, -1, NULL, ICON_NONE, sizex, te->ys, OL_RNA_COL_SIZEX,
- UI_UNIT_Y - 1);
+
+ if (!TSELEM_OPEN(tselem, soops)) {
+ if (RNA_property_type(prop) == PROP_POINTER) {
+ uiBut *but = uiDefAutoButR(block, ptr, prop, -1, "", ICON_NONE, sizex, te->ys,
+ OL_RNA_COL_SIZEX, UI_UNIT_Y - 1);
+ uiButSetFlag(but, UI_BUT_DISABLED);
+ }
+ else if (RNA_property_type(prop) == PROP_ENUM) {
+ uiDefAutoButR(block, ptr, prop, -1, NULL, ICON_NONE, sizex, te->ys, OL_RNA_COL_SIZEX,
+ UI_UNIT_Y - 1);
+ }
+ else {
+ uiDefAutoButR(block, ptr, prop, -1, "", ICON_NONE, sizex, te->ys, OL_RNA_COL_SIZEX,
+ UI_UNIT_Y - 1);
+ }
}
}
else if (tselem->type == TSE_RNA_ARRAY_ELEM) {
ptr = &te->rnaptr;
prop = te->directdata;
- uiDefAutoButR(block, ptr, prop, te->index, NULL, ICON_NONE, sizex, te->ys, OL_RNA_COL_SIZEX,
+ uiDefAutoButR(block, ptr, prop, te->index, "", ICON_NONE, sizex, te->ys, OL_RNA_COL_SIZEX,
UI_UNIT_Y - 1);
}
}