0

MU Help Documents

Hi All,

 

Is there any documents available for mu programming in RV ?

 

Thanks

 

Kurian

4 comments

  • 0
    Avatar
    Jim Hourihan

    There are a few documents in 3.10 under the Help menu in RV including the reference manual which shows how to make a mode in a package. There is also an API browser you can start from there. It will show all the currently loaded code in RV (Help->Mu Command API Browser...)

       -Jim

  • 0
    Avatar
    Kurian O.S

    Grrrrrrrrrrrr ... sorry Jim I didnt see that :( ... and can just give quick help regarding mu .

    I want to send 5 argument to a mu file like

                                       width,height , comments , scene name, take id

    -overlay myTestmu 680 420 "comments from user" "sc_030_020_anim" 2

    can you tell me how to receive this args in mu please

  • 0
    Avatar
    Jim Hourihan

    If you look in $RV_HOME/plugins/Mu/frameburn.mu you can see an example overlay script. In this case it just draws the frame number on the frame. Each of these scripts has a "main" function which takes a number of arguments the last of which is "argv" of type [string] which means a list of strings. 

    The key line in frameburn.mu which gets the arguments is this one:

    let _ : op : grey : size : _  = argv

    it takes the list of arguments from

    -overlay frameburn 1.0 1.0 25.0

    and pulls out the parts of the list. In this case its using two "_" patterns which means "ignore it". So its ignoring the first item in the list, assigning the name "op" to the second, "grey" to the third and "size" to the fourth and ignoring the remainder of args if there are any. The reason it ignores the first list item is that it contains the name of the script which is not very interesting. The ":" notation is specific to lists in Mu. For example this:

    let [a, b, c] = [1, 2, 3]

    is equivalent to this:

    let a : b : c : _ = [1,2,3]

    The difference is that ":" means assign the head of the list to the left side and the rest of the list to the right. So the last item in a bunch of ":" is actually a list of all the remaining stuff in the list or nil if there isn't any. So if its easier to understand you could do this:

    let [scriptname, op, grey, size] = argv;

    instead as long as you never give your script more args (it will throw). So in your case it will either be:

    let _ : width : height : comments : scenename : takeid : _ = argv;

    or 

    let [_, width, height, comments, scenename, takeid] = argv;

    then you can render whatever it is you're after.

       -Jim

  • 0
    Avatar
    Kurian O.S

    thank you so much for a wonderful reply jim ..

Please sign in to leave a comment.