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

    coremessage

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 474 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

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

      On 24/03/2008 at 06:12, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:    
      Platform:      
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      The code below worked in my plugin when I was using DOCUMENT_CHANGED, but it was continually being called even when I wasn't changing anything in my scene.  Why? Then I tried ACTIVE_OBJECT_CHANGED and that doesn't do anything, is this still a flag?

          
          
          MyDialog::CoreMessage(id,msg)  
          {  
           switch (id)  
           {  
            case ACTIVE_OBJECT_CHANGED:  
            //case DOCUMENT_CHANGED:  
             println("ACT OBJECTIVELY");  
             pPoints->MovePoints();  
             break;  
           }  
          }
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

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

        On 24/03/2008 at 08:12, xxxxxxxx wrote:

        OK I got it to work by using DOCUMENT_CHANGED and then in my function I commented out EventAdd().  I don't know why I had to do this but I guess the EventAdd() was sending a message to my CoreMessage DOCUMENT_CHANGED which sent a message back to the function with EventAdd() and so an endless loop. But anyway this works well now....

            
            
            MyDialog::CoreMessage(id,msg)  
            {  
             switch (id)  
             {  
              //case ACTIVE_OBJECT_CHANGED:  
              case DOCUMENT_CHANGED:  
              //case NEW_ACTIVE_OBJECT:  
              {  
               println("ACT OBJECTIVELY");  
               pPoints->MovePoints();  
               break;  
              }  
             }  
            }
            
            
            
            
            PointTonull::MovePoints()  
            {  
             pDoc=GetActiveDocument();  
             nObj=pDoc->GetActiveObject();  
             nName=nObj->GetName();  
             len=sizeof(nName);  
             sName=strmid(nName,0,len-2);  
             println(sName);  
             println(nName);  
             println(strmid(nName,len-1,len-1));  
             println("X",x);  
             for(i=0;i<20;i++)  
             {  
               if(sName==lSplines[i])  
               {  
                 x=1;  
               }  
             }  
             println("X",x);  
             if(x==0){return;}  
             //else  
             spObj=pDoc->FindObject("TTC");  
             //println(nName[len-1]);  
             inde=strmid(nName,len-1,len-1);  
             iObj=spObj->GetMg();  
             iObj->Invert();  
             println(spObj);  
             spObj->SetPoint(evaluate(inde),iObj->GetMulP(nObj->GetPosition()));  
             spObj->Message(MSG_UPDATE);  
             //EventAdd();  
             x=0;  
             println("X",x);  
            }  
            
        
        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

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

          On 24/03/2008 at 09:55, xxxxxxxx wrote:

          Anew problem with the above code.  My scene doesn't change until the payhead is stopped...and because of this when renderred no movement takes place.

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

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

            On 26/03/2008 at 04:47, xxxxxxxx wrote:

            Can you please explain what you are trying to achieve with this plugin?

            cheers,
            Matthias

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

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

              On 26/03/2008 at 05:28, xxxxxxxx wrote:

              Hey Matthias.  This thread is related to the other thread.  You guys answered the problem in that thread.  Thanks.  Anyway this part of this plugin is just using nulls to control some of the points on some splines.

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