[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3989] contrib/py/scripts/addons/ io_import_sound_to_anim.py: -v 0.70Beta-

vlassius santos vlassius at vlassius.com.br
Tue Nov 20 12:48:28 CET 2012


Revision: 3989
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3989
Author:   vlassius
Date:     2012-11-20 11:48:27 +0000 (Tue, 20 Nov 2012)
Log Message:
-----------
-v 0.70Beta-
    Included: SmartRender - Render just the frames that has changes
    Included: Options to check SmartRender for Blender Internal Render Engine:LocRotScale, Material, Transp, Mirror
    Included: User can Cancel all functions with CANCEL button- Extensive Code and flux change (bugs expected)
    Included: User can Cancel all functions with ESC
    Inclused: User friendly messages into UI while running (its no more necessary to look at terminal window to most users)
    Cleanup:  Non Stardard Chars in coments
    To Do:    Decrease overhead of timer loops
    To Do:    Try to implement Smart Render for Cycles

Modified Paths:
--------------
    contrib/py/scripts/addons/io_import_sound_to_anim.py

Modified: contrib/py/scripts/addons/io_import_sound_to_anim.py
===================================================================
--- contrib/py/scripts/addons/io_import_sound_to_anim.py	2012-11-20 04:24:19 UTC (rev 3988)
+++ contrib/py/scripts/addons/io_import_sound_to_anim.py	2012-11-20 11:48:27 UTC (rev 3989)
@@ -21,9 +21,9 @@
 bl_info = {
     "name": "Import: Sound to Animation",
     "author": "Vlassius",
-    "version": (0, 60),
-    "blender": (2, 57, 0),
-    "api": 37023,
+    "version": (0, 70),
+    "blender": (2, 64, 9),
+    "api": 52100,
     "location": "Select a object -> go to the Object tab ->  Import Movement From Wav File",
     "description": "Extract movement from sound file. See the Object Panel at the end.",
     "warning": "",
@@ -32,79 +32,84 @@
     "category": "Import-Export"}
 
 """
--- Extract movement from sound file, to help in animation - import script --<br> 
+-- Extract movement from sound file, to help in animation - import script --<br>
 
 - NOTES:
 - This script takes a wav file and get sound "movement" to help you in sync the movement to words in the wave file. <br>
-- Supported Audio: .wav (wave) 8 bits and 16 bits <br>
-- At least Blender 2.5.7 is necessary to run this program.
+- Supported Audio: .wav (wave) 8 bits and 16 bits - mono and multichanel file<br>
+- At least Blender 2.64.9 is necessary to run this program.
+- Curitiba - Brasil
 
--v 0.60Beta- 
+
+-v 0.70Beta-
+    Included: SmartRender - Render just the frames that has changes
+    Included: Options to check SmartRender for Blender Internal Render Engine:LocRotScale, Material, Transp, Mirror
+    Included: User can Cancel all functions with CANCEL button- Extensive Code and flux change (bugs expected)
+    Included: User can Cancel all functions with ESC
+    Inclused: User friendly messages into UI while running (its no more necessary to look at terminal window to most users)
+    Cleanup:  Non Stardard Chars in coments
+    To Do:    Decrease overhead of timer loops
+    To Do:    Try to implement Smart Render for Cycles
+
+-v 0.60Beta-
     Included: Option to use just the beat from the audio sound
     Included: Option to exclude the beat from the audio sound
     Included: More or less sensibility options when using the beat
     Included: Audio Channel Select option
 
--v 0.50Beta- 
-    Included: Auto Adjust Audio Sensity option    
+-v 0.50Beta-
+    Included: Auto Adjust Audio Sensity option
     Included: 8 bits .wav file support
-    Recalibrated: Manual audio sense 1    
+    Recalibrated: Manual audio sense 1
     Cosmetic: Many changes in panel and terminal window info
     Corrected: Tracker_url
     Corrected: a few bytes in Memory Leaks
     work around: memory leak in function: bpy.ops.transform.rotate
     work around: memory leak in function: bpy.ops.anim.keyframe_insert
-    
--v 0.22Beta- 
-    Included: 
+
+-v 0.22Beta-
+    Included:
     Camera Rotation
     Empty Location-Rotation-Scale
-    
 
--v 0.21Beta- 
+-v 0.21Beta-
     Changed just the meta informations like version and wiki page.
-    
 
--v 0.20 Beta- 
+-v 0.20 Beta-
     New Panel
-    
-    
--v 0.1.5 Beta- 
+
+-v 0.1.5 Beta-
     Change in API-> Properties
-    Included the button "Get FPS from Scene" due to a problem to get it in the start 
+    Included the button "Get FPS from Scene" due to a problem to get it in the start
     Return to Frame 1 after import
     Filter .wav type file (by batFINGER)
-    
--v 0.1.4 Beta- 
+
+-v 0.1.4 Beta-
     If choose negative in rotation, auto check the rotation negative to Bones
     change in register()  unregister():
 
--v 0.1.3 Beta- 
+-v 0.1.3 Beta-
     File Cleanup
-    Change to bl_info. 
-    Cosmetic Changes. 
-    Minor change in API in how to define buttons. 
+    Change to bl_info.
+    Cosmetic Changes.
+    Minor change in API in how to define buttons.
     Adjust in otimization.
 
 -v 0.1.2 Beta
-change in API- Update function bpy.ops.anim.keyframe_insert_menu 
+change in API- Update function bpy.ops.anim.keyframe_insert_menu
 
 -v 0.1.1 Beta
 change in API- Update property of  window_manager.fileselect_add
 
 -v 0.1.0 Beta
-new - Added support to LAMP object         
+new - Added support to LAMP object
 new - improved flow to import
 new - check the type of object before show options
 bug - option max. and min. values
 change- Updated scene properties for changes in property API.
         See http://lists.blender.org/pipermail/bf-committers/2010-September/028654.html
+new flow: 1) Process the sound file    2) Show Button to import key frames
 
-new flow:
-          1) Process the sound file
-          2) Show Button to import key frames 
-
-
 - v0.0.4 ALPHA
 new - Added destructive optimizer option - LostLestSignificativeDigit lost/total -> 10/255 default
 new - Visual Graph to samples
@@ -122,18 +127,17 @@
 Corrected initial error (Register() function)
 Corrected some labels R. S. L.
 Turned off "object field" for now
-Changed target default to Z location 
+Changed target default to Z location
 
 - v0.0.1
 Initial version
 
-
-
 Credit to:
 Vlassius
 
 - http://vlassius.com.br
 - vlassius at vlassius.com.br
+- Curitiba - Brasil
 
 """
 
@@ -142,776 +146,126 @@
 #from io_utils import ImportHelper
 import wave
 
-#TODO
-#
-#   colocar CANCELAR com ESC
-#
-#
-
-
-
-#para deixar array global 
+#para deixar global
 def _Interna_Globals(BytesDadosTotProcess, context):
     global array
-    
-    array= bytearray(BytesDadosTotProcess)  # cria array  
+    global arrayAutoSense
+
+    array= bytearray(BytesDadosTotProcess)  # cria array
+    arrayAutoSense= bytearray((BytesDadosTotProcess)*2)  # cria array para AutoAudioSense
     context.scene.imp_sound_to_anim.bArrayCriado=True
 
-
-def wavimport(context):
-    #================================================================================================== 
-    # Insert Key Frame
-    #================================================================================================== 
-    
-#    print("Inside Wave Import...")   
-    
-    iDivScala= int(context.scene.imp_sound_to_anim.action_escale)     #scala do valor do movimento. [se =1 - 0 a 255 ] [se=255 - 0,00000 a 1,00000] [se=1000 - 0 a 0.255]
-
-    bNaoValorIgual=True
-    if context.scene.imp_sound_to_anim.action_valor_igual: bNaoValorIgual= False    # não deixa repetir valores
-    
-    iStartFrame= int(context.scene.imp_sound_to_anim.frames_initial)
-
-    iMaxValue= context.scene.imp_sound_to_anim.action_max_value
-    iMinValue= context.scene.imp_sound_to_anim.action_min_value
-                
-    bEscala=bRotacao=bEixo=False   
-    if context.scene.imp_sound_to_anim.import_type=='imp_t_Scale':
-        bEscala=True;
-        
-    if context.scene.imp_sound_to_anim.import_type=='imp_t_Rotation':
-        bRotacao=True;
-
-    if context.scene.imp_sound_to_anim.import_type=='imp_t_Location':
-        bEixo=True;
-
-    # atencao, nao é boolean
-    iEixoXneg= iEixoYneg= iEixoZneg=1
-    # atencao, nao é boolean
-    iRotationNeg=1
-    # atencao, nao é boolean
-    iEscalaYneg= iEscalaZneg= iEscalaXneg=1
-    bEixoX=bEixoY=bEixoZ=bEscalaX=bEscalaY=bEscalaZ=bRotationX=bRotationY=bRotationZ=False 
-
-    # LOCAL 1
-    if context.scene.imp_sound_to_anim.import_where1== 'imp_w_x':
-        bEixoX=True
-        bEscalaX=True
-        bRotationX=True
-        
-    if context.scene.imp_sound_to_anim.import_where1== 'imp_w_y':
-        bEixoY=True
-        bEscalaY=True
-        bRotationY=True
-
-    if context.scene.imp_sound_to_anim.import_where1== 'imp_w_z':
-        bEixoZ=True
-        bEscalaZ=True
-        bRotationZ=True
-
-    if context.scene.imp_sound_to_anim.import_where1== 'imp_w_-x':
-        bEixoX=True
-        bEscalaX=True
-        bRotationX=True
-        iEixoXneg=-1
-        iEscalaXneg=-1
-        iRotationNeg=-1
-
-    if context.scene.imp_sound_to_anim.import_where1== 'imp_w_-y':
-        bEixoY=True
-        bEscalaY=True
-        bRotationY=True
-        iEixoYneg=-1
-        iRotationNeg=-1
-        iEscalaYneg=-1
-
-    if context.scene.imp_sound_to_anim.import_where1== 'imp_w_-z':
-        bEixoZ=True
-        bEscalaZ=True
-        bRotationZ=True
-        iEixoZneg=-1
-        iRotationNeg=-1
-        iEscalaZneg=-1
-
-
-    # LOCAL 2
-    if context.scene.imp_sound_to_anim.import_where2== 'imp_w_x':
-        bEixoX=True
-        bEscalaX=True
-        bRotationX=True
-        
-    if context.scene.imp_sound_to_anim.import_where2== 'imp_w_y':
-        bEixoY=True
-        bEscalaY=True
-        bRotationY=True
-
-    if context.scene.imp_sound_to_anim.import_where2== 'imp_w_z':
-        bEixoZ=True
-        bEscalaZ=True
-        bRotationZ=True
-
-    if context.scene.imp_sound_to_anim.import_where2== 'imp_w_-x':
-        bEixoX=True
-        bEscalaX=True
-        bRotationX=True
-        iEixoXneg=-1
-        iEscalaXneg=-1
-        iRotationNeg=-1
-
-    if context.scene.imp_sound_to_anim.import_where2== 'imp_w_-y':
-        bEixoY=True
-        bEscalaY=True
-        bRotationY=True
-        iEixoYneg=-1
-        iRotationNeg=-1
-        iEscalaYneg=-1
-
-    if context.scene.imp_sound_to_anim.import_where2== 'imp_w_-z':
-        bEixoZ=True
-        bEscalaZ=True
-        bRotationZ=True
-        iEixoZneg=-1
-        iRotationNeg=-1
-        iEscalaZneg=-1
-
-
-    # LOCAL 3
-    if context.scene.imp_sound_to_anim.import_where3== 'imp_w_x':
-        bEixoX=True
-        bEscalaX=True
-        bRotationX=True
-        
-    if context.scene.imp_sound_to_anim.import_where3== 'imp_w_y':
-        bEixoY=True
-        bEscalaY=True
-        bRotationY=True
-
-    if context.scene.imp_sound_to_anim.import_where3== 'imp_w_z':
-        bEixoZ=True
-        bEscalaZ=True
-        bRotationZ=True
-
-    if context.scene.imp_sound_to_anim.import_where3== 'imp_w_-x':
-        bEixoX=True
-        bEscalaX=True
-        bRotationX=True
-        iEixoXneg=-1
-        iEscalaXneg=-1
-        iRotationNeg=-1
-
-    if context.scene.imp_sound_to_anim.import_where3== 'imp_w_-y':
-        bEixoY=True
-        bEscalaY=True
-        bRotationY=True
-        iEixoYneg=-1
-        iRotationNeg=-1
-        iEscalaYneg=-1
-
-    if context.scene.imp_sound_to_anim.import_where3== 'imp_w_-z':
-        bEixoZ=True
-        bEscalaZ=True
-        bRotationZ=True
-        iEixoZneg=-1
-        iRotationNeg=-1
-        iEscalaZneg=-1
-
-    iMinBaseX=iMinScaleBaseX=context.scene.imp_sound_to_anim.action_offset_x
-    iMinBaseY=iMinScaleBaseY=context.scene.imp_sound_to_anim.action_offset_y

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-extensions-cvs mailing list