DeformCache Update



  • I used a cube object as a test and found that the DeformeCache obtained during script execution was the same. The cube object contains the pose morph tag (point type) and a deformer sub-object. The script does it to get the current DeformCache, then modify the intensity of the posemorph, and update to get the DeformCache again. I found that they are the same
    Is there a problem with my code, or is it logically impossible to do this?

    This is the script code:

    def main():
        tag = op.GetTag(c4d.Tposemorph)
        one = op.GetDeformCache().GetAllPoints()
        print one[3]
        tag[4000,1101] = 0
        c4d.EventAdd()
        two = op.GetDeformCache().GetAllPoints()
        print two[3]
    

    Thanks for any help



  • Hi @chuanzhen the deformed cache is only a representation of the current frame deformation state.
    That means, if you change the data, frame or whatever you need to rebuild the cache, this can be done with BaseDocument.ExecutePasses.

    Cheers,
    Maxime.



  • @m_adam Thanks👍


Log in to reply