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

    SetParameter(DOCUMENT_CLIPPING_PRESET does not work

    Cineware SDK
    2
    3
    6.0k
    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.
    • C
      camille chigot
      last edited by

      hello, I am using the melange sdk to export to c4d files.
      it looks like DOCUMENT_CLIPPING_PRESET parameter could not be set :

      test:

      	c4dDoc = cineware::BaseDocument::Alloc();
      	{
      		cineware::GeData udata;
      		cineware::Bool ret = c4dDoc->SetParameter(cineware::DOCUMENT_CLIPPING_PRESET, cineware::DOCUMENT_CLIPPING_PRESET_HUGE);
      		ret = c4dDoc->GetParameter(cineware::DescLevel(cineware::DOCUMENT_CLIPPING_PRESET), udata);
      	}
      

      udata correspond to a value of 1 ( MEDIUM, the default value)
      I tried with other preset, same issue.

      thanks in advance

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        hi,

        the preset will not be changed but the value for near and far clip are updated.
        I will talked with the dev to see why the preset isn't set.
        You can use the near and far values as a workaround.

        	char valuein;
        
        	auto PrintValue = [](BaseDocument* doc)
        	{
        		cineware::GeData udata;
        		doc->GetParameter(cineware::DescLevel(cineware::DOCUMENT_CLIPPING_PRESET_NEAR), udata);
        		Float n = udata.GetFloat();
        		doc->GetParameter(cineware::DescLevel(cineware::DOCUMENT_CLIPPING_PRESET_FAR), udata);
        		Float f = udata.GetFloat();
        		printf("value are near : %f  far %f \n\r", n, f);
        
        	};
        
        	BaseDocument* c4dDoc = cineware::BaseDocument::Alloc();
        
        	if (c4dDoc != nullptr)
        	{
        		PrintValue(c4dDoc);
        		cineware::Bool ret = c4dDoc->SetParameter(cineware::DOCUMENT_CLIPPING_PRESET, cineware::DOCUMENT_CLIPPING_PRESET_HUGE);
        		PrintValue(c4dDoc);
        		scanf("%c", &valuein);
        	}
        
        

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • C
          camille chigot
          last edited by

          right but when I load my document inside C4d ( R20 or R22), the clipping preset is medium and the clipping near and far are wrong ( back to medium)

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