Page 1 of 1

Import Image question

Posted: Tue Nov 05, 2013 5:47 pm
by jordicabeza@gmail.com
Hi friends,

I have a question.

I need import a image sequence to Realflow.

Anyone know how can I to do?

Thanks a lot

Cheers, Jordi

Re: Import Image question

Posted: Wed Nov 06, 2013 10:44 am
by tsn
Here you go:

Code: Select all

pathToSeq     = "Enter your path here"
fileName      = "Enter the common part of the file name here"
extension     = ".jpg"
numberOfFiles = 20

for i in range(0, numberOfFiles):
	if (i < 10): fileIndex = "00"+str(i)
	elif (i > 10 and i < 100): fileIndex = "0"+str(i)
	elif (i > 100): fileIndex = str(i)

	completeName = pathToSeq+fileName+fileIndex+extension
	image = Image.new()
	image.open(completeName)
	scene.message("Loading file "+completeName+" @ "+str(image.getSize()))
	image.close()
This is a batch script you can modify to your own needs. As always with Python scripts: please mind the indents. Here, the image name must have this format: filename###.extension

Cheers,
Thomas

Re: Import Image question

Posted: Wed Nov 06, 2013 1:06 pm
by jordicabeza@gmail.com
Thanks Thomas,

I try now.

Cheers,

Jordi

Re: Import Image question

Posted: Wed Nov 06, 2013 5:50 pm
by Oldcode
Stupid question:

Why are you importing a sequence of JPGs. Are you using them as an aminated map filter?

Thanks,