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

    LayerObject/LayerData Setting Color

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 326 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 01/04/2008 at 18:58, xxxxxxxx wrote:

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

      ---------
      hi pros 😄

      i found this helpful thread aubout layers
      the last thing i need to know about layers now is how to set the layer color. i can't modify any layerdata. (how) can this be done?
      thank you guys.

      Yakuza

      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 02/04/2008 at 02:13, xxxxxxxx wrote:

        Setting the color is easy, just set the color component of the LayerData.

        Sets the color of the first layer to white:

        > \> Bool MenuTest::Execute(BaseDocument \*doc) \> { \>      GeListHead \*llist = doc->GetLayerObjectRoot(); \>      if(!llist) return FALSE; \> \>      LayerObject \*layer = (LayerObject\* )llist->GetFirst(); \>      if(layer) \>      { \>           LayerData ldata(\*layer->GetLayerData(doc, TRUE)); \>           ldata.color = Vector(1.0,1.0,1.0); \>           layer->SetLayerData(doc, ldata); \> \>           layer->Message(MSG_UPDATE); \>           EventAdd(); \>      } \> \>      return TRUE; \> } \>

        cheers,
        Matthias

        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 02/04/2008 at 05:22, xxxxxxxx wrote:

          ah, i see. i tried similar but from
          LayerData *ldata= layer->GetLayerData(doc, TRUE);
          i didn't get far...
          thanks again. 🙂

          Yakuza

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