sanostol Posted July 24, 2012 Share Posted July 24, 2012 Hi, I'm trying to update some rbds positions and rotations with pytondop. it works but it is slow. I use code like this: objects = hou.pwd().objectsToProcess() ctrl = hou.node("/obj/box_object1/add1") simulation = hou.node("..").simulation() for item in objects: id = simulation.findData(item.name()+"/CopyInfo/").options().field("copynum") .... I'm not sure if I get this right, but I think for every processed object the loop is run, for 1000 objects that means a lot of double work. so my question is there a way to do this just for the current processed object Martin Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted July 24, 2012 Share Posted July 24, 2012 You could easily test if it is running the loop for each object by putting a print in there and just using 3 objects or something. If it prints it more than 3 times its running it for each object. I feel that if it is running for each object there should be some function in hou.DopNode to get current object but I can't see any. 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.