Skip to content

Commit

Permalink
Merge branch 'dev' into 'main'
Browse files Browse the repository at this point in the history
Merge dev to main

See merge request renderman/projects/RenderManForBlender!13
  • Loading branch information
Ian Hsieh committed Apr 22, 2022
2 parents 258e488 + 8ee1447 commit 74b86de
Show file tree
Hide file tree
Showing 13 changed files with 328 additions and 137 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Expand Up @@ -36,7 +36,7 @@
bl_info = {
"name": "RenderMan For Blender",
"author": "Pixar",
"version": (24, 3, 0),
"version": (24, 4, 0),
"blender": (2, 83, 0),
"location": "Info Header, render engine menu",
"description": "RenderMan 24 integration",
Expand Down
50 changes: 50 additions & 0 deletions changelog.txt
@@ -1,3 +1,53 @@
v24.4 April 22, 2022

Changes:
* Live stats are now enabled by default in the preferences.
* Setting the environment variable, RFB_BATCH_NO_PROGRESS, will disable progress printing during batch rendering via Blender.

Bug Fixes:
* Fix issue with depth of field not matching between viewport renders and preview renders
* Fix issue where rotating dome lights would cause portal lights to rotate on the wrong axis.
* An issue where textures in the texture manager would fail when materials/nodes were renamed has been addressed.
* Fix issue where light filters were still being drawn in the viewport when they were deleted.
* Holdouts should now render correctly when doing viewport renders
* Lights are correctly hidden when the viewports overlays has been disabled
* Fix an issue with progress not displaying correctly when rendering to "it".

v24.3 January 6, 2022

New Features:
* A cone shape will now be drawn in the viewport to represent the cone angle for lights that
support the Cone Angle parameter, emulating behavior that is present in the other RenderMan DCC
integrations. Light support this include PxrRectLight, PxrDiskLight, PxrSphereLight, and PxrCylinderLight.
Two new properties, Cone Angle Depth and Cone Angle Opacity, controls the depth and opacity of the cone
draw in the viewport.
* Add a Reset entry in the viewport integrators menu. Selecting Reset will reset
back to the scene integrator
* Added a pref to turn off the use of the <blend_dir> token to reference
relative paths

Changes:
* Rendering in the viewport with RIS should be slightly faster.
* The UI for arrays has changed. The addon will try to update any older scenes to use the
new arrays, but it is not guaranteed to work in all conditions, and may require
rebuilding/reconnecting of the shader network.
* The addon will now warn if the minor version of RenderMan selected is not compatible.
* When rendering hair, the mesh vertex colors will be added to the hair
as primitive variable "Cs".
* You can now choose a separate UV map and vertex colors for hair other than the current
active one.

Bug Fixes:
* Fixed an issue where importing SVGs as curves did not render correctly.
* Fixed a bug where bump and presence were not connectable on PxrSurface
* Fixed the enable parameter labels on PxrLayer
* Fixed a bug that caused light linking of LightFilters to not work
* Fixed an issue where the token was not working properly
* Fixed an issue where inputAOV on PxrDisneyBsdf was not connectable
* Fixed an issue where utilityInteger on LamaSurface was not connectable
* Fixed an issue where the bump2roughness settings in the texture manager
would reset after changes were applied.

v24.2 November 9, 2021
New Features:
* Add a new Volume Aggregates editor. For more information on volume aggregates, see the documentation
Expand Down
12 changes: 7 additions & 5 deletions preferences.py
Expand Up @@ -504,11 +504,14 @@ def update_stats_config(self, context):
update=update_stats_config
)
rman_roz_grpcServer: BoolProperty(name="Send Stats to 'it' HUD", default=True,
description="Turn this off if you don't want stats to be sent to the 'it' HUD.",
description="(DEPRECATED) Turn this off if you don't want stats to be sent to the 'it' HUD.",
update=update_stats_config)
rman_roz_webSocketServer: BoolProperty(name="Enable Live Stats", default=False,
description="Turning this off will disable the live statistics system in RfB.",
description="(DEPRECATED) Turning this off will disable the live statistics system in RfB.",
update=update_stats_config)
rman_roz_liveStatsEnabled: BoolProperty(name="Enable Live Stats", default=True,
description="Turning this off will disable the live statistics system in RfB.",
update=update_stats_config)
rman_roz_webSocketServer_Port: IntProperty(name="Port", default=0,
min=0,
description="Port number of the live stats server to use. Setting to 0 will randomly select an open port.",
Expand Down Expand Up @@ -664,10 +667,9 @@ def draw(self, context):
row = col.row()
col = row.column()
col.prop(self, 'rman_roz_logLevel')
col.prop(self, 'rman_roz_grpcServer')
col.prop(self, 'rman_roz_webSocketServer')
col.prop(self, 'rman_roz_liveStatsEnabled')

if self.rman_roz_webSocketServer:
if self.rman_roz_liveStatsEnabled:
try:
from .rman_stats import RfBStatsManager
stats_mgr = RfBStatsManager.get_stats_manager()
Expand Down
10 changes: 7 additions & 3 deletions rfb_utils/property_utils.py
Expand Up @@ -762,8 +762,7 @@ def set_node_rixparams(node, rman_sg_node, params, ob=None, mat_name=None, group
val = string_utils.expand_string(prop)
options = meta['options']
if bl_prop_info.is_texture:
tx_node_id = texture_utils.generate_node_id(node, param_name, ob=ob)
tx_val = texture_utils.get_txmanager().get_output_tex_from_id(tx_node_id)
tx_val = texture_utils.get_txmanager().get_output_tex_from_path(node, param_name, val, ob=ob)
val = tx_val if tx_val != '' else val
elif param_widget == 'assetidoutput':
display = 'openexr'
Expand All @@ -772,8 +771,13 @@ def set_node_rixparams(node, rman_sg_node, params, ob=None, mat_name=None, group
val = string_utils.expand_string(prop, display=display, asFilePath=True)
else:
val = string_utils.convert_val(prop, type_hint=param_type)
is_array = False
array_len = -1
if bl_prop_info.arraySize:
is_array = True
array_len = int(bl_prop_info.arraySize)

set_rix_param(params, param_type, param_name, val, is_reference=False, node=node)
set_rix_param(params, param_type, param_name, val, is_reference=False, is_array=is_array, array_len=array_len, node=node)

return params

Expand Down
41 changes: 32 additions & 9 deletions rfb_utils/shadergraph_utils.py
Expand Up @@ -379,35 +379,58 @@ def gather_nodes(node):

return nodes

def gather_all_nodes_for_material(mat, nodes_list):
for node in mat.node_tree.nodes:
def gather_all_nodes_for_material(ob, nodes_list):
for node in ob.node_tree.nodes:
if node not in nodes_list:
if isinstance(ob, bpy.types.ShaderNodeGroup):
nodes_list.insert(0, node)
else:
nodes_list.append(node)
if node.bl_idname == 'ShaderNodeGroup':
gather_all_nodes_for_material(node, nodes_list)

def gather_all_textured_nodes(ob, nodes_list):
nt = None
if isinstance(ob, bpy.types.Object):
if ob.type == 'LIGHT':
nt = ob.data.node_tree
elif isinstance(ob, bpy.types.Material):
nt = ob.node_tree
elif isinstance(ob, bpy.types.ShaderNodeGroup):
nt = ob.node_tree
if nt is None:
return

for node in nt.nodes:
has_textured_params = getattr(node, 'rman_has_textured_params', False)
if node not in nodes_list and has_textured_params:
nodes_list.append(node)
if node.bl_idname == 'ShaderNodeGroup':
for n in node.node_tree.nodes:
nodes_list.insert(0, n)
gather_all_textured_nodes(node, nodes_list)

def get_nodetree_name(node):
nt = node.id_data
nt = node.id_data.original

for nm, ng in bpy.data.node_groups.items():
if nt == ng:
if nt == ng.original:
return nm

for mat in bpy.data.materials:
if mat.node_tree is None:
continue
if mat.node_tree == nt:
if mat.node_tree.original == nt:
return mat.name

for world in bpy.data.worlds:
if world.node_tree == nt:
if world.node_tree.original == nt:
return world.name

for ob in bpy.data.objects:
if ob.type == 'LIGHT':
light = ob.data
if light.node_tree == nt:
if light.node_tree is None:
continue
if light.node_tree.original == nt:
return ob.name
elif ob.type == 'CAMERA':
if find_projection_node(ob) == node:
Expand Down

0 comments on commit 74b86de

Please sign in to comment.