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
    • Recent
    • Tags
    • Users
    • Login

    correct init of InExcludeData

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 328 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 19/11/2013 at 03:39, xxxxxxxx wrote:

      i stock here on a basic thing

      what is the correct term to init a InExcludeData ?

      def Init(self, op) :
          	bc = op.GetDataInstance()
          	bc.SetInt32(c4d.CLASSES_INEX_ACTIVE, 0)
          	return True
      

      Thanks

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

        On 19/11/2013 at 06:35, xxxxxxxx wrote:

        Your question is a bit misleading (at least for me). You are asking how to initialize a 
        InExcludeData (instance), where the answer would be :

        InExcludeData.\__init\_\_([v])[](file:///E:/Misc/SDK%20Help/C4d%20SDK%20Documentation%20Python/help/modules/c4d/CustomDataType/InExcludeData/index.html#InExcludeData.__init__)
        _<_t_<__<_t_<__<_t_<__<_t_<__<_t_>_Parameters:| v  (InExcludeData[URL-REMOVED]) – Copy constructor.

        Return type: InExcludeData[URL-REMOVED]
        Returns: Notable is here IMHO that while v is optional, you are well advised to always pass

        existing data from the gui-element you are working on/for as a parameter, or strange 
        things might happen.

        Your posted code on the other hand suggests that you are looking for the correct way 
        to initialize a InExclude property / field for a NodeData instance. It is not mandatory to 
        use NodeData.InitAttr(), but especially for more complex data types it actually is in the
        end. There are some problems with InitAttr() (for example with the the FontData type,
        which is initialized as TimeDateData), but I have never had problems with InExcludeData.
        The code would be something like that :

        self.Initattr(op, c4d.InExcludeData, c4d.SOMEID)
        

        I am not sure why you are using that backwards way with the data instance. Is that 
        because of the newly introduced types with R15 ? I have not dealt with them yet, so 
        I cannot say anything about them, but I also do not see why these are a of 
        importance here, as they actually target numeric types.


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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

          On 19/11/2013 at 06:57, xxxxxxxx wrote:

          thanks !

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