tips mainly for Houdini

タグ検索でpython9件見つかりました。

Variable Switch in Nuke

write python code in "before render" in a write node: =|CC| nuke.toNode("Switch1").knob("which").setValue(0) ||= and in another write node, something like: =|CC| nuke.toNode("Switch1").knob("which").setValue(1) ||= depending on write nodes you render, i…

https://nkvfx.memo.wiki/d/Variable%20Switch%20in%2... - 2021年12月18日更新

Sample Pixel

=|CC| nuke.toNode("Read1").sample("red",0,0) * nuke.thisNode().knob('Scale').getValue() ||=…

https://nkvfx.memo.wiki/d/Sample%20Pixel... - 2021年01月23日更新

get list of sub data in dop object

**Make a list of sub data in a dop object When you make your own solver, and you want all/the most of fields to resize. =|PY| node = hou.pwd().parent() obj = node.simulation().objects()[0] subDatas = obj.subData().keys() exclude = ["Geometry", "Solve…

https://nkvfx.memo.wiki/d/get%20list%20of%20sub%20... - 2020年06月05日更新

time

=|PY| import time as t print t.asctime(t.localtime(t.time())) ||=…

https://nkvfx.memo.wiki/d/time... - 2019年07月31日更新

get frame range from image sequence

***When plate of a shot is stored in a directory which doesn't include any other files =|PY| import os import re import glob def getSeqNum(iterFile): num = re.findall(r'\d+', iterFile)[-1] return num def getSeqInfoUnderDir(plateDir): i…

https://nkvfx.memo.wiki/d/get%20frame%20range%20fr... - 2018年12月08日更新

look at source code of a function

**Print source code of a function When we want to see source code of the function called "func" in "foo" library. =|PY| import inspect import foo print inspect.getsource(foo.func) ||=…

https://nkvfx.memo.wiki/d/look%20at%20source%20cod... - 2018年06月02日更新

read packed primitive

Get ObjectPaths In python, we can get object paths of cxform, xform, camera, polymesh, subdmesh, faceset, curves, points and nupatch. (unknown is no readable). For now, the best way is to add these paths to a string attribute with "," for seperation. =|…

https://nkvfx.memo.wiki/d/read%20packed%20primitiv... - 2018年05月30日更新

List of all nodes of a certain network type

e.g. print all sop nodes =|CC| import hou print hou.sopNodeTypeCategory().nodeTypes() ||=…

https://nkvfx.memo.wiki/d/List%20of%20all%20nodes%... - 2017年09月17日更新

get value from knob

string knob =|CC| [python {"%04d"%nuke.toNode("node").knob("intKnob").value()}] ||=…

https://nkvfx.memo.wiki/d/get%20value%20from%20kno... - 2017年08月24日更新

boolean(1) camera(2) cel(1) centos(2) chop(2) collision(3) constraint(1) cop(1) copy(1) csh(1) dop(9) expression(1) fedora(2) forloop(1) fracture(2) hdri(1) houdini(24) katana(2) linux(4) lookdev(1) mantra(1) mat(1) moitionblur(2) node(1) nuke(3) packed(3) pipeline(3) plastic(1) pop(1) python(9) quaternion(1) rbd(4) rendering(2) rop(1) script(1) shader(2) shape(1) shell(2) shop(1) smoke(1) softbody(1) sop(15) time(1) vellum(1) vex(11) volume(2) wire(1)

管理人/副管理人のみ編集できます