Select edges of object returned by a object plugin



  • On 10/04/2018 at 07:05, xxxxxxxx wrote:

    I hava an object plugin that returns a polygonal object.
    This of course a virtual object and not a "real" object.

    Now I was wondering, is it because it is a virtual object, that you cannot select the polygons of the returned object?
    If not, is there a way to select polygons or edges of the returned object?

    Or is this a nonsense question, because you cannot select polygons due to the nature of the object plugin?

    -Pim



  • On 11/04/2018 at 01:34, xxxxxxxx wrote:

    Hi Pim,

    I'm afraid is something not possible, all generators (I guess when you are telling Object Plugin we are currently speaking of a generator) get this limitation of not being able to select a component in the viewport (for example you can't select face/edge/point of a cube, which is nothing more than a generator).

    So the only solution for you is to make some selection tag, which can be used by the user.

    Hope it's answers to your questions.

    Cheers,
    Maxime



  • On 11/04/2018 at 02:57, xxxxxxxx wrote:

    Thanks, clear.

    What do you mean with "some selection tag, which can be used by the user".
    How can the user define / select what to select usiin a selection tag?

    -Pim



  • On 11/04/2018 at 04:57, xxxxxxxx wrote:

    For example, you can predefine some selection tags

    Here an from the Python Generator

    import c4d
      
    def main() :
        cube = c4d.BaseObject(c4d.Ocube)
        tag = c4d.BaseTag(c4d.Tpolygonselection)
        tag.SetName("Custom Selection")
        bs = tag.GetBaseSelect()
        bs.Select(0)
      
        cube.InsertTag(tag)
        return cube
    

    Now you can assign a material to this python generator and in the selection write "Custom Selection" it will then only affect the first face.

    Another solution for the user is to use the correction deformer to make such a selection, here an example.
    But you can't automate this from your ObjectData since it's not allowed to modify the scene in an ObjectData.

    Cheers,
    Maxime



  • On 11/04/2018 at 08:05, xxxxxxxx wrote:

    Yes, of course, the correction deformer, thanks!

    -Pim


Log in to reply