p2or / blender-loom

image sequence rendering, encoding and playback
175 stars 10 forks source link

# wildcard only works if it's the last character #46

Closed Apicedda closed 1 year ago

Apicedda commented 1 year ago

Using the # wildcard in the output path and rendering image sequence with the addon (ctrl shift f12) only works if # is/are the last characters, otherwise i get this error: console log

example of a non working path (doesn't work even without global variable usage) example of path not working

Blender 3.4.1 stable

p2or commented 1 year ago

Hi @Apicedda,

thanks for your report. This error is kind of expected, because # represents the frame number for the image sequence and is always the last part of the file name (one reason why you don't have to specify it in Blender either). Also there is currently no way to get rid if it. We could implement that, but I don't see any good reason for it because that way you would lose the actual reference to the real scene frame. Do you see any advantage?

Anyway, if you want a single-digit frame number on the front of the filename, you can create a new global like: $FRAME and assign "{:0d}".format(bpy.context.scene.frame_current) to it. Does this help?

Screenshot 2023-02-16 at 08 12 34

Cheers, Christian

Apicedda commented 1 year ago

It does work putting it in front if i render normally without the addon tho. The reason I didn't use $frame is because then I have the frame number twice. Anyway if putting it in front is not supported i think it should report it as an error message instead of getting an index out of range error. Thank you for your work and the prompt reply btw.

p2or commented 1 year ago

Hi @Apicedda,

It does work putting it in front if i render normally without the addon tho.

Interesting.

if putting it in front is not supported i think it should report it as an error message instead of getting an index out of range error.

Absolutely. We can even support that, I'm just not sure why and whether that's worth it. If you have a good reason for this, please let me know. Otherwise, I would prefer to remove the character instead of an error message, so that the render always starts, regardless of whether there is a typo. Cool?

Cheers, Christian

Apicedda commented 1 year ago

Absolutely. We can even support that, I'm just not sure why and whether that's worth it. If you have a good reason for this, please let me know. Otherwise, I would prefer to remove the character instead of an error message, so that the render always starts, regardless of whether there is a typo. Cool?

Oh i don't have a good reason, other than supporting what is already supported in blender. For my use i would be fine with using $frame in front and then removing the automatic frame number after the renders are done.

p2or commented 1 year ago

For my use i would be fine with using $frame in front and then removing the automatic frame number after the renders are done.

Also a good option. Then I'll take care of the index error as soon as I have some time. Cheers!