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

    Creating the TreeView root?

    SDK Help
    0
    4
    344
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 08/12/2007 at 16:15, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10.5 
      Platform:      
      Language(s) :     C++  ;

      ---------
      I've looked through all the examples and the light hasn't gone on - I'm having trouble figuring out the simplest way to create the list for my treeview (materials and channel textures).

      I thought I could use a GeListHead*, but I can't insert the textures because they're not GeListNodes.

      What's the best way to create the list?

      TIA for any help.

      - Rick -

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 12/12/2007 at 00:06, xxxxxxxx wrote:

        I haven't used a TreeView myself but from what I can see from the examples you need a list and an own TreeViewFunctions class. You have to re-define the virtual functions of your TreeViewFunctions class to make it work with your list. Then you pass the list and the TreeViewFunction to SetRoot().

        hope this helps a bit

        cheers,
        Matthias

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 12/12/2007 at 00:29, xxxxxxxx wrote:

          Well, you can get away with Cinema 4D defaults if the tree is based upon BaseList2D hierarchies (which include GeListNode and GeListHead). Otherwise you need to structure a 'root' class and a 'node' class for the TreeView to work with.

          With respect to materials and channel textures - no idea if this is possible by default. It all depends upon what you want to represent in the tree.

          The basic principle for 'custom' TreeView hierarchies is to create a root class and a node class. Then you need to create a TreeViewFunctions class and fill in the necessary virtual methods in accordance with the expected functionality.

          BaseMaterial is indeed based on BaseList2D so you should be able to construct an appropriate tree from it (it has roots in GeListNode). But it doesn't have an evident GeListHead as root. I would think that, similar to BaseObject, it would be the BaseDocument. The latest cinema4dsdk example (activeobject) makes it a bit more confusing. Most of my TreeViews require custom access to non-C4D structures so I don't completely understand the dance here.

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 13/12/2007 at 13:04, xxxxxxxx wrote:

            Thanks guys - that helped a bit. Finally I decided that the SDK examples are there for a reason, rolled up my sleeves and got what I needed out of them. I still think it's unnecessarily complex, but maybe that's the nature of the TreeView class.

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