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

    Dialog versus Description

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 230 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 28/01/2013 at 11:51, xxxxxxxx wrote:

      Still wondering about the difference between dialogs en descriptions.

      I have a plugin tag with some UI.
      When I try to Enable a UI field I get the message:
      AttributeError: 'c4.Basecontainer' object has no attribute 'Enable'.

      I guess this is because I'm referring a description ('basecontainer') and not a dialog.
      For other sort of plugins this is no problem.

      Here some code:
      class ECHOS(plugins.TagData) :

      def Init(self, node) :

      tag = node
            data = tag.GetDataInstance()
            data.SetLong(ECHOSMODE, ECHOSMANUAL)

      data.Enable(ECHOSstartframe, False)      <== error

      Is there another way to enable / disable UI fields?

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

        On 28/01/2013 at 12:34, xxxxxxxx wrote:

        For a description, things are a bit different. You don't call a function like Enable() to specifically enable/disable an element. In a description you have to implement the virtual function GetDEnabling().

        For each element in the description which you want to have the facility to be enabled or disabled, you either return true to enable it, or false to disable it. Cinema calls this function and renders the element according to the returned value. There are certain to be examples in the python docs which show this working.

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