ScriptSpot

Forum topic · General Scripting

How do mergeMaxFile help please

By yunusbbayram · 2011-03-27

Description
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 (3)

yunusbbayram · 2011-03-30

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

getDir look into your current project folder

Anubis · 2011-03-27

'$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"

yunusbbayram · 2011-03-27

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?