jmiguel2902 / blur-dev

Automatically exported from code.google.com/p/blur-dev
0 stars 0 forks source link

Cannot access 'value'-Property of Position_XYZ-controller object #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I use the following script to animate the position of a box.
mxs.getPropNames gives me a list where 'value' is contained but
mxs.isProperty returns false and mxs.getProperty throws an exception. What
I'm doing wrong?

By the way, I can run this script two times then MaxScript gives me an
Unknown System exception.

System:
HP 6735b
Windows Vista Business (x32)
3ds Max 2009

Thanks,

from Py3dsMax import mxs
import sys, traceback

try:
    print "Creating box ..."

    b = mxs.Box()
    b.name ="test"

    #mxs.setProperty(b, 'pos.controller', mxs.Position_XYZ())
    c = mxs.getProperty(b, 'pos.controller')

    print "Animating ..."

    for i in range(0, 50):
        print i
        mxs.addNewKey(c, i)

    for k in c[0].keys:
        print mxs.getPropNames(k)
        print mxs.isProperty(k, "value")

except:
    print "Exception in user code:"
    print '-'*60
    traceback.print_exc(file=sys.stdout)
    print '-'*60
    raise

Original issue reported on code.google.com by manuel.m...@foni.net on 24 Nov 2009 at 5:33