Home » Support » 3D Applications » Blender Pricing Script
Search Search  
 () 5 Vote(s)
Show: Today's Messages    Show Polls    Message Navigator
Blender Pricing Script [message #3513] Wed, 25 March 2009 17:30 UTC Go to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
Inspired somewhat by the 3DS Max utility, I present the Blender calculator for Shapeways costs (attachment).

Requires Blender v2.48a or later

v0.7 (8/28/2009):
Added Dyed WSF and Polished Stainless materials
WSF will add $1.50 to calculated price regardless of size, so don't worry about the price per cm3 not multiplying into the total
Similarly, dyed WSF will add $4 to calculated price
Changed WSF pricing to $1.50/cm3
An issue may arise when going from 0.6 to 0.7 with saved settings because of extra buttons... if something looks "wonky" when it loads, change to your preferred settings and exit, then run the script again.
v0.6 (4/28/2009):
Fixed a scaling/translation bug
v0.5 (4/23/2009):
Better script cleanup
Changed GUI to single column, contracting sections
Added Blender registry entries for persistent settings
Added changeable material prices
Added manifold check
Added polygon count (current and triangulated)
Added selection dimensions
Fixed Blender unit scale errors: exponent was wrong, and reversed between millimetres and metres
Slightly better support for scaling and translation calculation
v0.4 (3/30/2009):
Some script cleanup
Using popup GUI form rather than script window. The new form should fit on screen more reliably
v0.3 (3/27/2009):
Fixed resizing calculation bug
v0.2:
Added GUI with changeable options, VAT and markup calculation, and resizing calculation
Added quad support in addition to tris
Scaling applied without manual application
v0.1:
Basic calculation sent to console window

Preview:
http://www.loonsbury.com/img/statues/svscreen.jpg

To install: extract the .py file to the base blender working directory (this may be your installation path, AppData, %HOME%, or something else on another O/S. Then start up Blender, it should be in the object->scripts menu.

It will generally go to 1 of 2 places in Windows
Example 1:
C:\Program Files\Blender Foundation\Blender\.blender\scripts\
Example 2:
Vista:
C:\Users\username\AppData\Roaming\Blender Foundation\Blender\.blender\scripts\
XP:
C:\Documents And Settings\username\Application Data\Blender Foundation\Blender\.blender\scripts\

To use: Select the objects you want to calculate, and run the script as shown here:

http://www.loonsbury.com/img/statues/svmenu.jpg

This will display the GUI which should be self-explanatory. Let me know if anything could be explained easier.

I'm working on a normal check and trying to figure out a wallthickness calculation, so I may update with that in a few weeks.

I'll appreciate feedback; especially if something doesn't work.

[Updated on: Fri, 28 August 2009 17:46 UTC]

Re: Blender Pricing Script [message #3524 is a reply to message #3513 ] Thu, 26 March 2009 07:56 UTC Go to previous messageGo to next message
avatar joris  is currently offline joris
Messages: 426
Registered: May 2008
Go to all my models
Senior Member
Loonsbury: in a word: this is so so so cool.

Thank you!

Joris
Re: Blender Pricing Script [message #3557 is a reply to message #3513 ] Fri, 27 March 2009 09:14 UTC Go to previous messageGo to next message
avatar bartv  is currently offline bartv
Messages: 1670
Registered: December 2007
Go to my shop
Senior Member
Cool! I added a link in a comment on my BlenderNation post:

http://www.blendernation.com/2009/03/25/shapeways-whats-new- interview-with-fabian-fricke/

Now, how about adding a simple GUI? Smile

Cheers,

Bart


Community Manager Europe | Shapeways
Re: Blender Pricing Script [message #3565 is a reply to message #3513 ] Fri, 27 March 2009 17:13 UTC Go to previous messageGo to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
:edit: Updated to v0.3

[Updated on: Sun, 29 March 2009 00:11 UTC]

Re: Blender Pricing Script [message #3590 is a reply to message #3565 ] Sat, 28 March 2009 11:33 UTC Go to previous messageGo to next message
avatar Emm@nuel  is currently offline Emm@nuel
Messages: 22
Registered: January 2009
Go to my shop
Junior Member
Wow that's great and it works fine.

However I have a problem:

I have extracted the .blender file to the base blender working directory and this inactive other scripts (thus limits my use of Blender because now I can not open .obj files).

Do I do something wrong ?

[Updated on: Sat, 28 March 2009 11:34 UTC]

Re: Blender Pricing Script [message #3592 is a reply to message #3590 ] Sat, 28 March 2009 13:46 UTC Go to previous messageGo to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
Yikes. If you replaced the .blender subdirectory with the one in the .zip file, yes. There is only one file in here, intended to go into .blender/scripts/

You may need to reinstall blender to get the default scripts back again - it should keep your settings though.
Re: Blender Pricing Script [message #3601 is a reply to message #3592 ] Sat, 28 March 2009 20:25 UTC Go to previous messageGo to next message
avatar Emm@nuel  is currently offline Emm@nuel
Messages: 22
Registered: January 2009
Go to my shop
Junior Member
Quote:

If you replaced the .blender subdirectory with the one in the .zip file, yes


No I didn't do this because I had no file .blender, other scripts are placed in a folder called python25.zip

I have extracted your .blender file to the base blender working directory and this inactive other scripts which are placed in the folder called python25.zip.

I tried to extract your .blender file to the folder called python25.zip but your script doesn't appear in the object->scripts menu.


[Updated on: Sat, 28 March 2009 20:27 UTC]

Re: Blender Pricing Script [message #3602 is a reply to message #3601 ] Sat, 28 March 2009 20:41 UTC Go to previous messageGo to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
Hmm... what O/S and Blender version are you running? I don't really get what your file structure looks like.
Re: Blender Pricing Script [message #3605 is a reply to message #3602 ] Sat, 28 March 2009 21:04 UTC Go to previous messageGo to next message
avatar Emm@nuel  is currently offline Emm@nuel
Messages: 22
Registered: January 2009
Go to my shop
Junior Member
Thanks Loonsbury.

My OS is Vista 32 bits and the Blender version is 248.1

See attached file for file structure.

index.php?t=getfile&id=423&private=0

Re: Blender Pricing Script [message #3608 is a reply to message #3605 ] Sat, 28 March 2009 21:07 UTC Go to previous messageGo to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
Oh, now that I look at my own directory it makes sense. Python25.zip doesn't have any scripts that Blender uses as far as I know. Your scripts are probably located in your appdata folder.

C:\Users\username\AppData\Roaming\Blender Foundation\Blender
icon14.gif  Re: Blender Pricing Script [message #3611 is a reply to message #3608 ] Sat, 28 March 2009 23:46 UTC Go to previous messageGo to next message
avatar Emm@nuel  is currently offline Emm@nuel
Messages: 22
Registered: January 2009
Go to my shop
Junior Member
Wow, you were absolutly right and now everything works fine Very Happy
Thank you so much for your help and for this very very cool and useful script.
Re: Blender Pricing Script [message #3612 is a reply to message #3611 ] Sun, 29 March 2009 00:12 UTC Go to previous messageGo to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
Updated to v0.3, notes in OP

[Updated on: Sun, 29 March 2009 00:13 UTC]

Re: Blender Pricing Script [message #3639 is a reply to message #3612 ] Mon, 30 March 2009 12:09 UTC Go to previous messageGo to next message
avatar bartv  is currently offline bartv
Messages: 1670
Registered: December 2007
Go to my shop
Senior Member
Hey Loonsbury,

I think this script is very useful also for Blender users who don't use Shapeways. Once you're happy with it, please contact me on bart(at)blendernation(dot)com and I'll do a proper post about it.

Thanks!

Bart


Community Manager Europe | Shapeways
Re: Blender Pricing Script [message #3662 is a reply to message #3639 ] Mon, 30 March 2009 18:36 UTC Go to previous messageGo to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
Updated to v0.4, notes in OP
Re: Blender Pricing Script [message #3874 is a reply to message #3513 ] Fri, 10 April 2009 02:26 UTC Go to previous messageGo to next message
avatar johngomm  is currently offline johngomm
Messages: 13
Registered: February 2009
Go to my shop
Junior Member
Hi there,

I'm a little confused about the m, cm and mm buttons. They seem to operate the opposite way to how I expected. For example, if my model has the dimensions 50 x 50 x 50 in the properties, I expect the mm button to calculate price for a 50mm x 50mm x 50mm print and the cm button to be a 50 cm^3 print, but the price goes down, not up. I think it would be helpful to be able to see the xyz dimensions of the model in the applet window as a sanity check. Am I looking at this the wrong way?

Also, while I'm at it, it would be helpful to support user input of material cost so when Shapeways drops the price or includes a new material, we can input the current value.

FYI, it didn't run properly on my old version of Blender (early 2008) so I had to upgrade. And it took me a while to find the script in the scripts->objects sub menu, so mentioning that in the posts might save someone else some hunting.

Thanks for all your work on this.

John Gomm
Re: Blender Pricing Script [message #3875 is a reply to message #3513 ] Fri, 10 April 2009 02:45 UTC Go to previous messageGo to next message
avatar fracai  is currently offline fracai
Messages: 21
Registered: October 2008
Go to my shop
Junior Member
Thanks for the reminder, I'd forgotten to come and ask about this. I'm seeing the same behavior in the size options. It does seem like the options operate opposite of what they should. Though perhaps I'm thinking about it the wrong way?
Re: Blender Pricing Script [message #3876 is a reply to message #3874 ] Fri, 10 April 2009 03:01 UTC Go to previous messageGo to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
johngomm wrote on Fri, 10 April 2009 02:26

For example, if my model has the dimensions 50 x 50 x 50 in the properties, I expect the mm button to calculate price for a 50mm x 50mm x 50mm print and the cm button to be a 50 cm^3 print, but the price goes down, not up.

Not sure if I'm understanding right, when you go from mm to cm, the price goes down? I just tested it on my installation and it worked right, maybe I'm overlooking something.

johngomm wrote on Fri, 10 April 2009 02:26

I think it would be helpful to be able to see the xyz dimensions of the model in the applet window as a sanity check.
Also, while I'm at it, it would be helpful to support user input of material cost so when Shapeways drops the price or includes a new material, we can input the current value.

Good ideas, these will be in the next revision

johngomm wrote on Fri, 10 April 2009 02:26

FYI, it didn't run properly on my old version of Blender (early 2008) so I had to upgrade. And it took me a while to find the script in the scripts->objects sub menu, so mentioning that in the posts might save someone else some hunting.

What version of blender had the problem? I'll also try to be more clear about the location of the script.
Re: Blender Pricing Script [message #3877 is a reply to message #3876 ] Fri, 10 April 2009 03:17 UTC Go to previous messageGo to next message
avatar johngomm  is currently offline johngomm
Messages: 13
Registered: February 2009
Go to my shop
Junior Member
Sorry, don't remember the version of blender I was running before. A quick look at a saved file in wordpad makes me think it was 2.4.7 and I'm not sure I didn't overwrite some critical directory structure when I unzipped your file. I'm running 2.4.8 now on WinXP

For example, my model's volume reads 804 cm3 in "cm" mode, 804245 cm3 in "mm" mode and 0.0 cm3 in "m" mode. The pricing is similarly $0 in "m" mode! Now that's a price I wouldn't be able to resist for a meter big model!

Thanks for the quick reply

John Gomm
Re: Blender Pricing Script [message #4021 is a reply to message #3877 ] Thu, 23 April 2009 16:40 UTC Go to previous messageGo to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
Updated to v0.5, notes in OP
Re: Blender Pricing Script [message #4023 is a reply to message #3513 ] Thu, 23 April 2009 18:14 UTC Go to previous messageGo to next message
avatar mardson  is currently offline mardson
Messages: 1
Registered: August 2008
Go to all my models
Junior Member
the zip file is corrupt
Re: Blender Pricing Script [message #4024 is a reply to message #4023 ] Thu, 23 April 2009 18:18 UTC Go to previous messageGo to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
mardson wrote on Thu, 23 April 2009 18:14

the zip file is corrupt


Sorry, don't know what went wrong, but I recreated it and uploaded again, hope this one works.
Re: Blender Pricing Script [message #4025 is a reply to message #4024 ] Thu, 23 April 2009 19:04 UTC Go to previous messageGo to next message
avatar johngomm  is currently offline johngomm
Messages: 13
Registered: February 2009
Go to my shop
Junior Member
still seems like a bad zip. I can't copy the file to my directory (or any directory)

Can you just post a vanilla file without zipping?

Cheers

John Gomm
Re: Blender Pricing Script [message #4026 is a reply to message #4025 ] Thu, 23 April 2009 19:07 UTC Go to previous messageGo to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
I wonder if there's something wrong with the file - I know winzip has been giving me trouble lately. I changed it to just the .py. I'm not sure why I didn't just attach that file to begin with.
Re: Blender Pricing Script [message #4027 is a reply to message #4026 ] Thu, 23 April 2009 19:46 UTC Go to previous messageGo to next message
avatar johngomm  is currently offline johngomm
Messages: 13
Registered: February 2009
Go to my shop
Junior Member
Thanks. The pricing results work as expected on my system now. Yay!
My display is a bit small to best use the new window layout, so I need to minimize the information section etc to see the last panel, but I realize that this is an altruistic project and you are not going to endlessly rewrite it to respond to cosmetic comments.

Thanks again

John
Re: Blender Pricing Script [message #4028 is a reply to message #4027 ] Thu, 23 April 2009 19:50 UTC Go to previous messageGo to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
johngomm wrote on Thu, 23 April 2009 19:46

Thanks. The pricing results work as expected on my system now. Yay!
My display is a bit small to best use the new window layout, so I need to minimize the information section etc to see the last panel, but I realize that this is an altruistic project and you are not going to endlessly rewrite it to respond to cosmetic comments.


It's a little easier to reformat in its current form - but the information section is minimized by default after the first time you run it. I've been debating how best to make it smaller overall, maybe just cram the lines closer together.
Re: Blender Pricing Script [message #4125 is a reply to message #4028 ] Tue, 28 April 2009 14:01 UTC Go to previous messageGo to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
Updated to v0.6, notes in OP
Re: Blender Pricing Script [message #4134 is a reply to message #3513 ] Tue, 28 April 2009 20:13 UTC Go to previous messageGo to next message
avatar oblenob  is currently offline oblenob
Messages: 1
Registered: June 2008
Go to all my models
Junior Member
would a builtin currency converter be a lot to ask for?

to and would be usefull
Re: Blender Pricing Script [message #4135 is a reply to message #4134 ] Tue, 28 April 2009 20:19 UTC Go to previous messageGo to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
oblenob wrote on Tue, 28 April 2009 20:13

would a builtin currency converter be a lot to ask for?

to and would be usefull


I'd like to, but with shifting values you'd practically have to put in the conversion rate every time anyway, may as well use a calculator imho.

I may just be dense in this regard, not generally needing to convert currency for myself; is my logic off?
Re: Blender Pricing Script [message #4144 is a reply to message #4135 ] Tue, 28 April 2009 23:05 UTC Go to previous messageGo to next message
avatar johngomm  is currently offline johngomm
Messages: 13
Registered: February 2009
Go to my shop
Junior Member
Seems to me that the currency fluctuations would indeed make this impractical. I suggest setting a target price, use the web to convert that from roubles or whatever and then use the plugin to find an affordable scale. However, if shapeways has a fixed cost of x euros per cm3 then that could be put into the (forthcoming?) custom price box maybe.

Just my two cents on an already very useful app
Re: Blender Pricing Script [message #5048 is a reply to message #3513 ] Sat, 27 June 2009 17:47 UTC Go to previous messageGo to next message
avatar Heiner2  is currently offline Heiner2
Messages: 33
Registered: May 2009
Go to my shop
Member
Boy oh boy,
i am German and i have a german installation of Windows Vista. Does anybody in which directory do i have to put the script?
I tried to locate the C:\Users\username\AppData\Roaming\Blender Foundation\Blender
in the german windows version i manage to get to
C:\Users\username\ ...
then i dont know where to ...
any other german users which know where to put that *.py file?
Thanks
Heiner
Re: Blender Pricing Script [message #5052 is a reply to message #3513 ] Sat, 27 June 2009 20:07 UTC Go to previous messageGo to next message
avatar iguffick  is currently offline iguffick
Messages: 74
Registered: April 2009
Go to all my models
Member
Heiner,

I suspect your problem is that when you get to the C:\Users\username directory, you cannot see the AppData directory?

If that is the problem you are having, it is because the AppData directory is a hidden system directory that is not normally shown by File Explorer.
There are two solutions, you could change the view properties to display hidden and system files.
Or you could simply type C:\Users\username\AppData into the address bar of File Manager.
You would then be able to see the remaining directory choices of 'Roaming' -> 'Blender Foundation' -> 'Blender'.

I hope that helps.

Regards,
Ian.

[Updated on: Sat, 27 June 2009 20:08 UTC]

Re: Blender Pricing Script [message #5057 is a reply to message #3513 ] Sun, 28 June 2009 16:40 UTC Go to previous messageGo to next message
avatar Heiner2  is currently offline Heiner2
Messages: 33
Registered: May 2009
Go to my shop
Member
Thanks for the trick, that solved the problem, and the script is in place now, and it works. How well i will see as soon as i have enough time for a more in depth test.
Again
Thanks
Heiner
Re: Blender Pricing Script [message #5629 is a reply to message #5057 ] Sun, 02 August 2009 10:20 UTC Go to previous messageGo to next message
avatar Yeahvle  is currently offline Yeahvle
Messages: 3
Registered: July 2009
Go to my shop
Junior Member
Great!
When I finally figured out where to put it on my Apple OS10.5,
it worked instantly,
without restarts or nothing...
thanks so much for the manifold check!!!

Re: Blender Pricing Script [message #6117 is a reply to message #3513 ] Fri, 28 August 2009 17:34 UTC Go to previous messageGo to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
Updated to v0.7, notes in OP
icon14.gif  Re: Blender Pricing Script [message #7165 is a reply to message #6117 ] Thu, 08 October 2009 09:04 UTC Go to previous messageGo to next message
avatar Tommy_2Tall  is currently offline Tommy_2Tall
Messages: 113
Registered: August 2009
Go to my shop
Senior Member
Hi!

I've been using your script for some time now and it is G.R.E.A.T.! Very Happy

I just thought of something while reading this thread..
Would it be a lot of work to include density/weight as a separate section?
If you enter an estimate density for each material you could calculate the weight for each object.


Oh.. and since the latest update (1.5$ startup on WSF) I've had a minor issue;
when I start the script for the first time (during a Blender session) the black detail AND WSF buttons are both selected.
Any files I can clean/modify to fix that issue?
Re: Blender Pricing Script [message #7637 is a reply to message #7165 ] Fri, 06 November 2009 13:55 UTC Go to previous messageGo to next message
avatar loonsbury  is currently offline loonsbury
Messages: 67
Registered: January 2009
Go to all my models
Member
Tommy_2Tall wrote on Thu, 08 October 2009 09:04

Would it be a lot of work to include density/weight as a separate section?
If you enter an estimate density for each material you could calculate the weight for each object.

I considered this, just wasn't worth the effort at the time. I'll probably put it in the next vers.

Tommy_2Tall wrote on Thu, 08 October 2009 09:04

the black detail AND WSF buttons are both selected.
Any files I can clean/modify to fix that issue?

No, I got sloppy when writing the updated arrays/registry entries. I'll fix it someday soon.
Re: Blender Pricing Script [message #8708 is a reply to message #7637 ] Sun, 03 January 2010 21:06 UTC Go to previous messageGo to next message
avatar EricFinley  is currently offline EricFinley
Messages: 32
Registered: August 2009
Go to my shop
Member
For reference:

I've contacted Loonsbury and (with his blessing) have been working on integrating my Wall Thickness script into the framework of his excellent Volume/Cost/Manifold script. I'm calling the merged script "Shapeways Tools" for now, and am still working out the bugs in the Wall Thickness portion of the script, but I have in the meanwhile fixed the registry issues and cleaned things up a bit from where Loonsbury left it - as he says, there are clear signs of someone who was done with this for now, and didn't quite finish polishing it before he went home. Wink

I hope to be able to post the updated script within a matter of a couple of weeks, and turn the community loose on it at that point.

If anyone wants to either experiment and/or go looking at MSDSes and so forth for the material densities, then I could easily add in a Mass output together with the volume display, while I'm in there working with it. Just PM me the numbers, and please let me know whether you got those from literature or experimentally. It's not something that I'd care about much for my own work, but I can see how it would be a valuable addition to the program for some.
Re: Blender Pricing Script [message #8791 is a reply to message #8708 ] Fri, 08 January 2010 03:58 UTC Go to previous messageGo to next message
avatar EricFinley  is currently offline EricFinley
Messages: 32
Registered: August 2009
Go to my shop
Member
Note - the script I describe in the post above this one is finished, and has been posted to the 3D Design forum here. You can go straight to that thread with this link. Enjoy!
Re: Blender Pricing Script [message #60006 is a reply to message #3513 ] Fri, 11 January 2013 03:39 UTC Go to previous messageGo to next message
avatar bschlagel  is currently offline bschlagel
Messages: 2
Registered: December 2012
Go to all my models
Junior Member
Hi - just curious if this is still in development at all. I can't get the script to work on either installation of Blender I have running on OSX (2.63 and 2.60)—and when I run the script I get the following error message:

File "/shapeways_volume.py", line 127
print "Error loading registry data; likely due to new version, updating registry entry."
SyntaxError: invalid syntax
location:<unknown location>:-1
Python script fail, look in the console for now...

This is when I open the script in the text editor and run it just on the default blender cube. Would really appreciate any ideas for how to get this to work! Perhaps I need to run it on a different version of Blender, or tweak some setting? Thanks in advance for your help, and for building this!
Re: Blender Pricing Script [message #71943 is a reply to message #60006 ] Mon, 22 July 2013 06:48 UTC Go to previous messageGo to previous message
avatar mavern2013  is currently offline mavern2013
Messages: 1
Registered: May 2013
Go to all my models
Junior Member
Looks like this script (now a few years old) no longer works with the newer (2.5+) Blender software.
(need confirmation).

Pages (2): [1  2    »] 
   
Previous Topic:Using netfabb for fixing walls
Next Topic:wrl file format workflow