问题描述:

如何使用Python设置houdini的首选项

相关方法

Houdini中和PREFERENCES相关的有三个方法。
官方文档

hou.getPreference()

getPreference(name) → string
这个方法根据属性的名字返回属性的值

hou.getPreferenceNames()

getPreferenceNames() → tuple of strings
这个方法将会返回所有Preference属性的名字,便于查询


# 这是打印结果
('composites.cinplut.val', 'general.voppreview.val', 'networkeditor.wirefadefactor', 'networkeditor.textbadgeoutputf
orview', 'networkeditor.textbadgedescriptiveparm', 'networkeditor.taskgraphlimitrows', 'networkeditor.solohighlighte
dworkitems', 'networkeditor.showpreviews', 'networkeditor.shownodetypes', 'networkeditor.shownodeshapes', 'networked
itor.showfailedworkitems', 'networkeditor.showdirtyworkitems', 'networkeditor.showcookedworkitems', 'networkeditor.s
howcancelledworkitems', 'networkeditor.maxworkitemsperrow', 'networkeditor.maxtaskgraphrows', 'networkeditor.maxflyo
utscale', 'networkeditor.doautomovenodes', 'networkeditor.badgevexcache', 'networkeditor.badgetimedep', 'networkedit
or.badgeneedscook', 'networkeditor.badgehdaunlocked', 'networkeditor.badgehdalocked', 'networkeditor.allowdroponwire
', 'networkeditor.TopInOutColor_8', 'networkeditor.TopInOutColor_4', 'networkeditor.TopInOutColor_17', 'networkedito
r.TopInOutColor_16', 'networkeditor.TopInOutColor_15', 'networkeditor.badgehastakedata', 'networkeditor.badgenodeloc
ked', 'networkeditor.TopInOutColor_10', 'networkeditor.TopInOutColor_0', 'networkeditor.TopInOutColorTag_9', 'networ
keditor.TopInOutColorTag_8', 'networkeditor.TopInOutColorTag_7', 'networkeditor.TopInOutColorTag_6', 'networkeditor.
TopInOutColorTag_5', 'networkeditor.TopInOutColorTag_4', 'networkeditor.TopInOutColorTag_19', 'networkeditor.TopInOu
tColorTag_18', 'networkeditor.TopInOutColorTag_17', 'networkeditor.TopInOutColorTag_16', 'networkeditor.TopInOutColo
rTag_14', 'networkeditor.TopInOutColorTag_13', 'networkeditor.showcookingworkitems', 'networkeditor.TopInOutColorTag
_12', 'networkeditor.TopInOutColor_12', 'networkeditor.TopInOutColorTag_11', 'AP_KeyboardHit', 'exttools.foldercompa
re.options', 'exttools.filecompare.options', 'exttools.filecompare.path', 'ui.textport.paren', 'networkeditor.badgew
arning', 'networkeditor.TopInOutColor_1', 'ui.textport.syntax', 'networkeditor.TopInOutColor_6', 'ui.editor.paren',
'ui.parm.paren', 'ui.parm.syntax', 'notify.timelimit.val', 'networkeditor.TopInOutColorTag_10', 'notify.helptip.menu
', 'hipoptions.unitmass.val', 'hipoptions.unitlength.val', 'misc.opencl_env.override', 'misc.make_spare_parms.val',
'misc.externalhelpurl.val', 'take.autoincludeassets.val', 'general.autosaveinterval.val', 'general.newfilesavescenef
ormat', 'resmgr.showhidden.val', 'notify.timelimited.val', 'resmgr.autosave.desk.val', 'misc.cansendanonymousstats.v
al', 'render.showallrops.val', 'anim.underlinescoped.val', 'anim.underlinescopedcolor.val', 'anim.followscopedchanne
lreferences.val', 'objects.linkchopviewer.val', 'notify.location.menu', 'ui.textport.help', 'anim.includeconstraints
.val', 'anim.includechild.val', 'networkeditor.badgenodeunload', 'anim.includeanim.val', 'objects.linkchanneleditor.
val', 'networkeditor.maxnamewidth', 'anim.autoupdatechannels.val', 'networkeditor.badgeconstraints', 'networkeditor.
showprompttext', 'anim.setautoscope.val', 'anim.nopendingkey.val', 'anim.autokeytuples.val', 'general.newfilesavesce
neformat.val', 'anim.slope.val', 'anim.firstfunc.val', 'states.bones.autoenablecplane.val', 'networkeditor.badgenotc
ompilable', 'states.curve.autoenablecplane.val', 'states.objcurve.autoenablecplane.val', 'misc.restricttosafe.val',
'menu.val', 'handles.defaultxformglobal.val', 'anim.autofunc.val', 'states.path.autoenablecplane.val', 'networkedito
r.badgenodehasdata', 'handles.defaultgimbal.val', 'handles.viewaxisrotatering.val', 'handles.useviewdirtohiderotater
ings.val', 'handles.indirectdragprefertranslateoverscale.val', 'handles.indirectdragprefertranslateoverrotate.val',
'resmgr.pathbehaviour.val', 'anim.autoslope.val', 'networkeditor.TopInOutColor_7', 'handles.tumbleinside.val', 'gene
ral.loadwarndeprecated.val', 'networkeditor.TopInOutColor_9', 'handles.planartranslatetargets.val', 'anim.holdlastke
y.val', 'networkeditor.badgecomment', 'handles.extendedaxes.val', 'handles.pickdistance.val', 'handles.scalehandlest
yle.val', 'handles.axistoorienttonormal.val', 'handles.indirectdragspidermethod.val', 'handles.indirectdragtranslate
method.val', 'networkeditor.TopInOutColor_11', 'anim.firstfunc.menu', 'misc.useexternalhelp.val', 'viewport.locateco
mponents.val', 'networkeditor.TopInOutColorTag_3', 'misc.revert_invisible.val', 'viewport.setpivottumbledefault.val'
, 'networkeditor.textbadgeloplastmodifiedprim', 'handles.indirectdrag.val', 'viewport.autosetviewpivotonselection.va
l', 'general.undolimit.val', 'networkeditor.TopInOutColor_5', 'viewport.scrollstyle.val', 'viewport.wire_toggle.menu
', 'viewport.lightpasscolorbuffertype.val', 'viewport.allowadaptivesubd.val', 'viewport.offsetzoomdefault.val', 'vie
wport.wiretoggle.val', 'networkeditor.TopInOutColor_14', 'viewport.orientation.val', 'networkeditor.badgeerror', 'vi
ewport.defaulthoming.val', 'objsop.switch.val', 'handles.indirectdragprefertranslateovervrotate.val', 'objcache.memo
ry.val', 'ui.parm.help', 'sopcache.unload.val', 'networkeditor.showtaskgraph', 'network.autohighlight.val', 'network
editor.TopInOutColor_13', 'selector.areaselvisible.val', 'objects.folderflipping.val', 'sopcache.memory.val', 'objec
ts.highlight.val', 'anim.setfirstkey.val', 'trees.displayicons.val', 'networkeditor.textbadgelayercount', 'objcache.
memorylimit.val', 'tiles.perfstats.val', 'chops.mincooks.val', 'tools.secure.val', 'networkeditor.maxnameheight', 'r
esmgr.showall.val', 'networkeditor.minnameheight', 'objects.keepPos.val', 'networkeditor.shakesensitivity', 'general
.autosaveinc.val', 'networkeditor.snapradius', 'sopcache.level.val', 'networkeditor.flagsallowpreselect', 'networked
itor.badgedynamictop', 'exttools.filecompare.menu', 'handles.hidelockedparts.val', 'networkeditor.allowdiveintohdas'
, 'networkeditor.transientinfo', 'networkeditor.TopInOutColorTag_1', 'networkeditor.showvopinoutlabels', 'sopstates.
exportcookselectiontype.val', 'tools.createincontext.val', 'misc.destructive_revert.val', 'networkeditor.TopInOutCol
orTag_2', 'networkeditor.showanimations', 'networkeditor.TopInOutColorTag_0', 'objects.overwriteanim.val', 'networke
ditor.gridsnapping', 'chops.deftimeslice.val', 'parmdialog.embedviseditor.val', 'networkeditor.dosnapping', 'general
.audionotice_question.val', 'networkeditor.TopInOutColor_3', 'ui.editor.toolbar', 'tools.sopviewmode.val', 'anim.add
edfunc.val', 'anim.addedfunc.menu', 'general.audionotice_warning.val', 'handles.translateinside.val', 'general.lod.v
al', 'networkeditor.connectorsnapradius', 'general.lefthandmenus.val', 'tools.opnamespacefilter.val', 'general.fileb
rowserimages.val', 'objects.openchanneleditor.val', 'networkeditor.textbadgecomment', 'networkeditor.showstaticworki
tems', 'general.smoothlines.val', 'general.audionotice_message.val', 'general.uiscale', 'general.nopending.val', 'ge
neral.filechooserstyle.menu', 'networkeditor.textbadgecontextoptiondeps', 'general.saveviewcmds.val', 'objects.kinov
erride.val', 'objects.keepPosMoving.val', 'general.inc.val', 'sopcache.memorylimit.val', 'selector.useexisting.val','viewport.delayinactive.val', 'anim.keepchannelselection.val', 'misc.opencl_device.menu', 'handles.openchanneledito
r.val', 'misc.opencl_devicetype.menu', 'viewport.oldtumble.val', 'handles.colorxform.val', 'handles.scope.val', 'net
workeditor.copypathstoclipboard', 'notify.echohotkey.val', 'networkeditor.badgelopdebug', 'networkeditor.showsimples
hape', 'general.icon_size.menu', 'networkeditor.TopInOutColor_18', 'networkeditor.TopInOutColor_2', 'networkeditor.s
howstackedlook', 'exttools.foldercompare.path', 'general.coppreview.val', 'point_percent.val', 'handles.translateins
ideobscuresbackaxes.val', 'networkeditor.badgekinematics', 'delpoint.val', 'objects.pickingmenu.val', 'networkeditor
.TopInOutColorTag_15', 'handles.defaultworldalign.val', 'general.panecoloring.val', 'handles.keepalign.val', 'tools.
maxhistory.val', 'general.audionotice_error.val', 'anim.setkey.val', 'addpoint.val', 'objects.selectsubnet.val', 'FU
SE_PREF.ramp_val', 'anim.rotationfunc.menu', 'ramp_color_schemes.val', 'scripting.exprlanguage.menu', 'anim.rotation
func.val', 'general.uiplaybar.menu', 'viewport.altkeyviewcontrols.val', 'general.desk.val', 'handles.scale.val', 'ge
neral.keepfloatwindowsontop.val', 'networkeditor.TopInOutColor_19', 'viewport.directeddollydefault.val', 'networkedi
tor.distancefordrag', 'ui.editor.syntax', 'objcache.clear.val', 'open.val', 'networkeditor.showpartitionworkitems',
'ok.val', 'misc.parmdel_warnings.val', 'selector.fullloops.val', 'chops.maxtimeslice.val', 'networkeditor.autoscroll
', 'rendererListVscroll')

hou.setPreference()

setPreference(name, value) → bool
设置属性的值,如果成果就返回True

实际操作

简单来说就是先通过 hou.getPreferenceNames() 获取到想要修改的属性名,然后再通过 hou.setPreference() 进行操作,非常简便

Houdini 使用Python设置Preference相关推荐

  1. python houdini_【微笔记】houdini使用python创建城市教程笔记II

    原标题:[微笔记]houdini使用python创建城市教程笔记II 今天继续学习第二部分,使用python处理block和创建属性,批量处理导入的建筑模型.最大的感受是使用程序去处理批量重复的东西真 ...

  2. python houdini_【微笔记】houdini使用python创建城市教程笔记I

    原标题:[微笔记]houdini使用python创建城市教程笔记I 昨天小编分享了houdini使用python制作城市的教程,讲解得非常不错,不过个人建议大家至少有一些python基础和houdin ...

  3. python 设置开机自动启动 .py 文件

    python 设置开机自动启动 .py 文件 创建python_auto.bat的快捷方式,放入启动项: C:\Users\Administrator\AppData\Roaming\Microsof ...

  4. python modbus tk 库_如何使用modbus tk rtu(python)设置简单的从机和主机

    我想通过modbus协议在树莓pi(从机)和pc(主机)之间建立通信.目前,我正在使用 modbus-tk (python)设置通信协议. 问题是主设备无法从从设备读取寄存器我能知道我的代码有什么问题 ...

  5. python中文版界面-python设置中文界面实例方法

    下面,小编将通过一组实例演示,让大家更直观,更清楚明白的了解要设置中文这一内容的操作步骤. 首先展示实例代码: import pygame from pygame.locals import * de ...

  6. python设置坐标轴刻度值字体大小_python 设置xlabel,ylabel 坐标轴字体大小,字体类型...

    本文介绍了python 设置xlabel,ylabel 坐标轴字体大小,字体类型,分享给大家,具体如下: #--coding:utf-8-- import matplotlib.pyplot as p ...

  7. python设置本机IP地址、子网掩码、DNS,获取本机IP地址、子网掩码、DNS、MAC

    python设置本机IP地址.子网掩码.DNS,获取本机IP地址.子网掩码.DNS.MAC main.py """=== coding: UTF8 ==="&q ...

  8. python设置二维列表_Python设置为列表

    python设置二维列表 Python设置为列表 (Python Set to List) Sometimes we have to create a list from the set object ...

  9. python设置环境变量_Python设置环境变量

    python设置环境变量 We can set an environment variable in Python using os module. Python os module environ ...

最新文章

  1. [Educational Codeforces Round 16]A. King Moves
  2. Visual Studio 2015 编译与使用Boost库进行文件与目录的操作
  3. c#截取字符串后几位_基础库的字符串设计
  4. ajax注册表单用户名实时验证,Ajax注册表单用户名实时验证..doc
  5. oracle 数据库字段名与实体类字段名称不匹配的处理方法
  6. 【C#程序设计】教学讲义——第三章:C#语言基础
  7. pyecharts简单使用
  8. leetcode 107 --- 二叉树程序遍历 ii
  9. 15个最新的HTML5及CSS3特效代码生成器
  10. Intel 64/x86_64/IA-32/x86处理器 - SIMD指令集 - SSE扩展(7) - 混洗指令 解组合指令
  11. 如何防御xss?HTML编码和JS编码
  12. 怎么把mov视频转换成mp4格式
  13. JLINK+AXD 调试出现 RDI Warning 00005:Data Abort 问题的解决办法
  14. Unity小游戏算法分析与实现(Unity+XR+游戏开发+算法+MVC+斗地主+耳轮跳+见缝插针+王者荣耀+绝地求生+立钻哥哥+==)
  15. livp后缀文件图片怎么打开,在电脑怎么打开live照片批量转换?
  16. 基于ThinkPHP6+Layui后台开发框架
  17. matlab将空间描述转变为约当阵,matlab求约当标准型
  18. 【微信小程序】web-view 无法打开该页面不支持打开
  19. 同济大学计算机硕士生能拿到户口,上海这4所大学的应届生,毕业可直接“落户”,考生有福了...
  20. 较全的OA系统功能需求

热门文章

  1. 初学者备战蓝桥杯历程(大学编程学习历程记录,题目思路献给需要备考蓝桥杯的同学)
  2. linux ssd加速机械硬盘,关于linux:机械硬盘随机IO慢的超乎你的想象
  3. 全栈AI火力全开,“云智一体”为开发者凿开产业智能通衢
  4. Object Detection经典代码与文章
  5. 微信公众号身份证OCR识别和验真|人证比对
  6. 给大家讲个笑话,拿了个offer,因为体检查出脂肪肝,公司把我拒绝了!
  7. .基金从业资格考试信息
  8. 学生体育运动主题网页设计——兵乓球国乒网(纯HTML+CSS代码)
  9. 电商抢购高并发JAVA简单实现
  10. Python Pexpect 模块使用说明