Contributor ajz3d Posted November 18, 2013 Contributor Report Share Posted November 18, 2013 Hello. I have two short questions: 1. What is the script command for "to uniform space". 2. How to iterate through every layer of the VoxTree? I did a quick search of the Scripting Manual, but it doesn't seem to mention any of the above. Any help is appreciated. Quote Link to comment Share on other sites More sharing options...
Member Creator Posted November 26, 2013 Member Report Share Posted November 26, 2013 Hey !! 1) Have no idea how to run "to uniform" via script 2) Only option is to choose: SelectFirstVolume(false); // false - if you want to select visible and nonvisible layers Than you can select next layers in a loop with: SelectNextVolume(false); // false - if you want to select visible and nonvisible layers Quote Link to comment Share on other sites More sharing options...
Contributor ajz3d Posted November 28, 2013 Author Contributor Report Share Posted November 28, 2013 Thank you.But what if I need to put the SelectNextVolume(bool)call in a for loop when I don't know how many volumes are in a tree? Is there something like Python's for s in list in C++ or AngelScript? Or is subtree iteration possible only by hiding volumes one doesn't want to iterate through and running the bool SelectNextVolume(bool) function multiple times with true as its argument? Also, I have a question about bool SelectNextVolume(bool OnlyVisible).The manual states that: Select next volume after current in tree, if OnlyVisible==true then next visible volume will be selected. Returns falseif current volume is last in list So from what I understand, if OnlyVisible is true then if the function encounters the first hidden volume or the last volume in the VoxTree, it should return false. However, this doesn't happen. SelectNextVolume seems to always return false, no matter what volume it encounters. Take this script for example: void main(){ bool isNotLast = true; while (isNotLast){ isNotLast = SelectNextVolume(true); ModalDialog("isNotLast = "+isNotLast+"\nCurVolume = "+GetCurVolume()," "); //Debug //Some operations on volume here } } After iterating through currently selected volume, SelectNextVolume immediately returns false and ends the while loop, even if there are more non-hidden volumes below the current layer. I don't know. Maybe I'm doing something wrong here. Quote Link to comment Share on other sites More sharing options...
Andrew Shpagin Posted December 3, 2013 Report Share Posted December 3, 2013 To uniform space in current volume: cmd("$ToUniformSpace");/*To uniform space*/ And rule: Any RMB item accessible through same rule via RMB+MMB (copy item to clipboard) iterating seems to be buggy. Generally this should work: SelectFirstVolume(true); do{ cmd("$ToUniformSpace");/*To uniform space*/ }while(SelectNextVolume(true)); I will correct it in today's build. Quote Link to comment Share on other sites More sharing options...
Member Creator Posted December 3, 2013 Member Report Share Posted December 3, 2013 To uniform space in current volume: cmd("$ToUniformSpace");/*To uniform space*/ And rule: Any RMB item accessible through same rule via RMB+MMB (copy item to clipboard) Yeah I know, but it doesn't worked for me while i clicked RMB at Vox Layer and then RMB + MMB at "To uniform space". Quote Link to comment Share on other sites More sharing options...
Andrew Shpagin Posted December 6, 2013 Report Share Posted December 6, 2013 Scripts updated, look 4.0.11 1 Quote Link to comment Share on other sites More sharing options...
Contributor ajz3d Posted December 6, 2013 Author Contributor Report Share Posted December 6, 2013 Thanks Andrew! I'll try it today. 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.