Fix part of #26811: absolute shape keys should not show influence value in list.
[blender.git] / source / blender / editors / interface / interface_templates.c
index 32a20e82d2f2d3bb12ced7a7d05bf4858df08e1e..25dbb68a25872a1d38aaf789ceec5aead19ffa86 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "DNA_key_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_userdef_types.h"
 
@@ -2104,6 +2105,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
        }
        else if(itemptr->type == &RNA_ShapeKey) {
                Object *ob= (Object*)activeptr->data;
+               Key *key= (Key*)itemptr->data;
 
                split= uiLayoutSplit(sub, 0.75f, 0);
 
@@ -2111,7 +2113,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
 
                uiBlockSetEmboss(block, UI_EMBOSSN);
                row= uiLayoutRow(split, 1);
-               if(i == 0) uiItemL(row, "", ICON_NONE);
+               if(i == 0 || (key->type != KEY_RELATIVE)) uiItemL(row, "", ICON_NONE);
                else uiItemR(row, itemptr, "value", 0, "", ICON_NONE);
 
                if(ob->mode == OB_MODE_EDIT && !((ob->shapeflag & OB_SHAPE_EDIT_MODE) && ob->type == OB_MESH))