Added: 2 years ago
From: ctstealth
Views: 6,960
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (10)

Sign In or Sign Up now to post a comment!
  • hi there, I'm currently working on a project in which I'm animating a clock work shop, I already have all the clocks working I used the expression editor for this, but now I need to make a controller or an attribute in which it can let me Start or Stop the clock animation whenever I want.

    Any ideas?

  • @MrNahun88 This type of code is largely dependent upon the name of your clock hands and groups.

    Essentially you want to have an IF statement that says, IF attribute set == 1, then rotate clock hand/group == timeSlider query command.

    If you have some offsets, you can add a (+ *offset number here*) to the end.

  • great tutorial, thanks! Do you know of a good list of some of the basic mel expressions with examples showing how they can be used? I know they are all listed in the maya help document, but that can be a bit overwhelming to a rookie like me. Thanks again! :)

  • @cgstudent1

    Unfortunately, all I use is the Maya Help. But what I would recommend is actually learning the different types so you can understand the commands. For example, by every command there is a C Q E or M. To use them, they each are slightly different.

    C is Create. It's the most straight forward. When you write a command, you generally create it.

    Q is Query. This can only be done when the object is created. Gets info

    E is Edit. This can only be done when the object is created. Edits.

  • M isn't used very often unless you do some more advanced stuff. But allows the passing of multiple arguments.

    Most of the examples in the Maya help are Creation based and not Query or Edit based. I do wish to create some mild scripting tutorials in the future demonstrating how to read the code.

  • @cgstudent1

    So yeah.... I had some free time and made two videos to help you. Youtube comments disallow links, but check out my channel page and find "How to code in PyMel(Python) for Beginners (Part 1)" or do a search.

    Hope that helps!

  • Very useful, thank you!

  • Thank you so much this is just the thing I needed. You explained so it was very easy to understand using the mx+b format. Keep up the good work. Again thanks

  • thank you very much

  • thanks

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more