RayvisionAnalyse

进行CG分析的核心类,提供了一些的软件校验, 根据不同的CG软件自动调用相应的软件分析模块进行配置分析。

analyze.

Check the scene file and CG startup file, select the analysis script of CG software.

class rayvision_utils.analyse_handle.RayvisionAnalyse(task, exe_path=None)

基类:object

Analyze which CG process to follow.

analyse()

Analysis scene information in CG software.

analyse_cg_file()

Analyze CG software information for making scene files.

static cg_is_maya(cg_id, scene_info_data)

Execute when CG software is Maya.

Set the details of the frames that need to be rendered for each layer.

参数:
  • cg_id (str) -- CG software id.
  • scene_info_data (dict) --

    Analyzed scene information e.g.:

    {
    "defaultRenderLayer": {
    "renderable": "1", "is_default_camera": "1", "common": {
    "renderer": "mayaSoftware", "image_file_prefix": "", "start": "1", "end": "10", "by_frame": "1", "frames": "1-10[1]", "all_camera": [
    "perspShape"

    ], "render_camera": [

    "perspShape"

    ], "renumber_frames": "False", "width": "960", "height": "540", "image_format": "iff", "animation": "True"

    },
    "option": "", "env": {}

    } "layer1": {

    "renderable": "1", "is_default_camera": "1", "common": {
    "renderer": "mayaSoftware", "image_file_prefix": "", "start": "", "end": "", "by_frame": "", "frames": "", "all_camera": [
    "perspShape"

    ], "render_camera": [

    "perspShape"

    ], "renumber_frames": "False", "width": "960", "height": "540", "image_format": "iff", "animation": "True"

    },
    "option": "", "env": {}

    }

    }

返回:

Set the scene information of the frame details to be rendered for each layer.

返回类型:

dict

create_instance()

Create a startup analysis script object.

Check scene files and startup files of custom CG software, generate the object of the cmd command that builds the startup analysis script.

返回:
Construct the object of the cmd command that starts the
analysis script. e.g.:
Maya.
raises:RayvisionError -- The scene file does not exist. The file path of the startup CG software is incomplete or not a file.
返回类型:object
classmethod execute(task, exe_path=None)

Start analysis.

Create a cmd command to start the analysis script and Start the entire analysis process.

参数:
  • task (RayvisionTask) -- Task object.
  • exe_path (str, optional) -- Users can manually specify the exe path of the cg software. If there is any way to use this path directly, it will not be automatically found.
run()

Start the entire analysis process.