Fix T71171: Problems removing texture packing (without writing anything)
authorPhilipp Oeser <info@graphics-engineer.com>
Tue, 29 Oct 2019 10:33:41 +0000 (11:33 +0100)
committerPhilipp Oeser <info@graphics-engineer.com>
Tue, 29 Oct 2019 13:30:22 +0000 (14:30 +0100)
using image.unpack() or bpy.ops.image.unpack()

If we offer this in the UI, also expose this to .unpack

Maniphest Tasks: T71171

Differential Revision: https://developer.blender.org/D6152

source/blender/editors/space_info/info_ops.c
source/blender/makesrna/intern/rna_packedfile.c

index 14817e9ffa1fcb893eaf9e25e0408ab08d3bf69f..124e3c08165301365e08f661135c9af00fe526b2 100644 (file)
@@ -211,6 +211,7 @@ static const EnumPropertyItem unpack_all_method_items[] = {
      "Write files to original location (overwrite existing files)",
      ""},
     {PF_KEEP, "KEEP", 0, "Disable Auto-pack, keep all packed files", ""},
+    {PF_REMOVE, "REMOVE", 0, "Remove Pack", ""},
     /* {PF_ASK, "ASK", 0, "Ask for each file", ""}, */
     {0, NULL, 0, NULL, NULL},
 };
index dda1c637f395ed09b447530c4f8d5c24c8337d86..8319612ea91cd6c34258da3ce86780f8b7949bd2 100644 (file)
@@ -32,6 +32,7 @@
 #include "rna_internal.h"
 
 const EnumPropertyItem rna_enum_unpack_method_items[] = {
+    {PF_REMOVE, "REMOVE", 0, "Remove Pack", ""},
     {PF_USE_LOCAL, "USE_LOCAL", 0, "Use Local File", ""},
     {PF_WRITE_LOCAL, "WRITE_LOCAL", 0, "Write Local File (overwrite existing)", ""},
     {PF_USE_ORIGINAL, "USE_ORIGINAL", 0, "Use Original File", ""},