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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Ovolumeloader

    Cinema 4D SDK
    r20 c++ sdk
    2
    3
    732
    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.
    • kbarK
      kbar
      last edited by kbar

      Anybody here know how to access the volume grids in a VolumeLoader?

      Cheers,
      Kent

      https://www.gamelogicdesign.com
      https://www.plugins4d.com

      1 Reply Last reply Reply Quote 0
      • S
        s_bach
        last edited by

        Hello,

        a volume loader is just an ordinary generator. This means the stuff it creates is in its cache. You can access the volumes stored in its cache as usual:

        if (baseObject->IsInstanceOf(Ovolumeloader) == false)
          return maxon::IllegalArgumentError(MAXON_SOURCE_LOCATION);
        
        BaseObject* const cache = baseObject->GetCache();
        if (cache == nullptr)
          return maxon::IllegalArgumentError(MAXON_SOURCE_LOCATION);
        
        if (cache->IsInstanceOf(Ovolume) == false)
          return maxon::UnexpectedError(MAXON_SOURCE_LOCATION);
        
        const VolumeObject* const volumeObject = static_cast<VolumeObject*>(cache);
        
        ApplicationOutput("Volume Object: " + volumeObject->GetName());
        

        See also VolumeObject Manual.

        best wishes,
        Sebastian

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        C 1 Reply Last reply Reply Quote 4
        • kbarK
          kbar
          last edited by

          Thanks Sebastian. I did not realize it was a generator. Couldn't find it mentioned in the docs. However I was searching for VolumeLoader in the docs and on here, and I think the official docs searching system doesn't always return the results.

          Anyway, all good now. Thanks again.

          https://www.gamelogicdesign.com
          https://www.plugins4d.com

          1 Reply Last reply Reply Quote 0
          • ferdinandF ferdinand forked this topic on
          • First post
            Last post