Skip to content

Commit

Permalink
Disable render quality switching on macOS (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
hshakula authored and bsavery committed Nov 27, 2019
1 parent 5234be4 commit 4595d56
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions pxr/imaging/plugin/hdRpr/python/generateRenderSettingFiles.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import sys, os, argparse
import os
import sys
import argparse
import platform

dry_run = False

render_setting_categories = [
{
'name': 'RenderQuality',
'disabled_platform': ['Darwin'],
'settings': [
{
'name': 'renderQuality',
Expand Down Expand Up @@ -424,6 +428,11 @@ class HdRprConfig {{
rs_validate_values = ''
houdini_params = ''
for category in render_setting_categories:
disabled_category = False
if 'disabled_platform' in category:
if platform.system() in category['disabled_platform']:
disabled_category = True

category_name = category['name']
dirty_flag = 'Dirty{}'.format(category_name)
rs_category_dirty_flags += ' {} = 1 << {},\n'.format(dirty_flag, dirty_flags_offset)
Expand Down Expand Up @@ -483,7 +492,10 @@ class HdRprConfig {{

rs_list_initialization += ' settingDescs.push_back({{"{}", HdRprRenderSettingsTokens->{}, VtValue(k{}Default)}});\n'.format(setting['ui_name'], name, name_title)

rs_get_set_method_definitions += (
if disabled_category:
rs_get_set_method_definitions += 'void HdRprConfig::Set{name_title}({c_type} {name}) {{ /* Platform no-op */ }}'.format(name_title=name_title, c_type=c_type_str, name=name)
else:
rs_get_set_method_definitions += (
'''
void HdRprConfig::Set{name_title}({c_type} {name}) {{
{set_validation}
Expand Down

0 comments on commit 4595d56

Please sign in to comment.