Navigation

    • Register
    • Login
        No matches found
    • Search
    1. Home
    2. bureaudesprojets
    B

    bureaudesprojets

    @bureaudesprojets

    0
    Reputation
    2
    Posts
    1
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    bureaudesprojets Follow

    Best posts made by bureaudesprojets

    This user hasn't posted anything yet.

    Latest posts made by bureaudesprojets

    RE: Python Generator and texte

    Hello,

    Thanks a lot for your help !

    posted in Cinema 4D SDK •
    Python Generator and texte

    Hello there,

    for the plugin i'm working on, I need to generate an aeronautical numerotations. Meaning it goes like A, B , C... Z, AA, AB , AC
    Capture d’écran 2022-01-14 à 11.19.56.png
    I made a code wich I fill with the number of letters I want and the distance I want between each letters.

    import c4d
    
    
    
    def main():
    
        number= op [c4d.ID_USERDATA,3]
        distance = op [c4d.ID_USERDATA,4]
        alphabet=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"] ;
    
        for x in range( number):
    
            if ((x//26)-1==-1) :
                null = c4d.BaseObject ( c4d.Onull)
                texte = c4d.BaseObject(1019268)
                texte[c4d.PRIM_TEXT_TEXT]= alphabet [x]
                print (alphabet [x])
                texte.InsertUnder ( null)
            else :
                null = c4d.BaseObject ( c4d.Onull)
                texte = c4d.BaseObject(1019268)
                texte[c4d.PRIM_TEXT_TEXT]= alphabet [(x//26 - 1)]; alphabet [x%26]
                print (alphabet [x//26 - 1], alphabet [x%26])
                texte.InsertUnder ( null)
        texte[c4d.ID_BASEOBJECT_REL_POSITION,c4d.VECTOR_Z] = x* distance
    
    
    
        return null
    

    This is the result of my programs. I have the right letters but it display only the letters corrrespodings to the number not all letter before. Like in the picture above.

    Capture d’écran 2022-01-14 à 11.29.41.png

    I hope my issue is clear

    Thanks a lot

    Nadja

    posted in Cinema 4D SDK •