How do mergeMaxFile help please

on yuzspline pressed do 
 ( 
mergeMaxFile "$scenes\yuzkontrolspline.max" 
  )

running this code
but calling from within the C:\Users\Yunus11\Documents\3dsMax\scenes\yuzkontrolspline.max

I wish calling from within the E:\kurulum\Autodesk\3ds max 2011 64\scenes\yuzkontrolspline.max

 
    on yuzspline pressed do 
 ( 
    mergeMaxFile (getDir #scenes + "/yuzkontrolspline.max") 
  )

this code did not work

how do?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
yunusbbayram's picture

problem (getDir #scene +

problem

(getDir #scene + “/yuzkontrolspline.max") [color=red]<-----not equal----->[/color] E:\kurulum\Autodesk\3ds max 2011 64\scenes\yuzkontrolspline.max

(getDir #scene + “/yuzkontrolspline.max")[color=red]<-----equal----->[/color] C:\Users\Yunus11\Documents\3dsMax\scenes\yuzkontrolspline.max

so it does not work

correct script

rollout unnamedRollout "Untitled" width:160 height:64
(
 button yuzspline "yuzspline" pos:[8,15] width:144 height:29
 
 
 on yuzspline pressed do 
     (
            mergeMaxFile (getdir #maxRoot +"\\scene\\yuzkontrolspline.max") 
 )
)
createDialog unnamedRollout 160 64
Anubis's picture

getDir look into your current project folder

'$scene' or '(getDir #scene)' or '(pathConfig.GetDir #scene)' - all refer/search into '%Current_Project_Folder%/scenes'.

so you may swith the project folder with 'pathConfig.setCurrentProjectFolder %PRJ_ROOT_FOLDER%' or more simply - just supply full path like:

mergeMaxFile "E:\kurulum\Autodesk\3ds max 2011 64\scenes\yuzkontrolspline.max"

my recent MAXScripts RSS (archive here)

yunusbbayram's picture

This script

This script works

E:\kurulum\Autodesk\3ds max 2011 64\Scenes\yuzkontrolspline.max
 
rollout unnamedRollout "Untitled" width:160 height:64
(
 button yuzspline "yuzspline" pos:[8,15] width:144 height:29
 
 
 on yuzspline pressed do 
     (
            mergeMaxFile "E:\kurulum\Autodesk\3ds max 2011 64\Scenes\yuzkontrolspline.max"
 )
)
createDialog unnamedRollout 160 64

But this script did not work

rollout unnamedRollout "Untitled" width:160 height:64
(
 button yuzspline "yuzspline" pos:[8,15] width:144 height:29
 
 
 on yuzspline pressed do 
     (
            mergeMaxFile (getdir #Scene+"\yuzkontrolspline.max")
 )
)
createDialog unnamedRollout 160 64

What should I do?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.