Python generator after making editable



  • On 09/01/2018 at 02:58, xxxxxxxx wrote:

    I noticed that some of the C4D generators can return another object when making it editable.
    for example, subdivision surface has 2 subdivision types. When this generator is 'alive' it returns geometry with a value set to subdivision editor, but after making it editable, we are getting another object with a value of subdivision renderer...
    I wonder if it is possible to execute some other code when turning object generator plugin or python generator, into an editable object.



  • On 09/01/2018 at 03:02, xxxxxxxx wrote:



  • On 10/01/2018 at 04:13, xxxxxxxx wrote:

    Hi,

    A generator checks the BUILDFLAGS in GetVirtualObjects() to return the correct geometry.
    When an object is made editable the flag is set to BUILDFLAGS_EXTERNALRENDERER. Then the generator should return the render geometry representation.

    The BUILDFLAGS have to be retrieved from a HierarchyHelp object.
    Unfortunately this class is not available in the Python API, so hh variable in a Python generator is an opaque object ( PyCObject ). This is also the case for the hh parameter of ObjectData.GetVirtualObjects().
    So this is a limitation and there is no way to obtain the current BUILDFLAGS with the Python API.


Log in to reply