maxscript question [Solved]

polycounter lvl 4
Offline / Send Message
LandeTLS polycounter lvl 4
Hi, im pretty new to maxscript.
my main scripting experience from before has been in c# so there are many things that are a bit puzzling to me. right now im scratching my head because of this one:

take this code for example:
splineObj = selection[1]
print (numsplines splineObj) as string


But this:
splineObj = filters.getmodorobj()
print (numsplines splineObj) as string

and this:     
splineObj = modPanel.getCurrentObject()
print (numsplines splineObj) as string

gives this error:
-- No ""numSplines"" function for Line

but this:
splineObj = modPanel.getCurrentObject()
splineObj2 = selection[1]
print (classof splineObj) as string
print (classof splineObj2) as string


so my question is, how are these node returns (from selection[1] and modPanel.getCurrentObject()) different? they have the same class, so in my mind they should have the same methods. but obviously that is not true

in any case im wondering how do i convert the modPanel.getCurrentObject() or similar return node to something that works like selection[1]? the reason is because im using in a function where i would like to be passing both selection arrays and modPanel.getCurrentObject() nodes

im running into this issue in other places aswell like for example when im passing nodes to polyops.attach etc.

sorry if i didnt wrap my code blocks properly, i couldnt find an option for it


Sign In or Register to comment.