[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54123] trunk/blender: Pack UI:

Ton Roosendaal ton at blender.org
Sun Jan 27 18:20:08 CET 2013


Revision: 54123
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54123
Author:   ton
Date:     2013-01-27 17:20:08 +0000 (Sun, 27 Jan 2013)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_image.py
    trunk/blender/source/blender/editors/interface/interface_templates.c

Modified: trunk/blender/release/scripts/startup/bl_ui/space_image.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_image.py	2013-01-27 16:45:00 UTC (rev 54122)
+++ trunk/blender/release/scripts/startup/bl_ui/space_image.py	2013-01-27 17:20:08 UTC (rev 54123)
@@ -146,9 +146,7 @@
             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

Modified: trunk/blender/source/blender/editors/interface/interface_templates.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_templates.c	2013-01-27 16:45:00 UTC (rev 54122)
+++ trunk/blender/source/blender/editors/interface/interface_templates.c	2013-01-27 17:20:08 UTC (rev 54123)
@@ -541,7 +541,7 @@
 	   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);




More information about the Bf-blender-cvs mailing list