caught that last night and fixed it, still dont get the compound On Thu, Jun 24, 2021 at 10:41 PM Marcus Ottosson <konstrukt...@gmail.com> wrote:
> Looks like poseDriver is added twice. > > cmpAttr.addChild(poseDriver); > cmpAttr.addChild(poseDriver); > > Don’t forget to check the status after each call. It’ll tell you when any > of them fails, which in this case is likely the second call to adding > poseDriver. > > On Fri, 25 Jun 2021 at 05:53, Todd Widup <todd.wi...@gmail.com> wrote: > >> MStatus ArsenalPoseManager2::initialize() >> { >> MStatus status; >> MFnNumericAttribute nAttr; >> MFnMatrixAttribute mAttr; >> MFnMessageAttribute meAttr; >> MFnTypedAttribute tAttr; >> MFnCompoundAttribute cmpAttr; >> >> dataFile = tAttr.create("PoseFile", "psf", MFnData::kString); >> tAttr.setInternal(true); >> tAttr.setUsedAsFilename(true); >> tAttr.setStorable(true); >> tAttr.setKeyable(false); >> addAttribute(dataFile); >> >> poseDriver = meAttr.create("poseDriver", "pd"); >> meAttr.setArray(false); >> meAttr.setStorable(true); >> meAttr.setKeyable(false); >> addAttribute(poseDriver); >> >> poseDriverValue = nAttr.create("poseAttribute", "pa", >> MFnNumericData::kFloat); >> nAttr.setArray(false); >> nAttr.setStorable(true); >> nAttr.setKeyable(true); >> addAttribute(poseDriverValue); >> >> poseName = tAttr.create("poseName", "pn", MFnData::kString); >> tAttr.setArray(false); >> tAttr.setStorable(true); >> tAttr.setKeyable(false); >> addAttribute(poseName); >> >> poseNode = meAttr.create("poseNode", "pnd"); >> meAttr.setArray(false); >> meAttr.setStorable(true); >> meAttr.setKeyable(false); >> addAttribute(poseNode); >> >> poseMatrix = mAttr.create("poseMatrix", "pm", >> MFnMatrixAttribute::kDouble); >> mAttr.setArray(false); >> mAttr.setStorable(true); >> mAttr.setKeyable(true); >> addAttribute(poseMatrix); >> >> poseSets = cmpAttr.create("poseSet", "ps"); >> cmpAttr.setArray(true); >> cmpAttr.addChild(poseNode); >> cmpAttr.addChild(poseMatrix); >> cmpAttr.setReadable(true); >> cmpAttr.setUsesArrayDataBuilder(false); >> addAttribute(poseSets); >> >> poseData = cmpAttr.create("poseData", "pd"); >> cmpAttr.setArray(true); >> cmpAttr.addChild(poseDriver); >> cmpAttr.addChild(poseDriver); >> cmpAttr.addChild(poseName); >> cmpAttr.addChild(poseSets); >> cmpAttr.setReadable(true); >> cmpAttr.setUsesArrayDataBuilder(false); >> addAttribute(poseData); >> >> return MS::kSuccess; >> } >> >> >> that was working on the build I did the other day, but all of a sudden >> its not adding the compound attribute, no error or anything just not >> there. Any thoughts as to why? >> >> >> -- >> Todd Widup >> Creature TD / Technical Artist >> todd.wi...@gmail.com >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Python Programming for Autodesk Maya" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to python_inside_maya+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/python_inside_maya/CABBPk36ThRdY1qiR_6JU4JY3%3DH--LVqqtc9ZYHAfu6X15iH%2BCA%40mail.gmail.com >> <https://groups.google.com/d/msgid/python_inside_maya/CABBPk36ThRdY1qiR_6JU4JY3%3DH--LVqqtc9ZYHAfu6X15iH%2BCA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to python_inside_maya+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCaxoO9eCP6czw9UYD32BFc8V35zLrJLR%3DFBBUzxvKpYg%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCaxoO9eCP6czw9UYD32BFc8V35zLrJLR%3DFBBUzxvKpYg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- Todd Widup Creature TD / Technical Artist todd.wi...@gmail.com -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABBPk35Mo2qDVRB0wyd337UXecR8oc1UpFWaqL%3D5_kkj2FRmMQ%40mail.gmail.com.