Need help - select objects with scaling other than 1/1/1 (and consider negative scaling)


#1

So I tried to do this by myself but I just can’t figure it out.

I’d like the script to

  • work on meshes AND splines
  • work only on objects displayed in the viewport
  • not select objects that have scaling of 1,1,1
  • not select objects that have negative scaling but still are at 100% (-1,1,1 ; 1,-1,1 ; 1,1,-1 and any combinations thereof)
  • select everything else (.3,1,1 ; -.3,-1,1 etc) - any scaling other than 1, be it positive or negative

In short, select any object that has an axis scaled - positive or negative - but leave out any object that’s at 100% scaling, be it positive or negative. And work on objects displayed in the viewport only.

Any ideas are appreciated!!


#2
nodes = #()
join nodes geometry
join nodes shapes
select (for s in nodes where ((abs s.scale.x) != 1 or (abs s.scale.y) != 1 or (abs s.scale.z) != 1) and not s.isHiddenInVpt collect s)

#3

Amazing to see how easy it could’ve been IF I knew how to get there. Many thanks, this is going to help us a lot!