CWernerArt, German
@CWernerArt@mstdn.social avatar

I'm relative new in Python and still struggle with some basic logic. I've searched for an answer already, but the examples/solutions are mostly outdated or too complex for my understading.

Can someone give me an quick up to date example how to check if "any object is selected" and return a True or False then, or "do something" if True.

Thank you a lot!

Something like this:

if anyobjectseleted():
do this
else:
do that

  • All
  • Subscribed
  • Moderated
  • Favorites
  • blender
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • anitta
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • megavids
  • JUstTest
  • All magazines