[Closed] Advice Needed for Asset Management Script
I am embarking on my first maxscripting project (besides a few smaller ones that I have done) and wanted to post here for some process oriented suggestions for how I can make this script happen, first by thinking it through, then implementing it. Let me preface this by saying that I am an artist not a programmer, but relatively inquisitive enough to figure things out as I go along.
What I would like to do, is to create an asset management script this script would be a flyout dialogue box with small thumbnail images that would be linked to a mesh file or vrayproxy file (i.e. a tree or a car). I want to be able to click on the thumbnail and click into the scene to merge/insert the object into the scene.
This would be Phase I of the script.
Phase II would include categorizing assets into relative subsets, i.e., Trees-Tropical, Trees-Deciduous, etc. and then adding a radio button to select either the RawGeometry file, or the VrayProxy.
My idea came while watching a tutorial for another script called RenderMask. Ive contacted the author of the script to how he had done his, but unfortunately, he isnt willing to share the information for the particular asset management script at this time.
For a better understanding of what I would like to do, watch the following video Time code 1:54-2:04 specifically. This is the script I would like to duplicate.
click on the link http://www.tepavicharov.com/scripts/render_mask_preview.avi
Because it is my first script, Id really appreciate the following:
- Any prior knowledge of a similar script (so I can dissect it!)
- Any advice on how to plan out the sequence I would need to make this script work
- Any advice on specific commands/actions needed to complete the script.
Thanks in advance for your help as I delve into the world of scripting.
Also Please note that I am a lone artist with my own little assets. At this time I am not developing this to be some big behemoth of a script that would be on a server, dynamically updated, etc. Its just a little pet project to learn more scripting and to manage the 50 things that I use all the time.
Thanks!
There is probably a million things you will want to study up (these are MaxScript Help topics):
[ul]
[li]File Name Parsning[/li][li]BMP Interfaces[/li][li]3ds Max File Loading and Saving[/li][list]
[li]MergeMaxFile[/li][li]getMaxFileObjectNames[/li][/ul]
[/list]You will also probably want to look at setting up sort of “preview” rendering mechanism, something that can scan a bunch of files and produce your thumbnails for you automatically, or a means by which you can add new files (ie, select a file, generate preview and then have those files added to your repository…)
Depending on your version of max, a good understanding of the UI will also be required. If possible, I’d suggest DotNet…
Personally, I’d also have a long hard look at XML, it would make a much better format for meta data and would be quicker to parse then scanning through a bunch of folders…but thats just me.
Shane
I am looking for exactly the same thing! this script seems to be everything our asset collection needs. so if anybody could produce anything like this please keep us all in the loop!
I’d also be considering if maxscript is the best solution. Personally I’d be leaning towards a 3rd party element (java or python using a COM bridge) as they are more robust have a deeper API for handling this type of jobs.
At the very least, a plugin…
Hi, RustyKnight.
thank you for your advice.
I love vrayproxy, need vrayproxy library manager plugin… so , if you have time, could you try it …thank you…
I think you misunderstand what I am saying…
I’d use java or python to manage the file handling process and maybe the UI.
You can only pass primitive types over a com bridge…string would be my personal preference…
Shane
Also don’t count out a full fledged relational database as the back end.
I’m converting our big toolset right now to use MySQL. The entire scene can be reconstructed from the database and it’ll let you use all the existing relational data tools instead of coding them yourself.
If you’re going to go through all the trouble of creating an asset management system it might as well run outside of Max. I would try to do as much in a portable language as possible.
That all being said… what’s in that frame is quite simple. I would define a struct “Categorystruct (CategoryID, Name)”
Create an array of categories.
Createastruct called ItemStruct (ItemID, CategoryID, Name, Filepath, ThumbnailPath)
Create an array of items.
Populate the category drop down from the category strut.
dropdown.items = for o in categories collect o.name
CategoryItemArray = for o in itemstruct where o.categoryid == dropdown.selection collect o
rolloutstring = “” as stringstream
format “rolloutdef = ALL THE ROLLOUT DEFINITION STUFF” to: rolloutstring
then something like
for o in CategoryItemArray do
(
format “%Button% blah blah blah bitmap:openbitmap % etc etc” o.name o.itemid o.thumbnailpath to:rolloutstring
)
then something like
for o in CategoryItemArray do
(
format “on %button% pressed do mergemaxfile %” o.name o.itemid o.filepath to:rolloutstring
)
format “END ROLLOUTSTUFF” to:rolloutstring
removesubrollout (existing subrollout)
execute rolloutstring
addsubrollout rollout rolloutdeffromstring
i suggest u hire a TD like Gavin Greenwalt , it will be a great help for ur work pipline . a good TD can be freelance guy .
Commercial eh? How much you willing to pay. I’ll make a commercial script.
Hi thatoneguy.
You want to make a commercial script?? did you know the vrayscatter made by icube. this will be sale 100 euro. If you can make out this , how much do you think It’s fine to sale.