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

    [SOLVED] Point Data of Primitive Objects

    Scheduled Pinned Locked Moved PYTHON Development
    7 Posts 0 Posters 843 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

      On 31/05/2017 at 03:03, xxxxxxxx wrote:

      Is there a way to somehow access the generated points of Primitive Objects in Python?

      Let's say, I have a Cube Object with a few segments affected by a Bulge deformer. How would I get the resulting points? 
      Is it only possible with Polygon Objects? (i.e. using the "Current State to Object" command)

      Sorry for lots of noob-questions, still learning...

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 01/06/2017 at 00:54, xxxxxxxx wrote:

        only with Polygon Objects:

        PolygonObject.GetAllPolygons()

        Returns all polygons.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 01/06/2017 at 08:59, xxxxxxxx wrote:

          Well, while the above answer is not completely wrong, anion does not provide the full picture.

          You can of course access the points and polygons of generated/parametric objects. The keyword here is cache. Basically every generated object has a polygon cache. The thing is, due to deformers, input objects, etc. the situation with the cache can get a bit more complex and it's not done with a simple call to GetCache() (well, at least not if you need to cover all kinds of cases). Please take a look at the docs and see also GetDeformCache().
          Our C++ docs also have a bit more information on the topic in the BaseObject manual.
          By the way that's currently a general advice for Python developers, to also take a look at the Overview section in our C++ docs. I know, not the most convenient situation, but while we are still working on a general docs overhaul, we concentrate on C++ first.

          One more hint to wrap your head around caches is the Active Object Dialog example in our cinema4dsdk C++ examples. So if you have the means to compile the examples, it might be worth taking a look at it. You will see the cache hierarchy of objects in there.

          Edit: Added info on Active Object Dialog

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            On 01/06/2017 at 11:21, xxxxxxxx wrote:

            Can sound stupid but what the difference beetwen virtual object and cache object?

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              On 01/06/2017 at 23:36, xxxxxxxx wrote:

              I guess, you are referring to "Generator objects store virtual child objects in a cache" in the BaseObject manual linked above?
              I'd say, this is probably just language issue or a lingual detail. The objects in cache (or cache objects) do not show up to the user in Cinema 4D (i.E. are not accessible in Object Manager) and thus are often also called virtual objects.

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                On 02/06/2017 at 01:11, xxxxxxxx wrote:

                Thanks for confirming ! 🙂

                1 Reply Last reply Reply Quote 0
                • H Offline
                  Helper
                  last edited by

                  On 06/06/2017 at 00:51, xxxxxxxx wrote:

                  Thanks for clearing things up, Andreas. Great answers!

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