setz Posted March 18, 2021 Share Posted March 18, 2021 Here is the old script for 3 point align. Is is possible to script a tool with the current SDK? If so, ¢hris, do you want to take a shot at it? tool_3pt_align.fsl Quote Link to comment Share on other sites More sharing options...
¢hris £und Posted March 18, 2021 Share Posted March 18, 2021 Looking. Currently, all scripts are "Utility" scripts. So, until I look further, my guess is it will not behave quite the same way. I don't recall off the top of my head to see if click points can be tracked. That will be the first thing to consider. Pre-picking is currently NOT available since the API does not keep the list in order. So, there is no way to know which object was picked first or last. However, I will have to dig in to see if we can get at least some partial functionality. ¢£ setz and ZTEK 2 Quote Link to comment Share on other sites More sharing options...
setz Posted March 19, 2021 Author Share Posted March 19, 2021 Excellent! Quote Link to comment Share on other sites More sharing options...
¢hris £und Posted March 20, 2021 Share Posted March 20, 2021 Ok, Digging into this, I see no way to do it directly. There doesn't appear to be (in the documentation) a way to detect mouse information such as position or clicking etc... So, that means any current iteration will have to be pre-pick only. As mentioned above though, we cannot tell which points were picked when. *** Which, then means, we would have to figure out a method for keeping track of the order of the nodes picked and their order. At the moment, the only thing I can think of is to write them to a temporary file. And getting them selected and tracking the order will be at best, kludgey. *** This may be a limitation of fZ using Python 2.7 Python has a list object type called a "Dictionary" and of P2.7 dictionaries are unordered. There are just no two ways about it. (in versions 3.6 and newer, dictionaries have become ordered) Though, I am not sure that this is the issue or not. It is a possibility, however. I will continue to think about this, however. ¢£ 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.