Script for costing via attributes on objects
Hi there,
I'm trying to research whether or not I'm able to get a cost estimation from 3D max.
I haven't had much luck so far, but a guy on the CGTalk forums suggested that inside Maya, you can add attributes to objects.
After a search, I found that you can do this is 3D max too. Great news!
Can the scripting gurus here please tell me if this can be done;
Assign a number to an object (let's say 10 objects, numbered 1 to 10)
Somehow assign a price or a value to that number/object that can be tallied up as a total figure.
Make a script that grabs the number ID from all of the objects in a scene and tallies the cost attached to the ID number.
For example;
Couch/sofa has an attribute of 1. 1=$1000
Dining chair has attribute of 2. 2=$60
Table has an attribute of 3. 3=$500
Run Maxscript, 1+2+3=$1560
Can this be done? Or something similar, less clunky perhaps?
Thanks in advance,
Regards,
Tim.
Comments
Heya, that should not be a
Heya,
that should not be a big problem. a very simple way to do it is this (not using indices, just the price itself):
Can of course be improved in many ways. Works on selected objects. It uses the "User defined Properties" that can be set and edited manually by yourself for any object by rightclicking and looking inside the Object properties for the right tab. I have no idea why you would need a tool like this, but there you go. Do you plan to buy stuff for you household and make a layout in 3d first or what haha :D
Cheers
Never get low & slow & out of ideas