Pack UI:
authorTon Roosendaal <ton@blender.org>
Sun, 27 Jan 2013 17:20:08 +0000 (17:20 +0000)
committerTon Roosendaal <ton@blender.org>
Sun, 27 Jan 2013 17:20:08 +0000 (17:20 +0000)
Oops! So there was an Unpack button, hidden in the Nkey properties of Image window.
This was drawn next to greyed-out buttons, didn't notice it well.

I also now found the unpack() menu in editors/util, and there's an Image unpack op.
Also the RNA api has an unpack!

Will remove the generic unpack op, and add a sound and vfont unpack instead.

release/scripts/startup/bl_ui/space_image.py
source/blender/editors/interface/interface_templates.c

index cfedc5e..179c41a 100644 (file)
@@ -146,9 +146,7 @@ class IMAGE_MT_image(Menu):
             if not show_render:
                 layout.separator()
 
-                if ima.packed_file:
-                    layout.operator("image.unpack")
-                else:
+                if not ima.packed_file:
                     layout.operator("image.pack")
 
                 # only for dirty && specific image types, perhaps
index 742c7bd..83bd07a 100644 (file)
@@ -541,7 +541,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
           Only for images, sound and fonts */
        if (id && BKE_pack_check(id)) {
 
-               but = uiDefIconButO(block, BUT, "FILE_OT_unpack_item", WM_OP_INVOKE_REGION_WIN, ICON_UGLYPACKAGE, 0, 0, UI_UNIT_X, UI_UNIT_Y, "Packed File");
+               but = uiDefIconButO(block, BUT, "FILE_OT_unpack_item", WM_OP_INVOKE_REGION_WIN, ICON_PACKAGE, 0, 0, UI_UNIT_X, UI_UNIT_Y, "Packed File");
                uiButGetOperatorPtrRNA(but);
                
                RNA_string_set(but->opptr, "id_name", id->name+2);