
    
3j
                     *    S SK J r    " S S5      r\/rg)   )logc                   P    \ rS rSrSr\S 5       rSrSrSr	Sr
Sr     SS	 jrS
rg)MTB_AnimationBuilder   zSimple maths for animation.c           	      H    SSSSS.4SSSS.4SS	SS.4SSSS.4SSSS.4S
.0$ )NrequiredINTd       )defaultminFLOAT      ?g           )total_framesscale_float
loop_countraw_iterationraw_loop )clss    F/home/wildlama/comfy/ComfyUI/custom_nodes/comfy_mtb/nodes/animation.pyINPUT_TYPES MTB_AnimationBuilder.INPUT_TYPES   sW     !&C(B C 'S)EF$!A&>?"'Qq)A!B"!$<=	
 		
    )r	   r   r	   BOOLEAN)framez0-1 (scaled)count
loop_endedzmtb/animationbuild_animationa  
# Animation Builder

Check the
[wiki page](https://github.com/melMass/comfy_mtb/wiki/nodes-animation-builder)
for more info.


- This basic example should help to understand the meaning of
its inputs and outputs thanks to the [debug](nodes-debug) node.

![](https://github.com/melMass/comfy_mtb/assets/7041726/2b5c7e4f-372d-4494-9e73-abb2daa7cb36)

- In this other example Animation Builder is used in combination with
[Batch From History](https://github.com/melMass/comfy_mtb/wiki/nodes-batch-from-history)
to create a zoom-in animation on a static image

![](https://github.com/melMass/comfy_mtb/assets/7041726/77d37da1-0a8e-4519-a493-dfdef7f755ea)

## Inputs

| name | description |
| ---- | :----------:|
| total_frames | The number of frame to queue (this is multiplied by the `loop_count`)|
| scale_float | Convenience input to scale the normalized `current value` (a float between 0 and 1 lerp over the current queue length) |
| loop_count | The number of loops to queue |
| **Reset Button** | resets the internal counters, although the node is though around using its queue button it should still work fine when using the regular queue button of comfy |
| **Queue Button** | Convenience button to run the queues (`total_frames` * `loop_count`) |

c                 p    XA-  nXaS-
  -  U-  n[         R                  " SU SU SU 35        XgXVUS-
  :H  4$ )Nr   zframe: /z
  scaled: )r   debug)selfr   r   r   r   r   r   scaleds           r   r    $MTB_AnimationBuilder.build_animation7   sT     .!+,; 			GE7!L>F8DExL14D*EGGr   r   N)r
   r   r   r   r   )__name__
__module____qualname____firstlineno____doc__classmethodr   RETURN_TYPESRETURN_NAMESCATEGORYFUNCTIONDESCRIPTIONr    __static_attributes__r   r   r   r   r      sL    %

 

 6LCLH HKB Hr   r   N)r   r   	__nodes__r   r   r   <module>r4      s!    CH CHL ""	r   