Navigation

    • Register
    • Login
    • Search
    1. Home
    2. johnnyasdf
    J

    johnnyasdf

    @johnnyasdf

    0
    Reputation
    2
    Posts
    1
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    johnnyasdf Follow

    Best posts made by johnnyasdf

    This user does not have any upvoted posts yet.

    Latest posts made by johnnyasdf

    RE: Making a PolygonObject-like object plugin

    First of all, thanks for your support.

    It is not possible, at least not without A LOT of work, to implement polygonal geometry that is driven by Attribute Manger parameters and can maintain vertex-by-vertex manipulations of users.
    You must reimplement all its vertex/edge/polygon interactions
    OBJECT_POLYGONOBJECT is sort of uncharted territory.

    That answers my question. My approach was trying if I could use the already implemented geometry interactions and add from that point. Since I found no example for OBJECT_POLYGONOBJECT, thought that could be it, but seems not.

    If you just want to some information being displayed for objects, I would recommend implementing a tag which does that. If you want to, you could hide that tag from the users view, and also write a plugin which automatically distributes that tag in a scene

    My plan B was along these lines, with a dialog to show the info.

    Thanks,
    Oscar

    posted in Cinema 4D SDK •
    Making a PolygonObject-like object plugin

    Hi,
    I am trying to make a custom item that works in the same way as a polygon object, but with more options. These options would be simple things, like showing certain parameters in the UI that depend on other parameters and the points and polygons of the object itself, but the problem is creating the object.

    I found out that the OBJECT_POLYGONOBJECT tag in RegisterObjectData makes C4D create a PolygonObject, instead of a BaseObject, so one could apply all the PolygonObject methods (like GetAllPolygons or GetAllPoints) to the custom object without getting an error, but with no result. I started with ResizeObject, but the size wouldn't change. SetPoint returns index out of range since the size is 0, and GetAllPoints/Polygons always returns an empty list. Tried to use these methods in ObjectData.Init (using node as the object) and ObjectData.GetVirtualObjects (using op), but the object just refuses to change size without returning any error. Also tried creating a polygon object in GetVirtualObjects, manually giving it points and polygons, and it displays if OBJECT_GENERATOR is set, but when entering point/edge/polygon mode it disappears from the view and can't be edited.

    I couldn't find any Python examples for this, and the only thing I found for C++ (which I don't know too much about), was the Lattice Plane Modifier plugin (using OBJECT_POINTOBJECT, not polygon), where it seems to ResizeObject and access the points with GetPointW and replace them with no problem. Also browsed the SDK documentation for ObjectData and NodeData and didn't see anything useful, except maybe ObjectData.Draw, but I don't know how it should be used.

    My goal is to make multiple object types that can be edited by the user with the same tools as a polygon object, andthen giving them different icons and displaying different parameters in the UI depending on the object type. Is there a way to do this?

    Thanks,
    Oscar

    posted in Cinema 4D SDK •