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

    apend a layer to an Object

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 193 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

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

      On 21/04/2009 at 23:30, xxxxxxxx wrote:

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

      ---------
      Hi all,
      I want to apend a Layer(out of a list of several Layers)  to all objects.
      I looked at the SDK but I only found
      SetLayerObject(_<_a title="class layerobject : public baselist2d" href= "mk:@msitstore:c:\maxon\cinema%204d%20r11%20development\plugins\c4dr11sdkchm20090324.chm::/pages/c4d_basedocument/class_layerobject752.html"_>_ LayerObject* layer)
      Is this the correct on?

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

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

        On 22/04/2009 at 01:51, xxxxxxxx wrote:

        Yes SetLayerObject() is the correct method. Here a little example that assigns the first layer to all objects.

        > \> void StepThruHierarchy(BaseObject \*obj, LayerObject \*layer) \> { \>      while (obj && layer) \>      { \>           obj->SetLayerObject(layer); \> \>           obj->Message(MSG_UPDATE); \> \>           StepThruHierarchy(obj->GetDown(), layer); \>           obj = obj->GetNext(); \>      } \> } \> \> Bool MenuTest::Execute(BaseDocument \*doc) \> { \>      StopAllThreads(); \> \>      GeListHead \*layerlist = NULL; \>      layerlist = doc->GetLayerObjectRoot(); \>      if (!layerlist) return FALSE; \> \>      StepThruHierarchy(doc->GetFirstObject(), (LayerObject\* )layerlist->GetFirst()); \> \>      EventAdd(); \>            \>      return TRUE; \> } \>

        cheers,
        Matthias

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