Documentation on some key RV python functions

Hi Fabian!

A resource that has proven invaluable for learning and discovering the underlying API of RV has been the Mu Command API Browser available in the help menu. For example any functions in rv.commands that you have questions about can be searched for by name and their signature & documentation returned.

As for you questions:

The second and third argument to the getter functions are start and num, respectively. They act similarly to slicing a python list returning a subset of values from the property’s value-list.

Yes, property getters always return a value of type list.

Yes, property setters always require a value of type list.

The third parameter of a setter function is a bool controlling whether the property can resize when set with a value-list of different length than currently set. (The “width” of the value-list is set when a new property is created with commands.newProperty.)

You’ve got them all! For prosperity, here are the signature for the string property getter and setter:

setStringProperty (void; 
                   string propertyName,
                   string[] value,
                   bool allowResize = false)

getStringProperty (string[]; 
                   string propertyName,
                   int start = 0,
                   int num = 2147483647)

Unfortunately there are few online resources for learning about the Python API. The best resources I’ve found so far are the Mu Command API Browser in RV’s help menu and the source of the native plugins supplied with RV.

Let me know if you have any other questions, cheers!

5 Likes