|
|||||
|
|
#1 |
|
conscientious objector
Join Date: Sep 2007
Location: cambridge, uk
Posts: 4,234
Thanks: 3
Thanked 126 Times in 120 Posts
|
quick maxscript question
before I start down this road do the maxscript gurus present think I'll be able to automate the following process without too much mucking about?
1: import a lot of .obj files containing a number of objects from a single directory 2: rename the objects contained in the .obj files to match (well, contain) the .obj filename 3: copy a given modifer from an already existing object to the imported objects it sounds simple enough but I'm not familiar enough with the ins&outs of maxscript to want to start hacking without some encouragement that its doable ![]() cheers |
|
|
|
|
|
#2 |
|
Supplies Coordinator
Join Date: Oct 2004
Location: United States
Posts: 3,343
Thanks: 0
Thanked 11 Times in 8 Posts
|
Hey Poopipe!
The first and second should be a breeze, while the third might take a little more massaging. Here's some pseudo code for how I might do it... Code:
thisModifier = ParentObject.Modifiers[n] for file in folder do ( max import file quiet:true max select all $.name = file.name addmodifier $ thisModifier max freeze selection ) max unfreeze all
__________________
Be sure to check out my blog because there's tons of useful resources there: Last edited by Mr. Bluesummers-3DT; 27-09-2008 at 05:49 PM.. |
|
|
|
|
|
#3 |
|
Supplies Coordinator
Join Date: Oct 2004
Location: United States
Posts: 3,343
Thanks: 0
Thanked 11 Times in 8 Posts
|
P.S.
I checked, and taking a reference to a modifier and adding it to another object will take an instance, just like you want. =D
__________________
Be sure to check out my blog because there's tons of useful resources there: |
|
|
|
|
|
#4 |
|
conscientious objector
Join Date: Sep 2007
Location: cambridge, uk
Posts: 4,234
Thanks: 3
Thanked 126 Times in 120 Posts
|
ooh, nice one
the selection and renaming will be a little more involved cos there's several objects in each obj file but that gives me much hope. you sir, are an angel |
|
|
|
|
|
#5 |
|
Registered User
|
I learnt a lot from this book: 3ds Max MAXScript Essentials, Second Edition (Autodesk 3ds Max 9 Maxscript Essentials): http://www.amazon.com/MAXScript-Esse...2891862&sr=1-1
I feel that Poopipe should buy it. |
|
|
|
|
|
#6 |
|
conscientious objector
Join Date: Sep 2007
Location: cambridge, uk
Posts: 4,234
Thanks: 3
Thanked 126 Times in 120 Posts
|
good idea but I feel that my company should pay for it
![]() |
|
|
|
|
|
#7 |
|
conscientious objector
Join Date: Sep 2007
Location: cambridge, uk
Posts: 4,234
Thanks: 3
Thanked 126 Times in 120 Posts
|
cracked it (mostly)
I've ended up doing it in 2 scripts - if anybody needs to do something similar just let me know here or by pm and I'll hand the code over |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|