본문 바로가기

Code/cinema4d & 3dsmax

파이썬이 아닌 maxscript 소스

무슨 소스인지는 .. 기억이 안나고 그냥 바탕화면에 있길래 백업용으로 올려둠

 

transform 
위치 : pos (position을 줄인 단어입니다.)

회전 : rotation

크기 : scale

move 상대이동


mypot1 = teapot() --create a teapot
fn whendeleted = --define a callback function
(
local deletedobjects = callbacks.notificationParam()
format "Callback: %\n" deletedobjects
-- This will printevery object that was deleted.
-- By this point, the object isstillattached to it's parents
-- and is still in groups etc...
-- Nothing has been done to the nodeyet.
)
when mypot1 deleted id:#foo obj do --define a when construct
(
format "When Construct:%\n" obj
)
--unregisterany preDeletecallbacks
callbacks.removeScripts #selectedNodesPreDelete
--register the function as general callback
callbacks.addscript #selectedNodesPreDelete "whendeleted()"


-------------------
a = "Global String"
(
    b = "Local String"
    format "a1 = %\n" a
    format "b1 = %\n" b
)
format "a2 = %\n" a
format "b2 = %\n" b
format "%" "Happy\n"

print ("hello")
print "jinwoo"
format "%" "yellow\n"

format "helloooo\n"


array1 = #(1, 2)

array1[3] = 3
array1[5] = 4


format "%\n" array1 

format "-------------------\n"

a = #(1, 13, 5, 10, 6, 2, 2)
b = a
format "b = %\n" b
 
append a 7
format "b = %\n" b




mybox = box()
showProperties  mybox
myBox.transform
format "-------------------\n"

myNum = 1
myStr = ""
 
fn format_fn inpData =
(
    addStr = inpData + "입니다."
)
 
case myNum of 
(
    1: myStr = "1"
    2: myStr = "2"
    3: myStr = "3"
    4: myStr = "4"    
)
 
format "%\n" (format_fn  myStr)

---
링크

http://docs.autodesk.com/3DSMAX/14/ENU/MAXScript%20Help%202012/index.html?url=files/GUID-C1F6495F-5831-4FC8-A00C-667C5F2EAE3-2063.htm,topicNumber=d28e694276,hash=WS3ED54CBA79FF2E3D-7A802F912B7835E9A3-4C7A

https://help.autodesk.com/view/3DSMAX/2018/ENU/?query=general%20event%20callback&userType=Developer