ExternalWeb Package for RV

ExternalWeb Package - RV Developer Example Series


In this example, we expose how to use external events to load a web page from within RV. This could be useful if you write a web-based RV integration into one of your studio’s web pages inside of RV, or use just the external event processing to pass custom information into your package from the commandline or rvlink.

About this series:

Over the years, I’ve made a number of packages for myself, developers looking get get around a roadblock, or to just reproduce/validate a bug.

While the packages in this series aren’t intended to be fully finished forms of art, they all have some sort of value that I’d like to pass along. You will likely find problems, bugs, and/or things that could be optimized, but the purpose here is to share formulas and recipes to help expose what you can do with RV. I hope this series proves valuable, and I encourage you to share your own packages (assuming you have permission to share them to the public).

If you are new to writing RV packages, also check this out: How do I write my first package in RV?

What does this package do?

This package demonstrates how you can send, and handle, external events in RV. Functionally, the package as-is will simply load the web page you specify. You can use the package as such:

Windows

rv.exe -sendEvent open-web http://example.com

Linux

./rv -sendEvent open-web http://example.com

MacOS

/Applications/RV.app/Contents/MacOS/RV -sendEvent open-web http://example.com

What can we learn from this package?

In this package, you should be able to have the following takeaways:

  • How to handle external events from your regular event handling
  • How to embed dockable PySide2 widgets into the main application.

The Package

To install this package, go to RV>Preferences>Packages , then click the Add Package... button. Open the package file, choose your install location, and then make sure both check boxes are checked on the package in the list.
ExternalWeb-1.0.rvpkg (997 Bytes)

For help on installing packages, check out the package installation portion of the user manual, here

6 Likes