Import Image question

Post Reply
jordicabeza@gmail.com
Posts: 8
Joined: Thu Jan 31, 2013 3:58 pm

Import Image question

Post by jordicabeza@gmail.com » Tue Nov 05, 2013 5:47 pm

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

User avatar
tsn
Posts: 283
Joined: Fri Jun 11, 2010 7:22 am

Re: Import Image question

Post by tsn » Wed Nov 06, 2013 10:44 am

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
Thomas Schlick | Next Limit Technologies

jordicabeza@gmail.com
Posts: 8
Joined: Thu Jan 31, 2013 3:58 pm

Re: Import Image question

Post by jordicabeza@gmail.com » Wed Nov 06, 2013 1:06 pm

Thanks Thomas,

I try now.

Cheers,

Jordi

User avatar
Oldcode
Posts: 170
Joined: Fri Nov 04, 2011 12:35 am

Re: Import Image question

Post by Oldcode » Wed Nov 06, 2013 5:50 pm

Stupid question:

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

Thanks,

Post Reply