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
    • Recent
    • Tags
    • Users
    • Login

    Object plugin and CallCommand

    Scheduled Pinned Locked Moved PYTHON Development
    7 Posts 0 Posters 531 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 20/08/2014 at 06:27, xxxxxxxx wrote:

      Can I use a CallCommand in a Object Plugin?

      "c4d.CallCommand(14023)      # Align Normals" does not seem to work in a Object Plugin

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

        On 21/08/2014 at 03:19, xxxxxxxx wrote:

        Are you trying to do it on an object being generated by your plugin? If so it won't work, as the object being generated is parametric. It would be like trying to do Align Normals on a Cube primitive - the command is unavailable because it would have no meaning.

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

          On 21/08/2014 at 04:42, xxxxxxxx wrote:

          In the object plugin I create a polygon object.
          So, it should be ok.
          I will try another CallCommand, to make sure CallCommand works in an Object Plugin.

          Thanks, Pim

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

            On 21/08/2014 at 05:43, xxxxxxxx wrote:

            It does not work. a) CallCommand only works from the main thread. b) Depending on the command, but most commands operate on the active object in the active document. Since your object is virtual and you should NOT temporarily insert it into the document, you can't make it work.

            Not sure if

            Best,
            -Niklas

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

              On 21/08/2014 at 06:16, xxxxxxxx wrote:

              Ok, that is clear.
              I'll do it "manually", not using the CallCommand.

              Pim

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

                On 21/08/2014 at 07:53, xxxxxxxx wrote:

                Can't you use SendModelingCommand() to send the MCOMMAND_ALIGNNORMALS command?

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

                  On 21/08/2014 at 08:21, xxxxxxxx wrote:

                  Yes, good point.
                  I'll will use that one instead of a CallCommand.

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