Applied pack unpack from Pablo Martin (caedes),
http://projects.blender.org/tracker/?func=detail&atid=127&aid=3246&group_id=9 adds Blender.c: Blender.UnpackModes (dict with the unpack modes) Blender.UnpackAll(mode) Blender.PackAll() Blender.CountPackedFiles() Image.c: image.packed (this was working) image.pack() image.unpack() Sound.c: sound.packed sound.pack() sound.unpack()
This commit is contained in:
@@ -12,6 +12,7 @@ The main Blender module.
|
||||
|
||||
B{New}: L{Run}, L{UpdateMenus}, new options to L{Get}, L{ShowHelp},
|
||||
L{SpaceHandlers} dictionary.
|
||||
L{UnpackModes} dictionary.
|
||||
|
||||
Blender
|
||||
=======
|
||||
@@ -41,6 +42,12 @@ Blender
|
||||
will exit as soon as it finishes rendering or executing a script
|
||||
(ex: 'C{blender -b <blender file> -P <script>}'). Try 'C{blender -h}'
|
||||
for more detailed informations.
|
||||
@type UnpackModes: constant dictionary
|
||||
@var UnpackModes: dictionary with available unpack modes.
|
||||
- USE_LOCAL - use files in current directory (create when necessary)
|
||||
- WRITE_LOCAL - write files in current directory (overwrite when necessary)
|
||||
- USE_ORIGINAL - use files in original location (create when necessary)
|
||||
- WRITE_ORIGINAL - write files in original location (overwrite when necessary)
|
||||
@type SpaceHandlers: constant dictionary
|
||||
@var SpaceHandlers: dictionary with space handler types.
|
||||
- VIEW3D_EVENT;
|
||||
@@ -193,6 +200,22 @@ def UpdateMenus ():
|
||||
@note: only scripts that save other new scripts in the default or user
|
||||
defined folders need to call this function.
|
||||
"""
|
||||
def UnpackAll (mode):
|
||||
"""
|
||||
Unpack all files with specified mode.
|
||||
@param mode: The Mode for unpacking. Must be one of the modes in
|
||||
Blender.UnpackModes dictionary.
|
||||
@type mode: int
|
||||
"""
|
||||
def PackAll ():
|
||||
"""
|
||||
Pack all files.
|
||||
"""
|
||||
|
||||
def Blender_CountPackedFiles():
|
||||
"""
|
||||
Returns the number of packed files.
|
||||
"""
|
||||
|
||||
def Quit ():
|
||||
"""
|
||||
|
||||
@@ -82,7 +82,7 @@ class Image:
|
||||
@ivar start: Texture's animation start frame [0, 128].
|
||||
@ivar end: Texture's animation end frame [0, 128].
|
||||
@ivar speed: Texture's animation speed [1, 100].
|
||||
@ivar packed: Boolean, True whe the Texture is packed (readonly).
|
||||
@ivar packed: Boolean, True when the Texture is packed (readonly).
|
||||
@ivar bindcode: Texture's bind code (readonly).
|
||||
"""
|
||||
|
||||
@@ -320,9 +320,9 @@ class Image:
|
||||
def unpack(mode):
|
||||
"""
|
||||
Unpacks the image to the images filename.
|
||||
@param mode: if 0, the existing file located at filename will be used. 1, The file will be overwritten if its different. 2, always overwrite the existing image file.
|
||||
@param mode: One of the values in Blender.Unpackmodes dict.
|
||||
@note: An error will be raised if the image is not packed or the filename path does not exist.
|
||||
@returns: nothing
|
||||
@rtype: none
|
||||
@type mode: int
|
||||
"""
|
||||
"""
|
||||
|
||||
@@ -50,6 +50,7 @@ class Sound:
|
||||
This object gives access to Sounds in Blender.
|
||||
@ivar name: The name of this Sound object.
|
||||
@ivar filename: The filename (path) to the sound file loaded into this Sound
|
||||
@ivar packed: Boolean, True when the sample is packed (readonly).
|
||||
object.
|
||||
"""
|
||||
|
||||
@@ -114,3 +115,21 @@ class Sound:
|
||||
@param f: the new pitch value in the range [-12.0, 12.0].
|
||||
"""
|
||||
|
||||
def pack():
|
||||
"""
|
||||
Packs the sound into the current blend file.
|
||||
@note: An error will be raised if the sound is alredy packed or the filename path does not exist.
|
||||
@returns: nothing
|
||||
@rtype: none
|
||||
"""
|
||||
|
||||
def unpack(mode):
|
||||
"""
|
||||
Unpacks the sound to the samples filename.
|
||||
@param mode: One of the values in Blender.Unpackmodes dict.
|
||||
@note: An error will be raised if the sound is not packed or the filename path does not exist.
|
||||
@returns: nothing
|
||||
@rtype: none
|
||||
@type mode: int
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user