Notifications
Clear all
[Closed] The structure of maxscript is painful
May 02, 2021 3:38 pm
struct testDef
(
info = "no info",
fn addInfo txt =
(
append this.info txt
)
)
fn getInfo =
(
t = testDef()
t.addInfo "add some info contnet."
t2 = testDef()
t2.info
)
getInfo()
getInfo()
getInfo()
The right result
#Struct:testDef(
addInfo:<fn>; Public,
info:<data>; Public)
getInfo()
"no info"
"no info"
"no info"
max 2022:
#Struct:testDef(
addInfo:<fn>; Public,
info:<data>; Public)
getInfo()
"add some info contnet."
"add some info contnet.add some info contnet."
"add some info contnet.add some info contnet.add some info contnet."
3 Replies
May 02, 2021 3:38 pm
Max 2022 is not working correctly … this is a bug and needs to be fixed. My guess is that in MAX 2022 #this now means not an instance of a structure, but its definition. It is wrong and cannot be accepted in this way.
1 Reply