[Bf-blender-cvs] [9efe12d77a6] blender-v2.81-release: Fix T71171: Problems removing texture packing (without writing anything) using image.unpack() or bpy.ops.image.unpack()

Philipp Oeser noreply at git.blender.org
Tue Oct 29 14:34:14 CET 2019


Commit: 9efe12d77a60fab1215f09c6231337244df3c176
Author: Philipp Oeser
Date:   Tue Oct 29 11:33:41 2019 +0100
Branches: blender-v2.81-release
https://developer.blender.org/rB9efe12d77a60fab1215f09c6231337244df3c176

Fix T71171: Problems removing texture packing (without writing anything)
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

===================================================================

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

===================================================================

diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c
index 14817e9ffa1..124e3c08165 100644
--- a/source/blender/editors/space_info/info_ops.c
+++ b/source/blender/editors/space_info/info_ops.c
@@ -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},
 };
diff --git a/source/blender/makesrna/intern/rna_packedfile.c b/source/blender/makesrna/intern/rna_packedfile.c
index dda1c637f39..8319612ea91 100644
--- a/source/blender/makesrna/intern/rna_packedfile.c
+++ b/source/blender/makesrna/intern/rna_packedfile.c
@@ -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", ""},



More information about the Bf-blender-cvs mailing list