Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    How To use DrawPolygonObject ?

    SDK Help
    0
    21
    11.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 09/06/2012 at 09:52, xxxxxxxx wrote:

      Ack!Sorry again.
      There's so many versions of code in this thread I was getting them mixed up.

      Earlier Matthias posted this:

      sphere = (PolygonObject* )GeneratePrimitive(bh->GetDocument(), Osphere, BaseContainer(), 1.0, FALSE, NULL);
      

      Which converts a BaseObject to a polygon Object.
      But I now just noticed that you used this differently:

      sphere = (BaseObject* )GeneratePrimitive(node->GetDocument(), Osphere, BaseContainer(), 1.0, FALSE, NULL);
      

      Which should be ok.
      But I'm not sure you actually need to have the (BaseObject* ) code in there.

      I've never created a primitive object with a C++ generator plugin. But I do have a python example of doing that. And it's created in the GetVirtualObjects() method.
      Based on how "return" is used the same way to generate an object in both the pyGenerator object. And the C++ GetVirtualObjects() method. My guess is that GetVirtualObjects() is where we are supposed to do it.
      But that's just a guess.

      -ScottA

      1 Reply Last reply Reply Quote 0
      • First post
        Last post