title


genchansansanは今日も戦う。

2013/01/19

frequently used expressions




書き途中。。
よく使うのをまとめておくページ。



dopobjscreatedby() :





float dopfield(string dop, string object_spec, string sub_data_name, string record_type, float record_number, string field_name) : dop内オブジェクト"object_spec"のサブデータ"sub_data_name"の"record_type"の"record_number"番目の"field_name"の数値を返す。
string dopfields()

float dopoption(string dop, string object_spec, string sub_data_name, string field_name) : dopfieldの"record_type"="Options", "record_number"="0"を入れたもの。
string dopoptions ()

 ※指定するものがDOP Import Recordsと似ている。





float point(string surface_node, float point_number, string attribute_name, float attribute_index) : 指定されたSop node内のpoint_number番目のattribute「attribute_name」のattribute_index番目の数値を返す。

string points(string surface_node, float point_number, string attribute_name)
float prim(string surface_node, float primitive_number, string attribute_name, float attribute_index)
string prims(string surface_node, float primitive_number, string attribute_name)

※DOPNetwork内でも使える。
(ex : point("/obj/AutoDopNetwork:$OBJNAME/Geometry",0,"foo",0)
「:」は「/」でもいけた。事前に"foo"というpoint attributeをgeometry内で作っておく。)

※attribute_indexはattributeが配列じゃなかったら、0。





string primgrouplist(string surface_node) : 指定のノードのprimitiveのgroupのリスト(スペースを挟んだ文字列)を返す。
string pointgrouplist(string surface_node) : pointのgroup。

float npoints(string surface_node) : 指定のノードのジオメトリの持つポイントの数を返す。

string arg(string line, float argNum) : lineのargNum番目にあるものを返す。
float argc(string line) : lineの要素の数を返す。


var ch(string channel)
string ch(string channel)

※houdini(HScript)は文字列をスペースごとに区切って配列にするようです。
(ex : arg("hoo foo bar.", 1) -> "foo"
C#的には、
string[] line = new string[]{"hoo", "foo", "bar"};return line[1];
てな感じでしょうか。)



stamp()
CopyやらSOP Solverで頻出。

string padzero(size, value) : valueをsizeで指定した桁の数(満たない場合は0が追加される)にする。




nodeとかchnnel内文字列で使う相対パスについて、
"./~" : 自分自身のパラメータ「~」を参照。
"../~" : 自分の親のnodeのパラメータ「~」を参照。
     自分と同じ階層のnodeを参照。
※「..」と打って出てくるのは親のパラメータ。
 「../」と打って出てくるのは同じ階層のnode。
「.」が上、「/」が下ってな感じ?