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

    Tiny Bug in Documentation for "NodeData.InitAttr"

    Bugs
    0
    2
    926
    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 09/11/2017 at 23:59, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   19 
      Platform:   Windows  ;  Mac  ;  Mac OSX  ; 
      Language(s) :       PYTHON  ;

      ---------

      https://developers.maxon.net/docs/py/2023_2/modules/c4d.plugins/BaseData/NodeData/index.html#NodeData.InitAttr

          
          
          import c4d
          
          def Init(self, node) :
            self.InitAttr(op, float, [c4d.PY_TUBEOBJECT_RAD])
            self.InitAttr(op, float, [c4d.PY_TUBEOBJECT_IRADX])
          
            node[c4d.PY_TUBEOBJECT_RAD]= 200.0
            node[c4d.PY_TUBEOBJECT_IRADX] = 50.0
      

      Looks like a variable name mix up: node vs. op

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

        On 10/11/2017 at 02:26, xxxxxxxx wrote:

        Hi,

        Thanks for reporting this issue in NodeData.InitAttr() code snippet. It will be fixed.

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