[SOLVED] Point Data of Primitive Objects

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...

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

only with Polygon Objects:


Returns all polygons.

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

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

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

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.

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

Thanks for confirming ! 🙂

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

Thanks for clearing things up, Andreas. Great answers!