forked from bartvdbraak/blender
Pack UI:
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:
parent
6cadd2bee3
commit
2545e832e2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user