Navigation

    • Register
    • Login
    • Search
    1. Home
    2. Hugo BATTISTELLA
    H

    Hugo BATTISTELLA

    @Hugo BATTISTELLA

    0
    Reputation
    20
    Posts
    12
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    Hugo BATTISTELLA Follow

    Best posts made by Hugo BATTISTELLA

    This user does not have any upvoted posts yet.

    Latest posts made by Hugo BATTISTELLA

    RE: Insert User Data Track in Python

    That works find ! Thank you so much

    posted in Cinema 4D SDK •
    RE: Insert User Data Track in Python

    Hello @Cairyn,
    thank you a lot for this answer. I try this quikly but now I have a better understanding of the Desclevels concept !

    posted in Cinema 4D SDK •
    RE: Insert User Data Track in Python

    This is what the code looks like now :

    import c4d
    from c4d import gui
    
    
    #Création d'une piste pour chaque donnée utilisateur
    def AddAnimationTrack(op):
    
        LED = c4d.CTrack(c4d.DescID(c4d.DescLevel(c4d.ID_USERDATA, c4d.DTYPE_SUBCONTAINER),
                        c4d.DescLevel(c4d.ID_USERDATA,3,c4d.DTYPE_LONG)))
        op.InsertTrackSorted(LED)
    
        return True
    # Main function
    def main():
        AddAnimationTrack(op)
    
    # Execute main()
    if __name__=='__main__':
        main()
    
    posted in Cinema 4D SDK •
    RE: Insert User Data Track in Python

    @cairyn said in Insert User Data Track in Python:

    c4d.DescID(c4d.DescLevel(c4d.ID_USERDATA, c4d.DTYPE_SUBCONTAINER),
    c4d.DescLevel(userdata_entry,c4d.DTYPE_LONG))

    Hello ! Thank you for replying !

    I've put your code but get a error :
    "Traceback (most recent call last):
    File "scriptmanager", line 19, in <module>
    File "scriptmanager", line 15, in main
    File "scriptmanager", line 9, in AddAnimationTrack
    NameError: global name 'userdata_entry' is not defined"

    Maybe I didn't get what I should do with "userdata_entry"

    posted in Cinema 4D SDK •
    Insert User Data Track in Python

    Hello,
    I would like to add track (timeline) for each user data I have set on a object .
    Here is the code I tried, but I don't know why it's not working

    Here is the code I wrote :

    import c4d
    from c4d import gui
    
    
    #Création d'une piste pour chaque donnée utilisateur
    def AddAnimationTrack(op):
            
        LED = c4d.CTrack(op,c4d.DescID(c4d.DescLevel(c4d.ID_USERDATA,1,c4d.DTYPE_GROUP),c4d.DescLevel(c4d.ID_USERDATA,2,c4d.DTYPE_GROUP),c4d.DescLevel(c4d.ID_USERDATA,3,c4d.DTYPE_REAL)))
        op.InsertTrackSorted(LED)
    
        return True
    # Main function
    def main():
        AddAnimationTrack(op)
    
    # Execute main()
    if __name__=='__main__':
        main()
    

    I work on R21.
    You can see the scene here : ADD_TRACK - 1.c4d

    Thank you for helping

    posted in Cinema 4D SDK •
    RE: Write a python code into a Python Effector

    @Cairyn Thank you for your help ! That's it. I confused it all with the wrong word. Sory... Your answers help me very nicely

    @ferdinand I apologize about going out of the guidelines. I understand this and will create new topic for that point

    posted in Cinema 4D SDK •
    RE: Write a python code into a Python Effector

    The multilines code works well.

    Do you mean that there is no possibility to select clones ID to affect them with the Python Effector ?

    posted in Cinema 4D SDK •
    RE: Write a python code into a Python Effector

    TEST_CLONERS_2.c4d

    @Cairyn thank you for answer

    I can now add a line of code but how Can I add multiples lignes of code in the effector. I got some difficulties to manage this.

    What I would like is to make a selection by ID of the cloner through the Python Effector.

    posted in Cinema 4D SDK •
    RE: Write a python code into a Python Effector

    In fact in this Effector I would like to create an id selection for the operator it will be linked to.

    So I can add this code into the effector

    posted in Cinema 4D SDK •
    Write a python code into a Python Effector

    Hello,
    I want to insert a code (not written yet) into a python effector I created through a Python script. I figured out how to open the Editor but not how to change the code inside.

    Can you help please ?
    (running on R21)

    import c4d
    from c4d import gui
    from c4d.modules import mograph as mo
    
    def PythonEffector():
        PythonEffector = c4d.BaseList2D(1025800)
        #PythonEffector(c4d.OEPYTHON_OPENEDITOR) >> CHANGE THAT CODE WITH SOMETHING ELSE
        doc.InsertObject(PythonEffector)
        c4d.EventAdd()
    
    # Main function
    def main():
        PythonEffector()
        
    
    
    # Execute main()
    if __name__=='__main__':
        main()
    
    posted in Cinema 4D SDK •