GetAndCheckHierarchyClone & subdivision surfaces ?

On 24/07/2015 at 13:48, xxxxxxxx wrote:

I have this code snippet in my def main(), that I use to get the child (parametric) object and convert it to a polygonal object to make further modifications. This way I can make nondestructive generator/editor that works fluently with parametric objects as well.

However, when I place a subdivision surface as a child object, this bit does not work. The result is never a polygonal object but always a BaseObject.

What can I do in this case?

child = op.GetDown()
polyobj = op.GetAndCheckHierarchyClone(hh,child,c4d.HIERARCHYCLONEFLAGS_ASPOLY, False)

On 25/07/2015 at 04:45, xxxxxxxx wrote:

Tried many things, I can't get the poly representation of a subdiv. surface 😞

On 27/07/2015 at 06:05, xxxxxxxx wrote:

Hello,

Are you using this code in a Python Generator? Please always include the context of your code and your question.

As described in your other tread ("Custom Subdivide Generator"), GetAndCheckHierarchyClone() does not return an object but a dictionary. Using the "clone" index I have no problems to access the polygon version of a child subdivision surface.

Best wishes,
Sebastian

On 27/07/2015 at 13:55, xxxxxxxx wrote:

Yes this is a python generator,
can you post a code that "works" ? When I try to get the poly representation of the child subdivision surface all I get is:
<c4d.BaseObject object called 'Subdivision Surface/Null' with ID 5140 at 0x000000E56BA8D150>

which is a base object

On 28/07/2015 at 02:47, xxxxxxxx wrote:

Hello,

this code works perfectly fine for me:

  
result = op.GetAndCheckHierarchyClone(hh,child,c4d.HIERARCHYCLONEFLAGS_ASPOLY,False)  
  
if result is None:  
     return None  
  
polyobj = result["clone"]  

best wishes,
Sebastian

On 28/07/2015 at 03:36, xxxxxxxx wrote:

Here is an example file
https://www.dropbox.com/s/ci8x5bsi46vqfcl/subdiv_example.c4d?dl=1

As you can see the left python generator contains a subdivision object, and it's not converted to polygons.
However I've converted the right example's content to polygonal object and it works perfectly with a polygonal operation.

On 28/07/2015 at 09:26, xxxxxxxx wrote:

Hello,

I can confirm some problem in your scene with the very Subdivision Surface object you use. But I cannot reproduce the behavior with a new Subdivision Surface object and a cube. Does this problem only occur with that scene or also with a new scene and new elements?

Best wishes,
Sebastian

On 28/07/2015 at 11:14, xxxxxxxx wrote:

Yes, this happens with every scene and every new element.
Can you post the same scene made on your end, so I can test it?

On 29/07/2015 at 10:21, xxxxxxxx wrote:

Hello,

the Python Generator in this file works perfectly fine for me:

http://developers.maxon.net/plugincafe/subdivide.c4d

best wishes,
Sebastian

On 29/07/2015 at 14:49, xxxxxxxx wrote:

I've bean experimenting with this since we've discussed, looks like sometimes it works and sometimes it does not. Sometimes when you play around a lot with the same generator, it suddenly stops working (I have no idea why)

On 30/07/2015 at 09:16, xxxxxxxx wrote:

Hello,

if you can find a way to reproduce the issue we could file a bug report.

Best wishes,
Sebastian