Object Properties?



  • 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



  • 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).



  • 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


Log in to reply