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

    CommandData trigger from GeDialog

    Cinema 4D SDK
    c++ r19 r20 r21
    3
    6
    626
    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.
    • C4DSC
      C4DS
      last edited by

      Hi,
      A GeUserArea can trigger its parent GeDialog via a SendParentMessage which needs to be handled in GeDialog::Command.
      Is there something similar to let a GeDialog trigger its parent CommandData?
      Or is the only way to go via CallCommand?

      1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand
        last edited by ferdinand

        Hi,

        I have some trouble understanding your question. A GeDialog can be in a child relation to another GeDialog, but not to a CommandData node (at least out of the box). So I am uncertain if you actually meant CommandData, the plugin node type, or misspoke and meant Command, the method of GeDialog, and thereby were referring to hierarchically linked dialogs.

        1. CommandData::Execute: Since such a plugin can have a dialog, but does not have to, I am also a bit confused about the question here. I assume you are aware that you could store a reference to the instantiating CommandData node in your GeDialog and then invoke CommandData::Execute on your plugin node yourself. The call only takes a document, so not too hard to emulate. CallCommand would be probably easier, but might have some unwanted overhead.
        2. GeDialog::Command: Also a bit confused here. Isn't it already the case, that messages are being propagated through hierarchically linked dialogs? Can't test it right now, but I would have sworn that this is the case.

        Cheers,
        zipit

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 1
        • C4DSC
          C4DS
          last edited by

          Yes I meant CommandData.
          I know not every CommandData does need to have a GeDialog, but if a GeDialog exists it usually has a CommandData as "parent", hence the wording I used.

          And no I don't want to invoke CommandData::Execute (nor ExecuteSubID etc ...). That is why I was wondering if there was another way than going via CallCommand, as this triggers the Execute/ExecuteSubID.

          ferdinandF 1 Reply Last reply Reply Quote 0
          • ferdinandF
            ferdinand @C4DS
            last edited by ferdinand

            @C4DS said in CommandData trigger from GeDialog:

            And no I don't want to invoke CommandData::Execute (nor ExecuteSubID etc ...)

            Hm, I might be extra slow today, but what were you then referring to with "trigger its parent CommandData" in your original posting - if it wasn't CommandData::Execute? Or do you want the node to be executed, but just do not want to invoke the execution yourself?

            But long story short, I am not aware of any builtin references to a hosted dialog in a CommandData node, so one is not aware of the other out of the box.

            Cheers,
            zipit

            MAXON SDK Specialist
            developers.maxon.net

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

              Hi,

              thanks @zipit once again 🙂

              I'm also a bit confused on what you are trying to do.
              As @zipit said, you could have a pointer to your command in your Dialog and call what ever you want.

              If you really need one function you added in your CommandData you can think about making it static. Or redesign your functions.

              Cheers,
              Manuel

              .

              MAXON SDK Specialist

              MAXON Registered Developer

              1 Reply Last reply Reply Quote 1
              • C4DSC
                C4DS
                last edited by

                Nevermind. Trying to explain will probably lead us too far. I was only wondering if messaging was possible between a CommandData and its GeDialog.

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