You'll have to forgive what Im sure is a very simple question, but this is the first time I've really delved into scripting properly. Anyway - how exactly do you make a structure a child of another structure and have it inherit the properties and methods of the parent in Maxscript?
The only example I have been able to find is from an old topic on CGTalk from about 4 years ago. It gives this code as a simple example to demonstrate:
struct baseClass
(
fn function1=
(
print "function1"
)
)
struct mediumClass
(
base=baseClass(), --this an instance of the base object
function1=base.function1, --this is the actual inheritance, so we take over this function from baseclass.
fn function2=fn
(
print "function"
)
)
...and you would then use the listener to create an instance of mediumClass and test to see if it had inherited the functions.
However, evaluating this throws up errors. Can anyone provide a very simple example to demonstrate how to achieve inheritence?
Cheers.
Marco Brunetta · 2009-11-12