mrhumbility Posted April 20, 2017 Share Posted April 20, 2017 Hey, I am trying to do some stuff in python with viewport selections. I want to query whether or not the user has anything selected, not necessarily get what is already selected. As far as I can tell the only way to do anything with the viewport is through toolutils. If I use "toolutils.sceneViewer().selectGeometry()" and nothing is selected, it waits until the user hits enter over the viewport before continuing. Is there any way to simply return whether or not any geometry has been selected without having to wait for the user to hit enter? import toolutils sv = toolutils.sceneViewer() geo = sv.selectGeometry() if geo: print "There is a selection" else: print "No geo selected" Thanks! James C 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.