I animate with lots of holds in between each keyframe so there are lots of frames with no movement throughout my animation. I don't want to render a bunch of duplicate frames (I'd rather stretch them out in post), so I've devised a way of rendering only the frames which have keyframes using a batch script.
"C:\Program Files\Blender Foundation\Blender\blender.exe" -b "C:\Users\Me\Documents\Blendfile.blend"
-f 1 -f 23 -f 24 -f 25 -f 26 -f 31 -f 32 -f 33 -f 34 -f 37 -f 38 -f 39 -f 45 -f 46 -f 47 -f 51 -f 52 -f 53 -f 59 -f 61 -f 71 -f 72 -f 73 -f 75 -f 76 -f 77 -f 83 -f 84 -f 85 -f 93 -f 94 -f 95 -f 98 -f 99 -f 100 -f 103 -f 104 -f 105 -f 110 -f 111 -f 112 -f 114 -f 115 -f 116 -f 122 -f 123 -f 124 -f 127 -f 128 -f 129 -f 130 -f 131 -f 132 -f 140 -f 141 -f 142 -f 143 -f 144 -f 145 -f 149 -f 150 -f 151 -f 152 -f 153 -f 154 -f 156 -f 157 -f 158 -f 161 -f 162 -f 163 -f 169 -f 170 -f 171 -f 175 -f 176 -f 177 -f 178 -f 179 -f 180 -f 181 -f 182 -f 183 -f 192 -f 193 -f 194 -f 196 -f 198 -f 200 -f 202 -f 204 -f 206 -f 208 -f 210 -f 211 -f 212 -f 213 -f 217 -f 218 -f 219 -f 226 -f 227 -f 229 -f 234 -f 235 -f 236 -f 237 -f 238 -f 239 -f 240 -f 244 -f 245 -f 246 -f 249 -f 250 -f 251 -f 253 -f 254 -f 255 -f 264 -f 265 -f 266 -f 267 -f 268 -f 275 -f 276 -f 277 -f 279 -f 280 -f 281 -f 282 -f 285 -f 286 -f 287 -f 296 -f 297 -f 298 -f 308 -f 309 -f 310 -f 316 -f 317 -f 318 -f 319 -f 323 -f 324 -f 325 -f 332 -f 333 -f 334 -f 343 -f 344 -f 345 -f 352 -f 353 -f 354 -f 356 -f 357 -f 358 -f 361 -f 362 -f 363 -f 367 -f 368 -f 369 -f 370 -f 371 -f 372
Currently I'm manually populating this script with the frame numbers. However, I know that Blender keeps the data of all the keyframes (such as at the top of the Dope Sheet).
So my dilemma is, how can I write a Python script that collects this data for me? Does anyone know how to tap into this Super Sheet Summary or some Blender internal function to grab the frame numbers of the frames which have keyframes on them?
All help would be greatly appreciated! Thanks!