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

    SetBool RDATA_RENDERENGINE

    Cinema 4D SDK
    2
    2
    519
    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.
    • C4DSC
      C4DS
      last edited by C4DS

      Happy New Year all,

      I was rebuilding all plugins I converted to R20 and came upon this warning.

      warning C4305: 'argument': truncation from '' to 'Bool'
      

      Now, this seemed very odd to me. As such I went looking for the reason of this compiler warning, and stumbled upon some code I took for granted, since taken from examples found in SDK as well as posts in the (now legacy) forum.

      BaseContainer bcRender = image->pDoc->GetActiveRenderData()->GetData();
      ...
      bcRender.SetBool(RDATA_RENDERENGINE, RDATA_RENDERENGINE_PREVIEWSOFTWARE);
      
      	RDATA_RENDERENGINE							= 5300,
      		RDATA_RENDERENGINE_STANDARD						= 0,
      		RDATA_RENDERENGINE_PREVIEWSOFTWARE		= 1,
      		RDATA_RENDERENGINE_PREVIEWHARDWARE		= 300001061,
      		RDATA_RENDERENGINE_PHYSICAL						= 1023342,
      		RDATA_RENDERENGINE_CINEMAN						= 1016630,
      		RDATA_RENDERENGINE_GPURENDERER				= 1037639,
      
      

      I don't think SetBool is appropriate here. So, I guess the SimpleMaterial.cpp example in the cinema4dsdk (and maybe others as well) might need to be adjusted.

      Compiling with R19 seemed not to bring this warning up (or I must have missed it), but I now think to understand why some renderings failed with my plugins using the hardware renderer.

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by m_adam

        Hi Daniel,

        Thanks a lot, you are indeed right, SimpleMaterial.cpp has been fixed.

        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

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