[MaxScript] numSelKeys ergibt immer "0"

maddineytsch

Mitglied
Hey,

ich benutze 3dsMax 2014 64bit.
Aus irgendwelchen Gründen scheint bei mir "numselkeys" nicht zu funktionieren.

Bsp.:
Beliebiges Objekt ist in der Szene und ausgewählt - es befinden sich eine Reihe von Frames (pos.controller - beeinflussende) in dem Interval 0-1000

selectkeys $.pos.controller (interval 0 1000)

--> Keys in dem Interval werden richtig ausgewählt

numselkeys $.pos.controller

--> ergibt immer "0", egal wieviele Frames ausgewählt sind.
Hab ich die Funtkion "numselkeys" falsch verstanden****? Es soll doch die Anzahl der ausgewählten Keys im jeweiligen Controller ausgegeben werden oder etwa nicht****?


Über Hilfe würde ich mich sehr freuen - wahrscheinlich stehe ich gerade einfach nur auf dem Schlauch :)
 
Gleiches Problem tritt auf bei dem Befehl "GetKeyIndex". Wenn man z.B. den height.controller anspricht funktioniert alles bestens.

Wenn man jedoch den pos.controller anspricht, kommt bei dem Befehl immer "0" raus.
Z.B. getkeyindex $.pos.controller 19

Bei Zeit 19 befindet sich ein Positions-Änderungsframe, jedoch wird wieder nur "0" ausgegeben.
Kann das sein dass hier an Indezierungsproblem auf sMax-Seite vorliegt?

Bitte verifizieren. Danke!
 
kurzer respond von autodesk:

Position is a compound controller - you'll need to access each constituent controller to get those values. Although you may see (for example) 5 keys in the Trackbar, there may be different combinations of the sub-controller keys i.e. if the move on a specific key only affects the X controller there may not be a key (on that frame) for the Y and Z controllers.
numselKeys $.pos.controller.x_Position.controller --shows 5
numselKeys $.pos.controller.y_Position.controller --shows 4
numselKeys $.pos.controller.z_Position.controller --shows 4
That's why numSelKeys can't return a value for the whole controller, but selecting them works because it CAN select all the sub-controller keys within the interval.

[edit] Same for getKeyIndex - the keys are on the sub-controllers, not the pos controller [/edit]


Damit sollte die Sache wohl klar sein.
 
Zurück