PDA

View Full Version : # Error: : line1 in method 'MFnNurbsCurve_getKnotDomain', argument 2 of type 'double


RuthW
08-17-2009, 05:15 PM
Hi all

I am new to python and try to rewrite a C++ script in python.

The code is this:

tStart
tEnd
curveFn.getKnotDomain( tStart, tEnd) #OpenMaya.MFnNurbsCurve
()

Error:
# Error: : line1 in method 'MFnNurbsCurve_getKnotDomain', argument 2
of type 'double &' #

I also try it like is:

tStart = float(0.1)
tEnd = float(0.1)
curveFn.getKnotDomain( float(tStart), float(tEnd))
#OpenMaya.MFnNurbsCurve()

...but same error.

Thanks for your help.
R.

RuthW
08-17-2009, 07:15 PM
double post

RuthW
08-17-2009, 09:23 PM
Found my answer.
Problem solved.
tStartP = OpenMaya.MScriptUtil().asDoublePtr()
tEndP = OpenMaya.MScriptUtil().asDoublePtr()


curveFn.getKnotDomain(tStartP, tEndP)


tStart = OpenMaya.MScriptUtil().getDouble(tStartP)
tEnd = OpenMaya.MScriptUtil().getDouble(tEndP)


Thanks
R.

CGTalk Moderation
08-17-2009, 09:23 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.