props ¶
get_clip_filepath ¶
get_clip_filepath(
clip: VideoNode,
fallback: SPathLike | None = ...,
strict: Literal[False] = ...,
*,
func: FuncExceptT | None = ...
) -> SPath | None
get_clip_filepath(
clip: VideoNode,
fallback: SPathLike | None = None,
strict: bool = False,
*,
func: FuncExceptT | None = None
) -> SPath | None
Helper function to get the file path from a clip.
This functions checks for the IdxFilePath
frame property. It also checks to ensure the file exists, and throws an error if it doesn't.
Parameters:
-
clip
¶VideoNode
) –The clip to get the file path from.
-
fallback
¶SPathLike | None
, default:None
) –Fallback file path to use if the
prop
is not found. -
strict
¶bool
, default:False
) –If True, will raise an error if the
prop
is not found. This makes it so the function will NEVER return False. Default: False. -
func
¶FuncExceptT | None
, default:None
) –Function returned for error handling. This should only be set by VS package developers.
Raises:
-
FileWasNotFoundError
–The file path was not found.
-
FramePropError
–The property was not found in the clip.
Source code
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
|
merge_clip_props ¶
Merge frame properties from all provided clips.
The props of the main clip (defined by main_idx) will be overwritten, and all other props will be added to it.
Parameters:
-
clips
¶VideoNode
, default:()
) –Clips which will be merged.
-
main_idx
¶int
, default:0
) –Index of the main clip to which all other clips props will be merged.
Returns:
-
VideoNode
–First clip with all the frameprops of every other given clip merged into it.
Source code
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
|