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

    RIGID_BODY_CLEAR_INITIAL_STATE

    Scheduled Pinned Locked Moved PYTHON Development
    7 Posts 0 Posters 1.0k Views
    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.
    • H Offline
      Helper
      last edited by

      On 08/03/2018 at 21:46, xxxxxxxx wrote:

      Hello all,

      I try python CallButton, but it dosen't work.

      c4d.CallButton(tag, c4d.RIGID_BODY_CLEAR_INITIAL_STATE)

      I can't find "RIGID_BODY_CLEAR_INITIAL_STATE" CallCommand number.

      Do you know that?

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 09/03/2018 at 03:07, xxxxxxxx wrote:

        Hello Nob,

        Actually CallButton is the right way to go. And it should work (and it's working fine here).
        So may I ask you a few more information about where you execute it, maybe tag is not define or is not the right one?

        CallCommand is more used to use tool like reversenormal or execute a cut for example, so you can't use it in this context.

        Moreover just for your personal knowledge all constant you get (from the Console Log or either by drag and drop a parameter on the console or the script manager) are actually Integer.
        So if in the console you write c4d.RIGID_BODY_CLEAR_INITIAL_STATE (always add c4d, sicne constants are stored in the c4d module) it will print you the actual id of this action/button/parameter.

        Please do not hesitate if you feel lost, or you don't understand something.

        Cheers,
        Maxime

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 09/03/2018 at 20:11, xxxxxxxx wrote:

          Thanks for the reply.

          I am making ToolData Pugin. It is to paint the object with a mouse. Paint uses dynamics.
          tag [c4d.RIGID_BODY_INITIAL_LINEAR_VELOCITY] is used in def MouseInput.
          Can c4d.RIGID_BODY_INITIAL_LINEAR_VELOCITY be used with ToolData? Or can you use def MouseInput?

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            On 12/03/2018 at 02:53, xxxxxxxx wrote:

            Hi Nob,

            I'm not sure your last question is related to the first one.
            Does your initial question is completely resolved?

            If yes, please feel free to open a new thread for your last question.
            Owever make sure to share as most informations as you can, it will really help us to help you 🙂

            Cheers,
            Maxime

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              On 13/03/2018 at 07:43, xxxxxxxx wrote:

              Sorry, it was a different question.
              Is CallButton possible in the ToolData plugin class?

              def MouseInput(self, doc, data, bd, win, msg) :
              c4d.CallButton(tag, c4d.RIGID_BODY_CLEAR_INITIAL_STATE)

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                On 14/03/2018 at 03:56, xxxxxxxx wrote:

                Hi Nob,

                I would like to ask you at least a day in order to gather some more informations.

                Thanks 🙂

                1 Reply Last reply Reply Quote 0
                • H Offline
                  Helper
                  last edited by

                  On 15/03/2018 at 03:15, xxxxxxxx wrote:

                  Hi Nob,

                  after some discussions it's completely fine to use CallButton from MouseInput function of a ToolData.
                  So if it's not working as you expected or you encounter any issues please feel free to ask.

                  Cheers, 
                  Maxime

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