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

    UVWTag->SetData fails

    SDK Help
    0
    2
    232
    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 23/11/2003 at 07:36, xxxxxxxx wrote:

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

      ---------
      hi,
      im trying to add some uvw data to an object in my scene using this code:

          
          
          
          
          CreateUVWTag(op)  
          {  
            var t_tag = new(UVWTag);  
              
              
            var a_uvwcoords = new(array,1000);  
            var counter;  
            var v_coord = vector(0);
          
          
          
          
            for(counter=0; counter < 1000; counter++)  
            {  
              v_coord.x = 1.0;  
              v_coord.y = 1.0;
          
          
          
          
              a_uvwcoords[counter] = v_coord;  
            }
          
          
          
          
            
           var vc = new(VariableChanged);  
           vc->Init(0,op->GetPolygonCount());   
           if (!t_tag->Message(MSG_POLYGONS_CHANGED,vc))  
             return;
          
          
          
          
           if(!t_tag->SetData(a_uvwcoords))  
           {  
            println("SetData Failed!");  
           return;  
           }  
             
            t_tag->Message(MSG_UPDATE);  
            if(!op->InsertTag(t_tag, NULL))  
            {  
             println("InsertTag Failed!");  
           return;  
            }  
              
             op->Message(MSG_UPDATE);  
          }
          
          
          
      

      but it keeps saying SetData Failed! in console
      Why is it doing this?

      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 23/11/2003 at 11:28, xxxxxxxx wrote:

        I fixed it, I have to create an array that has exactly 4 times the polygon count.
        i.e

            
            
            
            
            var a_uvwcoords = new(array,op->GetPolygonCount()*4);
            
            
            
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post