0

Running RVIO from Python script

I wonder if there would be a way to run RVIO commands via Python.

Can I just import rvio or rv modules into my Python scripts and start using all the beauty of RV within Python?

The idea is to use RV or RVIO within one Python script environemnt. So my Python script would look something like this (as an example).

##################################

 

#!/usr/bin/python2.6.5

import sys

import os

from all_rv_commands import RV_commands

 

path_to_image_sequence = 'C:\TEMP\my_image_sequence\rendered_frames.#.tga'

path_to_converted_jpg_sequence: = 'C:\TEMP\my_image_sequence\rendered_frames.#.jpg'

 

RV_commands.make_me_JPG_sequence_command ('path_to_image_sequence ', 'path_to_converted_jpg_sequence')

print "The JPGs sequence has been created"

 

##################################

 

 

 

 

1 条评论

  • 0
    Avatar
    Seth Rosenthal

    Hello Pasha,

    Thanks for the question. We have not created python modules that work the way you suggest. Our focus with Python so far has been enabling scripting of RV so users can modify the application itself.

    However, I think it would be fairly easy for you to do what you want by making a system call from python to execute the RVIO command. You can just build up the rvio command line you need as a string and then use one of Python's many methods for executing a separate process on the system.

    Would that work for you?

    Cheers,

    Seth

请先登录再写评论。