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

    Object Properties?

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 340 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 03/10/2012 at 20:11, xxxxxxxx wrote:

      Hi Everyone,
       
      I am just starting with python within C4D and have made some progress, but I am confused about something.  With the SDK it seems that there are things missing such as properties of particular objects.  Take this code for example:
       
      ##########
       
      import c4d
      import random

      def main() :
        random.seed()
        MyMat = c4d.BaseMaterial(c4d.Mdanel)
        MyMat[c4d.SLA_DANEL_DIFFUSE_COLOR]=c4d.Vector(random.random(),
                                                      random.random(),
                                                      random.random())
        doc.InsertMaterial(MyMat)
        c4d.EventAdd()
       
      if __name__=='__main__':  
         main()

      ###########
       
      I found a tut on the net that led me in this direction and I am greatful for that, but nowhere in the SDK did I find any references to elements of an object (in this case properties of Mdanel like SLA_DANEL_DIFFUSE_COLOR)  What am I missing or better yet is there a way that I can find some documentation on details such as this?  Is there a python text file that shows these that I missed?
       
      TIA,
       
      Jeff

      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 04/10/2012 at 01:45, xxxxxxxx wrote:

        SLA_DANEL_DIFFUSE_COLOR is an object property identifier. In the SDK it's called a description parameter ID in an object data: they're defined in .res files. The description of an object is just its set of parameters and a .res contains it for each object type.
        These identifiers aren't documented (you can find them in CINEMA .res file) but to find them easily you can drag a property to the Python console edit text (see "Descriptions in CINEMA 4D" page in the docs).

        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 04/10/2012 at 08:54, xxxxxxxx wrote:

          Ah, that's right about the drag and drop method.  Which res files should I be concerned about and how do they relate to the import command like cd4, gui, and utils?   Sorry, I am just trying to connect the dots.
           
          Jeff

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