Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    DeformCache Update

    Cinema 4D SDK
    r19 python
    2
    3
    533
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chuanzhenC
      chuanzhen
      last edited by

      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

      相信我,可以的!

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        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.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        chuanzhenC 1 Reply Last reply Reply Quote 1
        • chuanzhenC
          chuanzhen @m_adam
          last edited by

          @m_adam Thanks👍

          相信我,可以的!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post