Export_3ds: Improved distance cue node search
[blender-addons.git] / hydra_storm / engine.py
blobd1d798308ee9d564a35cb436be102fb00036e9b7
1 # SPDX-FileCopyrightText: 2011-2022 Blender Foundation
3 # SPDX-License-Identifier: Apache-2.0
5 import bpy
8 class StormHydraRenderEngine(bpy.types.HydraRenderEngine):
9 bl_idname = 'HYDRA_STORM'
10 bl_label = "Hydra Storm"
11 bl_info = "USD's high performance rasterizing renderer"
13 bl_use_preview = True
14 bl_use_gpu_context = True
15 bl_use_materialx = True
17 bl_delegate_id = 'HdStormRendererPlugin'
19 def get_render_settings(self, engine_type):
20 settings = bpy.context.scene.hydra_storm.viewport if engine_type == 'VIEWPORT' else \
21 bpy.context.scene.hydra_storm.final
22 result = {
23 'enableTinyPrimCulling': settings.use_tiny_prim_culling,
24 'maxLights': settings.max_lights,
25 'volumeRaymarchingStepSize': settings.volume_raymarching_step_size,
26 'volumeRaymarchingStepSizeLighting': settings.volume_raymarching_step_size_lighting,
27 'volumeMaxTextureMemoryPerField': settings.volume_max_texture_memory_per_field,
30 if engine_type != 'VIEWPORT':
31 result |= {
32 'aovToken:Combined': "color",
33 'aovToken:Depth': "depth",
36 return result
38 def update_render_passes(self, scene, render_layer):
39 if render_layer.use_pass_combined:
40 self.register_pass(scene, render_layer, 'Combined', 4, 'RGBA', 'COLOR')
41 if render_layer.use_pass_z:
42 self.register_pass(scene, render_layer, 'Depth', 1, 'Z', 'VALUE')
45 register, unregister = bpy.utils.register_classes_factory((
46 StormHydraRenderEngine,