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

    Tag Plugin, action when user drags into Link

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 237 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 04/04/2014 at 12:50, xxxxxxxx wrote:

      So I have an object in a Link box in the GUI of my tag plugin that once the user has dragged an object into I want to get the y value of that position.

      I am doing processing in the "Execute" function of the inherited "plugins.TagData" class but it is getting the value everytime.

      Where should I add the code to get the object's y position the first time the user drags an object to the link box?  Should I put it in the "Message" function and use the "type" parameter via

      if type==c4d. _MSG_DRAGANDDROP_ :  
        
      If so it doesn't seem to be working.  Any guidance would be very helpful, thanks!  
      Jimmy   
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 11/04/2014 at 07:23, xxxxxxxx wrote:

        Just remember when you obtained the value the first time and don't re-obtain it when
        you already have it.

        -Niklas

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

          On 11/04/2014 at 08:32, xxxxxxxx wrote:

          Niklas,
          You are right, when I first obtain it I write it into a global variable which I don't change.  That solved the issue.
          Jimmy

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

            On 11/04/2014 at 09:34, xxxxxxxx wrote:

            Global variable? Sounds bad for a tag, what if the tag is there two times?

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