├── .DS_Store ├── rfb_icons ├── rman_bake.png ├── rman_help.png ├── rman_info.png ├── rman_it.png ├── out_LamaAdd.png ├── out_LamaMix.png ├── out_LamaSSS.png ├── out_PxrBump.png ├── out_PxrDirt.png ├── out_PxrDot.png ├── out_PxrGrid.png ├── out_PxrHSL.png ├── out_PxrMix.png ├── out_PxrOSL.png ├── out_PxrRamp.png ├── out_PxrTee.png ├── out_PxrVary.png ├── rman_batch.png ├── rman_beaker.png ├── rman_graph.png ├── rman_ipr_on.png ├── rman_render.png ├── rman_subdiv.png ├── rman_vp_viz.png ├── out_LamaLayer.png ├── out_LamaSheen.png ├── out_LamaStack.png ├── out_PxrBlack.png ├── out_PxrBlend.png ├── out_PxrChecker.png ├── out_PxrClamp.png ├── out_PxrCross.png ├── out_PxrDiffuse.png ├── out_PxrDisney.png ├── out_PxrFlakes.png ├── out_PxrFractal.png ├── out_PxrGamma.png ├── out_PxrInvert.png ├── out_PxrLayer.png ├── out_PxrMatteID.png ├── out_PxrPrimvar.png ├── out_PxrRemap.png ├── out_PxrSeExpr.png ├── out_PxrSurface.png ├── out_PxrSwitch.png ├── out_PxrTexture.png ├── out_PxrToFloat.png ├── out_PxrUnified.png ├── out_PxrVolume.png ├── out_PxrWorley.png ├── out_d_openexr.png ├── rman_alembic.png ├── rman_arealight.png ├── rman_blender.png ├── rman_holdOut.png ├── rman_material.png ├── rman_openvdb.png ├── rman_refresh.png ├── rman_rib_small.png ├── rman_solo_off.png ├── rman_solo_on.png ├── rman_txmanager.png ├── rman_vp_aovs.png ├── rman_vp_crop.png ├── help_stylized_1.png ├── out_LamaDiffuse.png ├── out_LamaEmission.png ├── out_LamaSurface.png ├── out_PxrAovLight.png ├── out_PxrAttribute.png ├── out_PxrBlackBody.png ├── out_PxrBumpMixer.png ├── out_PxrConstant.png ├── out_PxrCurvature.png ├── out_PxrDiskLight.png ├── out_PxrDisplace.png ├── out_PxrDomeLight.png ├── out_PxrEnvGround.png ├── out_PxrExposure.png ├── out_PxrHairColor.png ├── out_PxrMeshLight.png ├── out_PxrNormalMap.png ├── out_PxrProjector.png ├── out_PxrPtexture.png ├── out_PxrRectLight.png ├── out_PxrRoundCube.png ├── out_PxrSetRange.png ├── out_PxrSplineMap.png ├── out_PxrThinFilm.png ├── out_PxrThreshold.png ├── out_PxrToFloat3.png ├── out_PxrVariable.png ├── out_PxrVoronoise.png ├── out_PxrWireframe.png ├── out_rmanDisplay.png ├── rman_ipr_cancel.png ├── rman_licenseapp.png ├── rman_lightfilter.png ├── rman_loadplugin.png ├── rman_localqueue.png ├── rman_preview_fur.png ├── rman_preview_std.png ├── rman_vp_snapshot.png ├── out_LamaConductor.png ├── out_LamaDielectric.png ├── out_LamaHairChiang.png ├── out_LamaIridescence.png ├── out_LamaTranslucent.png ├── out_LamaTricolorSSS.png ├── out_PxrAdjustNormal.png ├── out_PxrArithmetic.png ├── out_PxrBakeTexture.png ├── out_PxrColorCorrect.png ├── out_PxrColorGrade.png ├── out_PxrColorSpace.png ├── out_PxrDisneyBsdf.png ├── out_PxrDistantLight.png ├── out_PxrEnvDayLight.png ├── out_PxrFacingRatio.png ├── out_PxrLayerMixer.png ├── out_PxrLayerSurface.png ├── out_PxrLayeredBlend.png ├── out_PxrManifold2D.png ├── out_PxrManifold3D.png ├── out_PxrMultiTexture.png ├── out_PxrPathTracer.png ├── out_PxrPhasorNoise.png ├── out_PxrPortalLight.png ├── out_PxrShadedSide.png ├── out_PxrSphereLight.png ├── out_PxrStylizedToon.png ├── out_PxrTangentField.png ├── out_PxrTileManifold.png ├── rman_CreateArchive.png ├── rman_batch_cancel.png ├── rman_blender_grey.png ├── rman_lightning_grey.png ├── rman_open_last_rib.png ├── rman_package_scene.png ├── rman_presetbrowser.png ├── rman_preview_none.png ├── rman_vol_aggregates.png ├── rman_vp_resolution.png ├── out_PxrBakePointCloud.png ├── out_PxrBumpManifold2D.png ├── out_PxrBumpRoughness.png ├── out_PxrCylinderLight.png ├── out_PxrDispTransform.png ├── out_PxrGeometricAOVs.png ├── out_PxrLayeredTexture.png ├── out_PxrLightEmission.png ├── out_PxrMarschnerHair.png ├── out_PxrRadialDensity.png ├── out_PxrRodLightFilter.png ├── out_PxrStylizedCanvas.png ├── out_PxrStylizedLines.png ├── rman_connection_menu.png ├── out_PxrBarnLightFilter.png ├── out_PxrCookieLightFilter.png ├── out_PxrDispScalarLayer.png ├── out_PxrDispVectorLayer.png ├── out_PxrGoboLightFilter.png ├── out_PxrHexTileManifold.png ├── out_PxrMetallicWorkflow.png ├── out_PxrProjectionLayer.png ├── out_PxrProjectionStack.png ├── out_PxrRampLightFilter.png ├── out_PxrStylizedCanvasXPU.png ├── out_PxrStylizedControl.png ├── out_PxrStylizedHatching.png ├── out_PxrStylizedLinesXPU.png ├── out_PxrStylizedToonXPU.png ├── out_aaOceanPrmanShader.png ├── out_rmanDisplayChannel.png ├── out_LamaGeneralizedSchlick.png ├── out_PxrBlockerLightFilter.png ├── out_PxrIntMultLightFilter.png ├── out_PxrCheatShadowLightFilter.png ├── out_PxrRandomTextureManifold.png ├── out_PxrBlenderPrincipledInputs.png ├── out_PxrStylizedPainterlyToonXPU.png ├── out_PxrStylizedHatchingSampleXPU.png ├── out_PxrStylizedPainterlyBrushXPU.png └── out_PxrStylizedPainterlyBrushControl.png ├── .gitignore ├── rfb_utils ├── __init__.py ├── color_utils.py ├── print_utils.py ├── timer_utils.py ├── register_utils.py ├── prefs_utils.py ├── color_manager_blender.py ├── json_file.py ├── collection_utils.py ├── camera_utils.py ├── transform_utils.py ├── operator_utils.py └── particles_utils.py ├── shaders ├── passthrough.osl ├── passthrough.oso ├── node_rgb_curves.osl └── node_fresnel.osl ├── docs └── images │ └── onward_walking_teapot_rfb.jpeg ├── display_driver └── README.md ├── rman_sg_nodes ├── rman_sg_nurbs.py ├── rman_sg_dra.py ├── rman_sg_volume.py ├── rman_sg_alembic.py ├── rman_sg_brickmap.py ├── rman_sg_openvdb.py ├── rman_sg_runprogram.py ├── rman_sg_hair.py ├── rman_sg_haircurves.py ├── rman_sg_blobby.py ├── rman_sg_gp.py ├── rman_sg_group.py ├── rman_sg_procedural.py ├── rman_sg_points.py ├── rman_sg_pointcloud.py ├── rman_sg_curve.py ├── rman_sg_light.py ├── rman_sg_fluid.py ├── rman_sg_quadric.py ├── rman_sg_emitter.py ├── rman_sg_particles.py ├── rman_sg_lightfilter.py ├── rman_sg_material.py └── rman_sg_mesh.py ├── envkeys ├── LocalQueue.linux.envkeys ├── LocalQueue.macosx.envkeys └── LocalQueue.windows.envkeys ├── rman_text_templates ├── Shader_Overrides │ └── PxrEnvDayLight_json.json ├── Rfb_EnvVars │ └── rfb_envvars.json ├── Render_Overrides │ ├── change_motion_blur_json.json │ ├── add_user_options_json.json │ ├── ipr_sampling_overrides_json.json │ └── sampling_overrides_json.json ├── Object_Overrides │ ├── add_instance_attribute_json.json │ └── add_primvar_json.json ├── RfB_Config │ └── rfb_json.json ├── Display_Channels │ └── rman_dspychan_definitions_json.json └── Workspace │ └── filepaths_json.json ├── rman_config └── config │ ├── overrides │ ├── rman_properties_PxrStylizedControl.json │ ├── rman_properties_d_openexr.json │ ├── rman_properties_PxrGoboLightFilter.json │ ├── rman_properties_PxrCookieLightFilter.json │ ├── rman_properties_PxrHairColor.json │ ├── rman_properties_PxrStylizedLines.json │ ├── rman_properties_PxrStylizedToon.json │ ├── rman_properties_PxrDisney.json │ ├── rman_properties_PxrMatteID.json │ ├── rman_properties_PxrDisneyBsdf.json │ ├── rman_properties_LamaSurface.json │ ├── rman_properties_PxrCryptomatte.json │ ├── rman_properties_PxrStylizedHatching.json │ ├── rman_properties_PxrDirt.json │ ├── rman_properties_PxrCurvature.json │ ├── rman_properties_PxrProjector.json │ ├── rman_properties_PxrMarschnerHair.json │ ├── rman_properties_PxrCheatShadowLightFilter.json │ ├── rman_properties_PxrPerspective.json │ ├── rman_properties_PxrStylizedPainterlyBrushXPU.json │ ├── rman_properties_PxrVolume.json │ ├── rman_properties_PxrRamp.json │ ├── rman_properties_PxrLayerSurface.json │ ├── rman_properties_PxrRectLight.json │ ├── rman_properties_PxrDiskLight.json │ ├── rman_properties_PxrDomeLight.json │ ├── rman_properties_PxrEnvDayLight.json │ ├── rman_properties_PxrMeshLight.json │ ├── rman_properties_PxrSphereLight.json │ ├── rman_properties_PxrDistantLight.json │ ├── rman_properties_PxrPortalLight.json │ ├── rman_properties_PxrCylinderLight.json │ ├── rman_properties_PxrCamera.json │ ├── rman_properties_PxrSurface.json │ └── rman_properties_PxrPathTracer.json │ ├── rman_properties_material.json │ ├── schemas │ ├── rfbEnvVarsSchema.json │ └── rfbDspyChansSchema.json │ ├── rman_properties_aov.json │ └── rman_properties_volume.json ├── Args └── PxrOSL.args ├── README.md ├── rman_properties ├── rman_properties_world │ └── __init__.py ├── rman_properties_material │ └── __init__.py ├── rman_properties_curve │ └── __init__.py ├── rman_properties_volume │ └── __init__.py ├── __init__.py ├── rman_properties_camera │ └── __init__.py └── rman_properties_mesh │ └── __init__.py ├── rman_ui ├── rman_ui_output_panels.py ├── rman_ui_volume_panels.py ├── rman_ui_scene_panels.py ├── rman_ui_texteditor.py ├── rman_ui_blender_panels.py ├── __init__.py ├── rman_ui_curve_panels.py ├── rman_ui_camera_panels.py └── rman_ui_mesh_panels.py ├── rfb_unittests ├── __init__.py ├── test_geo.py └── test_shader_nodes.py ├── rman_operators ├── rman_operators_editors │ └── __init__.py ├── __init__.py ├── rman_operators_printer.py └── rman_operators_mesh.py ├── LICENSE.txt ├── rman_translators ├── rman_group_translator.py ├── rman_empty_translator.py ├── rman_procedural_translator.py ├── rman_brickmap_translator.py ├── rman_runprogram_translator.py ├── rman_dra_translator.py ├── rman_volume_translator.py ├── rman_alembic_translator.py └── rman_points_translator.py ├── rman_presets ├── __init__.py └── icons.py ├── installation.txt ├── rman_handlers └── rman_it_handlers.py ├── rfb_translations └── __init__.py └── __init__.py /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/.DS_Store -------------------------------------------------------------------------------- /rfb_icons/rman_bake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_bake.png -------------------------------------------------------------------------------- /rfb_icons/rman_help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_help.png -------------------------------------------------------------------------------- /rfb_icons/rman_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_info.png -------------------------------------------------------------------------------- /rfb_icons/rman_it.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_it.png -------------------------------------------------------------------------------- /rfb_icons/out_LamaAdd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaAdd.png -------------------------------------------------------------------------------- /rfb_icons/out_LamaMix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaMix.png -------------------------------------------------------------------------------- /rfb_icons/out_LamaSSS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaSSS.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrBump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrBump.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrDirt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrDirt.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrDot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrDot.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrGrid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrGrid.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrHSL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrHSL.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrMix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrMix.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrOSL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrOSL.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrRamp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrRamp.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrTee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrTee.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrVary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrVary.png -------------------------------------------------------------------------------- /rfb_icons/rman_batch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_batch.png -------------------------------------------------------------------------------- /rfb_icons/rman_beaker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_beaker.png -------------------------------------------------------------------------------- /rfb_icons/rman_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_graph.png -------------------------------------------------------------------------------- /rfb_icons/rman_ipr_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_ipr_on.png -------------------------------------------------------------------------------- /rfb_icons/rman_render.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_render.png -------------------------------------------------------------------------------- /rfb_icons/rman_subdiv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_subdiv.png -------------------------------------------------------------------------------- /rfb_icons/rman_vp_viz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_vp_viz.png -------------------------------------------------------------------------------- /rfb_icons/out_LamaLayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaLayer.png -------------------------------------------------------------------------------- /rfb_icons/out_LamaSheen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaSheen.png -------------------------------------------------------------------------------- /rfb_icons/out_LamaStack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaStack.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrBlack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrBlack.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrBlend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrBlend.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrChecker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrChecker.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrClamp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrClamp.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrCross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrCross.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrDiffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrDiffuse.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrDisney.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrDisney.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrFlakes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrFlakes.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrFractal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrFractal.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrGamma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrGamma.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrInvert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrInvert.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrLayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrLayer.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrMatteID.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrMatteID.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrPrimvar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrPrimvar.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrRemap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrRemap.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrSeExpr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrSeExpr.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrSurface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrSurface.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrSwitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrSwitch.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrTexture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrTexture.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrToFloat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrToFloat.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrUnified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrUnified.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrVolume.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrVolume.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrWorley.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrWorley.png -------------------------------------------------------------------------------- /rfb_icons/out_d_openexr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_d_openexr.png -------------------------------------------------------------------------------- /rfb_icons/rman_alembic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_alembic.png -------------------------------------------------------------------------------- /rfb_icons/rman_arealight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_arealight.png -------------------------------------------------------------------------------- /rfb_icons/rman_blender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_blender.png -------------------------------------------------------------------------------- /rfb_icons/rman_holdOut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_holdOut.png -------------------------------------------------------------------------------- /rfb_icons/rman_material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_material.png -------------------------------------------------------------------------------- /rfb_icons/rman_openvdb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_openvdb.png -------------------------------------------------------------------------------- /rfb_icons/rman_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_refresh.png -------------------------------------------------------------------------------- /rfb_icons/rman_rib_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_rib_small.png -------------------------------------------------------------------------------- /rfb_icons/rman_solo_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_solo_off.png -------------------------------------------------------------------------------- /rfb_icons/rman_solo_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_solo_on.png -------------------------------------------------------------------------------- /rfb_icons/rman_txmanager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_txmanager.png -------------------------------------------------------------------------------- /rfb_icons/rman_vp_aovs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_vp_aovs.png -------------------------------------------------------------------------------- /rfb_icons/rman_vp_crop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_vp_crop.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | /.project 3 | RenderManAssetLibrary/ 4 | rendermanforblender_updater/ 5 | .vscode/ 6 | .DS_Store 7 | -------------------------------------------------------------------------------- /rfb_icons/help_stylized_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/help_stylized_1.png -------------------------------------------------------------------------------- /rfb_icons/out_LamaDiffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaDiffuse.png -------------------------------------------------------------------------------- /rfb_icons/out_LamaEmission.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaEmission.png -------------------------------------------------------------------------------- /rfb_icons/out_LamaSurface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaSurface.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrAovLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrAovLight.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrAttribute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrAttribute.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrBlackBody.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrBlackBody.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrBumpMixer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrBumpMixer.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrConstant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrConstant.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrCurvature.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrCurvature.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrDiskLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrDiskLight.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrDisplace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrDisplace.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrDomeLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrDomeLight.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrEnvGround.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrEnvGround.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrExposure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrExposure.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrHairColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrHairColor.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrMeshLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrMeshLight.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrNormalMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrNormalMap.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrProjector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrProjector.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrPtexture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrPtexture.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrRectLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrRectLight.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrRoundCube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrRoundCube.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrSetRange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrSetRange.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrSplineMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrSplineMap.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrThinFilm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrThinFilm.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrThreshold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrThreshold.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrToFloat3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrToFloat3.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrVariable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrVariable.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrVoronoise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrVoronoise.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrWireframe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrWireframe.png -------------------------------------------------------------------------------- /rfb_icons/out_rmanDisplay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_rmanDisplay.png -------------------------------------------------------------------------------- /rfb_icons/rman_ipr_cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_ipr_cancel.png -------------------------------------------------------------------------------- /rfb_icons/rman_licenseapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_licenseapp.png -------------------------------------------------------------------------------- /rfb_icons/rman_lightfilter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_lightfilter.png -------------------------------------------------------------------------------- /rfb_icons/rman_loadplugin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_loadplugin.png -------------------------------------------------------------------------------- /rfb_icons/rman_localqueue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_localqueue.png -------------------------------------------------------------------------------- /rfb_icons/rman_preview_fur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_preview_fur.png -------------------------------------------------------------------------------- /rfb_icons/rman_preview_std.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_preview_std.png -------------------------------------------------------------------------------- /rfb_icons/rman_vp_snapshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_vp_snapshot.png -------------------------------------------------------------------------------- /rfb_icons/out_LamaConductor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaConductor.png -------------------------------------------------------------------------------- /rfb_icons/out_LamaDielectric.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaDielectric.png -------------------------------------------------------------------------------- /rfb_icons/out_LamaHairChiang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaHairChiang.png -------------------------------------------------------------------------------- /rfb_icons/out_LamaIridescence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaIridescence.png -------------------------------------------------------------------------------- /rfb_icons/out_LamaTranslucent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaTranslucent.png -------------------------------------------------------------------------------- /rfb_icons/out_LamaTricolorSSS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaTricolorSSS.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrAdjustNormal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrAdjustNormal.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrArithmetic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrArithmetic.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrBakeTexture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrBakeTexture.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrColorCorrect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrColorCorrect.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrColorGrade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrColorGrade.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrColorSpace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrColorSpace.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrDisneyBsdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrDisneyBsdf.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrDistantLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrDistantLight.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrEnvDayLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrEnvDayLight.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrFacingRatio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrFacingRatio.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrLayerMixer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrLayerMixer.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrLayerSurface.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrLayerSurface.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrLayeredBlend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrLayeredBlend.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrManifold2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrManifold2D.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrManifold3D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrManifold3D.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrMultiTexture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrMultiTexture.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrPathTracer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrPathTracer.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrPhasorNoise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrPhasorNoise.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrPortalLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrPortalLight.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrShadedSide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrShadedSide.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrSphereLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrSphereLight.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrStylizedToon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrStylizedToon.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrTangentField.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrTangentField.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrTileManifold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrTileManifold.png -------------------------------------------------------------------------------- /rfb_icons/rman_CreateArchive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_CreateArchive.png -------------------------------------------------------------------------------- /rfb_icons/rman_batch_cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_batch_cancel.png -------------------------------------------------------------------------------- /rfb_icons/rman_blender_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_blender_grey.png -------------------------------------------------------------------------------- /rfb_icons/rman_lightning_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_lightning_grey.png -------------------------------------------------------------------------------- /rfb_icons/rman_open_last_rib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_open_last_rib.png -------------------------------------------------------------------------------- /rfb_icons/rman_package_scene.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_package_scene.png -------------------------------------------------------------------------------- /rfb_icons/rman_presetbrowser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_presetbrowser.png -------------------------------------------------------------------------------- /rfb_icons/rman_preview_none.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_preview_none.png -------------------------------------------------------------------------------- /rfb_icons/rman_vol_aggregates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_vol_aggregates.png -------------------------------------------------------------------------------- /rfb_icons/rman_vp_resolution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_vp_resolution.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrBakePointCloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrBakePointCloud.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrBumpManifold2D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrBumpManifold2D.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrBumpRoughness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrBumpRoughness.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrCylinderLight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrCylinderLight.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrDispTransform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrDispTransform.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrGeometricAOVs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrGeometricAOVs.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrLayeredTexture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrLayeredTexture.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrLightEmission.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrLightEmission.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrMarschnerHair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrMarschnerHair.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrRadialDensity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrRadialDensity.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrRodLightFilter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrRodLightFilter.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrStylizedCanvas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrStylizedCanvas.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrStylizedLines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrStylizedLines.png -------------------------------------------------------------------------------- /rfb_icons/rman_connection_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/rman_connection_menu.png -------------------------------------------------------------------------------- /rfb_utils/__init__.py: -------------------------------------------------------------------------------- 1 | __all__ = ['transform_utils', 'display_utils', 'object_utils', 'property_utils', 'string_utils', 'shadergraph_utils'] -------------------------------------------------------------------------------- /rfb_icons/out_PxrBarnLightFilter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrBarnLightFilter.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrCookieLightFilter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrCookieLightFilter.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrDispScalarLayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrDispScalarLayer.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrDispVectorLayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrDispVectorLayer.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrGoboLightFilter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrGoboLightFilter.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrHexTileManifold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrHexTileManifold.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrMetallicWorkflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrMetallicWorkflow.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrProjectionLayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrProjectionLayer.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrProjectionStack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrProjectionStack.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrRampLightFilter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrRampLightFilter.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrStylizedCanvasXPU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrStylizedCanvasXPU.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrStylizedControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrStylizedControl.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrStylizedHatching.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrStylizedHatching.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrStylizedLinesXPU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrStylizedLinesXPU.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrStylizedToonXPU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrStylizedToonXPU.png -------------------------------------------------------------------------------- /rfb_icons/out_aaOceanPrmanShader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_aaOceanPrmanShader.png -------------------------------------------------------------------------------- /rfb_icons/out_rmanDisplayChannel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_rmanDisplayChannel.png -------------------------------------------------------------------------------- /shaders/passthrough.osl: -------------------------------------------------------------------------------- 1 | shader passthrough(color Cin = 1, 2 | output color Cout = 1) 3 | { 4 | Cout = Cin; 5 | } 6 | -------------------------------------------------------------------------------- /rfb_icons/out_LamaGeneralizedSchlick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_LamaGeneralizedSchlick.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrBlockerLightFilter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrBlockerLightFilter.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrIntMultLightFilter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrIntMultLightFilter.png -------------------------------------------------------------------------------- /docs/images/onward_walking_teapot_rfb.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/docs/images/onward_walking_teapot_rfb.jpeg -------------------------------------------------------------------------------- /rfb_icons/out_PxrCheatShadowLightFilter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrCheatShadowLightFilter.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrRandomTextureManifold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrRandomTextureManifold.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrBlenderPrincipledInputs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrBlenderPrincipledInputs.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrStylizedPainterlyToonXPU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrStylizedPainterlyToonXPU.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrStylizedHatchingSampleXPU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrStylizedHatchingSampleXPU.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrStylizedPainterlyBrushXPU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrStylizedPainterlyBrushXPU.png -------------------------------------------------------------------------------- /rfb_icons/out_PxrStylizedPainterlyBrushControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prman-pixar/RenderManForBlender/HEAD/rfb_icons/out_PxrStylizedPainterlyBrushControl.png -------------------------------------------------------------------------------- /display_driver/README.md: -------------------------------------------------------------------------------- 1 | The source for the RenderMan for Blender display driver is provided here for reference only. It is not expected for users to compile the driver themselves. -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_nurbs.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgNurbs(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_dra.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgDra(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_volume.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgVolume(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) -------------------------------------------------------------------------------- /envkeys/LocalQueue.linux.envkeys: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": 'riley_capture=([^"]+)', 4 | "environment": { 5 | "RILEY_CAPTURE": r"\1", 6 | "RILEY_CAPTURE_FORMAT": "python" 7 | } 8 | } 9 | ] -------------------------------------------------------------------------------- /envkeys/LocalQueue.macosx.envkeys: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": 'riley_capture=([^"]+)', 4 | "environment": { 5 | "RILEY_CAPTURE": r"\1", 6 | "RILEY_CAPTURE_FORMAT": "python" 7 | } 8 | } 9 | ] -------------------------------------------------------------------------------- /envkeys/LocalQueue.windows.envkeys: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key": 'riley_capture=([^"]+)', 4 | "environment": { 5 | "RILEY_CAPTURE": r"\1", 6 | "RILEY_CAPTURE_FORMAT": "python" 7 | } 8 | } 9 | ] -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_alembic.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgAlembic(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_brickmap.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgBrickmap(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_openvdb.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgOpenVDB(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_runprogram.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgRunProgram(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | -------------------------------------------------------------------------------- /rman_text_templates/Shader_Overrides/PxrEnvDayLight_json.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrEnvDayLight.args", 3 | "params": [ 4 | { 5 | "name": "sunDirection", 6 | "default": [0.0, 0.0, 1.0] 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_hair.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgHair(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | 8 | self.sg_curves_list = list() 9 | -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrStylizedControl.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrStylizedControl.oso", 3 | "params": [ 4 | { 5 | "name": "Version", 6 | "connectable": false 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_d_openexr.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "d_openexr.args", 3 | "params": [ 4 | { 5 | "name": "asrgba", 6 | "default": 0, 7 | "always_write": true 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrGoboLightFilter.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrGoboLightFilter.args", 3 | "params": [ 4 | { 5 | "name": "refreshMap", 6 | "widget": "__REMOVE__" 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_haircurves.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgHairCurves(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | 8 | self.sg_curves_list = list() 9 | -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrCookieLightFilter.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrCookieLightFilter.args", 3 | "params": [ 4 | { 5 | "name": "refreshMap", 6 | "widget": "__REMOVE__" 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrHairColor.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrHairColor.oso", 3 | "params": [ 4 | { 5 | "name": "hairIndexPrimvar", 6 | "default": "index", 7 | "always_write": true 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrStylizedLines.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrStylizedLines.args", 3 | "params": [ 4 | { 5 | "name": "Notes", 6 | "connectable": false, 7 | "readOnly": true 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrStylizedToon.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrStylizedToon.args", 3 | "params": [ 4 | { 5 | "name": "Notes", 6 | "connectable": false, 7 | "readOnly": true 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /rfb_utils/color_utils.py: -------------------------------------------------------------------------------- 1 | import math 2 | 3 | def linearizeSRGB(col): 4 | ret = [] 5 | for i in range(0, len(col)): 6 | if col[i] < 0.04045: 7 | ret.append(col[i] * 0.07739938) 8 | else: 9 | ret.append(math.pow((col[i] + 0.055) * 0.947867299, 2.4)) 10 | return ret -------------------------------------------------------------------------------- /rman_text_templates/Rfb_EnvVars/rfb_envvars.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./schemas/rfbEnvVarsSchema.json", 3 | "environment": { 4 | "RFB_LOG_LEVEL": { 5 | "value": "DEBUG" 6 | }, 7 | "RFB_SITE_PATH": { 8 | "value": "/path/to/rfb_config_files" 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrDisney.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrDisney.args", 3 | "params": [ 4 | { 5 | "name": "inputAOV", 6 | "widget": "default", 7 | "default": 0, 8 | "readOnly": true, 9 | "connectable": true 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrMatteID.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrMatteID.oso", 3 | "params": [ 4 | { 5 | "name": "inputAOV", 6 | "widget": "default", 7 | "default": 0, 8 | "readOnly": true, 9 | "connectable": true 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrDisneyBsdf.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrDisneyBsdf.args", 3 | "params": [ 4 | { 5 | "name": "inputAOV", 6 | "widget": "default", 7 | "default": 0, 8 | "readOnly": true, 9 | "connectable": true 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_LamaSurface.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "LamaSurface.args", 3 | "params": [ 4 | { 5 | "name": "utilityInteger", 6 | "widget": "default", 7 | "default": 0, 8 | "readOnly": true, 9 | "connectable": true 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrCryptomatte.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrCryptomatte.args", 3 | "params": [ 4 | { 5 | "name": "filename", 6 | "default": "/images/v_t/..cryptomatte..exr", 7 | "always_write": true 8 | } 9 | ] 10 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrStylizedHatching.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrStylizedHatching.args", 3 | "params": [ 4 | { 5 | "name": "Notes", 6 | "readOnly": true 7 | }, 8 | { 9 | "name": "hatchingTexType", 10 | "always_write": true 11 | } 12 | 13 | ] 14 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrDirt.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrDirt.oso", 3 | "params": [ 4 | { 5 | "name": "traceSet", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups", 8 | "connectable": false 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /rman_text_templates/Render_Overrides/change_motion_blur_json.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rman_properties_scene", 3 | "params": [ 4 | { 5 | "name": "motion_blur", 6 | "label": "Motion Blur (Blurry!)", 7 | "type": "int", 8 | "default": 1, 9 | "help": "Motion blur is now on by default!" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrCurvature.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrCurvature.args", 3 | "params": [ 4 | { 5 | "name": "traceSet", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups", 8 | "connectable": false 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrProjector.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrProjector.oso", 3 | "params": [ 4 | { 5 | "name": "traceSet", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups", 8 | "connectable": false 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrMarschnerHair.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrMarschnerHair.args", 3 | "params": [ 4 | { 5 | "name": "specularColorTRT", 6 | "label": "Specular Color TRT" 7 | }, 8 | { 9 | "name": "specularColorTT", 10 | "label": "Specular Color TT" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /shaders/passthrough.oso: -------------------------------------------------------------------------------- 1 | OpenShadingLanguage 1.00 2 | # Compiled by oslc 1.7.4.pixar38bde12 3 | # options: 4 | shader passthrough 5 | param color Cin 1 1 1 %read{0,0} %write{2147483647,-1} 6 | oparam color Cout 1 1 1 %read{2147483647,-1} %write{0,0} 7 | code ___main___ 8 | # passthrough.osl:4 9 | # Cout = Cin; 10 | assign Cout Cin %filename{"passthrough.osl"} %line{4} %argrw{"wr"} 11 | end 12 | -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrCheatShadowLightFilter.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrCheatShadowLightFilter.args", 3 | "params": [ 4 | { 5 | "name": "shadowExcludeSubset", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups", 8 | "connectable": false 9 | } 10 | ] 11 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrPerspective.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrPerspective.args", 3 | "params": [ 4 | { 5 | "name": "focalLength", 6 | "slidermin": 2, 7 | "slidermax": 3500 8 | }, 9 | { 10 | "name": "focalDistance", 11 | "slidermin": 0.1, 12 | "slidermax": 1000 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_blobby.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgBlobby(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | self.matrix_world = None 8 | 9 | @property 10 | def matrix_world(self): 11 | return self.__matrix_world 12 | 13 | @matrix_world.setter 14 | def matrix_world(self, mtx): 15 | self.__matrix_world = mtx -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_gp.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgGreaseP(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | self.matrix_world = None 8 | 9 | @property 10 | def matrix_world(self): 11 | return self.__matrix_world 12 | 13 | @matrix_world.setter 14 | def matrix_world(self, mtx): 15 | self.__matrix_world = mtx -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_group.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgGroup(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | self.matrix_world = None 8 | 9 | @property 10 | def matrix_world(self): 11 | return self.__matrix_world 12 | 13 | @matrix_world.setter 14 | def matrix_world(self, mtx): 15 | self.__matrix_world = mtx -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_procedural.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgProcedural(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | self.matrix_world = None 8 | 9 | @property 10 | def matrix_world(self): 11 | return self.__matrix_world 12 | 13 | @matrix_world.setter 14 | def matrix_world(self, mtx): 15 | self.__matrix_world = mtx -------------------------------------------------------------------------------- /rman_text_templates/Render_Overrides/add_user_options_json.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rman_properties_scene", 3 | "params": [ 4 | { 5 | "panel": "RENDER_PT_renderman_custom_options", 6 | "name": "user_foobar", 7 | "label": "FooBar", 8 | "riopt": "user:foobar", 9 | "type": "int", 10 | "default": 0, 11 | "help": "This is a new user option named foobar" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /rman_text_templates/Render_Overrides/ipr_sampling_overrides_json.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rman_properties_scene", 3 | "params": [ 4 | { 5 | "name": "ipr_hider_minSamples", 6 | "default": 0 7 | }, 8 | { 9 | "name": "ipr_hider_maxSamples", 10 | "default": 64 11 | }, 12 | { 13 | "name": "ipr_ri_pixelVariance", 14 | "default": 0.015 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /rfb_utils/print_utils.py: -------------------------------------------------------------------------------- 1 | import bpy 2 | from ..rfb_logger import rfb_log 3 | 4 | def rman_print(message, level='INFO'): 5 | override = bpy.context.copy() 6 | window = bpy.context.window_manager.windows[0] 7 | override['window'] = window 8 | override['screen'] = window.screen 9 | try: 10 | bpy.ops.renderman.printer(override, 'INVOKE_DEFAULT', message=message, level=level) 11 | except Exception as e: 12 | rfb_log().debug("Cannot call renderman.printer: %s" % str(e)) -------------------------------------------------------------------------------- /rman_text_templates/Object_Overrides/add_instance_attribute_json.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rman_properties_object", 3 | "params": [ 4 | { 5 | "panel": "OBJECT_PT_renderman_object_custom_attributes", 6 | "name": "user_char_db", 7 | "label": "Character DB", 8 | "riattr": "user:char_db", 9 | "type": "string", 10 | "default": "", 11 | "help": "This is a new instance attribute called char_db" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /rman_text_templates/RfB_Config/rfb_json.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./schemas/rfbSchema.json", 3 | "tractor_cfg": { 4 | "engine": "tractor-engine", 5 | "port": 80, 6 | "user": "" 7 | }, 8 | "dirmaps": { 9 | "myserver_to_z": { 10 | "from": "/myserver/", 11 | "to": "Z:/", 12 | "zone": "UNC" 13 | } 14 | }, 15 | "editor_preferences": { 16 | "preset_browser": { 17 | "width": 900 18 | } 19 | } 20 | "user tokens": ["PROD", "SHOT"] 21 | } -------------------------------------------------------------------------------- /rman_config/config/rman_properties_material.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rman_properties_material", 3 | "params": [ 4 | { 5 | "panel": "MATERIAL_PT_renderman_shader_surface", 6 | "name": "preview_render_type", 7 | "label": "Preview Render Type", 8 | "type": "string", 9 | "default": "SPHERE", 10 | "widget": "mapper", 11 | "options": "Sphere:SPHERE|Cube:CUBE", 12 | "page": "", 13 | "help": "Object to display in material preview" 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /rman_text_templates/Render_Overrides/sampling_overrides_json.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rman_properties_scene", 3 | "params": [ 4 | { 5 | "name": "hider_minSamples", 6 | "default": 0 7 | }, 8 | { 9 | "name": "hider_maxSamples", 10 | "default": 128 11 | }, 12 | { 13 | "name": "ri_pixelVariance", 14 | "default": 0.015 15 | }, 16 | { 17 | "name": "hider_darkfalloff", 18 | "default": 0.025 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrStylizedPainterlyBrushXPU.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrStylizedPainterlyBrushXPU.oso", 3 | "params": [ 4 | { 5 | "name": "Brush1to4", 6 | "always_write": true, 7 | "default": "$RMANTREE/lib/textures/StylizedLooks/PxrStylizedPainterlyBrush/brush1to4.tex" 8 | }, 9 | { 10 | "name": "Brush5to8", 11 | "always_write": true, 12 | "default": "$RMANTREE/lib/textures/StylizedLooks/PxrStylizedPainterlyBrush/brush1to4.tex" 13 | } 14 | 15 | ] 16 | } -------------------------------------------------------------------------------- /rman_text_templates/Object_Overrides/add_primvar_json.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rman_properties_object", 3 | "params": [ 4 | { 5 | "panel": "OBJECT_PT_renderman_object_custom_primvars", 6 | "name": "user_mycolor", 7 | "label": "MyColor", 8 | "primvar": "user:mycolor", 9 | "type": "color", 10 | "default": [ 11 | 1, 12 | 1, 13 | 1 14 | ], 15 | "help": "This is a new user primitive variable called mycolor" 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrVolume.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrVolume.args", 3 | "params": [ 4 | { 5 | "name": "densityFloatPrimVar", 6 | "label": "Density Float PrimVar", 7 | "type": "string", 8 | "default": "", 9 | "connectable": 0 10 | }, 11 | { 12 | "name": "densityColorPrimVar", 13 | "label": "Density Color PrimVar", 14 | "type": "string", 15 | "default": "", 16 | "connectable": 0 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrRamp.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrRamp.oso", 3 | "params": [ 4 | { 5 | "name": "useNewRamp", 6 | "widget": "__REMOVE__", 7 | "default": "1" 8 | }, 9 | { 10 | "name": "positions", 11 | "widget": "__REMOVE__" 12 | }, 13 | { 14 | "name": "colors", 15 | "widget": "__REMOVE__" 16 | }, 17 | { 18 | "name": "basis", 19 | "widget": "__REMOVE__" 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /rman_text_templates/Display_Channels/rman_dspychan_definitions_json.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./schemas/rfbDspyChansSchema.json", 3 | "channels": { 4 | "MyAOV": { 5 | "description": "This a custom AOV", 6 | "channelType": "color", 7 | "channelSource": "MyAOV", 8 | "group": "Pixar" 9 | } 10 | }, 11 | "displays": { 12 | "MyOutput": { 13 | "description": "MyOutput AOVs", 14 | "channels": [ 15 | "diffuse", 16 | "albedo", 17 | "directSpecular" 18 | ] 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /rfb_utils/timer_utils.py: -------------------------------------------------------------------------------- 1 | from .envconfig_utils import envconfig 2 | import time 3 | 4 | def time_this(f): 5 | if not envconfig().getenv('RFB_DEVELOPER'): 6 | return f 7 | """Function that can be used as a decorator to time any method.""" 8 | def timed(*args, **kw): 9 | tstart = time.time() 10 | result = f(*args, **kw) 11 | tstop = time.time() 12 | elapsed = (tstop - tstart) * 1000.0 13 | print(' _ %0.2f ms: %s(%s, %s)' % ( 14 | elapsed, f.__name__, 15 | ', '.join([repr(a) for a in args]), 16 | ', '.join(['%s=%r' % (k, w) for k, w in kw.items()]))) 17 | return result 18 | 19 | return timed -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_points.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgPoints(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | self.matrix_world = None 8 | self.npoints = -1 9 | 10 | @property 11 | def matrix_world(self): 12 | return self.__matrix_world 13 | 14 | @matrix_world.setter 15 | def matrix_world(self, mtx): 16 | self.__matrix_world = mtx 17 | 18 | @property 19 | def npoints(self): 20 | return self.__npoints 21 | 22 | @npoints.setter 23 | def npoints(self, npoints): 24 | self.__npoints = npoints 25 | 26 | -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_pointcloud.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgPointCloud(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | self.matrix_world = None 8 | self.npoints = -1 9 | 10 | @property 11 | def matrix_world(self): 12 | return self.__matrix_world 13 | 14 | @matrix_world.setter 15 | def matrix_world(self, mtx): 16 | self.__matrix_world = mtx 17 | 18 | @property 19 | def npoints(self): 20 | return self.__npoints 21 | 22 | @npoints.setter 23 | def npoints(self, npoints): 24 | self.__npoints = npoints 25 | 26 | -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_curve.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_mesh import RmanSgMesh 2 | 3 | class RmanSgCurve(RmanSgMesh): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | self.is_mesh = False 8 | self.sg_mesh_node = None 9 | 10 | @property 11 | def is_mesh(self): 12 | return self.__is_mesh 13 | 14 | @is_mesh.setter 15 | def is_mesh(self, is_mesh): 16 | self.__is_mesh = is_mesh 17 | 18 | @property 19 | def sg_mesh_node(self): 20 | return self.__sg_mesh_node 21 | 22 | @sg_mesh_node.setter 23 | def sg_mesh_node(self, sg_mesh_node): 24 | self.__sg_mesh_node = sg_mesh_node -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_light.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgLight(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | self.matrix_world = None 8 | self.solo_light = False 9 | 10 | @property 11 | def matrix_world(self): 12 | return self.__matrix_world 13 | 14 | @matrix_world.setter 15 | def matrix_world(self, mtx): 16 | self.__matrix_world = mtx 17 | 18 | @property 19 | def solo_light(self): 20 | return self.__solo_light 21 | 22 | @solo_light.setter 23 | def solo_light(self, solo_light): 24 | self.__solo_light = solo_light -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_fluid.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgFluid(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | self.rman_sg_volume_node = None 8 | self.rman_sg_liquid_node = None 9 | 10 | def __del__(self): 11 | super().__del__() 12 | pass 13 | ''' 14 | if self.rman_scene.rman_render.rman_context.is_render_running() and self.rman_scene.sg_scene: 15 | self.rman_scene.sg_scene.DeleteDagNode(self.rman_sg_volume_node) 16 | self.rman_scene.sg_scene.DeleteDagNode(self.rman_sg_liquid_node) 17 | super().__del__() 18 | ''' -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_quadric.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgQuadric(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | self.matrix_world = None 8 | self.quadric_type = 'SPHERE' 9 | 10 | @property 11 | def matrix_world(self): 12 | return self.__matrix_world 13 | 14 | @matrix_world.setter 15 | def matrix_world(self, mtx): 16 | self.__matrix_world = mtx 17 | 18 | @property 19 | def quadric_type(self): 20 | return self.__quadric_type 21 | 22 | @quadric_type.setter 23 | def quadric_type(self, quadric_type): 24 | self.__quadric_type = quadric_type -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrLayerSurface.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrLayerSurface.args", 3 | "params": [ 4 | { 5 | "name": "subsurfaceSubset", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups", 8 | "connectable": false 9 | }, 10 | { 11 | "name": "singlescatterSubset", 12 | "widget": "propSearch", 13 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups", 14 | "connectable": false 15 | }, 16 | { 17 | "name": "utilityPattern", 18 | "connectable": true, 19 | "default": 0 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrRectLight.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrRectLight.args", 3 | "params": [ 4 | { 5 | "name": "shadowSubset", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 8 | }, 9 | { 10 | "name": "shadowExcludeSubset", 11 | "widget": "propSearch", 12 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 13 | }, 14 | { 15 | "name": "cheapCausticsExcludeGroup", 16 | "widget": "propSearch", 17 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrDiskLight.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrDiskLight.args", 3 | "params": [ 4 | { 5 | "name": "shadowSubset", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 8 | }, 9 | { 10 | "name": "shadowExcludeSubset", 11 | "widget": "propSearch", 12 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 13 | }, 14 | { 15 | "name": "cheapCausticsExcludeGroup", 16 | "widget": "propSearch", 17 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrDomeLight.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrDomeLight.args", 3 | "params": [ 4 | { 5 | "name": "shadowSubset", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 8 | }, 9 | { 10 | "name": "shadowExcludeSubset", 11 | "widget": "propSearch", 12 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 13 | }, 14 | { 15 | "name": "cheapCausticsExcludeGroup", 16 | "widget": "propSearch", 17 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrEnvDayLight.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrEnvDayLight.args", 3 | "params": [ 4 | { 5 | "name": "shadowSubset", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 8 | }, 9 | { 10 | "name": "shadowExcludeSubset", 11 | "widget": "propSearch", 12 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 13 | }, 14 | { 15 | "name": "cheapCausticsExcludeGroup", 16 | "widget": "propSearch", 17 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrMeshLight.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrMeshLight.args", 3 | "params": [ 4 | { 5 | "name": "shadowSubset", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 8 | }, 9 | { 10 | "name": "shadowExcludeSubset", 11 | "widget": "propSearch", 12 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 13 | }, 14 | { 15 | "name": "cheapCausticsExcludeGroup", 16 | "widget": "propSearch", 17 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrSphereLight.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrSphereLight.args", 3 | "params": [ 4 | { 5 | "name": "shadowSubset", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 8 | }, 9 | { 10 | "name": "shadowExcludeSubset", 11 | "widget": "propSearch", 12 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 13 | }, 14 | { 15 | "name": "cheapCausticsExcludeGroup", 16 | "widget": "propSearch", 17 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrDistantLight.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrDistantLight.args", 3 | "params": [ 4 | { 5 | "name": "shadowSubset", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 8 | }, 9 | { 10 | "name": "shadowExcludeSubset", 11 | "widget": "propSearch", 12 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 13 | }, 14 | { 15 | "name": "cheapCausticsExcludeGroup", 16 | "widget": "propSearch", 17 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrPortalLight.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrPortalLight.args", 3 | "params": [ 4 | { 5 | "name": "shadowSubset", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 8 | }, 9 | { 10 | "name": "shadowExcludeSubset", 11 | "widget": "propSearch", 12 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 13 | }, 14 | { 15 | "name": "cheapCausticsExcludeGroup", 16 | "widget": "propSearch", 17 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrCylinderLight.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrCylinderLight.args", 3 | "params": [ 4 | { 5 | "name": "shadowSubset", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 8 | }, 9 | { 10 | "name": "shadowExcludeSubset", 11 | "widget": "propSearch", 12 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 13 | }, 14 | { 15 | "name": "cheapCausticsExcludeGroup", 16 | "widget": "propSearch", 17 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Args/PxrOSL.args: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | A pattern that lets you execute OSL shader. 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | -------------------------------------------------------------------------------- /rfb_utils/register_utils.py: -------------------------------------------------------------------------------- 1 | from ..rfb_logger import rfb_log 2 | import bpy 3 | 4 | def rman_register_class(cls): 5 | try: 6 | if hasattr(bpy.types, str(cls)): 7 | rman_unregister_class(cls) 8 | bpy.utils.register_class(cls) 9 | except ValueError as e: 10 | rfb_log().debug("Could not register class, %s, because: %s" % (str(cls), str(e))) 11 | pass 12 | 13 | def rman_register_classes(classes): 14 | for cls in classes: 15 | rman_register_class(cls) 16 | 17 | def rman_unregister_class(cls): 18 | try: 19 | bpy.utils.unregister_class(cls) 20 | except RuntimeError: 21 | rfb_log().debug('Could not unregister class: %s' % str(cls)) 22 | pass 23 | 24 | def rman_unregister_classes(classes): 25 | for cls in classes: 26 | rman_unregister_class(cls) -------------------------------------------------------------------------------- /shaders/node_rgb_curves.osl: -------------------------------------------------------------------------------- 1 | 2 | #include "stdosl.h" 3 | #include "oslutil.h" 4 | 5 | float ramp_lookup(color ramp[256], float at, int component) 6 | { 7 | float f = clamp(at, 0.0, 1.0) * (256 - 1); 8 | 9 | /* clamp int as well in case of NaN */ 10 | int i = (int)f; 11 | if (i < 0) i = 0; 12 | if (i >= 256) i = 256 - 1; 13 | float t = f - (float)i; 14 | 15 | float result = ramp[i][component]; 16 | 17 | if (t > 0.0) 18 | result = (1.0 - t) * result + t * ramp[i + 1][component]; 19 | 20 | return result; 21 | } 22 | 23 | shader node_rgb_curves( 24 | color ramp[256] = {0.0}, 25 | 26 | color ColorIn = 0.0, 27 | float Fac = 0.0, 28 | output color ColorOut = 0.0) 29 | { 30 | ColorOut[0] = ramp_lookup(ramp, ColorIn[0], 0); 31 | ColorOut[1] = ramp_lookup(ramp, ColorIn[1], 1); 32 | ColorOut[2] = ramp_lookup(ramp, ColorIn[2], 2); 33 | 34 | ColorOut = mix(ColorIn, ColorOut, Fac); 35 | } 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RenderMan for Blender 2 | 3 | ![Onward Walking Teapot](docs/images/onward_walking_teapot_rfb.jpeg) 4 | 5 | RenderMan for Blender is a render engine addon written for the 3D creation suite [Blender](https://www.blender.org/). 6 | 7 | ## Installing 8 | 9 | To use, install RenderMan, (free from [renderman.pixar.com](https://renderman.pixar.com/store/intro)), download [the latest release](https://github.com/prman-pixar/RenderManForBlender/releases) and put it in the addons folder for Blender. See the [installation.txt](installation.txt) file for detailed instructions. 10 | 11 | ## Getting Help 12 | 13 | For support visit the [RenderMan Discord Server](https://discord.com/invite/renderman). 14 | 15 | ## Acknowledgements 16 | 17 | Many thanks to Matt Ebb for the initial 3delight/Blender plugin this is forked from. 18 | Also thanks to contributors to this release: rgordon, aek, jdent02, jdbener 19 | -------------------------------------------------------------------------------- /rman_config/config/schemas/rfbEnvVarsSchema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema#", 3 | "definitions": { 4 | "envvar": { 5 | "type": "object", 6 | "properties": { 7 | "value": { 8 | "type": ["string"] 9 | } 10 | } 11 | } 12 | }, 13 | "type": "object", 14 | "properties": { 15 | "$schema": { 16 | "description": "This is a validation schema for this file.\nSome editors can validate on the fly using this information.", 17 | "type": "string" 18 | }, 19 | "environment": { 20 | "type": "object", 21 | "patternProperties": { 22 | "[A-Za-z0-9_-]+": { 23 | "$ref": "#/definitions/envvar" 24 | } 25 | } 26 | } 27 | }, 28 | "additionalProperties": false 29 | } -------------------------------------------------------------------------------- /rman_text_templates/Workspace/filepaths_json.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rman_properties_scene", 3 | "params": [ 4 | { 5 | "name": "path_rib_output", 6 | "default": "/rib/v_t/...rib" 7 | }, 8 | { 9 | "name": "path_beauty_image_output", 10 | "default": "/images/v_t/..." 11 | }, 12 | { 13 | "name": "path_aov_image_output", 14 | "default": "/images/v_t/...." 15 | }, 16 | { 17 | "name": "path_bake_illum_ptc", 18 | "default": "/bake/v_t/...." 19 | }, 20 | { 21 | "name": "path_bake_illum_img", 22 | "default": "/bake/v_t/...." 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_emitter.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgEmitter(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | self.matrix_world = None 8 | self.npoints = -1 9 | self.render_type = '' 10 | self.sg_particles_node = None 11 | 12 | @property 13 | def matrix_world(self): 14 | return self.__matrix_world 15 | 16 | @matrix_world.setter 17 | def matrix_world(self, mtx): 18 | self.__matrix_world = mtx 19 | 20 | @property 21 | def npoints(self): 22 | return self.__npoints 23 | 24 | @npoints.setter 25 | def npoints(self, npoints): 26 | self.__npoints = npoints 27 | 28 | @property 29 | def render_type(self): 30 | return self.__render_type 31 | 32 | @render_type.setter 33 | def render_type(self, render_type): 34 | self.__render_type = render_type 35 | 36 | -------------------------------------------------------------------------------- /rman_properties/rman_properties_world/__init__.py: -------------------------------------------------------------------------------- 1 | import bpy 2 | from bpy.props import PointerProperty, StringProperty, BoolProperty, \ 3 | IntProperty, CollectionProperty, EnumProperty, FloatProperty 4 | from ..rman_properties_misc import RendermanMeshPrimVar 5 | 6 | 7 | class RendermanWorldSettings(bpy.types.PropertyGroup): 8 | 9 | use_renderman_node: BoolProperty( 10 | name="Use RenderMans World Node", 11 | description="Will enable RenderMan World Nodes, opening more options", 12 | default=False) 13 | 14 | classes = [ 15 | RendermanWorldSettings 16 | ] 17 | 18 | def register(): 19 | from ...rfb_utils import register_utils 20 | 21 | register_utils.rman_register_classes(classes) 22 | 23 | bpy.types.World.renderman = PointerProperty( 24 | type=RendermanWorldSettings, name="Renderman World Settings") 25 | 26 | def unregister(): 27 | from ...rfb_utils import register_utils 28 | 29 | register_utils.rman_unregister_classes(classes) -------------------------------------------------------------------------------- /rman_ui/rman_ui_output_panels.py: -------------------------------------------------------------------------------- 1 | from .rman_ui_base import PRManButtonsPanel 2 | from bpy.types import Panel 3 | import bpy 4 | 5 | class RENDER_PT_renderman_workspace(PRManButtonsPanel, Panel): 6 | bl_label = "Workspace" 7 | bl_context = "output" 8 | 9 | def draw(self, context): 10 | self.layout.use_property_split = True 11 | self.layout.use_property_decorate = False 12 | 13 | if context.scene.render.engine != "PRMAN_RENDER": 14 | return 15 | 16 | layout = self.layout 17 | layout.prop(context.scene.renderman, 'root_path_output') 18 | layout.operator('scene.rman_open_workspace', text='Open Workspace') 19 | 20 | classes = [ 21 | RENDER_PT_renderman_workspace 22 | ] 23 | 24 | def register(): 25 | from ..rfb_utils import register_utils 26 | 27 | register_utils.rman_register_classes(classes) 28 | 29 | def unregister(): 30 | from ..rfb_utils import register_utils 31 | 32 | register_utils.rman_unregister_classes(classes) -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrCamera.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrCamera.args", 3 | "params": [ 4 | { 5 | "name": "enhance", 6 | "widget": "null", 7 | "type": "vector", 8 | "default": [0.0, 0.0, 1.0] 9 | }, 10 | { 11 | "name": "focalLength", 12 | "slidermin": 2, 13 | "slidermax": 3500 14 | }, 15 | { 16 | "name": "focalDistance", 17 | "slidermin": 0.1, 18 | "slidermax": 1000 19 | }, 20 | { 21 | "name": "distortionCtr", 22 | "type": "float2", 23 | "arraySize": "__REMOVE__" 24 | }, 25 | { 26 | "name": "dofPivotCenter", 27 | "type": "point", 28 | "arraySize": "__REMOVE__" 29 | }, 30 | { 31 | "name": "dofSqCtr", 32 | "type": "point", 33 | "arraySize": "__REMOVE__" 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrSurface.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrSurface.args", 3 | "params": [ 4 | { 5 | "name": "subsurfaceSubset", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups", 8 | "connectable": false 9 | }, 10 | { 11 | "name": "singlescatterSubset", 12 | "widget": "propSearch", 13 | "options": "prop_parent:context.scene.renderman|prop_name:object_groups", 14 | "connectable": false 15 | }, 16 | { 17 | "name": "volumeAggregateName", 18 | "widget": "propSearch", 19 | "options": "prop_parent:context.scene.renderman|prop_name:vol_aggregates", 20 | "connectable": false, 21 | "default": "" 22 | }, 23 | { 24 | "name": "utilityPattern", 25 | "connectable": true, 26 | "default": 0 27 | } 28 | ] 29 | } -------------------------------------------------------------------------------- /rfb_unittests/__init__.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | from RenderManForBlender.rfb_unittests.test_string_expr import StringExprTest 3 | from RenderManForBlender.rfb_unittests.test_shader_nodes import ShaderNodesTest 4 | from RenderManForBlender.rfb_unittests.test_geo import GeoTest 5 | 6 | classes = [ 7 | StringExprTest, 8 | ShaderNodesTest, 9 | GeoTest 10 | ] 11 | 12 | def suite(): 13 | suite = unittest.TestSuite() 14 | 15 | for cls in classes: 16 | cls.add_tests(suite) 17 | 18 | return suite 19 | 20 | def run_rfb_unittests(): 21 | runner = unittest.TextTestRunner(verbosity=2, failfast=True) 22 | test_result = runner.run(suite()) 23 | 24 | if test_result.wasSuccessful(): 25 | return None 26 | msg = '' 27 | for cls, err in test_result.errors: 28 | msg += '%s:\n' % cls.id() 29 | msg += '\t%s' % err 30 | for cls, err in test_result.failures: 31 | msg += '%s:\n' % cls.id() 32 | msg += '\t%s' % err 33 | return msg 34 | 35 | if __name__ == '__main__': 36 | run_rfb_unittests() -------------------------------------------------------------------------------- /rman_operators/rman_operators_editors/__init__.py: -------------------------------------------------------------------------------- 1 | from . import rman_operators_editors_lightlink 2 | from . import rman_operators_editors_stylized 3 | from . import rman_operators_editors_tracegroups 4 | from . import rman_operators_editors_workspace 5 | from . import rman_operators_editors_lightmixer 6 | from . import rman_operators_editors_vol_aggregates 7 | 8 | 9 | def register(): 10 | rman_operators_editors_lightlink.register() 11 | rman_operators_editors_stylized.register() 12 | rman_operators_editors_tracegroups.register() 13 | rman_operators_editors_workspace.register() 14 | rman_operators_editors_lightmixer.register() 15 | rman_operators_editors_vol_aggregates.register() 16 | 17 | def unregister(): 18 | rman_operators_editors_lightlink.unregister() 19 | rman_operators_editors_stylized.unregister() 20 | rman_operators_editors_tracegroups.unregister() 21 | rman_operators_editors_workspace.unregister() 22 | rman_operators_editors_lightmixer.unregister() 23 | rman_operators_editors_vol_aggregates.unregister() 24 | -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_particles.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgParticles(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | self.matrix_world = None 8 | self.npoints = -1 9 | self.render_type = '' 10 | 11 | self.rman_sg_emitter = None 12 | self.rman_sg_hair = None 13 | self.particles_type = '' 14 | 15 | @property 16 | def matrix_world(self): 17 | return self.__matrix_world 18 | 19 | @matrix_world.setter 20 | def matrix_world(self, mtx): 21 | self.__matrix_world = mtx 22 | 23 | @property 24 | def npoints(self): 25 | return self.__npoints 26 | 27 | @npoints.setter 28 | def npoints(self, npoints): 29 | self.__npoints = npoints 30 | 31 | @property 32 | def render_type(self): 33 | return self.__render_type 34 | 35 | @render_type.setter 36 | def render_type(self, render_type): 37 | self.__render_type = render_type 38 | 39 | -------------------------------------------------------------------------------- /rman_properties/rman_properties_material/__init__.py: -------------------------------------------------------------------------------- 1 | from bpy.props import StringProperty, BoolProperty, EnumProperty, IntProperty, PointerProperty 2 | 3 | from ...rfb_logger import rfb_log 4 | from ...rman_config import RmanBasePropertyGroup 5 | 6 | import bpy 7 | 8 | class RendermanMaterialSettings(RmanBasePropertyGroup, bpy.types.PropertyGroup): 9 | rman_config_name: StringProperty(name='rman_config_name', 10 | default='rman_properties_material') 11 | 12 | classes = [ 13 | RendermanMaterialSettings 14 | ] 15 | 16 | def register(): 17 | 18 | from ...rfb_utils import register_utils 19 | 20 | for cls in classes: 21 | cls._add_properties(cls, 'rman_properties_material') 22 | register_utils.rman_register_class(cls) 23 | 24 | bpy.types.Material.renderman = PointerProperty( 25 | type=RendermanMaterialSettings, name="Renderman Material Settings") 26 | 27 | def unregister(): 28 | 29 | del bpy.types.Material.renderman 30 | 31 | from ...rfb_utils import register_utils 32 | register_utils.rman_unregister_classes(classes) 33 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2015-2021 Pixar 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /shaders/node_fresnel.osl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011, Blender Foundation. 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License 6 | * as published by the Free Software Foundation; either version 2 7 | * of the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software Foundation, 16 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #include "node_fresnel.h" 20 | 21 | shader node_fresnel( 22 | float IOR = 1.45, 23 | normal Normal = N, 24 | output float Fac = 0.0) 25 | { 26 | float f = max(IOR, 1e-5); 27 | float eta = backfacing() ? 1.0 / f: f; 28 | float cosi = dot(I,Normal); 29 | Fac = fresnel_dielectric_cos(cosi, eta); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /rman_config/config/overrides/rman_properties_PxrPathTracer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PxrPathTracer.args", 3 | "params": [ 4 | { 5 | "name": "volumeAggregate", 6 | "widget": "propSearch", 7 | "options": "prop_parent:context.scene.renderman|prop_name:vol_aggregates", 8 | "connectable": false 9 | }, 10 | { 11 | "name": "volumeAggregateCamera", 12 | "widget": "propSearch", 13 | "options": "prop_parent:context.scene.renderman|prop_name:vol_aggregates", 14 | "connectable": false 15 | }, 16 | { 17 | "name": "volumeAggregateIndirect", 18 | "widget": "propSearch", 19 | "options": "prop_parent:context.scene.renderman|prop_name:vol_aggregates", 20 | "connectable": false 21 | }, 22 | { 23 | "name": "volumeAggregateTransmission", 24 | "widget": "propSearch", 25 | "options": "prop_parent:context.scene.renderman|prop_name:vol_aggregates", 26 | "connectable": false 27 | } 28 | ] 29 | } -------------------------------------------------------------------------------- /rman_translators/rman_group_translator.py: -------------------------------------------------------------------------------- 1 | from .rman_translator import RmanTranslator 2 | from ..rman_sg_nodes.rman_sg_group import RmanSgGroup 3 | from ..rfb_utils import transform_utils 4 | from ..rfb_utils import object_utils 5 | from mathutils import Matrix 6 | import math 7 | 8 | class RmanGroupTranslator(RmanTranslator): 9 | 10 | def __init__(self, rman_scene): 11 | super().__init__(rman_scene) 12 | 13 | def update_transform(self, ob, rman_sg_group): 14 | mtx = transform_utils.convert_matrix(ob.matrix_world.copy()) 15 | rman_sg_group.sg_node.SetTransform( mtx ) 16 | 17 | def update_transform_sample(self, ob, rman_sg_group, index, seg): 18 | mtx = transform_utils.convert_matrix(ob.matrix_world.copy()) 19 | rman_sg_group.sg_node.SetTransformSample( index, mtx, seg) 20 | 21 | def update_transform_num_samples(self, rman_sg_group, motion_steps): 22 | rman_sg_group.sg_node.SetTransformNumSamples(len(motion_steps)) 23 | 24 | def export(self, ob, db_name=""): 25 | sg_group = self.rman_scene.sg_scene.CreateGroup(db_name) 26 | rman_sg_group = RmanSgGroup(self.rman_scene, sg_group, db_name) 27 | return rman_sg_group -------------------------------------------------------------------------------- /rman_translators/rman_empty_translator.py: -------------------------------------------------------------------------------- 1 | from .rman_translator import RmanTranslator 2 | from ..rman_sg_nodes.rman_sg_group import RmanSgGroup 3 | from ..rfb_utils import transform_utils 4 | from ..rfb_utils import object_utils 5 | from mathutils import Matrix 6 | import math 7 | 8 | class RmanEmptyTranslator(RmanTranslator): 9 | 10 | def __init__(self, rman_scene): 11 | super().__init__(rman_scene) 12 | 13 | def update_transform(self, ob, rman_sg_group): 14 | pass 15 | 16 | def update_transform_sample(self, ob, rman_sg_group, index, seg): 17 | pass 18 | 19 | def update_transform_num_samples(self, rman_sg_group, motion_steps): 20 | pass 21 | 22 | def clear_children(self, rman_sg_group): 23 | if rman_sg_group.sg_attributes: 24 | for c in [ rman_sg_group.sg_attributes.GetChild(i) for i in range(0, rman_sg_group.sg_attributes.GetNumChildren())]: 25 | rman_sg_group.sg_attributes.RemoveChild(c) 26 | 27 | def export(self, ob, db_name=""): 28 | sg_group = self.rman_scene.sg_scene.CreateGroup(db_name) 29 | rman_sg_group = RmanSgGroup(self.rman_scene, sg_group, db_name) 30 | return rman_sg_group -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_lightfilter.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgLightFilter(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | self.matrix_world = None 8 | self.coord_sys = '' 9 | self.sg_filter_node = None 10 | self.lights_list = list() # list of lights referencing this light filter 11 | 12 | @property 13 | def matrix_world(self): 14 | return self.__matrix_world 15 | 16 | @matrix_world.setter 17 | def matrix_world(self, mtx): 18 | self.__matrix_world = mtx 19 | 20 | @property 21 | def coord_sys(self): 22 | return self.__coord_sys 23 | 24 | @coord_sys.setter 25 | def coord_sys(self, coord_sys): 26 | self.__coord_sys = coord_sys 27 | 28 | @property 29 | def sg_filter_node(self): 30 | return self.__sg_filter_node 31 | 32 | @sg_filter_node.setter 33 | def sg_filter_node(self, sg_filter_node): 34 | self.__sg_filter_node = sg_filter_node 35 | 36 | @property 37 | def lights_list(self): 38 | return self.__lights_list 39 | 40 | @lights_list.setter 41 | def lights_list(self, lights_list): 42 | self.__lights_list = lights_list -------------------------------------------------------------------------------- /rman_ui/rman_ui_volume_panels.py: -------------------------------------------------------------------------------- 1 | from .rman_ui_base import CollectionPanel 2 | from ..rfb_utils.draw_utils import _draw_ui_from_rman_config 3 | from ..rfb_utils import object_utils 4 | from ..rfb_logger import rfb_log 5 | from bpy.types import Panel 6 | import bpy 7 | import os 8 | class VOLUME_PT_renderman_openvdb_attributes(CollectionPanel, Panel): 9 | bl_context = "data" 10 | bl_label = "OpenVDB" 11 | 12 | @classmethod 13 | def poll(cls, context): 14 | if not context.volume: 15 | return False 16 | return CollectionPanel.poll(context) 17 | 18 | def draw(self, context): 19 | layout = self.layout 20 | self.layout.use_property_split = True 21 | self.layout.use_property_decorate = False 22 | volume = context.volume 23 | rm = volume.renderman 24 | 25 | #layout.operator('renderman.add_openvdb_to_txmanager') 26 | _draw_ui_from_rman_config('rman_properties_volume', 'VOLUME_PT_renderman_openvdb_attributes', context, layout, rm) 27 | 28 | 29 | classes = [ 30 | VOLUME_PT_renderman_openvdb_attributes 31 | ] 32 | 33 | def register(): 34 | from ..rfb_utils import register_utils 35 | 36 | register_utils.rman_register_classes(classes) 37 | 38 | def unregister(): 39 | from ..rfb_utils import register_utils 40 | 41 | register_utils.rman_unregister_classes(classes) -------------------------------------------------------------------------------- /rman_translators/rman_procedural_translator.py: -------------------------------------------------------------------------------- 1 | from .rman_translator import RmanTranslator 2 | from ..rman_sg_nodes.rman_sg_procedural import RmanSgProcedural 3 | 4 | class RmanProceduralTranslator(RmanTranslator): 5 | 6 | def __init__(self, rman_scene): 7 | super().__init__(rman_scene) 8 | self.bl_type = 'DYNAMIC_LOAD_DSO' 9 | 10 | def export(self, ob, db_name): 11 | 12 | sg_node = self.rman_scene.sg_scene.CreateProcedural(db_name) 13 | sg_node.Define("DynamicLoad", None) 14 | rman_sg_procedural = RmanSgProcedural(self.rman_scene, sg_node, db_name) 15 | 16 | return rman_sg_procedural 17 | 18 | def export_deform_sample(self, rman_sg_procedural, ob, time_sample): 19 | pass 20 | 21 | 22 | def update(self, ob, rman_sg_procedural): 23 | rm = ob.renderman 24 | path_dso = rm.path_dso 25 | bounds = (-100000, 100000, -100000, 100000, -100000, 100000 ) 26 | 27 | primvar = rman_sg_procedural.sg_node.GetPrimVars() 28 | primvar.SetString(self.rman_scene.rman.Tokens.Rix.k_dsoname, path_dso) 29 | primvar.SetString(self.rman_scene.rman.Tokens.Rix.k_data, rm.path_dso_initial_data ) 30 | primvar.SetFloatArray(self.rman_scene.rman.Tokens.Rix.k_bound, bounds, 6) 31 | super().export_object_primvars(ob, primvar) 32 | rman_sg_procedural.sg_node.SetPrimVars(primvar) 33 | -------------------------------------------------------------------------------- /rman_properties/rman_properties_curve/__init__.py: -------------------------------------------------------------------------------- 1 | import bpy 2 | from bpy.props import PointerProperty, StringProperty, BoolProperty, \ 3 | IntProperty, CollectionProperty 4 | from ...rman_config import RmanBasePropertyGroup 5 | from ..rman_properties_misc import RendermanMeshPrimVar 6 | 7 | 8 | class RendermanCurveGeometrySettings(RmanBasePropertyGroup, bpy.types.PropertyGroup): 9 | prim_vars: CollectionProperty( 10 | type=RendermanMeshPrimVar, name="Primitive Variables") 11 | prim_vars_index: IntProperty(min=-1, default=-1) 12 | 13 | classes = [ 14 | RendermanCurveGeometrySettings 15 | ] 16 | 17 | def register(): 18 | from ...rfb_utils import register_utils 19 | 20 | for cls in classes: 21 | cls._add_properties(cls, 'rman_properties_curve') 22 | register_utils.rman_register_class(cls) 23 | 24 | bpy.types.Curve.renderman = PointerProperty( 25 | type=RendermanCurveGeometrySettings, 26 | name="Renderman Curve Geometry Settings") 27 | 28 | bpy.types.Curves.renderman = PointerProperty( 29 | type=RendermanCurveGeometrySettings, 30 | name="Renderman Curve Geometry Settings") 31 | 32 | def unregister(): 33 | 34 | del bpy.types.Curve.renderman 35 | del bpy.types.Curves.renderman 36 | 37 | from ...rfb_utils import register_utils 38 | 39 | register_utils.rman_unregister_classes(classes) -------------------------------------------------------------------------------- /rman_translators/rman_brickmap_translator.py: -------------------------------------------------------------------------------- 1 | from .rman_translator import RmanTranslator 2 | from ..rman_sg_nodes.rman_sg_brickmap import RmanSgBrickmap 3 | from ..rfb_utils import string_utils 4 | 5 | import bpy 6 | 7 | class RmanBrickmapTranslator(RmanTranslator): 8 | 9 | def __init__(self, rman_scene): 10 | super().__init__(rman_scene) 11 | self.bl_type = 'BRICKMAP' 12 | 13 | def export(self, ob, db_name): 14 | 15 | sg_node = self.rman_scene.sg_scene.CreateGeometry(db_name) 16 | sg_node.SetGeometry(self.rman_scene.rman.Tokens.Rix.k_Ri_BrickMap) 17 | rman_sg_brickmap = RmanSgBrickmap(self.rman_scene, sg_node, db_name) 18 | 19 | return rman_sg_brickmap 20 | 21 | def export_deform_sample(self, rman_sg_brickmap, ob, time_sample): 22 | pass 23 | 24 | def update(self, ob, rman_sg_brickmap): 25 | primvar = rman_sg_brickmap.sg_node.GetPrimVars() 26 | rm = ob.renderman 27 | if string_utils.check_frame_sensitive(rm.bkm_filepath): 28 | rman_sg_brickmap.is_frame_sensitive = True 29 | else: 30 | rman_sg_brickmap.is_frame_sensitive = False 31 | bkm_filepath = string_utils.expand_string(rm.bkm_filepath) 32 | primvar.SetString("filename", bkm_filepath) 33 | super().export_object_primvars(ob, primvar) 34 | rman_sg_brickmap.sg_node.SetPrimVars(primvar) -------------------------------------------------------------------------------- /rman_properties/rman_properties_volume/__init__.py: -------------------------------------------------------------------------------- 1 | from bpy.props import BoolProperty, PointerProperty, StringProperty, EnumProperty 2 | 3 | from ...rfb_logger import rfb_log 4 | from ...rman_config import RmanBasePropertyGroup 5 | from ...rfb_utils import filepath_utils 6 | import os 7 | import bpy 8 | 9 | class RendermanVolumeGeometrySettings(RmanBasePropertyGroup, bpy.types.PropertyGroup): 10 | 11 | def check_openvdb(self): 12 | ob = bpy.context.object 13 | if ob.type != 'VOLUME': 14 | return False 15 | volume = bpy.context.volume 16 | openvdb_file = filepath_utils.get_real_path(volume.filepath) 17 | return os.path.exists(openvdb_file) 18 | 19 | has_openvdb: BoolProperty(name='', get=check_openvdb) 20 | 21 | classes = [ 22 | RendermanVolumeGeometrySettings 23 | ] 24 | 25 | def register(): 26 | from ...rfb_utils import register_utils 27 | 28 | for cls in classes: 29 | cls._add_properties(cls, 'rman_properties_volume') 30 | register_utils.rman_register_class(cls) 31 | 32 | bpy.types.Volume.renderman = PointerProperty( 33 | type=RendermanVolumeGeometrySettings, 34 | name="Renderman Voume Geometry Settings") 35 | 36 | def unregister(): 37 | 38 | del bpy.types.Volume.renderman 39 | 40 | from ...rfb_utils import register_utils 41 | 42 | register_utils.rman_unregister_classes(classes) -------------------------------------------------------------------------------- /rman_operators/__init__.py: -------------------------------------------------------------------------------- 1 | from . import rman_operators_printer 2 | from . import rman_operators_view3d 3 | from . import rman_operators_render 4 | from . import rman_operators_rib 5 | from . import rman_operators_nodetree 6 | from . import rman_operators_collections 7 | from . import rman_operators_editors 8 | from . import rman_operators_stylized 9 | from . import rman_operators_mesh 10 | from . import rman_operators_volumes 11 | from . import rman_operators_utils 12 | 13 | def register(): 14 | rman_operators_printer.register() 15 | rman_operators_view3d.register() 16 | rman_operators_render.register() 17 | rman_operators_rib.register() 18 | rman_operators_nodetree.register() 19 | rman_operators_collections.register() 20 | rman_operators_editors.register() 21 | rman_operators_stylized.register() 22 | rman_operators_mesh.register() 23 | rman_operators_volumes.register() 24 | rman_operators_utils.register() 25 | 26 | def unregister(): 27 | rman_operators_printer.unregister() 28 | rman_operators_view3d.unregister() 29 | rman_operators_render.unregister() 30 | rman_operators_rib.unregister() 31 | rman_operators_nodetree.unregister() 32 | rman_operators_collections.unregister() 33 | rman_operators_editors.unregister() 34 | rman_operators_stylized.unregister() 35 | rman_operators_mesh.unregister() 36 | rman_operators_volumes.unregister() 37 | rman_operators_utils.unregister() -------------------------------------------------------------------------------- /rman_translators/rman_runprogram_translator.py: -------------------------------------------------------------------------------- 1 | from .rman_translator import RmanTranslator 2 | from ..rman_sg_nodes.rman_sg_runprogram import RmanSgRunProgram 3 | 4 | class RmanRunProgramTranslator(RmanTranslator): 5 | 6 | def __init__(self, rman_scene): 7 | super().__init__(rman_scene) 8 | self.bl_type = 'PROCEDURAL_RUN_PROGRAM' 9 | 10 | def export(self, ob, db_name): 11 | 12 | sg_node = self.rman_scene.sg_scene.CreateProcedural(db_name) 13 | sg_node.Define(self.rman_scene.rman.Tokens.Rix.k_RunProgram, None) 14 | rman_sg_runprogram = RmanSgRunProgram(self.rman_scene, sg_node, db_name) 15 | 16 | return rman_sg_runprogram 17 | 18 | def export_deform_sample(self, rman_sg_runprogram, ob, time_sample): 19 | pass 20 | 21 | 22 | def update(self, ob, rman_sg_runprogram): 23 | rm = ob.renderman 24 | path_runprogram = rm.path_runprogram 25 | bounds = (-100000, 100000, -100000, 100000, -100000, 100000 ) 26 | 27 | primvar = rman_sg_runprogram.sg_node.GetPrimVars() 28 | primvar.SetString(self.rman_scene.rman.Tokens.Rix.k_filename, path_runprogram) 29 | primvar.SetString(self.rman_scene.rman.Tokens.Rix.k_data, rm.runprogram_args) 30 | primvar.SetFloatArray(self.rman_scene.rman.Tokens.Rix.k_bound, bounds, 6) 31 | super().export_object_primvars(ob, primvar) 32 | rman_sg_runprogram.sg_node.SetPrimVars(primvar) 33 | -------------------------------------------------------------------------------- /rman_translators/rman_dra_translator.py: -------------------------------------------------------------------------------- 1 | from .rman_translator import RmanTranslator 2 | from ..rman_sg_nodes.rman_sg_dra import RmanSgDra 3 | from ..rfb_utils import string_utils 4 | 5 | class RmanDraTranslator(RmanTranslator): 6 | 7 | def __init__(self, rman_scene): 8 | super().__init__(rman_scene) 9 | self.bl_type = 'DELAYED_LOAD_ARCHIVE' 10 | 11 | def export(self, ob, db_name): 12 | 13 | sg_node = self.rman_scene.sg_scene.CreateProcedural(db_name) 14 | sg_node.Define("DelayedReadArchive", None) 15 | rman_sg_dra = RmanSgDra(self.rman_scene, sg_node, db_name) 16 | 17 | return rman_sg_dra 18 | 19 | def export_deform_sample(self, rman_sg_dra, ob, time_sample): 20 | pass 21 | 22 | 23 | def update(self, ob, rman_sg_dra): 24 | rm = ob.renderman 25 | if string_utils.check_frame_sensitive(rm.path_archive): 26 | rman_sg_dra.is_frame_sensitive = True 27 | else: 28 | rman_sg_dra.is_frame_sensitive = False 29 | path_archive = string_utils.expand_string(rm.path_archive) 30 | bounds = (-100000, 100000, -100000, 100000, -100000, 100000 ) 31 | 32 | primvar = rman_sg_dra.sg_node.GetPrimVars() 33 | primvar.SetString(self.rman_scene.rman.Tokens.Rix.k_filename, path_archive) 34 | primvar.SetFloatArray(self.rman_scene.rman.Tokens.Rix.k_bound, bounds, 6) 35 | 36 | rman_sg_dra.sg_node.SetPrimVars(primvar) 37 | -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_material.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgMaterial(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | 8 | self.has_meshlight = False 9 | self.is_gp_material = False 10 | self.sg_stroke_mat = None 11 | self.sg_fill_mat = None 12 | self.nodes_to_blnodeinfo = dict() 13 | self.sg_group = rman_scene.sg_scene.CreateGroup("__lightFilterParent") 14 | self.sg_lightfilters = list() # list to hold light filter transforms 15 | 16 | @property 17 | def has_meshlight(self): 18 | return self.__has_meshlight 19 | 20 | @has_meshlight.setter 21 | def has_meshlight(self, has_meshlight): 22 | self.__has_meshlight = has_meshlight 23 | 24 | @property 25 | def is_gp_material(self): 26 | return self.__is_gp_material 27 | 28 | @is_gp_material.setter 29 | def is_gp_material(self, is_gp_material): 30 | self.__is_gp_material = is_gp_material 31 | 32 | @property 33 | def sg_stroke_mat(self): 34 | return self.__sg_stroke_mat 35 | 36 | @sg_stroke_mat.setter 37 | def sg_stroke_mat(self, sg_stroke_mat): 38 | self.__sg_stroke_mat = sg_stroke_mat 39 | 40 | @property 41 | def sg_fill_mat(self): 42 | return self.__sg_fill_mat 43 | 44 | @sg_fill_mat.setter 45 | def sg_fill_mat(self, sg_fill_mat): 46 | self.__sg_fill_mat = sg_fill_mat -------------------------------------------------------------------------------- /rman_properties/__init__.py: -------------------------------------------------------------------------------- 1 | from . import rman_properties_scene 2 | from . import rman_properties_misc 3 | from . import rman_properties_object 4 | from . import rman_properties_mesh 5 | from . import rman_properties_material 6 | from . import rman_properties_curve 7 | from . import rman_properties_world 8 | from . import rman_properties_renderlayers 9 | from . import rman_properties_camera 10 | from . import rman_properties_particles 11 | from . import rman_properties_volume 12 | 13 | def pre_register(): 14 | # These properties have to be registered before 15 | # we start parsing our shading nodes 16 | rman_properties_misc.register() 17 | 18 | def register(): 19 | 20 | rman_properties_renderlayers.register() 21 | rman_properties_scene.register() 22 | rman_properties_object.register() 23 | rman_properties_mesh.register() 24 | rman_properties_material.register() 25 | rman_properties_curve.register() 26 | rman_properties_world.register() 27 | rman_properties_camera.register() 28 | rman_properties_particles.register() 29 | rman_properties_volume.register() 30 | 31 | def unregister(): 32 | rman_properties_misc.unregister() 33 | rman_properties_renderlayers.unregister() 34 | rman_properties_scene.unregister() 35 | rman_properties_object.unregister() 36 | rman_properties_mesh.unregister() 37 | rman_properties_material.unregister() 38 | rman_properties_curve.unregister() 39 | rman_properties_world.unregister() 40 | rman_properties_camera.unregister() 41 | rman_properties_particles.unregister() 42 | rman_properties_volume.unregister() -------------------------------------------------------------------------------- /rman_presets/__init__.py: -------------------------------------------------------------------------------- 1 | # ##### BEGIN MIT LICENSE BLOCK ##### 2 | # 3 | # Copyright (c) 2015 - 2025 Pixar 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | # 23 | # 24 | # ##### END MIT LICENSE BLOCK ##### 25 | 26 | import bpy 27 | from . import properties 28 | if not bpy.app.background: 29 | from . import ui 30 | from . import operators 31 | 32 | def register(): 33 | properties.register() 34 | if not bpy.app.background: 35 | ui.register() 36 | operators.register() 37 | 38 | def unregister(): 39 | properties.unregister() 40 | if not bpy.app.background: 41 | ui.unregister() 42 | operators.unregister() -------------------------------------------------------------------------------- /rman_operators/rman_operators_printer.py: -------------------------------------------------------------------------------- 1 | from ..rfb_logger import rfb_log 2 | from bpy.types import Operator 3 | from bpy.props import StringProperty, EnumProperty 4 | import bpy 5 | 6 | class PRMAN_OT_Renderman_printer(Operator): 7 | """An operator to simply print messages.""" 8 | 9 | bl_idname = "renderman.printer" 10 | bl_label = "RenderMan Message" 11 | bl_options = {'INTERNAL'} 12 | 13 | message: StringProperty() 14 | 15 | level: EnumProperty( 16 | name="level", 17 | items=[ 18 | ('INFO', 'INFO', ''), 19 | ('ERROR', 'ERROR', ''), 20 | ('DEBUG', 'DEBUG', ''), 21 | ('WARNING', 'WARNING', '') 22 | ] 23 | ) 24 | 25 | @classmethod 26 | def poll(cls, context): 27 | if hasattr(context, 'window_manager'): 28 | return True 29 | return False 30 | 31 | 32 | def draw(self, context): 33 | layout = self.layout 34 | col = layout.column() 35 | rman_icon = 'ERROR' 36 | if self.level == 'INFO': 37 | rman_icon = 'INFO' 38 | 39 | col.label(text='%s' % self.message, icon=rman_icon) 40 | 41 | def execute(self, context): 42 | #self.report({'ERROR'}, '%s' % self.message ) 43 | return{'FINISHED'} 44 | 45 | def invoke(self, context, event): 46 | wm = context.window_manager 47 | width = len(self.properties.message) * 10 48 | return wm.invoke_props_dialog(self, width=width) 49 | 50 | classes = [ 51 | PRMAN_OT_Renderman_printer 52 | ] 53 | 54 | def register(): 55 | from ..rfb_utils import register_utils 56 | 57 | register_utils.rman_register_classes(classes) 58 | 59 | def unregister(): 60 | from ..rfb_utils import register_utils 61 | 62 | register_utils.rman_unregister_classes(classes) -------------------------------------------------------------------------------- /rfb_unittests/test_geo.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | import bpy 3 | import numpy as np 4 | from ..rfb_utils import mesh_utils 5 | from ..rman_constants import BLENDER_41 6 | 7 | 8 | class GeoTest(unittest.TestCase): 9 | 10 | @classmethod 11 | def add_tests(self, suite): 12 | suite.addTest(GeoTest('test_mesh_export')) 13 | 14 | def test_mesh_export(self): 15 | 16 | def test_eq(a, b, msg=None): 17 | if a != b: 18 | msg = "Mesh export test failed" 19 | bpy.ops.object.delete() 20 | raise self.failureException(msg) 21 | 22 | nverts = [4, 4, 4, 4, 4, 4] 23 | verts = [0, 1, 3, 2, 2, 3, 7, 6, 6, 7, 5, 4, 4, 5, 1, 0, 2, 6, 4, 0, 7, 3, 1, 5] 24 | P = [-1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0] 25 | if BLENDER_41: 26 | N = [-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0] 27 | else: 28 | N = [-1.0, -0.0, 0.0, 0.0, 1.0, 0.0, 1.0, -0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, -0.0, 1.0] 29 | 30 | mesh = mesh_utils.RmanMesh(nverts, verts, P, N) 31 | 32 | bpy.ops.mesh.primitive_cube_add() 33 | ob = bpy.context.object 34 | 35 | mesh_test = mesh_utils.get_mesh(ob.data, get_normals=True) 36 | 37 | self.addTypeEqualityFunc(mesh_utils.RmanMesh, test_eq) 38 | self.assertEqual(mesh, mesh_test) 39 | bpy.ops.object.delete() 40 | 41 | 42 | -------------------------------------------------------------------------------- /installation.txt: -------------------------------------------------------------------------------- 1 | RenderMan for Blender Installation Instructions 2 | ------------------------------------------ 3 | (NOTE: current **MacOS** support is limited to the **Intel** variant; M1/M2 Macs can still run RenderManForBlender on the Mac/Intel version of Blender) 4 | 5 | 1. Install Blender if not already (4.1 and above is recommended) 6 | 7 | 2. Register for the free Non-Commercial Version of RenderMan from Pixar. 8 | https://renderman.pixar.com/store/intro 9 | 10 | 3. Download and install RenderMan Pro Server Package and 11 | installation instructions at: http://rendermansite.pixar.com/view/get-renderman 12 | You need to install at a minimum RenderMan Pro Server 27.0 13 | It is recommended to install RenderMan Pro Server in the default location (or see advanced instructions below) 14 | 15 | 3.A If on Windows, be sure to restart after installing RenderMan Pro Server 16 | 17 | 4. Download the latest release of the RenderMan for Blender addon 18 | https://github.com/prman-pixar/RenderManForBlender/releases save the zip file somewhere. 19 | 20 | 5. Start Blender, and from the File->User Preferences->Add-ons install the zip file from step 4. 21 | 22 | 6. Change your renderer to RenderMan and start rendering! 23 | 24 | 25 | ADVANCED: 26 | RenderMan normally bases everything off a variable RMANTREE which is set to your installation 27 | folder, eg /Applications/Pixar/RenderManProServer-27.0 on OSX and C:\Program Files\Pixar\RenderManProServer-27.0 on Windows. 28 | 29 | RenderMan for Blender will try and guess the appropriate RenderMan version to use and the location of 30 | the RMANTREE folder. If you are installing RenderMan to the standard location you shouldn't have to do anything! 31 | 32 | However, if you installed in a non-standard location, set the RMANTREE 33 | environment variable before starting blender. 34 | 35 | Furthermore, advanced options for finding the RenderMan Pro Server location 36 | are in the addon preferences. 37 | -------------------------------------------------------------------------------- /rman_sg_nodes/rman_sg_mesh.py: -------------------------------------------------------------------------------- 1 | from .rman_sg_node import RmanSgNode 2 | 3 | class RmanSgMesh(RmanSgNode): 4 | 5 | def __init__(self, rman_scene, sg_node, db_name): 6 | super().__init__(rman_scene, sg_node, db_name) 7 | self.matrix_world = None 8 | self.npolys = -1 9 | self.npoints = -1 10 | self.nverts = -1 11 | self.is_subdiv = False 12 | self.subdiv_scheme = 'none' 13 | self.is_multi_material = False 14 | self.multi_material_children = [] 15 | self.sg_mesh = None 16 | 17 | def __del__(self): 18 | if self.rman_scene.rman_render.rman_context.is_render_running() and self.rman_scene.rman_render.sg_scene: 19 | with self.rman_scene.rman.SGManager.ScopedEdit(self.rman_scene.sg_scene): 20 | self.rman_scene.sg_scene.DeleteDagNode(self.sg_mesh) 21 | super().__del__() 22 | 23 | @property 24 | def matrix_world(self): 25 | return self.__matrix_world 26 | 27 | @matrix_world.setter 28 | def matrix_world(self, mtx): 29 | self.__matrix_world = mtx 30 | 31 | @property 32 | def npolys(self): 33 | return self.__npolys 34 | 35 | @npolys.setter 36 | def npolys(self, npolys): 37 | self.__npolys = npolys 38 | 39 | @property 40 | def npoints(self): 41 | return self.__npoints 42 | 43 | @npoints.setter 44 | def npoints(self, npoints): 45 | self.__npoints = npoints 46 | 47 | @property 48 | def nverts(self): 49 | return self.__nverts 50 | 51 | @nverts.setter 52 | def nverts(self, nverts): 53 | self.__nverts = nverts 54 | 55 | @property 56 | def is_subdiv(self): 57 | return self.__is_subdiv 58 | 59 | @is_subdiv.setter 60 | def is_subdiv(self, is_subdiv): 61 | self.__is_subdiv = is_subdiv 62 | 63 | @property 64 | def subdiv_scheme(self): 65 | return self.__subdiv_scheme 66 | 67 | @subdiv_scheme.setter 68 | def subdiv_scheme(self, subdiv_scheme): 69 | self.__subdiv_scheme = subdiv_scheme -------------------------------------------------------------------------------- /rman_properties/rman_properties_camera/__init__.py: -------------------------------------------------------------------------------- 1 | import bpy 2 | from bpy.props import PointerProperty, BoolProperty, \ 3 | EnumProperty, FloatProperty, StringProperty 4 | from ... import rman_config 5 | from ...rman_config import RmanBasePropertyGroup 6 | from ...rfb_logger import rfb_log 7 | 8 | class RendermanCameraSettings(RmanBasePropertyGroup, bpy.types.PropertyGroup): 9 | bl_label = "RenderMan Camera Settings" 10 | bl_idname = 'RendermanCameraSettings' 11 | 12 | rman_config_name: StringProperty(name='rman_config_name', 13 | default='rman_properties_camera') 14 | 15 | rman_nodetree: PointerProperty( 16 | name="NodeTree", 17 | type=bpy.types.ShaderNodeTree 18 | ) 19 | 20 | rman_use_cam_fov: BoolProperty( 21 | name="Use Camera FOV", 22 | default=True, 23 | description="When using a projection plugin, copy the FOV settings from the camera object, effectively ignoring any FOV params on the projection plugin." 24 | ) 25 | 26 | def validate_shift_object(self, ob): 27 | if ob.type == 'MESH': 28 | return True 29 | return False 30 | 31 | rman_tilt_shift_object: PointerProperty( 32 | name="Tilt-Shift Object Focus", 33 | type=bpy.types.Object, 34 | poll=validate_shift_object, 35 | description="Select an object to represent the tilt-shift focus points. Must be a triangle. If an object is selected, Focus 1, Focus 2, and Focus 3 values are ignored." 36 | ) 37 | 38 | classes = [ 39 | RendermanCameraSettings, 40 | ] 41 | 42 | def register(): 43 | from ...rfb_utils import register_utils 44 | 45 | for cls in classes: 46 | cls._add_properties(cls, 'rman_properties_camera') 47 | register_utils.rman_register_class(cls) 48 | 49 | bpy.types.Camera.renderman = PointerProperty( 50 | type=RendermanCameraSettings, name="Renderman Camera Settings") 51 | 52 | def unregister(): 53 | from ...rfb_utils import register_utils 54 | 55 | del bpy.types.Camera.renderman 56 | 57 | register_utils.rman_unregister_classes(classes) -------------------------------------------------------------------------------- /rman_translators/rman_volume_translator.py: -------------------------------------------------------------------------------- 1 | from .rman_translator import RmanTranslator 2 | from ..rman_sg_nodes.rman_sg_volume import RmanSgVolume 3 | from ..rfb_utils import scenegraph_utils 4 | from ..rfb_utils import transform_utils 5 | from ..rfb_utils import property_utils 6 | from ..rfb_logger import rfb_log 7 | 8 | import bpy 9 | 10 | class RmanVolumeTranslator(RmanTranslator): 11 | 12 | def __init__(self, rman_scene): 13 | super().__init__(rman_scene) 14 | self.bl_type = 'RI_VOLUME' 15 | 16 | def export(self, ob, db_name): 17 | 18 | sg_node = self.rman_scene.sg_scene.CreateVolume(db_name) 19 | rman_sg_volume = RmanSgVolume(self.rman_scene, sg_node, db_name) 20 | 21 | return rman_sg_volume 22 | 23 | def export_deform_sample(self, rman_sg_volume, ob, time_sample): 24 | pass 25 | 26 | def update_primvar(self, ob, rman_sg_volume, prop_name): 27 | primvars = rman_sg_volume.sg_node.GetPrimVars() 28 | super().update_object_primvar(ob, primvars, prop_name) 29 | rman_sg_volume.sg_node.SetPrimVars(primvars) 30 | 31 | def update(self, ob, rman_sg_volume): 32 | rman_sg_volume.sg_node.Define(0,0,0) 33 | primvar = rman_sg_volume.sg_node.GetPrimVars() 34 | primvar.SetString(self.rman_scene.rman.Tokens.Rix.k_Ri_type, "box") 35 | if ob.type == 'EMPTY': 36 | scale = [1.0, 1.0, 1.0] #ob.scale 37 | display_size = ob.empty_display_size 38 | bound_box = [-display_size * scale[0], display_size * scale[0], -display_size * scale[1], display_size * scale[1], -display_size * scale[2], display_size * scale[2] ] 39 | primvar.SetFloatArray(self.rman_scene.rman.Tokens.Rix.k_Ri_Bound, bound_box, 6) 40 | else: 41 | primvar.SetFloatArray(self.rman_scene.rman.Tokens.Rix.k_Ri_Bound, transform_utils.convert_ob_bounds(ob.bound_box), 6) 42 | scenegraph_utils.export_vol_aggregate(self.rman_scene.bl_scene, primvar, ob) 43 | super().export_object_primvars(ob, primvar) 44 | rman_sg_volume.sg_node.SetPrimVars(primvar) -------------------------------------------------------------------------------- /rman_config/config/rman_properties_aov.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rman_properties_aov", 3 | "params": [ 4 | { 5 | "panel": "RENDER_PT_layer_custom_aovs", 6 | "name": "show_displaydriver_settings", 7 | "label": "show_displaydriver_settings", 8 | "type": "int", 9 | "default": 0, 10 | "widget": "checkbox", 11 | "page": "", 12 | "help": "Show Display Driver Settings" 13 | }, 14 | { 15 | "panel": "RENDER_PT_layer_custom_aovs", 16 | "name": "denoise", 17 | "label": "Denoise", 18 | "type": "int", 19 | "default": 0, 20 | "widget": "checkbox", 21 | "page": "", 22 | "help": "Denoise this AOV. Note, the beauty pass denoise needs to be enabled, in order to denoise any other AOVs." 23 | }, 24 | { 25 | "panel": "RENDER_PT_layer_custom_aovs", 26 | "name": "denoise_mode", 27 | "label": "Denoise Mode", 28 | "type": "string", 29 | "default": "singleframe", 30 | "widget": "mapper", 31 | "options": "Single Frame:singleframe|Cross Frame:crossframe", 32 | "page": "", 33 | "help": "" 34 | }, 35 | { 36 | "panel": "RENDER_PT_layer_custom_aovs", 37 | "page": "", 38 | "name": "camera", 39 | "label": "Camera", 40 | "type": "string", 41 | "widget": "bl_scenegraphLocation", 42 | "options": "nodeType:bpy.types.Camera", 43 | "default": "" 44 | }, 45 | { 46 | "panel": "RENDER_PT_layer_custom_aovs", 47 | "page": "", 48 | "name": "aov_bake", 49 | "label": "Bake", 50 | "type": "int", 51 | "widget": "checkbox", 52 | "default": 0, 53 | "help": "Bake illumination for this AOV. Note, we can only bake color channels. All other channel types will be ignored." 54 | } 55 | ] 56 | } -------------------------------------------------------------------------------- /rman_properties/rman_properties_mesh/__init__.py: -------------------------------------------------------------------------------- 1 | from bpy.props import PointerProperty, IntProperty, CollectionProperty, BoolProperty 2 | 3 | from ...rfb_logger import rfb_log 4 | from ...rman_config import RmanBasePropertyGroup 5 | from ..rman_properties_misc import RendermanMeshPrimVar, RendermanReferencePosePrimVars, RendermanReferencePoseNormalsPrimVars 6 | 7 | import bpy 8 | 9 | class RendermanMeshGeometrySettings(RmanBasePropertyGroup, bpy.types.PropertyGroup): 10 | output_all_primvars: BoolProperty( 11 | name="Output All Attributes", 12 | default=False, 13 | description="If you like to output all attributes as primitive variables, click this on. Note, turning this on will slow down export time of the scene." 14 | ) 15 | prim_vars: CollectionProperty( 16 | type=RendermanMeshPrimVar, name="Primitive Variables") 17 | prim_vars_index: IntProperty(min=-1, default=-1) 18 | 19 | reference_pose: CollectionProperty( 20 | type=RendermanReferencePosePrimVars, name="" 21 | ) 22 | 23 | reference_pose_normals: CollectionProperty( 24 | type=RendermanReferencePoseNormalsPrimVars, name="" 25 | ) 26 | 27 | classes = [ 28 | RendermanMeshGeometrySettings 29 | ] 30 | 31 | def register(): 32 | 33 | from ...rfb_utils import register_utils 34 | 35 | for cls in classes: 36 | cls._add_properties(cls, 'rman_properties_mesh') 37 | register_utils.rman_register_class(cls) 38 | 39 | bpy.types.Mesh.renderman = PointerProperty( 40 | type=RendermanMeshGeometrySettings, 41 | name="Renderman Mesh Geometry Settings") 42 | 43 | # blender 3.6 provides us a mesh version 44 | # of metaballs, so we need to add a renderman 45 | # pointer property in order to use the rman_mesh_translator 46 | bpy.types.MetaBall.renderman = PointerProperty( 47 | type=RendermanMeshGeometrySettings, 48 | name="Renderman Mesh Geometry Settings") 49 | 50 | def unregister(): 51 | 52 | del bpy.types.Mesh.renderman 53 | 54 | from ...rfb_utils import register_utils 55 | register_utils.rman_unregister_classes(classes) -------------------------------------------------------------------------------- /rfb_utils/prefs_utils.py: -------------------------------------------------------------------------------- 1 | from ..rman_constants import RFB_PREFS_NAME, BLENDER_PYTHON_VERSION_MAJOR, BLENDER_PYTHON_VERSION_MINOR 2 | import bpy 3 | import sys 4 | import os 5 | 6 | IMPORT_QT_SUCCEED = None 7 | 8 | def get_addon_prefs(): 9 | try: 10 | addon = bpy.context.preferences.addons[RFB_PREFS_NAME] 11 | return addon.preferences 12 | except: 13 | # try looking for all variants of RFB_PREFS_NAME 14 | for k, v in bpy.context.preferences.addons.items(): 15 | if RFB_PREFS_NAME in k: 16 | return v 17 | return None 18 | 19 | def _have_pyside(): 20 | global IMPORT_QT_SUCCEED 21 | if IMPORT_QT_SUCCEED is None: 22 | for p in sys.path: 23 | for root, dirnames, files in os.walk(p): 24 | for d in dirnames: 25 | if 'PySide' in d: 26 | IMPORT_QT_SUCCEED = True 27 | break 28 | 29 | return IMPORT_QT_SUCCEED 30 | 31 | def using_qt(): 32 | if bpy.app.background: 33 | return False 34 | if not _have_pyside(): 35 | return False 36 | return get_pref('rman_ui_framework') == 'QT' 37 | 38 | def show_wip_qt(): 39 | if bpy.app.background: 40 | return False 41 | if not _have_pyside(): 42 | return False 43 | return get_pref('rman_show_wip_qt') 44 | 45 | def single_node_view(): 46 | return get_pref('rman_single_node_view') 47 | 48 | def get_pref(pref_name='', default=None): 49 | """ Return the value of a preference 50 | 51 | Args: 52 | pref_name (str) - name of the preference to look up 53 | default (AnyType) - default to return, if pref_name doesn't exist 54 | 55 | Returns: 56 | (AnyType) - preference value. 57 | """ 58 | 59 | prefs = get_addon_prefs() 60 | if not prefs: 61 | if default is None: 62 | from ..preferences import __DEFAULTS__ 63 | default = __DEFAULTS__.get(pref_name, None) 64 | return default 65 | return getattr(prefs, pref_name, default) 66 | 67 | def get_bl_temp_dir(): 68 | return bpy.context.preferences.filepaths.temporary_directory -------------------------------------------------------------------------------- /rman_ui/rman_ui_scene_panels.py: -------------------------------------------------------------------------------- 1 | from .rman_ui_base import PRManButtonsPanel 2 | from bpy.types import Panel 3 | import bpy 4 | 5 | class PRMAN_PT_Renderman_Light_Mixer_Panel(PRManButtonsPanel, Panel): 6 | bl_label = "RenderMan Light Mixer" 7 | bl_context = "scene" 8 | bl_space_type = 'PROPERTIES' 9 | bl_region_type = 'WINDOW' 10 | 11 | def draw(self, context): 12 | layout = self.layout 13 | scene = context.scene 14 | rm = scene.renderman 15 | 16 | row = layout.row() 17 | row.operator('scene.rman_open_light_mixer_editor', text='Open Light Mixer Editor') 18 | 19 | class PRMAN_PT_Renderman_Light_Linking_Panel(PRManButtonsPanel, Panel): 20 | bl_label = "RenderMan Light Linking" 21 | bl_context = "scene" 22 | bl_space_type = 'PROPERTIES' 23 | bl_region_type = 'WINDOW' 24 | 25 | @classmethod 26 | def poll(cls, context): 27 | rd = context.scene.render 28 | return rd.engine == 'PRMAN_RENDER' 29 | 30 | def draw(self, context): 31 | layout = self.layout 32 | scene = context.scene 33 | 34 | layout.operator('scene.rman_open_light_linking', text='Open Light Linking') 35 | 36 | class PRMAN_PT_Renderman_Groups_Panel(PRManButtonsPanel, Panel): 37 | bl_label = "RenderMan Trace Sets" 38 | bl_context = "scene" 39 | bl_space_type = 'PROPERTIES' 40 | bl_region_type = 'WINDOW' 41 | 42 | @classmethod 43 | def poll(cls, context): 44 | rd = context.scene.render 45 | return rd.engine == 'PRMAN_RENDER' 46 | 47 | def draw(self, context): 48 | layout = self.layout 49 | layout.operator('scene.rman_open_groups_editor', text='Trace Sets Editor') 50 | 51 | classes = [ 52 | PRMAN_PT_Renderman_Light_Mixer_Panel, 53 | PRMAN_PT_Renderman_Light_Linking_Panel, 54 | PRMAN_PT_Renderman_Groups_Panel 55 | ] 56 | 57 | def register(): 58 | from ..rfb_utils import register_utils 59 | 60 | register_utils.rman_register_classes(classes) 61 | 62 | def unregister(): 63 | from ..rfb_utils import register_utils 64 | 65 | register_utils.rman_unregister_classes(classes) -------------------------------------------------------------------------------- /rfb_utils/color_manager_blender.py: -------------------------------------------------------------------------------- 1 | import os 2 | import bpy 3 | import sys 4 | from ..rfb_utils.envconfig_utils import envconfig 5 | try: 6 | from rman_utils.color_manager import ColorManager 7 | except: 8 | ColorManager = None 9 | 10 | __clrmgr__ = None 11 | __has_warned__ = False 12 | 13 | class ColorManagerBlender(ColorManager): 14 | def __init__(self, config_path, **kwargs): 15 | super(ColorManagerBlender, self).__init__(config_path, **kwargs) 16 | 17 | def update(self): 18 | ociopath = get_env_config_path() 19 | super(ColorManagerBlender, self).update(ociopath) 20 | 21 | def color_manager(): 22 | """return the color manager singleton 23 | """ 24 | if __clrmgr__ is None: 25 | init() 26 | return __clrmgr__ 27 | 28 | 29 | def init(): 30 | """initialize ColorManager 31 | """ 32 | global __clrmgr__ 33 | 34 | if __clrmgr__ is None: 35 | ociopath = get_env_config_path() 36 | if ColorManager: 37 | __clrmgr__ = ColorManagerBlender(ociopath) 38 | 39 | def get_env_config_path(): 40 | """return ocio config path from the environment 41 | """ 42 | global __has_warned__ 43 | blender_config_path = envconfig().get_blender_ocio_config() 44 | envconfig_path = envconfig().getenv('OCIO', None) 45 | ociopath = blender_config_path 46 | if envconfig_path: 47 | if os.path.exists(envconfig_path): 48 | ociopath = envconfig_path 49 | elif not __has_warned__: 50 | bpy.ops.renderman.printer('INVOKE_DEFAULT', level='WARNING', message='OCIO environment value (%s) is invalid.' % envconfig_path) 51 | __has_warned__ = True 52 | return ociopath 53 | 54 | def get_config_path(): 55 | """return ocio config path 56 | """ 57 | clrmgr = color_manager() 58 | if clrmgr: 59 | return clrmgr.config_file_path() 60 | 61 | return get_env_config_path() 62 | 63 | def get_colorspace_name(): 64 | """return the scene colorspace name. updating with $OCIO 65 | """ 66 | clrmgr = color_manager() 67 | 68 | if ColorManager: 69 | clrmgr.update() 70 | return clrmgr.scene_colorspace_name 71 | 72 | return "" -------------------------------------------------------------------------------- /rfb_utils/json_file.py: -------------------------------------------------------------------------------- 1 | """ 2 | Load and save JSON data. 3 | No exception handling at all: should be handled by the caller. 4 | """ 5 | 6 | # ##### BEGIN MIT LICENSE BLOCK ##### 7 | # 8 | # Copyright (c) 2015 - 2025 Pixar 9 | # 10 | # Permission is hereby granted, free of charge, to any person obtaining a copy 11 | # of this software and associated documentation files (the "Software"), to deal 12 | # in the Software without restriction, including without limitation the rights 13 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | # copies of the Software, and to permit persons to whom the Software is 15 | # furnished to do so, subject to the following conditions: 16 | # 17 | # The above copyright notice and this permission notice shall be included in 18 | # all copies or substantial portions of the Software. 19 | # 20 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 26 | # THE SOFTWARE. 27 | # 28 | # 29 | # ##### END MIT LICENSE BLOCK ##### 30 | 31 | import json 32 | from collections import OrderedDict 33 | 34 | 35 | def load(file_path, ordered=False): 36 | """Load a JSON file from disk. 37 | 38 | Args: 39 | - file_path (FilePath): The fully qualified file path. 40 | 41 | Returns: 42 | - dict: The JSON data 43 | """ 44 | 45 | fh = open(file_path, mode='r') 46 | data = None 47 | if ordered: 48 | data = json.load(fh, object_pairs_hook=OrderedDict) 49 | else: 50 | data = json.load(fh) 51 | fh.close() 52 | return data 53 | 54 | 55 | def save(data, file_path): 56 | """Save a dict as a JSON file. 57 | 58 | Args: 59 | - data (dict): The JSON data. 60 | 61 | Returns: 62 | - None 63 | """ 64 | fh = open(file_path, mode='w') 65 | json.dump(data, fh) 66 | fh.close() 67 | -------------------------------------------------------------------------------- /rman_ui/rman_ui_texteditor.py: -------------------------------------------------------------------------------- 1 | from ..rman_constants import RFB_ADDON_PATH 2 | from ..rfb_logger import rfb_log 3 | import bpy 4 | import os 5 | 6 | __TEMPLATE_BASE_PATH__ = os.path.join(RFB_ADDON_PATH, 'rman_text_templates') 7 | 8 | submenu_classes = [] 9 | 10 | class TEXT_MT_templates_renderman_base(bpy.types.Menu): 11 | bl_label = "RenderMan" 12 | bl_idname = "OBJECT_MT_renderman_base_menu" 13 | 14 | def draw(self, context): 15 | global submenu_classes 16 | layout = self.layout 17 | for submenu in submenu_classes: 18 | layout.menu(submenu) 19 | 20 | classes = [ 21 | TEXT_MT_templates_renderman_base, 22 | ] 23 | 24 | def register_renderman_template_submenus(): 25 | global classes 26 | 27 | def draw(self, context): 28 | layout = self.layout 29 | search_path = os.path.join(__TEMPLATE_BASE_PATH__, self.dir_name) 30 | self.path_menu( 31 | searchpaths=[search_path], 32 | operator="text.open", 33 | props_default={"internal": True} 34 | ) 35 | 36 | for nm in os.listdir(__TEMPLATE_BASE_PATH__): 37 | typename = 'TEXT_MT_templates_renderman_%s' % nm 38 | ntype = type(typename, (bpy.types.Menu,), {}) 39 | label = ' ' . join(nm.split('_')) 40 | ntype.bl_label = label 41 | ntype.bl_idname = 'OBJECT_MT_renderman_%s' % nm 42 | if "__annotations__" not in ntype.__dict__: 43 | setattr(ntype, "__annotations__", {}) 44 | ntype.draw = draw 45 | ntype.dir_name = nm 46 | classes.append(ntype) 47 | submenu_classes.append(ntype.bl_idname) 48 | 49 | def draw_item(self, context): 50 | layout = self.layout 51 | layout.menu(TEXT_MT_templates_renderman_base.bl_idname) 52 | 53 | def register(): 54 | from ..rfb_utils import register_utils 55 | 56 | register_renderman_template_submenus() 57 | register_utils.rman_register_classes(classes) 58 | 59 | bpy.types.TEXT_MT_templates.append(draw_item) 60 | 61 | def unregister(): 62 | from ..rfb_utils import register_utils 63 | 64 | register_utils.rman_unregister_classes(classes) 65 | 66 | bpy.types.TEXT_MT_templates.remove(draw_item) -------------------------------------------------------------------------------- /rman_translators/rman_alembic_translator.py: -------------------------------------------------------------------------------- 1 | from .rman_translator import RmanTranslator 2 | from ..rman_sg_nodes.rman_sg_alembic import RmanSgAlembic 3 | from ..rfb_utils import transform_utils 4 | from ..rfb_utils import string_utils 5 | from ..rfb_logger import rfb_log 6 | 7 | class RmanAlembicTranslator(RmanTranslator): 8 | 9 | def __init__(self, rman_scene): 10 | super().__init__(rman_scene) 11 | self.bl_type = 'ALEMBIC' 12 | 13 | def export(self, ob, db_name): 14 | 15 | sg_node = self.rman_scene.sg_scene.CreateProcedural(db_name) 16 | sg_node.Define("DynamicLoad", None) 17 | rman_sg_alembic = RmanSgAlembic(self.rman_scene, sg_node, db_name) 18 | 19 | return rman_sg_alembic 20 | 21 | def export_deform_sample(self, rman_sg_alembic, ob, time_sample): 22 | pass 23 | 24 | def update(self, ob, rman_sg_alembic): 25 | rm = ob.renderman 26 | abc_filepath = string_utils.expand_string(rm.abc_filepath) 27 | bounds = (-100000, 100000, -100000, 100000, -100000, 100000 ) 28 | 29 | primvar = rman_sg_alembic.sg_node.GetPrimVars() 30 | primvar.SetString(self.rman_scene.rman.Tokens.Rix.k_dsoname, 'AlembicProcPrim') 31 | primvar.SetFloatArray(self.rman_scene.rman.Tokens.Rix.k_bound, bounds, 6) 32 | 33 | shutter_interval = self.rman_scene.bl_scene.renderman.shutter_angle / 360.0 34 | shutter_open, shutter_close = 0, shutter_interval 35 | abc_frame = rm.abc_frame 36 | if rm.abc_use_scene_frame: 37 | rman_sg_alembic.is_frame_sensitive = True 38 | abc_frame = float(self.rman_scene.bl_frame_current) 39 | elif string_utils.check_frame_sensitive(abc_filepath): 40 | rman_sg_alembic.is_frame_sensitive = True 41 | else: 42 | rman_sg_alembic.is_frame_sensitive = False 43 | 44 | abc_args = "-filename %s" % abc_filepath 45 | abc_args += " -frame %f" % abc_frame 46 | abc_args += " -fps %f" % rm.abc_fps 47 | abc_args += " -shutteropen %f" % shutter_open 48 | abc_args += " -shutterclose %f" % shutter_close 49 | abc_args += " -velocityscale %f" % rm.abc_velocityScale 50 | abc_args += " -ccw" 51 | 52 | primvar.SetString(self.rman_scene.rman.Tokens.Rix.k_data, abc_args) 53 | super().export_object_primvars(ob, primvar) 54 | rman_sg_alembic.sg_node.SetPrimVars(primvar) 55 | 56 | -------------------------------------------------------------------------------- /rman_config/config/schemas/rfbDspyChansSchema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema#", 3 | "type": "object", 4 | "properties": { 5 | "channels": { 6 | "type": "object", 7 | "description": "displayChannel definitions", 8 | "additionalProperties": { 9 | "type": "object", 10 | "properties": { 11 | "description": { 12 | "type": "string" 13 | }, 14 | "channelType": { 15 | "description": "Basic data type of this channel.", 16 | "type": "string", 17 | "enum": [ 18 | "color", 19 | "float", 20 | "point", 21 | "vector", 22 | "normal", 23 | "integer", 24 | "float[2]" 25 | ] 26 | }, 27 | "channelSource": { 28 | "description": "A variable name or a LPE expression.", 29 | "type": "string" 30 | }, 31 | "group": { 32 | "description": "A group name or list of group names this channels belongs to in the UI.", 33 | "type": [ 34 | "string", 35 | "array" 36 | ], 37 | "items": { 38 | "type": "string" 39 | } 40 | } 41 | }, 42 | "additionalProperties": true 43 | } 44 | }, 45 | "displays": { 46 | "description": "A display definition, made of one or more channels.", 47 | "type": "object", 48 | "additionalProperties": { 49 | "type": "object", 50 | "properties": { 51 | "description": { 52 | "type": "string" 53 | }, 54 | "channels": { 55 | "description": "A list of displayChannels, referenced by name.", 56 | "type": "array", 57 | "items": { 58 | "type": "string" 59 | } 60 | } 61 | } 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /rman_ui/rman_ui_blender_panels.py: -------------------------------------------------------------------------------- 1 | import bpy 2 | 3 | def get_panels(): 4 | exclude_panels = { 5 | 'DATA_PT_area', 6 | 'DATA_PT_camera_dof', 7 | 'DATA_PT_falloff_curve', 8 | 'DATA_PT_light', 9 | 'DATA_PT_preview', 10 | 'DATA_PT_shadow', 11 | 'DATA_PT_sunsky', 12 | 'MATERIAL_PT_diffuse', 13 | 'MATERIAL_PT_flare', 14 | 'MATERIAL_PT_halo', 15 | 'MATERIAL_PT_mirror', 16 | 'MATERIAL_PT_options', 17 | 'MATERIAL_PT_pipeline', 18 | 'MATERIAL_PT_preview', 19 | 'MATERIAL_PT_shading', 20 | 'MATERIAL_PT_shadow', 21 | 'MATERIAL_PT_specular', 22 | 'MATERIAL_PT_sss', 23 | 'MATERIAL_PT_strand', 24 | 'MATERIAL_PT_transp', 25 | 'MATERIAL_PT_volume_density', 26 | 'MATERIAL_PT_volume_integration', 27 | 'MATERIAL_PT_volume_lighting', 28 | 'MATERIAL_PT_volume_options', 29 | 'MATERIAL_PT_volume_shading', 30 | 'MATERIAL_PT_volume_transp', 31 | 'RENDERLAYER_PT_layer_options', 32 | 'RENDERLAYER_PT_layer_passes', 33 | 'RENDERLAYER_PT_views', 34 | 'RENDER_PT_antialiasing', 35 | 'RENDER_PT_bake', 36 | 'RENDER_PT_performance', 37 | 'RENDER_PT_freestyle', 38 | 'RENDER_PT_shading', 39 | 'RENDER_PT_render', 40 | 'RENDER_PT_stamp', 41 | 'RENDER_PT_simplify', 42 | #'RENDER_PT_color_management', 43 | 'RENDER_PT_output', 44 | 'RENDER_PT_stereoscopy', 45 | 'TEXTURE_PT_context_texture', 46 | 'WORLD_PT_ambient_occlusion', 47 | 'WORLD_PT_environment_lighting', 48 | 'WORLD_PT_gather', 49 | 'WORLD_PT_indirect_lighting', 50 | 'WORLD_PT_mist', 51 | 'WORLD_PT_preview', 52 | 'WORLD_PT_world', 53 | 'NODE_DATA_PT_light', 54 | 'NODE_DATA_PT_spot', 55 | } 56 | 57 | panels = [] 58 | for t in bpy.types.Panel.__subclasses__(): 59 | if hasattr(t, 'COMPAT_ENGINES') and 'BLENDER_RENDER' in t.COMPAT_ENGINES: 60 | if t.__name__ not in exclude_panels: 61 | panels.append(t) 62 | 63 | return panels 64 | 65 | def register(): 66 | # This module is here to tell Blender which builtin panels we are 67 | # compatible with 68 | for panel in get_panels(): 69 | panel.COMPAT_ENGINES.add('PRMAN_RENDER') 70 | 71 | 72 | def unregister(): 73 | 74 | for panel in get_panels(): 75 | try: 76 | panel.COMPAT_ENGINES.remove('PRMAN_RENDER') 77 | except KeyError: 78 | continue -------------------------------------------------------------------------------- /rfb_utils/collection_utils.py: -------------------------------------------------------------------------------- 1 | from .rman_socket_utils import node_add_input 2 | 3 | def node_add_array_elem(node, collection, collection_index, param_name, elem_type): 4 | 5 | collection = getattr(node, collection) 6 | index = getattr(node, collection_index) 7 | meta = node.prop_meta[param_name] 8 | connectable = True 9 | if '__noconnection' in meta and meta['__noconnection']: 10 | connectable = False 11 | elem = collection.add() 12 | index = len(collection)-1 13 | setattr(node, collection_index, index) 14 | elem.name = '%s[%d]' % (param_name, len(collection)-1) 15 | elem.type = elem_type 16 | if connectable: 17 | param_array_label = '%s[%d]' % (meta.get('label', param_name), len(collection)-1) 18 | node_add_input(node, elem_type, elem.name, meta, param_array_label) 19 | 20 | def node_remove_array_elem(node, collection, collection_index, param_name, elem_type): 21 | collection = getattr(node, collection) 22 | index = getattr(node, collection_index) 23 | meta = node.prop_meta[param_name] 24 | connectable = True 25 | if '__noconnection' in meta and meta['__noconnection']: 26 | connectable = False 27 | idx = -1 28 | if connectable: 29 | # rename sockets 30 | def update_sockets(socket, name, label): 31 | link = None 32 | from_socket = None 33 | if socket.is_linked: 34 | link = socket.links[0] 35 | from_socket = link.from_socket 36 | node.inputs.remove(socket) 37 | new_socket = node_add_input(node, elem_type, name, meta, label) 38 | if not new_socket: 39 | return 40 | if link and from_socket: 41 | nt = node.id_data 42 | nt.links.new(from_socket, new_socket) 43 | 44 | idx = 0 45 | elem = collection[index] 46 | node.inputs.remove(node.inputs[elem.name]) 47 | for elem in collection: 48 | nm = elem.name 49 | new_name = '%s[%d]' % (param_name, idx) 50 | new_label = '%s[%d]' % (meta.get('label', param_name), idx) 51 | socket = node.inputs.get(nm, None) 52 | if socket: 53 | update_sockets(socket, new_name, new_label) 54 | idx += 1 55 | 56 | collection.remove(index) 57 | index -= 1 58 | setattr(node, collection_index, 0) 59 | for i in range(len(collection)): 60 | elem = collection[i] 61 | elem.name = '%s[%d]' % (param_name, i) -------------------------------------------------------------------------------- /rman_ui/__init__.py: -------------------------------------------------------------------------------- 1 | from . import rman_ui_base 2 | from . import rman_ui_txmanager 3 | from . import rman_ui_aovs 4 | from . import rman_ui_viewport 5 | from . import rman_ui_light_handlers 6 | from . import rman_ui_render_panels 7 | from . import rman_ui_object_panels 8 | from . import rman_ui_mesh_panels 9 | from . import rman_ui_curve_panels 10 | from . import rman_ui_material_panels 11 | from . import rman_ui_scene_panels 12 | from . import rman_ui_world_panels 13 | from . import rman_ui_camera_panels 14 | from . import rman_ui_particles_panels 15 | from . import rman_ui_header_panels 16 | from . import rman_ui_view3d_panels 17 | from . import rman_ui_blender_panels 18 | from . import rman_ui_view3d_menus 19 | from . import rman_ui_texteditor 20 | from . import rman_ui_output_panels 21 | from . import rman_ui_node_category_menus 22 | from . import rman_ui_volume_panels 23 | 24 | def register(): 25 | rman_ui_base.register() 26 | rman_ui_txmanager.register() 27 | rman_ui_aovs.register() 28 | rman_ui_viewport.register() 29 | rman_ui_light_handlers.register() 30 | rman_ui_render_panels.register() 31 | rman_ui_object_panels.register() 32 | rman_ui_mesh_panels.register() 33 | rman_ui_curve_panels.register() 34 | rman_ui_material_panels.register() 35 | rman_ui_scene_panels.register() 36 | rman_ui_world_panels.register() 37 | rman_ui_camera_panels.register() 38 | rman_ui_particles_panels.register() 39 | rman_ui_header_panels.register() 40 | rman_ui_view3d_panels.register() 41 | rman_ui_blender_panels.register() 42 | rman_ui_view3d_menus.register() 43 | rman_ui_texteditor.register() 44 | rman_ui_output_panels.register() 45 | rman_ui_node_category_menus.register() 46 | rman_ui_volume_panels.register() 47 | 48 | def unregister(): 49 | rman_ui_base.unregister() 50 | rman_ui_txmanager.unregister() 51 | rman_ui_aovs.unregister() 52 | rman_ui_viewport.unregister() 53 | rman_ui_light_handlers.unregister() 54 | rman_ui_render_panels.unregister() 55 | rman_ui_object_panels.unregister() 56 | rman_ui_mesh_panels.unregister() 57 | rman_ui_curve_panels.unregister() 58 | rman_ui_material_panels.unregister() 59 | rman_ui_scene_panels.unregister() 60 | rman_ui_world_panels.unregister() 61 | rman_ui_camera_panels.unregister() 62 | rman_ui_particles_panels.unregister() 63 | rman_ui_header_panels.unregister() 64 | rman_ui_view3d_panels.unregister() 65 | rman_ui_blender_panels.unregister() 66 | rman_ui_view3d_menus.unregister() 67 | rman_ui_texteditor.unregister() 68 | rman_ui_output_panels.unregister() 69 | rman_ui_node_category_menus.unregister() 70 | rman_ui_volume_panels.unregister() -------------------------------------------------------------------------------- /rfb_utils/camera_utils.py: -------------------------------------------------------------------------------- 1 | from bpy_extras.view3d_utils import location_3d_to_region_2d 2 | 3 | def render_get_resolution_(r): 4 | xres = int(r.resolution_x * r.resolution_percentage * 0.01) 5 | yres = int(r.resolution_y * r.resolution_percentage * 0.01) 6 | return xres, yres 7 | 8 | def render_get_aspect_(r, camera=None, x=-1, y=-1): 9 | if x != -1 and y != -1: 10 | xratio = x * r.pixel_aspect_x / 200.0 11 | yratio = y * r.pixel_aspect_y / 200.0 12 | else: 13 | xres, yres = render_get_resolution_(r) 14 | xratio = xres * r.pixel_aspect_x / 200.0 15 | yratio = yres * r.pixel_aspect_y / 200.0 16 | 17 | if camera is None: 18 | # If we don't have a camera, always use HORIZONTAL 19 | # This is the viewport render case, but there's no camera in the scene 20 | fit = 'HORIZONTAL' 21 | elif camera.type != 'PERSP': 22 | fit = 'AUTO' 23 | else: 24 | fit = camera.sensor_fit 25 | 26 | if fit == 'HORIZONTAL' or fit == 'AUTO' and xratio > yratio: 27 | aspectratio = xratio / yratio 28 | xaspect = aspectratio 29 | yaspect = 1.0 30 | elif fit == 'VERTICAL' or fit == 'AUTO' and yratio > xratio: 31 | aspectratio = yratio / xratio 32 | xaspect = 1.0 33 | yaspect = aspectratio 34 | else: 35 | aspectratio = xaspect = yaspect = 1.0 36 | 37 | return xaspect, yaspect, aspectratio 38 | 39 | 40 | def get_viewport_cam_borders(ob, render, region, region_data, scene): 41 | 42 | # Code reference: 43 | # https://blender.stackexchange.com/questions/6377/coordinates-of-corners-of-camera-view-border 44 | 45 | cam = ob.data 46 | frame = cam.view_frame(scene=scene) 47 | 48 | # move from object-space into world-space 49 | frame = [ob.matrix_world @ v for v in frame] 50 | 51 | # move into pixelspace 52 | frame_px = [location_3d_to_region_2d(region, region_data, v) for v in frame] 53 | 54 | min_x = -1 55 | min_y = -1 56 | max_x = -1 57 | max_y = -1 58 | for v in frame_px: 59 | if min_x == -1: 60 | min_x = v[0] 61 | elif min_x > v[0]: 62 | min_x = v[0] 63 | if max_x < v[0]: 64 | max_x = v[0] 65 | if min_y == -1: 66 | min_y = v[1] 67 | elif min_y > v[1]: 68 | min_y = v[1] 69 | if max_y < v[1]: 70 | max_y = v[1] 71 | 72 | cam_width = max_x - min_x 73 | cam_height = max_y - min_y 74 | x0 = min_x + render.border_min_x * cam_width 75 | x1 = min_x + render.border_max_x * cam_width 76 | y0 = min_y + render.border_min_y * cam_height 77 | y1 = min_y + render.border_max_y * cam_height 78 | 79 | return (x0, x1, y0, y1) -------------------------------------------------------------------------------- /rman_translators/rman_points_translator.py: -------------------------------------------------------------------------------- 1 | from .rman_translator import RmanTranslator 2 | from ..rman_sg_nodes.rman_sg_points import RmanSgPoints 3 | from ..rfb_utils import mesh_utils 4 | 5 | class RmanPointsTranslator(RmanTranslator): 6 | 7 | def __init__(self, rman_scene): 8 | super().__init__(rman_scene) 9 | self.bl_type = 'POINTS' 10 | 11 | def export(self, ob, db_name): 12 | 13 | sg_node = self.rman_scene.sg_scene.CreatePoints(db_name) 14 | rman_sg_points = RmanSgPoints(self.rman_scene, sg_node, db_name) 15 | 16 | return rman_sg_points 17 | 18 | def export_deform_sample(self, rman_sg_points, ob, time_sample): 19 | mesh = None 20 | mesh = ob.to_mesh() 21 | 22 | P = mesh_utils.get_mesh_points_(mesh) 23 | 24 | primvar = rman_sg_points.sg_node.GetPrimVars() 25 | npoints = int(len(P) / 3 ) 26 | 27 | if rman_sg_points.npoints != npoints: 28 | primvar.SetTimes([]) 29 | rman_sg_points.sg_node.SetPrimVars(primvar) 30 | rman_sg_points.is_transforming = False 31 | rman_sg_points.is_deforming = False 32 | return 33 | 34 | primvar.SetPointDetail(self.rman_scene.rman.Tokens.Rix.k_P, P, "vertex", time_sample) 35 | 36 | rman_sg_points.sg_node.SetPrimVars(primvar) 37 | 38 | ob.to_mesh_clear() 39 | 40 | def update(self, ob, rman_sg_points, input_mesh=None): 41 | mesh = input_mesh 42 | rm = ob.renderman 43 | if not mesh: 44 | mesh = ob.to_mesh() 45 | 46 | P = mesh_utils.get_mesh_points_(mesh) 47 | 48 | # if this is empty continue: 49 | if P is None or len(P) < 1: 50 | if not input_mesh: 51 | ob.to_mesh_clear() 52 | rman_sg_points.sg_node = None 53 | rman_sg_points.is_transforming = False 54 | rman_sg_points.is_deforming = False 55 | return None 56 | 57 | npoints = int(len(P) /3 ) 58 | rman_sg_points.sg_node.Define(npoints) 59 | rman_sg_points.npoints = npoints 60 | 61 | primvar = rman_sg_points.sg_node.GetPrimVars() 62 | primvar.Clear() 63 | 64 | super().set_primvar_times(rman_sg_points.motion_steps, primvar) 65 | 66 | primvar.SetPointDetail(self.rman_scene.rman.Tokens.Rix.k_P, P, "vertex") 67 | primvar.SetFloatDetail(self.rman_scene.rman.Tokens.Rix.k_constantwidth, rm.primitive_point_width, "constant") 68 | super().export_object_primvars(ob, primvar) 69 | rman_sg_points.sg_node.SetPrimVars(primvar) 70 | 71 | if not input_mesh: 72 | ob.to_mesh_clear() 73 | -------------------------------------------------------------------------------- /rfb_utils/transform_utils.py: -------------------------------------------------------------------------------- 1 | import rman 2 | from mathutils import Matrix,Vector 3 | 4 | def convert_matrix(m): 5 | v = [m[0][0], m[1][0], m[2][0], m[3][0], 6 | m[0][1], m[1][1], m[2][1], m[3][1], 7 | m[0][2], m[1][2], m[2][2], m[3][2], 8 | m[0][3], m[1][3], m[2][3], m[3][3]] 9 | 10 | return v 11 | 12 | def convert_matrix4x4(m): 13 | mtx = m 14 | if len(m) == 4: 15 | # convert this to a flat list 16 | mtx = convert_matrix( m ) 17 | rman_mtx = rman.Types.RtMatrix4x4( mtx[0],mtx[1],mtx[2],mtx[3], 18 | mtx[4],mtx[5],mtx[6],mtx[7], 19 | mtx[8],mtx[9],mtx[10],mtx[11], 20 | mtx[12],mtx[13],mtx[14],mtx[15]) 21 | 22 | return rman_mtx 23 | 24 | def get_world_bounding_box(selected_obs): 25 | 26 | min_vector = None 27 | max_vector = None 28 | 29 | for ob in selected_obs: 30 | v = ob.matrix_world @ Vector(ob.bound_box[0]) 31 | if min_vector is None: 32 | min_vector = v 33 | elif v < min_vector: 34 | min_vector = v 35 | v = ob.matrix_world @ Vector(ob.bound_box[7]) 36 | if max_vector is None: 37 | max_vector = v 38 | elif v > max_vector: 39 | max_vector = v 40 | 41 | return "%f %f %f %f %f %f" % (min_vector[0], max_vector[0], min_vector[1], max_vector[1], min_vector[2], max_vector[2]) 42 | 43 | def convert_ob_bounds(ob_bb): 44 | return (ob_bb[0][0], ob_bb[7][0], ob_bb[0][1], 45 | ob_bb[7][1], ob_bb[0][2], ob_bb[1][2]) 46 | 47 | def convert_to_blmatrix(m): 48 | bl_matrix = Matrix() 49 | bl_matrix[0][0] = m[0] 50 | bl_matrix[1][0] = m[1] 51 | bl_matrix[2][0] = m[2] 52 | bl_matrix[3][0] = m[3] 53 | 54 | bl_matrix[0][1] = m[4] 55 | bl_matrix[1][1] = m[5] 56 | bl_matrix[2][1] = m[6] 57 | bl_matrix[3][1] = m[7] 58 | 59 | bl_matrix[0][2] = m[8] 60 | bl_matrix[1][2] = m[9] 61 | bl_matrix[2][2] = m[10] 62 | bl_matrix[3][2] = m[11] 63 | 64 | bl_matrix[0][3] = m[12] 65 | bl_matrix[1][3] = m[13] 66 | bl_matrix[2][3] = m[14] 67 | bl_matrix[3][3] = m[15] 68 | 69 | return bl_matrix 70 | 71 | def transform_points(transform_mtx, P): 72 | transform_pts = [] 73 | mtx = convert_matrix( transform_mtx ) 74 | m = rman.Types.RtMatrix4x4( mtx[0],mtx[1],mtx[2],mtx[3], 75 | mtx[4],mtx[5],mtx[6],mtx[7], 76 | mtx[8],mtx[9],mtx[10],mtx[11], 77 | mtx[12],mtx[13],mtx[14],mtx[15]) 78 | for i in range(0, len(P), 3): 79 | pt = m.pTransform( rman.Types.RtFloat3(P[i], P[i+1], P[i+2]) ) 80 | transform_pts.append(pt.x) 81 | transform_pts.append(pt.y) 82 | transform_pts.append(pt.z) 83 | 84 | return transform_pts -------------------------------------------------------------------------------- /rman_handlers/rman_it_handlers.py: -------------------------------------------------------------------------------- 1 | from bpy.app.handlers import persistent 2 | import bpy 3 | 4 | DRAW_HANDLER = None 5 | 6 | @persistent 7 | def ipr_it_depsgraph_update_post(bl_scene, depsgraph): 8 | from ..rman_render import RmanRender 9 | rman_render = RmanRender.get_rman_render() 10 | 11 | # check updates if we are render ipring into it 12 | if rman_render.is_ipr_to_it(): 13 | context = bpy.context 14 | rman_render.update_scene(context, depsgraph) 15 | 16 | ''' 17 | Not sure if we need this. This seems to cause camera 18 | edits, as the camera matrices are slightly different in some 19 | cases, when just selecting objects 20 | ''' 21 | # rman_render.update_view(context, depsgraph) 22 | 23 | 24 | @persistent 25 | def ipr_frame_change_post(bl_scene): 26 | from ..rman_render import RmanRender 27 | rman_render = RmanRender.get_rman_render() 28 | # check updates if we are render ipring into it 29 | if rman_render.is_ipr_to_it(): 30 | context = bpy.context 31 | depsgraph = context.evaluated_depsgraph_get() 32 | rman_render.update_scene(context, depsgraph) 33 | # rman_render.update_view(context, depsgraph) 34 | 35 | 36 | def draw(): 37 | from ..rman_render import RmanRender 38 | from ..rfb_utils.draw_utils import draw_viewport_message 39 | 40 | rman_render = RmanRender.get_rman_render() 41 | 42 | if rman_render.rman_license_failed: 43 | draw_viewport_message(bpy.context, rman_render.rman_license_failed_message, warning=True) 44 | return 45 | 46 | scene = bpy.context.scene 47 | 48 | if scene.renderman.rfb_disgust: 49 | draw_viewport_message(bpy.context, 'Debug Logging On') 50 | 51 | def add_ipr_to_it_handlers(): 52 | ''' 53 | This adds handlers needed when we ipr to it 54 | ''' 55 | global DRAW_HANDLER 56 | 57 | if ipr_it_depsgraph_update_post not in bpy.app.handlers.depsgraph_update_post: 58 | bpy.app.handlers.depsgraph_update_post.append(ipr_it_depsgraph_update_post) 59 | 60 | if ipr_frame_change_post not in bpy.app.handlers.frame_change_post: 61 | bpy.app.handlers.frame_change_post.append(ipr_frame_change_post) 62 | 63 | DRAW_HANDLER = bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_PIXEL') 64 | 65 | def remove_ipr_to_it_handlers(): 66 | ''' 67 | Remove handlers needed when we ipr to it 68 | ''' 69 | global DRAW_HANDLER 70 | 71 | if ipr_it_depsgraph_update_post in bpy.app.handlers.depsgraph_update_post: 72 | bpy.app.handlers.depsgraph_update_post.remove(ipr_it_depsgraph_update_post) 73 | 74 | if ipr_frame_change_post in bpy.app.handlers.frame_change_post: 75 | bpy.app.handlers.frame_change_post.remove(ipr_frame_change_post) 76 | 77 | if DRAW_HANDLER: 78 | bpy.types.SpaceView3D.draw_handler_remove(DRAW_HANDLER, 'WINDOW') 79 | DRAW_HANDLER = None -------------------------------------------------------------------------------- /rman_operators/rman_operators_mesh.py: -------------------------------------------------------------------------------- 1 | from ..rfb_logger import rfb_log 2 | from ..rfb_utils import mesh_utils 3 | import bpy 4 | from bpy.props import BoolProperty 5 | from mathutils import Vector, Matrix 6 | 7 | class PRMAN_OT_Renderman_mesh_reference_pose(bpy.types.Operator): 8 | bl_idname = 'mesh.freeze_reference_pose' 9 | bl_label = "Freeze Reference Pose" 10 | bl_description = "Use the mesh's points and normals for the current frame as the reference pose. This essentially adds the __Pref, __NPref, __Nref and __WNref primitive variables." 11 | 12 | add_Pref: BoolProperty(name='Add __Pref', default=True) 13 | add_WPref: BoolProperty(name='Add __WPref', default=True) 14 | add_Nref: BoolProperty(name='Add __Nref', default=True) 15 | add_WNref: BoolProperty(name='Add __WNref', default=True) 16 | 17 | @classmethod 18 | def poll(cls, context): 19 | if context.engine != "PRMAN_RENDER": 20 | return False 21 | if context.object is None: 22 | return False 23 | if context.mesh is None: 24 | return False 25 | return True 26 | 27 | def execute(self, context): 28 | mesh = context.mesh 29 | ob = context.object 30 | rm = mesh.renderman 31 | rm.reference_pose.clear() 32 | rm.reference_pose_normals.clear() 33 | 34 | matrix_world = ob.matrix_world 35 | if not self.add_Pref and not self.add_WPref and not self.add_Nref and not self.add_WNref: 36 | return {'FINISHED'} 37 | 38 | rman_mesh = mesh_utils.get_mesh(mesh, get_normals=True) 39 | if self.add_Pref or self.add_WPref: 40 | Plist = rman_mesh.P.reshape((-1,3)) 41 | for P in Plist: 42 | rp = rm.reference_pose.add() 43 | if self.add_Pref: 44 | rp.has_Pref = True 45 | rp.rman__Pref = P 46 | 47 | if self.add_WPref: 48 | rp.has_WPref = True 49 | v = Vector(P) 50 | v = matrix_world @ v 51 | rp.rman__WPref = v 52 | 53 | if self.add_Nref or self.add_WNref: 54 | Nlist = rman_mesh.N.reshape((-1,3)) 55 | for N in Nlist: 56 | rp = rm.reference_pose_normals.add() 57 | if self.add_Nref: 58 | rp.has_Nref = True 59 | rp.rman__Nref = N 60 | 61 | if self.add_WNref: 62 | rp.has_WNref = True 63 | n = Vector(N) 64 | n = matrix_world @ n 65 | rp.rman__WNref = n 66 | 67 | ob.update_tag(refresh={'DATA'}) 68 | return {'FINISHED'} 69 | 70 | def invoke(self, context, event=None): 71 | wm = context.window_manager 72 | return wm.invoke_props_dialog(self) 73 | 74 | classes = [ 75 | PRMAN_OT_Renderman_mesh_reference_pose 76 | ] 77 | 78 | def register(): 79 | from ..rfb_utils import register_utils 80 | 81 | register_utils.rman_register_classes(classes) 82 | 83 | def unregister(): 84 | from ..rfb_utils import register_utils 85 | 86 | register_utils.rman_unregister_classes(classes) 87 | -------------------------------------------------------------------------------- /rman_ui/rman_ui_curve_panels.py: -------------------------------------------------------------------------------- 1 | from .rman_ui_base import _RManPanelHeader 2 | from .rman_ui_base import CollectionPanel 3 | from .rman_ui_base import PRManButtonsPanel 4 | from ..rfb_utils.draw_utils import _draw_ui_from_rman_config 5 | from ..rman_constants import NODE_LAYOUT_SPLIT 6 | from ..rfb_utils import object_utils 7 | from bpy.types import Panel 8 | import bpy 9 | 10 | class CURVE_PT_renderman_curve_attrs(CollectionPanel, Panel): 11 | bl_context = "data" 12 | bl_label = "Curve Attributes" 13 | 14 | @classmethod 15 | def poll(cls, context): 16 | if not context.curve and not context.curves: 17 | return False 18 | return CollectionPanel.poll(context) 19 | 20 | def draw(self, context): 21 | layout = self.layout 22 | self.layout.use_property_split = True 23 | self.layout.use_property_decorate = False 24 | curve = context.curve 25 | if curve is None: 26 | curve = context.curves 27 | rm = curve.renderman 28 | 29 | _draw_ui_from_rman_config('rman_properties_curve', 'CURVE_PT_renderman_curve_attrs', context, layout, rm) 30 | 31 | class CURVE_PT_renderman_prim_vars(CollectionPanel, Panel): 32 | bl_context = "data" 33 | bl_label = "Primitive Variables" 34 | 35 | def draw_item(self, layout, context, item): 36 | ob = context.object 37 | if context.curve: 38 | geo = context.curve 39 | elif context.curves: 40 | geo = context.curves 41 | layout.prop(item, "name") 42 | 43 | row = layout.row() 44 | row.prop(item, "data_source", text="Source") 45 | if item.data_source == 'VERTEX_COLOR': 46 | row.prop_search(item, "data_name", geo, "vertex_colors", text="") 47 | elif item.data_source == 'UV_TEXTURE': 48 | row.prop_search(item, "data_name", geo, "uv_textures", text="") 49 | elif item.data_source == 'VERTEX_GROUP': 50 | row.prop_search(item, "data_name", ob, "vertex_groups", text="") 51 | 52 | @classmethod 53 | def poll(cls, context): 54 | if not context.curve and not context.curves: 55 | return False 56 | return CollectionPanel.poll(context) 57 | 58 | def draw(self, context): 59 | layout = self.layout 60 | self.layout.use_property_split = True 61 | self.layout.use_property_decorate = False 62 | curve = context.curve 63 | if curve is None: 64 | curve = context.curves 65 | rm = curve.renderman 66 | 67 | self._draw_collection(context, layout, rm, "Primitive Variables:", 68 | "collection.add_remove", "curve", "prim_vars", 69 | "prim_vars_index") 70 | 71 | _draw_ui_from_rman_config('rman_properties_curve', 'CURVE_PT_renderman_prim_vars', context, layout, rm) 72 | 73 | classes = [ 74 | CURVE_PT_renderman_curve_attrs, 75 | CURVE_PT_renderman_prim_vars 76 | ] 77 | 78 | def register(): 79 | from ..rfb_utils import register_utils 80 | 81 | register_utils.rman_register_classes(classes) 82 | 83 | def unregister(): 84 | from ..rfb_utils import register_utils 85 | 86 | register_utils.rman_unregister_classes(classes) -------------------------------------------------------------------------------- /rman_ui/rman_ui_camera_panels.py: -------------------------------------------------------------------------------- 1 | from .rman_ui_base import ShaderPanel 2 | from ..rfb_utils.shadergraph_utils import is_renderman_nodetree 3 | from ..rfb_utils.draw_utils import draw_node_properties_recursive 4 | from ..rfb_utils.draw_utils import _draw_ui_from_rman_config 5 | from ..rfb_utils import shadergraph_utils 6 | from .. import rfb_icons 7 | import bpy 8 | from bpy.types import Panel 9 | 10 | class DATA_PT_renderman_camera(ShaderPanel, Panel): 11 | bl_context = "data" 12 | bl_label = "RenderMan Camera" 13 | 14 | @classmethod 15 | def poll(cls, context): 16 | rd = context.scene.render 17 | if not context.camera: 18 | return False 19 | return rd.engine == 'PRMAN_RENDER' 20 | 21 | def draw(self, context): 22 | layout = self.layout 23 | cam = context.camera 24 | scene = context.scene 25 | rm = cam.renderman 26 | 27 | _draw_ui_from_rman_config('rman_properties_camera', 'DATA_PT_renderman_camera', context, layout, rm) 28 | 29 | 30 | class DATA_PT_renderman_projection(ShaderPanel, Panel): 31 | bl_context = "data" 32 | bl_label = "RenderMan Projection" 33 | bl_parent_id = 'DATA_PT_renderman_camera' 34 | 35 | @classmethod 36 | def poll(cls, context): 37 | rd = context.scene.render 38 | if not context.camera: 39 | return False 40 | return rd.engine == 'PRMAN_RENDER' 41 | 42 | def draw(self, context): 43 | layout = self.layout 44 | cam = context.camera 45 | scene = context.scene 46 | rm = cam.renderman 47 | 48 | layout.separator() 49 | if not rm.rman_nodetree: 50 | layout.operator('node.rman_add_projection_nodetree', text='Add Projection Plugin') 51 | else: 52 | nt = rm.rman_nodetree 53 | output = shadergraph_utils.find_node_from_nodetree(nt, 'RendermanProjectionsOutputNode') 54 | socket = output.inputs[0] 55 | 56 | 57 | split = layout.split(factor=0.35) 58 | split.label(text=socket.identifier + ':') 59 | 60 | split.context_pointer_set("socket", socket) 61 | split.context_pointer_set("node", output) 62 | split.context_pointer_set("nodetree", nt) 63 | if socket.is_linked: 64 | node = socket.links[0].from_node 65 | rman_icon = rfb_icons.get_projection_icon(node.bl_label) 66 | split.menu('NODE_MT_renderman_connection_menu', text='%s (%s)' % (node.name, node.bl_label), icon_value=rman_icon.icon_id) 67 | layout.prop(rm, "rman_use_cam_fov") 68 | if node.bl_label == 'PxrCamera': 69 | layout.prop(rm, "rman_tilt_shift_object") 70 | draw_node_properties_recursive(layout, context, nt, node) 71 | else: 72 | split.menu('NODE_MT_renderman_connection_menu', text='None', icon='NODE_MATERIAL') 73 | 74 | 75 | classes = [ 76 | DATA_PT_renderman_camera, 77 | DATA_PT_renderman_projection 78 | ] 79 | 80 | def register(): 81 | from ..rfb_utils import register_utils 82 | 83 | register_utils.rman_register_classes(classes) 84 | 85 | def unregister(): 86 | from ..rfb_utils import register_utils 87 | 88 | register_utils.rman_unregister_classes(classes) 89 | -------------------------------------------------------------------------------- /rfb_utils/operator_utils.py: -------------------------------------------------------------------------------- 1 | from .. import rman_bl_nodes 2 | from ..rfb_icons import get_bxdf_icon, get_light_icon, get_lightfilter_icon, get_projection_icon 3 | from ..rman_constants import RMAN_BL_NODE_DESCRIPTIONS 4 | 5 | def get_description(category, node_name): 6 | description = None 7 | for n in rman_bl_nodes.__RMAN_NODES__.get(category, list()): 8 | if n.name == node_name: 9 | if n.help: 10 | description = n.help 11 | break 12 | if not description: 13 | description = RMAN_BL_NODE_DESCRIPTIONS.get(node_name, node_name) 14 | return description 15 | 16 | 17 | def get_bxdf_items(): 18 | 19 | items = [] 20 | i = 1 21 | for bxdf_cat, bxdfs in rman_bl_nodes.__RMAN_NODE_CATEGORIES__['bxdf'].items(): 22 | if not bxdfs[1]: 23 | continue 24 | tokens = bxdf_cat.split('_') 25 | bxdf_category = ' '.join(tokens[1:]) 26 | items.append(('', bxdf_category.capitalize(), '', 0, 0)) 27 | for n in bxdfs[1]: 28 | rman_bxdf_icon = get_bxdf_icon(n.name) 29 | items.append( (n.name, n.name, '', rman_bxdf_icon.icon_id, i)) 30 | i += 1 31 | 32 | return items 33 | 34 | def get_light_items(): 35 | rman_light_icon = get_light_icon("PxrRectLight") 36 | items = [] 37 | i = 0 38 | dflt = 'PxrRectLight' 39 | items.append((dflt, dflt, '', rman_light_icon.icon_id, i)) 40 | for n in rman_bl_nodes.__RMAN_LIGHT_NODES__: 41 | if n.name == 'PxrMeshLight': 42 | continue 43 | if n.name != dflt: 44 | i += 1 45 | light_icon = get_light_icon(n.name) 46 | description = get_description('light', n.name) 47 | description = RMAN_BL_NODE_DESCRIPTIONS.get(n.name, n.name) 48 | if n.help: 49 | description = n.help 50 | items.append( (n.name, n.name, description, light_icon.icon_id, i)) 51 | return items 52 | 53 | def get_lightfilter_items(): 54 | items = [] 55 | i = 0 56 | rman_light_icon = get_lightfilter_icon("PxrRodLightFilter") 57 | dflt = 'PxrRodLightFilter' 58 | items.append((dflt, dflt, '', rman_light_icon.icon_id, i)) 59 | for n in rman_bl_nodes.__RMAN_LIGHTFILTER_NODES__: 60 | if n.name != dflt and n.name not in ['PxrBlockerLightFilter', 'PxrGoboLightFilter']: 61 | i += 1 62 | light_icon = get_lightfilter_icon(n.name) 63 | description = RMAN_BL_NODE_DESCRIPTIONS.get(n.name, n.name) 64 | if n.help: 65 | description = n.help 66 | items.append( (n.name, n.name, description, light_icon.icon_id, i)) 67 | return items 68 | 69 | def get_projection_items(): 70 | items = [] 71 | i = 0 72 | proj_icon = get_projection_icon("PxrCamera") 73 | dflt = 'PxrCamera' 74 | items.append((dflt, dflt, '', proj_icon.icon_id, i)) 75 | for n in rman_bl_nodes.__RMAN_PROJECTION_NODES__: 76 | if n.name != dflt: 77 | i += 1 78 | proj_icon = get_projection_icon(n.name) 79 | description = RMAN_BL_NODE_DESCRIPTIONS.get(n.name, n.name) 80 | if n.help: 81 | description = n.help 82 | items.append( (n.name, n.name, description, proj_icon.icon_id, i)) 83 | return items -------------------------------------------------------------------------------- /rfb_utils/particles_utils.py: -------------------------------------------------------------------------------- 1 | from mathutils import Vector 2 | 3 | def valid_particle(pa, valid_frames): 4 | return pa.die_time >= valid_frames[-1] and pa.birth_time <= valid_frames[0] 5 | 6 | def get_particles(ob, psys, inv_mtx, frame, valid_frames=None, get_next_P=False, get_width=True): 7 | P = [] 8 | next_P = [] 9 | width = [] 10 | 11 | valid_frames = (frame, 12 | frame) if valid_frames is None else valid_frames 13 | 14 | rm = psys.settings.renderman 15 | 16 | for pa in [p for p in psys.particles if valid_particle(p, valid_frames)]: 17 | pt = inv_mtx @ pa.location 18 | P.append(pt) 19 | 20 | if get_next_P: 21 | # calculate the point for the next frame using velocity 22 | vel = Vector(pa.velocity / pa.lifetime ) * rm.scale_velocity_blur 23 | next_P.append( inv_mtx @ (Vector(pa.location) + vel)) 24 | 25 | if get_width: 26 | if pa.alive_state != 'ALIVE': 27 | width.append(0.0) 28 | else: 29 | width.append(pa.size) 30 | return (P, next_P, width) 31 | 32 | def get_primvars_particle(primvar, frame, psys, subframes, sample): 33 | rm = psys.settings.renderman 34 | 35 | for p in rm.prim_vars: 36 | pvars = [] 37 | 38 | if p.data_source in ('VELOCITY', 'ANGULAR_VELOCITY'): 39 | if p.data_source == 'VELOCITY': 40 | for pa in \ 41 | [p for p in psys.particles if valid_particle(p, subframes)]: 42 | pvars.append(pa.velocity) 43 | elif p.data_source == 'ANGULAR_VELOCITY': 44 | for pa in \ 45 | [p for p in psys.particles if valid_particle(p, subframes)]: 46 | pvars.append(pa.angular_velocity) 47 | 48 | primvar.SetVectorDetail(p.name, pvars, "vertex", sample) 49 | 50 | elif p.data_source in \ 51 | ('SIZE', 'AGE', 'BIRTH_TIME', 'DIE_TIME', 'LIFE_TIME', 'ID'): 52 | if p.data_source == 'SIZE': 53 | for pa in \ 54 | [p for p in psys.particles if valid_particle(p, subframes)]: 55 | pvars.append(pa.size) 56 | elif p.data_source == 'AGE': 57 | for pa in \ 58 | [p for p in psys.particles if valid_particle(p, subframes)]: 59 | pvars.append((frame - pa.birth_time) / pa.lifetime) 60 | elif p.data_source == 'BIRTH_TIME': 61 | for pa in \ 62 | [p for p in psys.particles if valid_particle(p, subframes)]: 63 | pvars.append(pa.birth_time) 64 | elif p.data_source == 'DIE_TIME': 65 | for pa in \ 66 | [p for p in psys.particles if valid_particle(p, subframes)]: 67 | pvars.append(pa.die_time) 68 | elif p.data_source == 'LIFE_TIME': 69 | for pa in \ 70 | [p for p in psys.particles if valid_particle(p, subframes)]: 71 | pvars.append(pa.lifetime) 72 | elif p.data_source == 'ID': 73 | pvars = [id for id, p in psys.particles.items( 74 | ) if valid_particle(p, subframes)] 75 | 76 | primvar.SetFloatDetail(p.name, pvars, "vertex", sample) -------------------------------------------------------------------------------- /rfb_translations/__init__.py: -------------------------------------------------------------------------------- 1 | from ..rfb_logger import rfb_log 2 | from ..rfb_utils.prefs_utils import get_pref 3 | from ..rfb_utils import filepath_utils 4 | from ..rfb_utils.envconfig_utils import envconfig 5 | import bpy 6 | import os 7 | import json 8 | 9 | __RFB_TRANSLATIONS_DICT__ = dict() 10 | 11 | def load_locale_file(jsonfile): 12 | global __RFB_TRANSLATIONS_DICT__ 13 | jdata = json.load(open(jsonfile)) 14 | 15 | locale_nm = jdata['locale'] 16 | translation_dict = dict() 17 | for nm in jdata["translations"]: 18 | translation_data = jdata["translations"][nm] 19 | ctxt = translation_data['context'] 20 | translation = translation_data['translation'] 21 | translation_dict[(ctxt, nm)] = translation 22 | 23 | __RFB_TRANSLATIONS_DICT__[locale_nm] = translation_dict 24 | 25 | def get_user_locales(): 26 | paths = list() 27 | 28 | prefs_path = get_pref('rman_config_dir', default='') 29 | if prefs_path: 30 | prefs_path = filepath_utils.get_real_path(prefs_path) 31 | locale_path = os.path.join(prefs_path, 'locales') 32 | if os.path.exists(locale_path): 33 | paths.append(locale_path) 34 | 35 | # first, RFB_SITE_PATH 36 | RFB_SITE_PATH = envconfig().getenv('RFB_SITE_PATH') 37 | if RFB_SITE_PATH: 38 | for path in RFB_SITE_PATH.split(os.path.pathsep): 39 | locale_path = os.path.join(path, 'locales') 40 | if os.path.exists(locale_path): 41 | paths.append(locale_path) 42 | 43 | # next, RFB_SHOW_PATH 44 | RFB_SHOW_PATH = envconfig().getenv('RFB_SHOW_PATH') 45 | if RFB_SHOW_PATH: 46 | for path in RFB_SHOW_PATH.split(os.path.pathsep): 47 | locale_path = os.path.join(path, 'locales') 48 | if os.path.exists(locale_path): 49 | paths.append(locale_path) 50 | 51 | # finally, RFB_USER_PATH 52 | RFB_USER_PATH = envconfig().getenv('RFB_USER_PATH') 53 | if RFB_USER_PATH: 54 | for path in RFB_USER_PATH.split(os.path.pathsep): 55 | locale_path = os.path.join(path, 'locales') 56 | if os.path.exists(locale_path): 57 | paths.append(locale_path) 58 | 59 | return paths 60 | 61 | def register_locale_translations(): 62 | rfb_log().debug("Loading factory translations:") 63 | cur_dir = os.path.dirname(os.path.realpath(__file__)) 64 | locales_dir = os.path.join(cur_dir, 'locales') 65 | if os.path.exists(locales_dir): 66 | for f in os.listdir(locales_dir): 67 | if not f.endswith('.json'): 68 | continue 69 | jsonfile = os.path.join(locales_dir, f) 70 | rfb_log().debug("\t%s" % f) 71 | load_locale_file(jsonfile) 72 | 73 | # load user translations 74 | for p in get_user_locales(): 75 | if not os.path.exists(p): 76 | continue 77 | rfb_log().debug("Loading user translations from: %s" % p) 78 | for f in os.listdir(p): 79 | if not f.endswith('.json'): 80 | continue 81 | jsonfile = os.path.join(p, f) 82 | rfb_log().debug("\t%s" % f) 83 | load_locale_file(jsonfile) 84 | 85 | def register(): 86 | register_locale_translations() 87 | bpy.app.translations.register(__name__, __RFB_TRANSLATIONS_DICT__) 88 | 89 | 90 | def unregister(): 91 | bpy.app.translations.unregister(__name__) -------------------------------------------------------------------------------- /rman_presets/icons.py: -------------------------------------------------------------------------------- 1 | # ##### BEGIN MIT LICENSE BLOCK ##### 2 | # 3 | # Copyright (c) 2015 - 2025 Pixar 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | # 23 | # 24 | # ##### END MIT LICENSE BLOCK ##### 25 | 26 | import os 27 | import bpy 28 | import bpy.utils.previews 29 | from ..rfb_utils.prefs_utils import get_pref 30 | from ..rfb_utils.envconfig_utils import envconfig 31 | import json 32 | 33 | asset_previews = bpy.utils.previews.new() 34 | __RMAN_MAT_FLAT_PATH__ = 'lib/rmanAssetResources/icons' 35 | __RMAN_MAT_FLAT_FILENAME__ = 'rman_Mat_default_big_100.png' 36 | 37 | def get_presets_for_category(preset_category): 38 | items = list(preset_category.presets) 39 | 40 | if get_pref('presets_show_subcategories', False): 41 | for sub_category in preset_category.sub_categories: 42 | items.extend(get_presets_for_category(sub_category)) 43 | 44 | return items 45 | 46 | def get_icon(path): 47 | global asset_previews 48 | thumb = asset_previews.get(path, None) 49 | if not thumb: 50 | flat_icon_path = os.path.join(envconfig().rmantree, __RMAN_MAT_FLAT_PATH__) 51 | flat_icon_thumb = asset_previews.get(flat_icon_path, None) 52 | if not flat_icon_thumb: 53 | flat_icon_thumb_path = os.path.join(flat_icon_path, __RMAN_MAT_FLAT_FILENAME__) 54 | flat_icon_thumb = asset_previews.load(flat_icon_path, flat_icon_thumb_path, 'IMAGE', force_reload=True) 55 | 56 | return flat_icon_thumb 57 | return thumb 58 | 59 | def get_preset_icon(preset_path): 60 | global asset_previews 61 | flat_icon_path = os.path.join(envconfig().rmantree, __RMAN_MAT_FLAT_PATH__) 62 | flat_icon_thumb = asset_previews.get(flat_icon_path, None) 63 | if not flat_icon_thumb: 64 | flat_icon_thumb_path = os.path.join(flat_icon_path, __RMAN_MAT_FLAT_FILENAME__) 65 | flat_icon_thumb = asset_previews.load(flat_icon_path, flat_icon_thumb_path, 'IMAGE', force_reload=True) 66 | 67 | path = preset_path 68 | if path not in asset_previews: 69 | thumb_path = os.path.join(path, 'asset_100.png') 70 | if os.path.exists(thumb_path): 71 | thumb = asset_previews.load(path, thumb_path, 'IMAGE', force_reload=True) 72 | else: 73 | thumb = flat_icon_thumb 74 | else: 75 | thumb = asset_previews[path] 76 | 77 | return thumb -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- 1 | # ##### BEGIN MIT LICENSE BLOCK ##### 2 | # 3 | # Copyright (c) 2015 - 2025 Pixar 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | # 23 | # 24 | # ##### END MIT LICENSE BLOCK ##### 25 | import addon_utils 26 | 27 | from .rfb_logger import rfb_log 28 | from .rfb_utils.envconfig_utils import envconfig 29 | 30 | bl_info = { 31 | "name": "RenderMan For Blender", 32 | "author": "Pixar", 33 | "version": (27, 1, 0), 34 | "blender": (3, 6, 0), 35 | "location": "Render Properties > Render Engine > RenderMan", 36 | "description": "RenderMan 27 integration", 37 | "doc_url": "https://rmanwiki.pixar.com/display/RFB", 38 | 'warning': '', 39 | "category": "Render"} 40 | 41 | __RMAN_ADDON_LOADED__ = False 42 | 43 | def load_addon(): 44 | global __RMAN_ADDON_LOADED__ 45 | 46 | rman_env = envconfig() 47 | if not rman_env.load_error: 48 | from . import rman_config 49 | from . import rman_presets 50 | from . import rman_operators 51 | from . import rman_ui 52 | from . import rman_bl_nodes 53 | from . import rman_properties 54 | from . import rman_handlers 55 | from . import rfb_translations 56 | from . import rman_stats 57 | from . import rman_engine 58 | 59 | rman_config.register() 60 | rman_properties.pre_register() 61 | rman_presets.register() 62 | rman_operators.register() 63 | rman_bl_nodes.register() 64 | rman_properties.register() 65 | rman_ui.register() 66 | rman_handlers.register() 67 | rfb_translations.register() 68 | rman_stats.register() 69 | rman_engine.register() 70 | 71 | __RMAN_ADDON_LOADED__ = True 72 | 73 | else: 74 | rfb_log().error(rman_env.load_error_message) 75 | 76 | def register(): 77 | from . import preferences 78 | preferences.register() 79 | load_addon() 80 | 81 | def unregister(): 82 | global __RMAN_ADDON_LOADED__ 83 | 84 | from . import preferences 85 | preferences.unregister() 86 | 87 | if __RMAN_ADDON_LOADED__: 88 | rman_presets.unregister() 89 | rman_handlers.unregister() 90 | rman_bl_nodes.unregister() 91 | rman_ui.unregister() 92 | rman_properties.unregister() 93 | rman_operators.unregister() 94 | rfb_translations.unregister() 95 | rman_stats.unregister() 96 | rman_engine.unregister() 97 | -------------------------------------------------------------------------------- /rman_config/config/rman_properties_volume.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rman_properties_volume", 3 | "params": [ 4 | { 5 | "panel": "VOLUME_PT_renderman_openvdb_attributes", 6 | "name": "openvdb_filterwidth", 7 | "label": "Filter Width", 8 | "type": "float", 9 | "ipr_editable": true, 10 | "default": 0.0, 11 | "page": "", 12 | "help": "If set to 0, disables mipmapping. If greater than 0, values less than 1 bias towards finer levels of the mipmap and values larger than one bias towards coarser levels." 13 | }, 14 | { 15 | "panel": "VOLUME_PT_renderman_openvdb_attributes", 16 | "name": "openvdb_densitymult", 17 | "label": "Density Multiplier", 18 | "type": "float", 19 | "ipr_editable": true, 20 | "default": 1.0, 21 | "page": "", 22 | "help": "Scales the values in the density grid of the volume. This should be more efficient than scaling the density in the shader." 23 | }, 24 | { 25 | "panel": "VOLUME_PT_renderman_openvdb_attributes", 26 | "name": "openvdb_densityrolloff", 27 | "label": "Density Rolloff", 28 | "type": "float", 29 | "ipr_editable": true, 30 | "default": 0.0, 31 | "page": "", 32 | "help": "Values greater than 0 produce a logarithmic falloff in density values. Smaller rolloff values produce greater falloff." 33 | }, 34 | { 35 | "panel": "VOLUME_PT_renderman_openvdb_attributes", 36 | "name": "volume_dsominmax", 37 | "label": "DSO Min/Max", 38 | "type": "int", 39 | "ipr_editable": true, 40 | "default": 1, 41 | "widget": "checkbox", 42 | "primvar": "volume:dsominmax", 43 | "page": "", 44 | "help": "Currently only used for aggregate volumes, and only for volumes that use an ImplicitField DSO. If set to 1, the DSO may be able to use stored information from the file directly to compute the minimum and maximum values within the volume. This may allow the renderer to avoid shading the volume up front, greatly decreasing time to first pixel. This can only be enabled if the density signal from the volume is used directly, or if the density signal is modulated only by the DSO itself. Any shading modifications of the density signal requires setting this parameter to off.", 45 | "update_function_name": "lambda s, c: update_primvar_func(s, 'volume_dsominmax', c)" 46 | }, 47 | { 48 | "panel": "VOLUME_PT_renderman_openvdb_attributes", 49 | "name": "volume_dsovelocity", 50 | "label": "DSO Velocity", 51 | "type": "int", 52 | "ipr_editable": true, 53 | "default": 0, 54 | "widget": "checkbox", 55 | "primvar": "volume:dsovelocity", 56 | "page": "", 57 | "help": "Used only for aggregate volumes that use an ImplicitField DSO. If set to 1, the DSO can provide velocity bounds to the renderer directly via the BoxMotion call. This can allow the renderer to avoid upfront shading of the volume's velocity data when using Eulerian velocity, improving render time and time to first pixel greatly. This can only be enabled if the velocity signal from the DSO is used directly.", 58 | "update_function_name": "lambda s, c: update_primvar_func(s, 'volume_dsovelocity', c)" 59 | } 60 | ] 61 | } -------------------------------------------------------------------------------- /rman_ui/rman_ui_mesh_panels.py: -------------------------------------------------------------------------------- 1 | from .rman_ui_base import _RManPanelHeader 2 | from .rman_ui_base import CollectionPanel 3 | from .rman_ui_base import PRManButtonsPanel 4 | from ..rfb_utils.draw_utils import _draw_ui_from_rman_config 5 | from ..rman_constants import NODE_LAYOUT_SPLIT 6 | from ..rfb_utils import object_utils 7 | from bpy.types import Panel 8 | import bpy 9 | 10 | class MESH_PT_renderman_mesh_attrs(CollectionPanel, Panel): 11 | bl_context = "data" 12 | bl_label = "Mesh Attributes" 13 | 14 | @classmethod 15 | def poll(cls, context): 16 | if not context.mesh: 17 | return False 18 | return CollectionPanel.poll(context) 19 | 20 | def draw(self, context): 21 | layout = self.layout 22 | self.layout.use_property_split = True 23 | self.layout.use_property_decorate = False 24 | mesh = context.mesh 25 | rm = mesh.renderman 26 | 27 | _draw_ui_from_rman_config('rman_properties_mesh', 'MESH_PT_renderman_mesh_attrs', context, layout, rm) 28 | 29 | class MESH_PT_renderman_prim_vars(CollectionPanel, Panel): 30 | bl_context = "data" 31 | bl_label = "Primitive Variables" 32 | 33 | def draw_item(self, layout, context, item): 34 | ob = context.object 35 | if context.mesh: 36 | geo = context.mesh 37 | layout.prop(item, "name") 38 | 39 | row = layout.row() 40 | row.prop(item, "data_source", text="Source") 41 | if item.data_source == "ATTRIBUTES": 42 | row.prop_search(item, "data_name", geo, "attributes", text="") 43 | elif item.data_source == 'VERTEX_COLOR': 44 | row.prop_search(item, "data_name", geo, "vertex_colors", text="") 45 | elif item.data_source == 'UV_TEXTURE': 46 | row.prop_search(item, "data_name", geo, "uv_layers", text="") 47 | row = layout.row() 48 | row.prop(item, "export_tangents") 49 | elif item.data_source == 'VERTEX_GROUP': 50 | row.prop_search(item, "data_name", ob, "vertex_groups", text="") 51 | elif item.data_source == 'VERTEX_ATTR_COLOR': 52 | row.prop(item, "data_name", text="Attr") 53 | @classmethod 54 | def poll(cls, context): 55 | if not context.mesh: 56 | return False 57 | return CollectionPanel.poll(context) 58 | 59 | def draw(self, context): 60 | layout = self.layout 61 | self.layout.use_property_split = True 62 | self.layout.use_property_decorate = False 63 | mesh = context.mesh 64 | rm = mesh.renderman 65 | row = layout.row() 66 | 67 | row.prop(rm, 'output_all_primvars') 68 | 69 | if not rm.output_all_primvars: 70 | self._draw_collection(context, layout, rm, "Primitive Variables:", 71 | "collection.add_remove", "mesh", "prim_vars", 72 | "prim_vars_index") 73 | 74 | _draw_ui_from_rman_config('rman_properties_mesh', 'MESH_PT_renderman_prim_vars', context, layout, rm) 75 | 76 | 77 | row = layout.row() 78 | if len(rm.reference_pose) > 0 or len(rm.reference_pose_normals) > 0: 79 | row.operator('mesh.freeze_reference_pose', text='Re-Freeze Reference Pose') 80 | else: 81 | row.operator('mesh.freeze_reference_pose', text='Freeze Reference Pose') 82 | 83 | classes = [ 84 | MESH_PT_renderman_mesh_attrs, 85 | MESH_PT_renderman_prim_vars 86 | ] 87 | 88 | def register(): 89 | from ..rfb_utils import register_utils 90 | 91 | register_utils.rman_register_classes(classes) 92 | 93 | def unregister(): 94 | from ..rfb_utils import register_utils 95 | 96 | register_utils.rman_unregister_classes(classes) -------------------------------------------------------------------------------- /rfb_unittests/test_shader_nodes.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | import bpy 3 | from ..rfb_utils import string_utils, property_utils 4 | from .. import rfb_api 5 | import rman 6 | 7 | class ShaderNodesTest(unittest.TestCase): 8 | 9 | @classmethod 10 | def add_tests(self, suite): 11 | suite.addTest(ShaderNodesTest('test_value_conversion')) 12 | suite.addTest(ShaderNodesTest('test_rtparamlist')) 13 | 14 | # test getvar 15 | def test_value_conversion(self): 16 | import mathutils 17 | 18 | mat, n1 = rfb_api.create_bxdf('PxrSurface') 19 | n2 = rfb_api.create_pattern('PxrPrimvar', mat) 20 | n3 = rfb_api.create_pattern('PxrDirt', mat) 21 | 22 | diffuse_color = [0.18, 0.18, 0.18] 23 | diffuse_color_test = string_utils.convert_val(n1.diffuseColor, type_hint='color') 24 | bias_direction = [0.0, 0.0, 0.0] 25 | bias_direction_test = string_utils.convert_val(n3.biasDirection) 26 | 27 | bl_mtx = string_utils.convert_val(mathutils.Matrix.Identity(4)) 28 | rman_mtx = [1.0, 0.0, 0.0, 0.0, 29 | 0.0, 1.0, 0.0, 0.0, 30 | 0.0, 0.0, 1.0, 0.0, 31 | 0.0, 0.0, 0.0, 1.0 32 | ] 33 | 34 | unitLength = 0.1 35 | diffuseDoubleSided = 0 36 | var_type = 'float' 37 | 38 | for i in range(3): 39 | self.assertAlmostEqual(diffuse_color[i], diffuse_color_test[i]) 40 | 41 | for i in range(3): 42 | self.assertAlmostEqual(bias_direction[i], bias_direction_test[i]) 43 | 44 | for i in range(16): 45 | self.assertAlmostEqual(rman_mtx[i], bl_mtx[i]) 46 | 47 | self.assertAlmostEqual(unitLength, string_utils.convert_val(n1.unitLength, type_hint='float')) 48 | self.assertEqual(diffuseDoubleSided, string_utils.convert_val(n1.diffuseDoubleSided, type_hint='int')) 49 | self.assertEqual(var_type, string_utils.convert_val(n2.rman_type, type_hint='string')) 50 | 51 | bpy.data.materials.remove(mat) 52 | 53 | # test RtParamList 54 | def test_rtparamlist(self): 55 | from ..rfb_utils import prefs_utils 56 | diffuse_params = [ 57 | 'diffuseColor', 58 | 'transmissionBehavior', 59 | 'transmissionColor', 60 | 'presence', 61 | 'bumpNormal', 62 | 'shadowBumpTerminator' 63 | ] 64 | 65 | def test_eq(a, b, msg=None): 66 | # for now, we can only check the existence 67 | # of a parameter 68 | # we cannot retrieve its value 69 | for nm in diffuse_params: 70 | if not b.HasParam(nm): 71 | msg = "%s is not in RtParamList" % nm 72 | raise self.failureException(msg) 73 | 74 | mat, node = rfb_api.create_bxdf('PxrDiffuse') 75 | params = rman.Types.RtParamList() 76 | params_test = rman.Types.RtParamList() 77 | 78 | params.SetColor("diffuseColor", [0.5, 0.5, 0.5]) 79 | params.SetInteger("transmissionBehavior", 2) 80 | params.SetColor("transmissionColor", [0.0, 0.0, 0.0]) 81 | params.SetFloat("presence", 1.0) 82 | params.SetNormal("bumpNormal", [0.0, 0.0, 0.0]) 83 | params.SetInteger("shadowBumpTerminator", 1) 84 | 85 | prefs = prefs_utils.get_addon_prefs() 86 | pref_val = prefs_utils.get_pref('rman_emit_default_params', False) 87 | prefs.rman_emit_default_params = True 88 | property_utils.set_node_rixparams(node, None, params_test) 89 | self.addTypeEqualityFunc(rman.Types.RtParamList, test_eq) 90 | self.assertEqual(params, params_test) 91 | 92 | prefs.rman_emit_default_params = pref_val 93 | bpy.data.materials.remove(mat) 94 | --------------------------------------------------------------------------------