Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Register
    • Register
    • Login

    Any way to get the originally point pos before posemorph tag?

    Cinema 4D SDK
    2
    7
    1.4k
    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.
    • M
      mike
      last edited by

      hi,
      if any way to get the originally points pos before posemorph tag?don't use CAMorphNode::GetPoint, just like get points pos form pointobject.
      and i also want to know how can i get message when my tag or object plugin close?(not delete and free,just temporary closure)
      Hope your help!

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        hello,

        you can get the "base" for this morph tag.

        You can find information about the CAPoseMorphTag, CAMorph, CAMorphNode

        A very basic example

            mt = node.GetTag(c4d.Tposemorph)
            if not mt:
                raise ValueError("Pose Morph tag can't be found")
            
            #retrive the morphBase
            morphBase = mt.GetMorphBase()
            #this CAMorph should have only one node
            nodeMorph =  morphBase.GetFirst()
            #maybe check if point Count are the same
            if node.GetPointCount() != nodeMorph.GetPointCount():
                raise ValueError("point count are not the same")
        
            for i in xrange(nodeMorph.GetPointCount()):
                print nodeMorph.GetPoint(i)
        

        Don't forget the manuals on the c++ documentation, there are full of informations
        CAPoseMorphTag Manuel
        CAMorph Manual
        CAMorphNode Manual

        Cheers
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        M 1 Reply Last reply Reply Quote 1
        • M
          mike @Manuel
          last edited by

          @m_magalhaes Frist of all,thank your for your answer, but sorry maybe you didn't look at my questions carefully.

          @mike said in Any way to get the originally point pos before posemorph tag?:

          hi,
          if any way to get the originally points pos before posemorph tag?don't use CAMorphNode::GetPoint, just like get points pos form pointobject.
          and i also want to know how can i get message when my tag or object plugin close?(not delete and free,just temporary closure)
          Hope your help!

          1 Reply Last reply Reply Quote 0
          • ManuelM
            Manuel
            last edited by

            my bad, so c++ and yea i read that too fast.

            i guess it's related with your other question.
            So i'm afraid you want to retrieve a pointer to have the best performance. If so, it's not possible, you have to use GetPoint.

            For your other question, i'm not sure if i understand what you mean by plugin close (not delete and free).
            Do you mean sending a message at the end of your execute (for a tag) for example ?

            Cheers
            Manuel.

            MAXON SDK Specialist

            MAXON Registered Developer

            M 1 Reply Last reply Reply Quote 1
            • M
              mike @Manuel
              last edited by

              @m_magalhaes object and tag plugin's 'Enabled' ,can i detect it? i want detect itself Disenable/Enabled switch and set some attribute.

              1 Reply Last reply Reply Quote 0
              • ManuelM
                Manuel
                last edited by

                hi @mike,

                there's no direct solution for that. Depending on your need, there's different tracks.

                You can create a invisible tag that will check that for you.

                If you need something more global, you can create a SceneHook.
                In this sceneHook you can track the items you need to check and store/use GetDirty to see if something changed. (or in your case simply check if it's enabled)

                Cheers
                Manuel

                MAXON SDK Specialist

                MAXON Registered Developer

                M 1 Reply Last reply Reply Quote 1
                • M
                  mike @Manuel
                  last edited by

                  @m_magalhaes thank for your help!

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