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

    Selction Tag

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 194 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 31/01/2012 at 08:49, xxxxxxxx wrote:

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

      ---------
      I have a xpresso, coffee script combo that has been running fine on 11.5 and 12. I gave it to someone who is running r13 and it doesn't work in the renderer. I've put every debug line I could think of, but the console output tells me its running perfectly.

      The script first reads a txt file in the form of 0 and 1's. It then adjusts two selection tags to have a polygon to be selected or deselected based on the cache. So every frame it reads a new txt file, the updates the selection tags of the object. Works fine in 12 and below but not in 13. It renders but the tags don't seem to update.

      Rendering with Standard renderer.

      //sets up the selections
      		var flatSelectTag = AllocTag(Tpolygonselection);
      		flatSelectTag#ID_BASELIST_NAME = "flatSelection";
      		var f = new(BaseSelect);
      		f->Init();
        
      		var distortSelectTag = AllocTag(Tpolygonselection);
      		distortSelectTag#ID_BASELIST_NAME = "distortSelection";
      		var d = new(BaseSelect);
      		d->Init();
        
      //gets the cache txt
        
      		var fileString = stradd(cacheFolder, "\\", name, tostring(int(frame)), ".txt");
      		var myFilename =  new (Filename);
      		myFilename->SetFullString(fileString);
      		var file = new(BaseFile);
        
      	  file->Open(myFilename, FILEOPEN_READ, FILE_DIALOG);
      		var fileLength = file->GetLength();
      		var i = 0;
      		var capturedString;
      		var distortFlag;
        
      		//reads characters; selects which polygons are on one tag and which are on another
      		for(i = 0; i < fileLength; i++)
      		{
      			capturedString = file->ReadChar();
      			//println(capturedString);
      			
      			if(capturedString == 0)
      			{
      				f->Select(i);
      			}
      			else
      			{
      				d->Select(i);
      			}
      		}
        
      //sets seelction and closes file
      		
      		flatSelectTag->SetSelection(f);
      		myObj->InsertTag(flatSelectTag);
        
      		distortSelectTag->SetSelection(d);
      		myObj->InsertTag(distortSelectTag);
        
      		file->Close();
      		println(int(frame));
      
      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 02/02/2012 at 03:29, xxxxxxxx wrote:

        Anyone have an idea on changes between 12 and 13 that would cause something like this? Essentially, in the renderer, its not updating the selection tags as previously. Has there been a change?

        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 02/02/2012 at 04:04, xxxxxxxx wrote:

          Please send a simple example (c4d and text file) to [email protected].

          cheers,
          Matthias

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