Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    1. Maxon Developers Forum
    2. Hugo BATTISTELLA
    H
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 20
    • Best 0
    • Controversial 0
    • Groups 0

    Hugo BATTISTELLA

    @Hugo BATTISTELLA

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

    Hugo BATTISTELLA Unfollow Follow

    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
      H
      Hugo BATTISTELLA
    • 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
      H
      Hugo BATTISTELLA
    • 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
      H
      Hugo BATTISTELLA
    • 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
      H
      Hugo BATTISTELLA
    • 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
      H
      Hugo BATTISTELLA
    • 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
      H
      Hugo BATTISTELLA
    • 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
      H
      Hugo BATTISTELLA
    • 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
      H
      Hugo BATTISTELLA
    • 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
      H
      Hugo BATTISTELLA
    • 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 python
      H
      Hugo BATTISTELLA