Author Topic: Create own Default folder structure  (Read 685 times)

2023-10-19, 15:29:34

Hubl

  • Active Users
  • **
  • Posts: 38
    • View Profile
Hello,

I want to create my own Default folder structure when Setting up my current project folder.

There are far to many folder and subfolders and here at the company where i am working they have their own structure that I have to use and I don't want to do this manually every time I am working on a new project.
can someone help me with some standard max folder organsation stuff?
i want to use my own created folder structure in Max and not the Default one by Autodesk that will be created every time i setup a new project.
it seems people have the same issue since 2014 ... is there no other way?

http://www.scriptspot.com/forums/3ds-max/general-scripting/making-simple-project-scene-directory?fbclid=IwAR2m9bdX7YgkB3geYozp7EikjS_7vHgZ9nxO4pCQVrxiwM0Pj3b-96OrTQQ

The Script isnt there anymore ... maybe someon know how to fix the problem without it?  :-)

thanks in advance.
 

Thanks in advance

2023-10-20, 15:54:18
Reply #1

nauticus25

  • Active Users
  • **
  • Posts: 63
    • View Profile
I feel the same pain, but I have a workaround which is sufficient for my needs. I get one project set up the way I want it, either through Customize/Configure Project Paths... or by editing the .mxp of the current project with a text editor. As long as your folder paths are written as relative (Images=.\sceneassets\images) instead of absolute (Images=C:\AwesomeProject\sceneassets\images), then this will work cleanly from one project to the next. Then, instead of choosing "Create Default" when setting up a new project, I use "Create from Current" which is the next button to the right in the toolbar. There's probably a way of editing the default project folder structure, but I think it's hidden away in an .ini file somewhere and the way I do it now works for me so I've never bothered to figure it out.

Edit to add: For a folder you don't want in your structure, don't delete the line from the .mxp or the Customize/Configure Project Paths... configurator. Instead, just make that path ".\" and the folder won't get created. For instance, in my configuration I have "Sounds=.\" and it doesn't create a sounds folder, but Max is still satisfied that the Sounds folder is accounted for because I think it's hard coded into an .ini file somewhere.



« Last Edit: 2023-10-20, 16:01:34 by nauticus25 »
i9-12900K @ 3.2GHz, 64GB RAM, 3090ti
Max 2024, Corona 10

2023-10-21, 12:46:52
Reply #2

clemens_at

  • Active Users
  • **
  • Posts: 140
    • View Profile
I think the script you are looking for is in the comments of your link:

Code: [Select]
fn createCustomProjectFolder dir: subdirs: =
(
if (makeDir dir) do
(
local sioFile = dotnetclass "System.IO.File"
local dirstrings = #("[Directories]",("ProjectFolder="+dir))
local mxp = pathConfig.appendPath dir ((pathConfig.stripPathToLeaf dir)+".mxp")
for n in subdirs do
(
makeDir (pathConfig.appendPath dir n)
case n of
(
"maps": append dirstrings @"Images=.\maps"
"ies": append dirstrings @"Photometric=.\ies"
"proxy": join dirstrings #(@"Export=.\proxy",@"Import=.\proxy")
"scenes": append dirstrings @"Scenes=.\scenes"
"render": append dirstrings @"RenderOutput=.\render"
)
if finditem subdirs "xrefs" != 0 do join dirstrings #(@"[XReferenceDirs]", @"Dir1=.\xrefs")
if finditem subdirs "maps" != 0 do join dirstrings #(@"[BitmapDirs]",@"Dir1=.\maps")
sioFile.WriteAllLines mxp dirstrings ; pathConfig.setCurrentProjectFolder dir
)
)
)
createCustomProjectFolder dir:@"C:\temp\dussiaProject" subdirs:#("maps", "ies", "proxy", "scenes", "xrefs", "render")

works just fine.

2023-10-23, 10:16:20
Reply #3

Hubl

  • Active Users
  • **
  • Posts: 38
    • View Profile
thank you both! i have to try it next time i setup a new project ... i also asked on the Autodeskforums but it seems no one is intrested in solving this issue :-(

https://forums.autodesk.com/t5/3ds-max-forum/create-own-default-folder-structure/td-p/12315234