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:
authorJanne Karhu <jhkarh@gmail.com>2011-01-22 17:44:04 +0300
committerJanne Karhu <jhkarh@gmail.com>2011-01-22 17:44:04 +0300
commitdb8a253ace6810264062a26f36fe7e59f8a70231 (patch)
tree1b487c68a159de71474ebcfaea3fca028b9fef14 /source/blender/editors/space_image
parent11491201451fbb5e1510979df8d7335ed0ee790f (diff)
Fix for [#25664] Remove Pack does not work in Texture panel
* Unpack menu option "Remove Pack" didn't get a pointer to the image to be unpacked. This worked from image view by using the active image, but not from texture panel.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_ops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 3f4c10c8155..cd54a899f35 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -1445,7 +1445,10 @@ static void unpack_menu(bContext *C, const char *opname, Image *ima, const char
pup= uiPupMenuBegin(C, "Unpack file", ICON_NULL);
layout= uiPupMenuLayout(pup);
- uiItemEnumO(layout, opname, "Remove Pack", 0, "method", PF_REMOVE);
+ sprintf(line, "Remove Pack");
+ props_ptr= uiItemFullO(layout, opname, line, ICON_NULL, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
+ RNA_enum_set(&props_ptr, "method", PF_REMOVE);
+ RNA_string_set(&props_ptr, "image", ima->id.name+2);
if(strcmp(abs_name, local_name)) {
switch(checkPackedFile(local_name, pf)) {