[英]How to change value in a drop down list in Houdini with Python?
I have 2 problems: 我有2个问题:
1. 1。
I don´t know hot to add 2 points in fuse node. 我不知道在保险丝节点中添加2点很热。 I tried to write this: 我试着这样写:
union1.parm('querygroup').set (2)
union1.parm('querygroup').set (3)
union1.parm('tol3d').set(1.25)
and don't work then I tried to write 而且不工作,我试图写
grupo1=geo.createNode('group','G1')
#grupo1.parm(entity).set(2)
to select and group the points but I don't know how select and group the points in it 选择和分组点,但我不知道如何选择和分组点
2. I need to change the second value of the drop down list to the option BA but i dont know hot to say to python that. 2.我需要将下拉列表的第二个值更改为选项BA,但我不喜欢对python这么说。
crear.parm('booleanop').set(3)
crear.parm('substractchoices')
I tried this. 我试过了
I would appreciate it if you could help me fix it 如果您能帮助我修复它,我将不胜感激
IMAGES IN LINK= 链接中的图像=
https://drive.google.com/file/d/1C1v3DLgW4cz85PjCqK4hAFkk0wxrVWwp/view?usp=sharing https://drive.google.com/file/d/1FbhEkyX29YHVExlaTlw8eg0oD98ajcV7/view?usp=sharing https://drive.google.com/file/d/1C1v3DLgW4cz85PjCqK4hAFkk0wxrVWwp/view?usp=sharing https://drive.google.com/file/d/1FbhEkyX29YHVExlaTlw8eg0oD98ajcV7/view?usp=sharing
In case you haven't already encountered a solution to your questions, see if the following helps to resolve: 如果您尚未遇到问题的解决方案,请查看以下内容是否有助于解决:
'querygroup'
looks for a string value to populate the Group field, so your attempt is almost there, but the following should work to set the Fuse Group field to be points 2 and 3: 'querygroup'
寻找一个字符串值来填充Group字段,因此您的尝试就在那儿,但是下面的方法应该可以将Fuse Group字段设置为第2点和第3点:
union1.parm('querygroup').set ('2-3')
To select the 2nd value of the Boolean subtract drop down list, use the menu tokens for that parameter. 要选择布尔减法下拉列表的第二个值,请对该参数使用菜单标记。 In this case, the subtract choices are 'aminusb'
, 'bminusa'
, and 'both'
. 在这种情况下,减法选择为'aminusb'
, 'bminusa'
和'both'
。 So for your scenario, the following should work to set the subtract operation and the right token (BA): 因此,对于您的方案,以下应该可以设置减法运算和正确的令牌(BA):
crear.parm('booleanop').set('subtract')
crear.parm('subtractchoices').set('bminusa')
I've found that searching through a node's 'Edit Parameter Interface' (small gear icon in top right of parameters) outlines the parameter names and options, such as tokens and other specific criteria. 我发现在节点的“编辑参数界面”(参数右上角的小齿轮图标)中进行搜索可以概述参数名称和选项,例如标记和其他特定条件。 For example, the Boolean's parameter 'Subtract Choices (substractchoices)' lists the available tokens under its Menu tab. 例如,布尔参数'Subtract Choices(substractchoices)'在“菜单”选项卡下列出了可用的标记。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.