Member Sandu Posted June 5, 2023 Member Share Posted June 5, 2023 I read the python api doc ,but I can't figure out how to select the current sculpt object to do some other operations . code like this : import coat vol = coat.Volume.getVolume() print (vol ) coat.dialog().params(vol).ok().show() I don't know what goes wrong .need some tips and help .Thankyou Quote Link to comment https://3dcoat.com/forum/index.php?/topic/28402-quesion-how-to-select-the-current-sculpt-object-in-the-scene-to-some-other-operation-just-like-cal-volume-or-size-in-python-script/ Share on other sites More sharing options...
Contributor Solution poeboi Posted June 5, 2023 Contributor Solution Share Posted June 5, 2023 (edited) This post was recognized by Carlosan! poeboi was awarded the badge 'Helpful' and 1 points. Hello, this is how you can get reference to Volume which is left mouse button selected in Vox Tree # import the module coat import coat # get selected scene element scene_element = coat.Scene.current() # scene_element.Volume will get reference to selected object volume, can then use print(scene_element.Volume()) # it does not have a default string but console should print something meaningful # rudimentary example, get number of points from Volume and print to the console print(scene_element.Volume().getPolycount()) all Volume member functions :https://pilgway.com/files/3dcoat/PythonAPI/classcoat_1_1_volume.html#a22d52d8c660cf85808a1eaab3ae6986f Edited June 5, 2023 by poeboi () at end of member 1 Quote Link to comment https://3dcoat.com/forum/index.php?/topic/28402-quesion-how-to-select-the-current-sculpt-object-in-the-scene-to-some-other-operation-just-like-cal-volume-or-size-in-python-script/#findComment-188798 Share on other sites More sharing options...
Member Sandu Posted June 5, 2023 Author Member Share Posted June 5, 2023 Thank you for your tips ! I try something more Quote Link to comment https://3dcoat.com/forum/index.php?/topic/28402-quesion-how-to-select-the-current-sculpt-object-in-the-scene-to-some-other-operation-just-like-cal-volume-or-size-in-python-script/#findComment-188801 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.