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

mbt3d,
@mbt3d@fosstodon.org avatar
CWernerArt,
@CWernerArt@mstdn.social avatar

@mbt3d This was "not exactly" what I expected, Mark. Hoped for a quick code sample... 😊

metin,
@metin@graphics.social avatar

@CWernerArt @mbt3d Playing the Devil's advocate here, I believe ChatGPT is quite effective for solving coding issues.

mbt3d,
@mbt3d@fosstodon.org avatar

@metin @CWernerArt You devil you 😂

metin,
@metin@graphics.social avatar

@mbt3d @CWernerArt Don't tell anyone I advised AI! My reputation will be ruined! 😅

CWernerArt,
@CWernerArt@mstdn.social avatar

@metin @mbt3d ☺️ I thought I try the old school way first... 😜

metin,
@metin@graphics.social avatar

@CWernerArt @mbt3d That's better to keep the brain young and healthy. 👍

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