When you register the node, since you are creating a deformer, you need to
specify:

apiMPx.MPxNode.kDeformerNode

On Tue, Dec 11, 2012 at 10:14 PM, Bay <[email protected]> wrote:

> Hi all,
>         currently I'm doing the tutorial for Chad Vernon's Custom Jiggle
> Deformer tutorial but trying to convert the code into Python just to
> understand better the anatomy of building a Deformer. I'm stuck right now
> at this error
>
> // Error: file: C:/Program
> Files/Autodesk/Maya2013/scripts/others/pluginWin.mel line 665:
> RuntimeError: file G:/AdvancedScripting/jiggleFinal.py line 48:
> (kInvalidParameter): Cannot find item of required type //
> // Warning: file: C:/Program
> Files/Autodesk/Maya2013/scripts/others/pluginWin.mel line 665: Failed to
> call script creator function //
>
> Everytime I load in my plugin, I haven't implemented the main code yet
> just trying if the thing could load. The section of code it's complaining
> about is here:
>
>  def initialize():
>
>         nAttr = api.MFnNumericAttribute()
>         uAttr = api.MFnUnitAttribute()
>         mAttr = api.MFnMatrixAttribute()
>         cAttr = api.MFnCompoundAttribute()
>
>         outputGeom = apiMPx.cvar.MPxDeformerNode_outputGeom
>
>         Jiggle.aTime = uAttr.create('time', 'time',
> api.MFnUnitAttribute.kTime,0.0)
>         Jiggle.addAttribute(Jiggle.aTime)
>         Jiggle.attributeAffects(Jiggle.aTime, outputGeom)
>
>
>         Jiggle.aStartFrame = nAttr.create("startFrame", "startFrame",
> api.MFnNumericData.kInt, 0)
>         nAttr.setKeyable(True)
>         Jiggle.addAttribute(Jiggle.aStartFrame)
>         Jiggle.attributeAffects(Jiggle.aStartFrame, outputGeom)
>
> Attached is the main code. Would appreciate if anyone could tell me what
> I'm doing wrong
>
> Thank you
> Bay
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].


Reply via email to