Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    ID_GV_DATA_TYPE_UNDEFINED

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 391 Views
    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 Offline
      Helper
      last edited by

      On 14/03/2013 at 06:31, xxxxxxxx wrote:

      hey,

      could someone please explain how ID_GV_DATA_TYPE_UNDEFINED is meant to be used ?
      i have created a data channel of undefinied type. but when i try to read this channel 
      the console returns TypeError: Unknown type of data channel: .

      i need to attach a basecontainer to a tp particle. the brute force solution would be to 
      attach a null object to each particle and store the data in this null object, but i would 
      prefer to use basecontainers.

      thanks for your help.

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

        On 14/03/2013 at 06:59, xxxxxxxx wrote:

        just for the record, c4d.DTYPE_SUBCONTAINER was the first thing i tried, tp does accept it, but
        reads it as ColorProfile.

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

          On 14/03/2013 at 10:36, xxxxxxxx wrote:

          Hi Ferdinand,

          I'm sorry, I don't get the context. Where are you using c4d.ID_GV_DATA_TYPE_UNDEFINED and
          c4d.DTYPE_SUBCONTAINER? Could you show an example?

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

            On 14/03/2013 at 10:58, xxxxxxxx wrote:

            sure:

            def createDataChannel(self) :
                  qlvl = False
                  ...
                  if not qlvl:
                        # c4d.DTYPE_SUBCONTAINER doesn't work as a dtype, tp reads it as the ColorProfile datatype.
                        qpos = tp.AddDataChannel(c4d.ID_GV_DATA_TYPE_UNDEFINED , "qlvl")
              
            def getStepData(self, pid, split) :
                  # both lines raise a runtime error as described
                  data  = tp.GetPData(pid, cid)
                  tp.SetPData (pid, cid, bc)
            

            i think ID_GV_DATA_TYPE_UNDEFINED is meant to be used with customdatatypes. but i 
            cannot believe, that it is impossible to insert a basecontainer into the data 
            channel of a particle.

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

              On 14/03/2013 at 11:20, xxxxxxxx wrote:

              Hi Ferdinand,

              I doubt this is possible. There is not BaseContainer datatype for channels, nor can we access
              C++ specific custom datatypes (we can not perform any casts in Python and also can not create
              wrapper classes, etc.)

              A possible workaround would be to use a dictionary associating particle-IDs with BaseContainers
              and removing items at an appropriate time if the particle does not exist anymore.

              Best,
              -Niklas

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