Announcement

Collapse
No announcement yet.

Python Scripting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Python Scripting

    Hello, I have a question about Python Scripting in general.
    First of all I would like to say that I studied Python but I am not a programmer by profession.

    I recently started looking into Python on Cascadeur in order to add custom commands to Cascadeur.
    I read the official documentation page on Python on Cascadeur, read some of the source for the standard commands that come with Cascadeur, and took a quick look at the API reference.
    But I did not find any significant guiding information.

    The standard commands were small and simple, but when I searched the documentation for the functions used there, all I could find were signatures.
    I could only guess what it actually did from the name of the function.
    Also, although the documentation only contains information related to the csc module, reading the code for the standard commands, it appears that there are other modules in use.
    I think I understand about half of what I need to know about the editor and viewer, but I am not sure what is implicit in the behavior and attribute names in the behavior viewer.
    This was critical because Python string types are case-sensitive.
    It took me a while to figure out the rules because the actual attribute names did not exactly match what was shown in the properties panel.

    I am also unsure of the intended use of the script.
    I was trying to create a command that would automatically convert the animation I created into an InPlace animation, or if I created half of a walking animation, it would flip the other half and automatically append it to the back.
    However, from reading the code for the standard commands, it seemed to me that the premise was not to directly generate and apply numerical values related to bones, but rather to take the ID of the data from one frame and use it for another frame.

    I have written at length, but my questions are

    1. are there any plans to include in the documentation the key functions provided by the editor and viewer, not just the signatures, but what operations they correspond to in the software?

    2. are there any plans to include rules for behavior and attribute names or a list of behavior and attribute names in the documentation?

    3.Is there any possibility of creating a tutorial like "Introduction to Python Scripting"?

    4.Will the Python Scripting feature continue to be developed?

    5.Is it possible to develop the command I am trying to create at this time?

    Sorry this is so long.

    Any answers would be greatly appreciated.

  • #2
    Hi Beginner_Forever

    we are really happy to see interest about python scripting in Cascadeur!
    1. The fact is that scripting in Cascadeur is pretty "low level". So it takes some time to get into it.
      And as Cascadeur is an app with an expected low-level entry barrier - we didn't invest much time into creating documentation for it.
      There are plans to do it, but covering all of the API will probably take a very long time.
      So our plan was to focus on providing small examples for the most popular use-cases.
    2. We might have misunderstood the question, but you probably mean that we should provide a rule to translate the name of the attribute from the property editor to the name used in python? If that is true - its pretty simple - property editor just removes "_" and starts names with a capital letter, so you'll have to reverse that
    3. Yeah, this would be the best.
      Our CTO Alexander touched this topic here in his video: https://www.youtube.com/watch?v=7NSLKIpTk_g
      Also, there is a thread on Discord, where he answers about scripts. He told me, he will be glad to help in the same manner in your case (offering you some editing of the script) https://discord.com/channels/5531666...51496736620604
    4. Yes, as it is extensively used in our own development (all the rig generation and the rig tool are written via python scripts)
    5. Yes, I think it's possible, it's actually pretty close to the script "Go to origin" from the commands menu.

    Comment


    • #3
      Hello.

      Since receiving your answer, I have watched several archives of Cascadeur streaming.
      That has helped me understand a lot more than before.
      I realized that because I had completely skimmed over Cascadeur's node editor, I was missing some important knowledge for Python scripting in Cascadeur.
      Had I looked at the node editor, I would not have asked questions like #2.

      I also read the "go to origin" code you gave me.
      I think I understand about 70% of it, but I don't think I understand the important parts.

      Sorry to ask the most rudimentary question, but what is this command supposed to do?
      The documentation page for the Cascadeur command does not explain this command.
      https://cascadeur.com/help/interface.../commands_menu

      I tried to use it with UE Mannequin root, but it didn't work, because there is no connection to the output "Actuality".

      I would also like to know how the "behaviour_viewer.get_behaviours" function and the "behaviour_viewer.get_behaviour_object_range" function used in the "get_all_rig_points" function work. I would like to know how they work.

      Finally, I would like to know the difference between "scene.modify" functions.
      There seem to be four types of "modify" functions.
      Is there a difference in something like update timing?

      Sorry for the length.

      Comment

      About us
      Cascadeur is a standalone software for creating physically correct keyframe animations for characters, humanoid and otherwise. Make realistic animations from scratch or improve your mocap, while retaining full control over the results.
      Join us
      Working...
      X