Jump to content

cannot create button for a script


carlonarducci
 Share

Recommended Posts

this error when I set rock generator on stdscript folder and I create a text file with this script

 

 

macroScript RockGenerator category:"aa_stoneworks" buttonText:"RockGenerator" toolTip:"Rock Generator" silenterrors:true

(

on execute do(

filein ((getDir #UI) + "\\MacroScripts\\aa_rockgenerator1x0.mse")

)

 

)

Screenshot 2014-04-19 21.12.02.jpg

Link to comment
Share on other sites

Get aa_rockgenerator1x0.mse and place it in maxRoot/scripts folder. Usualy:

C:\Program Files\Autodesk\3ds Max 2014\scripts\aa_rockgenerator1x0.mse

Then use the code below to create a macroscript.

 

macroScript RockGenerator 
category:"aa_stoneworks" 
buttonText:"RockGenerator" 
toolTip:"Rock Generator" 
(
   rockGenScript = (getDir #scripts) + "\\aa_rockgenerator1x0.mse"
   if doesFileExist rockGenScript do fileIn rockGenScript
)

Edited by miauu_u
Link to comment
Share on other sites

It works, believe me.

Put the mse in the maxroot/scripts folder. RUn 3dsMax, open the maxscript listener, paste this:

(getDir #scripts) + "\\aa_rockgenerator1x0.mse"

Press the NumPad Enter and in the next line you have to see the full path to the file, which in my case is:

 

"C:\Program Files\Autodesk\3ds Max 2014\scripts\aa_rockgenerator1x0.mse"

 

If this is not printed, I mean the full path, then the aa_rockgenerator1x0.mse is not in the proper folder and this is the reason that it is not started when you use the macro script.

Link to comment
Share on other sites

  • 9 months later...

1° Maxscript - Run Script. Then browse your "aa_rockgenerator1x0.mse" wherever you saved it - Window with the aaRockGen - 1.0 will appear

2° Do NOT close the script window

3° Customize - Customize User interface - Group: Main UI - Category: aa_stoneworks - Action: Rock Generator

4° Click on "New" and name your toolbar. Then drag Rock Generator from the Action list to the new window you just created.

 

Just be aware, if you close the script window, aa_stoneworks won't appear on the category list.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...