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.
This commit is contained in:
Ton Roosendaal 2013-01-27 17:20:08 +00:00
parent 6cadd2bee3
commit 2545e832e2
2 changed files with 2 additions and 4 deletions

@ -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

@ -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);