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

    SetPData(), GetPData() TypeError

    Scheduled Pinned Locked Moved Bugs
    6 Posts 0 Posters 1.1k 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 11/05/2015 at 02:31, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R16 
      Platform:     Mac  ;  
      Language(s) :

      ---------
      Using c4d.modules.thinkingparticles.TP_MasterSystem.SetPData() or ~.GetPData() throws a TypeError
      here when I try it on a Boolean data channel. It seems to work fine for Integers though.

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

        On 11/05/2015 at 02:35, xxxxxxxx wrote:

        Traceback (most recent call last) :
          File "'ParticlesToMesh'", line 108, in main
        TypeError: The data channel is not accessible: '174'.
        
        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 11/05/2015 at 02:36, xxxxxxxx wrote:

          Hm, I always get 0 for an Integer channel but I set it to TRUE from XPresso.

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

            On 11/05/2015 at 09:16, xxxxxxxx wrote:

            Hello,

            could you please provide us with the code that is necessary to reproduce the described behavior?

            Best wishes,
            Sebastian

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

              On 11/05/2015 at 11:42, xxxxxxxx wrote:

              import c4d
                
              def main() :
                  tp = doc.GetParticleSystem()
                  pid = tp.AllocParticle()
                  last_channel = tp.NumDataChannels() - 1
                  if last_channel < 0:
                      print "Please create a Data Channel."
                      return
                  print "1)", tp.GetPData(pid, last_channel)
                  print "2)", tp.SetPData(pid, last_channel, True)
                  print "3)", tp.GetPData(pid, last_channel)
                
              main()
              

              Create a Boole channel before you run the script.

              Best,
              Niklsa

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

                On 15/05/2015 at 08:36, xxxxxxxx wrote:

                Hello,

                it has been confirmed that this is a bug. A bug report was filed, thanks for reporting this.

                Best wishes,
                Sebastian

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