Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (PropAnim
- (description "Animate any properties on target object")
- (ext anim)
- (superclasses Anim)
- (editor (loop
- bool
- (help "Do I self loop on SetFrame")))
- (types
- (song_anim (song TRUE))
- (vignette_lipsync
- (editor
- (clip
- object
- (class CharClip)
- (help "The clip that this propanim goes along with"))
- (lip_sync
- object
- (class CharLipSync)
- (help "The lipsync object to set from this propanim"))
- (setup_from_clip
- script
- (script {$this setup_from_clip})))
- (clip )
- (lip_sync )
- (setup_from_clip {do
- {set
- $target
- [lip_sync]}
- {set
- $num_frames
- {*
- {[clip]
- get
- length_seconds}
- 30}}
- {foreach
- $viseme
- {$target
- get
- viseme_list}
- {set
- $temp
- {array 0}}
- {push_back
- $temp
- $viseme}
- {if
- {! {$this
- has_keys
- $target
- $temp}}
- {$this
- add_keys
- $target
- $temp
- kPropFloat}
- {$this
- set_key_val
- $target
- $temp
- 0
- 0.00}
- {$this
- set_key_val
- $target
- $temp
- $num_frames
- 0.00}}}}))
- (song_facial_exp
- (song TRUE)
- (editor (lip_sync
- object
- (class CharLipSync)
- (help "The lipsync object to set from this propanim")))
- (lip_sync )
- (setup {if_else
- {$tool_song song_name}
- {do
- {set
- $target
- [lip_sync]}
- {set
- $num_frames
- {*
- {$tool_song
- get
- song_end_frame}
- 30}}
- {foreach
- $viseme
- {$target
- get
- viseme_list}
- {set
- $temp
- {array 0}}
- {push_back
- $temp
- $viseme}
- {if
- {! {$this
- has_keys
- $target
- $temp}}
- {$this
- add_keys
- $target
- $temp
- kPropFloat}
- {$this
- set_key_val
- $target
- $temp
- 0
- 0.00}
- {$this
- set_key_val
- $target
- $temp
- $num_frames
- 0.00}}}}
- {notify "No song selected in anim bar- can't set up lip sync. Please select the song and try again."}}))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement