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
    • Register
    • Login

    In/Exclude List Accept/Refuse

    PYTHON Development
    0
    2
    486
    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

      On 04/05/2018 at 10:33, xxxxxxxx wrote:

      Hello.

      I'd like the In/Exclude lists on my object node plugin to only accept objects that cache to polygons.  I'm aware of the ACCEPT/REFUSE flags in the .res file but as far as I can tell the ids expected here are Object Types.

      I suppose one solution would be to build a list of accepted object types, but in that case my In/Exclude list would not accept objects defined in plugins.

      The last option I can think of would be to use a list of refused object types.  This would accept objects defined in plugins, but would also accept non-polygonal objects defined in plugins!

      Is there anyway to indicate to my In/Exclude list that I want to accept only objects that contain polygonal caches?

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 07/05/2018 at 06:05, xxxxxxxx wrote:

        Hi darby, thanks for writing us

        Actually the desired mechanism can be achieved by overriding the NodeData::SetDParameter() method in your ObjectData() class. There you can check if the objects which the user is attempting to include in your list are "allowed" and eventually proceed to create a new c4d.InExcludeData() based on this allowed object which will then be used for the in/exclude list.

        Hoping it helps, give best.
        Riccardo

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