sefisec Posted April 18 Share Posted April 18 (edited) Is there any way to access keyframe values of a parameter from custom python expression on the same parameter WITHOUT RECURSION as a result? Like, I understand why it's happening, because it's evaluating the expression each time, but is there any way to avoid that? Basically trying to write custom interpolating function, found this video (https://www.youtube.com/watch?v=4uO21IyjIz8), which is similar to what I'm trying to do, but it's a paid one, and I only need like that single piece of information out of it Simple example of python expression on RX channel: import time node = hou.pwd() keyframes = node.parm("rx").keyframes() time.sleep(0.01) print(keyframes[0].value()) time.sleep(0.01) is to demonstrate that it runs like 300 times per cook because of recursion, so it would take a few seconds to complete Edited April 18 by sefisec Quote Link to comment Share on other sites More sharing options...
sefisec Posted April 18 Author Share Posted April 18 So, problem solved, I made a mistake in full code, where I used keyframesInRange() wrong, and it throw recursion error, which confused me. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.