I'm trying to get a list of the currently scoped and selected channels in the animation editor with python but not sure how. I tried
hou.ChannelList.parms()
hou.ChannelList.selected()
Thanks
hou.ChannelList.parms()
hou.ChannelList.selected()
[redsith@heimdall ~]$ Traceback (most recent call last): File "/opt/hfs19.0.454/houdini/python3.7libs/poselib/poselib.py", line 221, in _openDirectory self.libraryWidget.openLibrary(itemlibrary.LIBRARY_DIRECTORY) File "/opt/hfs19.0.454/houdini/python3.7libs/poselib/itembrowser.py", line 1034, in openLibrary return self._loadFrom(load_format, path, "Open Library", False) File "/opt/hfs19.0.454/houdini/python3.7libs/poselib/itembrowser.py", line 1058, in _loadFrom name = self.itemModel.loadFrom(load_format, path, importing) File "/opt/hfs19.0.454/houdini/python3.7libs/poselib/itemlibrary.py", line 2446, in loadFrom success = self.loadJSON(root_folder) File "/opt/hfs19.0.454/houdini/python3.7libs/poselib/itemlibrary.py", line 1606, in loadJSON force_load_data=force_load_data) \ File "/opt/hfs19.0.454/houdini/python3.7libs/poselib/itemlibrary.py", line 1578, in loadJSON item = self.itemFromJSON(json) File "/opt/hfs19.0.454/houdini/python3.7libs/poselib/posemodel.py", line 354, in itemFromJSON json[itemlibrary.JSON_IMAGE_TYPE]), File "/opt/hfs19.0.454/houdini/python3.7libs/poselib/itemlibrary.py", line 1515, in _deserializeImage byte_array = byte_array.fromBase64(image.encode('utf-8')) AttributeError: 'bytes' object has no attribute 'encode'
juergen
same issue here, in 16.5 worked fine
ciao j
Zoot
Still no luck with OpenCL. I upgraded from 39x to 416 Nvidia drivers for my 1060 without any effect.
I have various ENV variables in Windows 10 related to the CUDA toolkits being used for Tensorflow and Pytorch, and I suspect perhaps that or the CUDA version(s) installed are preventing H from seeing what it needs.
PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\libnvvp;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\libnvvp;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\libnvvp;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\cuda\bin;"
No Configured OpenCL Device
Environment:
CUDA_PATH C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0
CUDA_PATH_V8_0 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0
CUDA_PATH_V9_0 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0
CUDA_PATH_V9_1 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1
NVCUDASAMPLES8_0_ROOT C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0
NVCUDASAMPLES9_0_ROOT C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.0
NVCUDASAMPLES9_1_ROOT C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.1
NVCUDASAMPLES_ROOT C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.0
NVTOOLSEXT_PATH C:\Program Files\NVIDIA Corporation\NvToolsExt\
friedasparagus
Hi Redcroft,
Nothing wrong with the code there, the problem was to do with the timeshift and getting the prev_pos value. With the timeshift set to $F-1, the rot wrangle will only compute the dist travelled over the last timestep, which is why you'll notice the ball straighten up when it changes direction - the dist is very small. You can get you're existing setup to work by changing the timeshift to use the first frame (as I've done in the file), but this of course only gives you the right motion when moving in a straight line through the origin, as the dir will always be computed from there. I stuck a curve based animation in there to see that clearly.
All you need to do is take your existing setup and stick it in a Solver SOP, this way we can continuously update the dir and the distance based upon the previous frame (which I'm guessing was you're instinct).
I swapped around the prev_pos and cur_pos in the ‘rot’ node within the solver, just to make accumulating the rotation a bit simpler.
Hope that's useful
Cheers!
PS Forgot to mention one of the perks of using the solver sop is that we can increase substeps to improve the accuracy of the rotation, super handy for fast motion!
vector cur_pos = detail(0, "cen"); vector prev_pos = detail(1, "cen"); float dist = distance(cur_pos, prev_pos); float circum = detail(0, "circum"); float angle = radians((dist/circum)*360); vector up = {0,1,0}; vector dir = normalize(prev_pos-cur_pos); vector axis = normalize(cross(dir, up)); matrix3 m = ident(); rotate(m, angle, axis); @P -= cur_pos; @P *= m; @P += cur_pos;