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

    change selection to parent

    Scheduled Pinned Locked Moved PYTHON Development
    6 Posts 0 Posters 462 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 14/05/2013 at 01:32, xxxxxxxx wrote:

      hi

      is there a way to watch for selecting an objekt an if this object is child of my Plugin_Objekt change the selection to the parent object ?

      Thanks

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

        On 14/05/2013 at 04:28, xxxxxxxx wrote:

        the easiest way would be in python to write a separate message plugin for that.
        for each EVMSG_CHANGE evaluate and modify the active documents object selection
        to your needs.

        but i do not think that this is good idea, as it would make it impossible to select and
        delete the child. either hide the child completely in the object manager or use a
        link resource element  to embed your child in the description of your parent object.

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

          On 14/05/2013 at 07:56, xxxxxxxx wrote:

          hey - thanks for your reply

          hide the object in the object manager don`t prevent to select the child in the viewport

          what do you meen with link resource element ? xref ?

          thanks

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

            On 14/05/2013 at 11:09, xxxxxxxx wrote:

            i meant the LinkBoxGui resource element.

            _<_img src="http://chicagoc4d.com/c4dpythonsdk/\_images/linkbox.png" height="30" width="193" border="0" /_>_

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

              On 15/05/2013 at 01:56, xxxxxxxx wrote:

              hey littledevil,

              thanks for the explanation

              i don`t get a clou how protect with the link my child objekts - thanks !

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

                On 15/05/2013 at 09:59, xxxxxxxx wrote:

                Hi,

                I think you misunderstood me. The LinkBoxGui is not meant to implement the selection behaviour
                you described. I suggested it as an alternative approach to providing input data by parenting 
                object nodes.

                Overriding user selections is one the worst things you could do in terms of gui design IMHO. 
                If you do want implement the desired behaviour nevertheless you will have to write a little 
                MessageData plugin for that and do what I have described in my first posting. Theoretically 
                you could just use one of the NodeData methods which are being called often, like for 
                example GetDEnabling(), but I guess that would be REALLY sloppy.

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