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

    InExcludeData.InsertObject(...) still not working?

    PYTHON Development
    0
    5
    970
    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/03/2011 at 05:52, xxxxxxxx wrote:

      Hi,

      it may be true that InExcludeData.InsertObject( pObject , lFlags ) is still not working in python?
      Because it did nothing when i used this function.
      It there a trick i have to use to get this working?

      Thanks for any advices.

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

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

        On 09/03/2011 at 06:15, xxxxxxxx wrote:

        I already used it. Take a look at this script here:

        http://forums.cgsociety.org/showpost.php?p=6886222&postcount=5

        Cheers, nux

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

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

          On 09/03/2011 at 06:46, xxxxxxxx wrote:

          My fault. Now, it works.

          I thought this should be working, because my userdata is an InExcludeData.
          op[c4d.ID_USERDATA,3].InsertObject(obj,0)

          but that is a right way:
          _
          objList = c4d.InExcludeData()
          objList.InsertObject(obj,0)
          op[c4d.ID_USERDATA,3] = objList_

          Thank you very much, nux! 🙂

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

            On 20/08/2017 at 02:58, xxxxxxxx wrote:

            this is odd, not?

            this is not working:
            op[c4d.ID_USERDATA,3].InsertObject(obj,0)

            but this is working:
            objList = c4d.InExcludeData()
            objList.InsertObject(obj,0)
            op[c4d.ID_USERDATA,3] = objList

            in my opinion op[c4d.ID_USERDATA,3] is already a c4d.InExcludeData()
            so op[c4d.ID_USERDATA,3].InsertObject(obj,0) should work, not?
            what is wrong here?

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

              On 21/08/2017 at 03:24, xxxxxxxx wrote:

              Hi,

              The [] operator returns a copy of the InExcludeData user data. So you have to retrieve it and set it back after modification.
              Instead of creating a new InExcludeData you can do:

              objList = op[c4d.ID_USERDATA, 3]
              objList.InsertObject(obj, 0) 
              op[c4d.ID_USERDATA, 3] = objList
              
              1 Reply Last reply Reply Quote 0
              • First post
                Last post