sidebar features
sidebar content

Go Back   Blender Artists Forums > General Forums > Python & Plugins

Reply
 
Thread Tools
forTe's Avatar
forTe forTe is offline
Member
 
Join Date: Dec 2003
Posts: 2,111
Based off the conversations in this thread, I have written a script (a preliminary version can be found in that thread).

Updated UI->


The basic functionality of the script is fairly simple. Select a single image or directory of images and the import each image to a new plane, uv mapped with the image. The Pixels Per Unit slider sets how many pixels will be in one blender unit, meaning that whole directories of images will be proportional to the image size (see other thread for why this was done). Materials just give editing options for the materials (default lambert shader and cooktorr specularity).

I have only tried this script on windows, so I'd be interested in knowing if it works on other Operating systems (with the file import and what not).

Code is GPLed

Script v1.1 Here
--------------------------------------------------
June 16, 2008: I got a new update for this. It has a new UI and much, much more including materials templates and apply as a sequence of images as well as a few other miscellaneous features and improvements. Take a look:

Script v1.2 Here

(If any Wiki maintainers see this, please update the link in the scripts catalog, thanks!)
............................................
Rocket Scientists and Squirrel Preserves...

Some Scripts I've Written

Last edited by forTe; 17-Jun-08 at 01:18.
#1   Old 29-Jun-07, 20:52   
Reply With Quote


yellow yellow is offline
Member
 
Join Date: Dec 2004
Posts: 1,084
forTe:

Thanks for the script. I've tried it on linux and it works as long as i remember that linux is case sensitive so it wouldn't load .JPG's when i had .jpg in the image type box. I assume that having to click on each image before the next image appears is by design, giving you the chance to position the previous plane before the next one appears preventing a stack occuring.

Thanks again.
#2   Old 30-Jun-07, 18:06   
Reply With Quote
forTe's Avatar
forTe forTe is offline
Member
 
Join Date: Dec 2003
Posts: 2,111
Good to know its working on linux.

I'm not quite sure what you meant by your last sentence about stacking. All planes are imported and positioned at the origin by default. If you select a directory it imports all of them (there should be a stack of planes at the origin after importing all of them). Could you describe the behavior further so I can know if its intended, a quirk with the blender redraw() function (I doubt this one, but maybe), or a bug in the script I might need to fix?
............................................
Rocket Scientists and Squirrel Preserves...

Some Scripts I've Written
#3   Old 30-Jun-07, 19:55   
Reply With Quote
rexprime's Avatar
rexprime rexprime is offline
Member
 
Join Date: Aug 2004
Location: floriduh
Posts: 780
forTe... you are a genius!

you script works great and is going to save me a lot of time

now i can set my folders up like libraries
............................................
Rexprime.com * Twitter
#4   Old 30-Jun-07, 21:47   
Reply With Quote
rexprime's Avatar
rexprime rexprime is offline
Member
 
Join Date: Aug 2004
Location: floriduh
Posts: 780
update, it works like a charm
............................................
Rexprime.com * Twitter
#5   Old 01-Jul-07, 17:39   
Reply With Quote
adamprocter adamprocter is offline
Member
 
Join Date: Sep 2006
Posts: 67
Works on Mac 10.4.10 sweeeet
#6   Old 22-Jul-07, 18:41   
Reply With Quote
testscreenings's Avatar
testscreenings testscreenings is offline
Member
 
Join Date: Sep 2006
Location: Germany
Posts: 100
Just found your grat scrypt.

Thank you sooo much.

I had spent hours the other day doing this by hand
and hated every single minute of it.

next time IŽll just press a button, whisper your name, and let the magic work.
#7   Old 22-Jul-07, 19:25   
Reply With Quote
ecgilboy's Avatar
ecgilboy ecgilboy is offline
Member
 
Join Date: Sep 2006
Location: Saipan, CNMI USA
Posts: 618
This is cool...another addition to my scripts collection...thanks for sharing
............................................
#8   Old 23-Jul-07, 12:06   
Reply With Quote
krupa krupa is offline
Member
 
Join Date: Aug 2004
Location: UK
Posts: 144
genius mate, ive needed this for ages, but now you've done it and i need it more than ever the next fortnight, genius , marvelous amazin, catn believe it, wicked!
#9   Old 26-Jul-07, 06:31   
Reply With Quote
krupa krupa is offline
Member
 
Join Date: Aug 2004
Location: UK
Posts: 144
one question - how do you do the transparancy in the 3d viewport, something else ive always wanted but never even realised blender could do...

cheers

christian
#10   Old 26-Jul-07, 08:29   
Reply With Quote
forTe's Avatar
forTe forTe is offline
Member
 
Join Date: Dec 2003
Posts: 2,111
Thanks for the comments everyone.

@krupa: When you go into UV select mode, in the edit buttons (F9) there is a panel called 'Texture Face' and a button called 'Alpha.' If you enable the alpha button it will apply the alpha channel of the image in the 3d viewport.
............................................
Rocket Scientists and Squirrel Preserves...

Some Scripts I've Written
#11   Old 26-Jul-07, 16:01   
Reply With Quote
krupa krupa is offline
Member
 
Join Date: Aug 2004
Location: UK
Posts: 144
ahh brilliant, that'll speed things up - been switching layers back and forth to do 2d stuff...

ta very much

Christian
#12   Old 26-Jul-07, 17:43   
Reply With Quote
craigomatic's Avatar
craigomatic craigomatic is offline
Member
 
Join Date: Apr 2006
Location: Victoria, TX
Posts: 1,398
Very useful, and it will be educational as well to read the script
Thank you for this gift!
Craigo
............................................
http://wiki.blender.org/index.php/Main_Page

"Nothing ventured, nothing gained."

"Better to try and fail, than to sit on your butt and play video games."
http://www.freewebs.com/craigomatic/index.htm
#13   Old 26-Jul-07, 17:49   
Reply With Quote
krupa krupa is offline
Member
 
Join Date: Aug 2004
Location: UK
Posts: 144
Quick note - I just tried importing a folder of images exported from Photoshop on a mac, and I think, because of the .dot files (info stuff i think) the import fails after the first one - Im getting by by importing one by one, but a shame... Is there a way to stop the script from looking at these files?
#14   Old 27-Jul-07, 12:21   
Reply With Quote
forTe's Avatar
forTe forTe is offline
Member
 
Join Date: Dec 2003
Posts: 2,111
I don't have a mac on me, but I'll look into it and try to simulate your results.

Could you tell me the specific error (in the blender console) you are getting. I created a .dot file on windows, filled it with garbage and had no problems importing a directory.
............................................
Rocket Scientists and Squirrel Preserves...

Some Scripts I've Written

Last edited by forTe; 27-Jul-07 at 15:34.
#15   Old 27-Jul-07, 15:21   
Reply With Quote
krupa krupa is offline
Member
 
Join Date: Aug 2004
Location: UK
Posts: 144
With mac im not sure how to get the console open, also it seems to (sometimes) import multiple copies of a single image (using single image import) - they end up on different objects with truncated names... ill try and research mac console thing though

thanks
#16   Old 27-Jul-07, 18:30   
Reply With Quote
forTe's Avatar
forTe forTe is offline
Member
 
Join Date: Dec 2003
Posts: 2,111
Hmmm... I forgot about that console thing.

Is blender highlighting any specific lines when it throws the error?

Also when you say its importing multiple copies with truncated names, do you mean that if you try to import an image like "myimage.png" its making multiple planes with the same image but names like "myim" or "myimag" or something like that instead of "myimage"(if the name on the file is too long, blender may be truncating it as well. I'm not sure what the internal length for name clipping is).
............................................
Rocket Scientists and Squirrel Preserves...

Some Scripts I've Written
#17   Old 27-Jul-07, 18:43   
Reply With Quote
papui papui is offline
Member
 
Join Date: Aug 2006
Posts: 8
great work. Thanks!
#18   Old 11-Dec-07, 16:19   
Reply With Quote
cipher_X's Avatar
cipher_X cipher_X is offline
Member
 
Join Date: Nov 2007
Location: So Cal..if you're a squirrel looking for nuts we have plenty
Posts: 52
OMG... I wish I had found this script two days ago when I was working on a model of a house and was UV mapping every wall with wallpaper textures - 40 walls and a few hours..LMAO! I could have cut my work by at least a 1/3. This is great. Keep up the good work.
One quick question. Would it be possible to expand beyond just planes with a script? Spheres and cylinders. Just a thought.
............................................
"No Way As Way...No Limitation As Limitation"

System Specs: Windows XP SP2, Gigabyte GA-8N-SLI Pro, Intel Pentium D 3.00 Ghz, 4 Gb Ram, Nvidia GeForce 7300 GT, Blender 2.45
#19   Old 03-Jan-08, 14:08   
Reply With Quote
forTe's Avatar
forTe forTe is offline
Member
 
Join Date: Dec 2003
Posts: 2,111
Thanks for all the positive comments.

@cipher_X: Yes its entirely possible to extend this with spheres and cylinders. That was outside the scope of the original purpose of the script though (since it was meant for 2D animation), so I've just never considered doing it.

Hopefully I'll get around to updating this script soon. I had some good ideas back a couple months ago when I originally posted it for ways to extend/improve it, but lost track of time.

On a similar note, the URL for this script will likely be changing soon due to some webhost things. Not sure what it will be yet, but it will be changing. When it does I'll post an update.
............................................
Rocket Scientists and Squirrel Preserves...

Some Scripts I've Written
#20   Old 03-Jan-08, 18:38   
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 14:11.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Logo and website design copyright © 2006 by froodee design bureau. All rights reserved.
Other Blender Sites
new icon Blender Homepage »
The official Blender homepage
new icon BlenderNation »
Fresh Blender News, Every Day
new icon Blenderart Magazine »
Blender articles, tutorials and images.
Blender Headlines
Featured Artwork
Short animation: Barrel by Phlopper
Woolly mammoth by sebastian_k
Photorealistic classic furniture by eMirage
Social BlenderArtists