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

    Include same container multiple times in .res

    Cinema 4D SDK
    2024 python c++
    2
    2
    473
    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.
    • CJtheTigerC
      CJtheTiger
      last edited by

      Hello coders.

      I'd like to include the Oprimitiveaxis container multiple times in the .res file of my ObjectData plugin where the first inclusion should be called the same as the default Orientation while the second inclusion should be called something else like Alternative Orientation. To access both values in my plugin code they of course need separate IDs as well.

      For the first inlcusion I can simply do this in the .res file:

      CONTAINER omyobject
      {
      	NAME Omyobject;
      	INCLUDE Obase;
      
      	INCLUDE Oprimitiveaxis;
      }
      

      and access it via:

      orientation = op[c4d.PRIM_AXIS]
      

      What would I need to do to include this a second and possibly even more times? Is this even possible? In my head I'd have to define an alternative name and ID right with the INCLUDE statement. Or do I simply have copy and paste the CYCLE myself?

      Best regards,
      Daniel

      i_mazlovI 1 Reply Last reply Reply Quote 0
      • i_mazlovI
        i_mazlov @CJtheTiger
        last edited by

        Hi Daniel,

        You cannot include multiple containers and keep their IDs different. There's no special arguments for the INCLUDE statement that can optimize this workflow for you.

        In your case having your own implementation of CYCLE would be the solution you're looking for.

        Cheers,
        Ilia

        MAXON SDK Specialist
        developers.maxon.net

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