Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Can't detect Drag finish

    SDK Help
    0
    24
    15.4k
    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
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 03/04/2003 at 06:57, xxxxxxxx wrote:

      I just pasted the code that does the search, Samir. The code that uses the found mat would follow. In fact, it already exists. I just did a println(mat->GetName());
      But it never reaches that part of the code.
      I even placed a println(dropped); before and I get a different value all the time. Even when keeping the mouse still inside the field I want the tag to be dragged to. It just spits out a list of different values. Like if the value of dropped is changing all the time. (by the way, dropped value is set by dropped = GetDragObject(msg);)
      In short, how can I get the name of the material assigned to a specific material tag?

      Rui Batista

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 03/04/2003 at 07:04, xxxxxxxx wrote:

        well, you could try to get the material link of the texture tag. Isn´t this possible in COFFEE? The id for the Container ID is 1010 (TEXTURETAG_MATERIAL). You could then use this object (or maybe it´s a string returned) to get the name and use FindMaterial to get the material. But I don´t know if this will work.
        Best
        Samir

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 03/04/2003 at 07:14, xxxxxxxx wrote:

          Isn't that what matmarker1=dropped->GetMaterial(); does? Getting the material that is assigned to the tag pointed by dropped?
          Since dropped passed these two tests:

          if (instanceof(dropped,BaseTag))
                              {
                              if(dropped->GetType() == 5616)

          (5616 is the value of TTexture)

          I assumed that dropped is a pointer to the texture tag itself. Isn't it?

          Rui Batista

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 03/04/2003 at 07:21, xxxxxxxx wrote:

            yes dropped is a pointer to the texture tag, but getmaterial will only give you a marker but not the name of the material. What I told you to do is to get the material name directly out of the TextureTag container but this doesn´t seem to work.
            So, the only way spontaneously said to me is the markers.
            Best
            Samir

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 03/04/2003 at 07:24, xxxxxxxx wrote:

              But hey, it´s long ago I used coffee so maybe there is another way. 🙂

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

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 03/04/2003 at 07:26, xxxxxxxx wrote:

                You are being really helpful Samir. Thank you so much.
                It's a shame that I'm no programmer and can't make this work 😞
                It seemed such a simple thing to do at first. I will start another thread with only this question to see if someone else can also help.

                Rui Batista

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

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 03/04/2003 at 09:17, xxxxxxxx wrote:

                  Oh, just another thing, Samir. Your plug-in "Drag" does work and I could also do that before. What I was trying to do was to only accept the dragged object if the mouse was released inside a specific gadget. If the mouse was moved away, the dragged object would just be ignored (the gadget would keep the old value or become empty, whatever).
                  With your code (and mine), as soon as a dragged object enters the gadget, it is accepted.
                  That's why I was trying to check BFM_DRAG_FINISHED. But I always get nil as a result. Isn't there a way to make it behave the way I was intending?

                  Rui Batista

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

                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                    On 03/04/2003 at 09:42, xxxxxxxx wrote:

                    Works fine for me. Change the code I gave you to this and use obj as final object:
                    var obj,temp;
                    MyDialog::Message(msg)
                    {
                     if(msg->GetId() == BFM_DRAGRECEIVE) 
                     {
                      if(CheckDropArea(DRAG_TEST, msg, TRUE, TRUE))
                      {
                       temp = GetDragObject(msg);
                       SetDragDestination(MOUSE_POINT_HAND);
                       SetString(DRAG_TEST, temp->GetName());
                       if(msg->GetData(BFM_DRAG_FINISHED))
                       { 
                          obj= GetDragObject(msg);
                          SetString(DRAG_TEST, obj->GetName());
                        
                       }
                       return TRUE;
                       
                      }
                      else SetString(DRAG_TEST, "");
                     }
                     return super::Message(msg);
                    }

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

                      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                      On 09/03/2005 at 08:09, xxxxxxxx wrote:

                      It's really to bad, that there never was an answer to the BFM_DRAG_FINISHED.

                      This should trigger, when an object is dropped:

                        
                      if ( msg->GetData( BFM_DRAG_FINISHED ) )  
                      {  
                      println( "Drag Finished" );  
                      }  
                      

                      It doesn't 😞

                      Weird it seems that the SDK 9.1 advice to use this, and it never triggers !?!

                      If anybody know the solution to this, please post 🙂

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

                        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                        On 13/03/2005 at 17:07, xxxxxxxx wrote:

                        Thanks to a a PM I got from Rui, this is needed to detect a drag finished.

                        If a

                        CheckDropArea()
                        

                        returns TRUE, you can use

                          
                        if ( msg->GetData( BFM_DRAG_FINISHED ) )  
                        {  
                        // Your code here  
                        }  
                        

                        This should have been mentioned in the C.O.F.F.E.E. SDK.

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