It works, but only on a face selection. The UI/hotkey you're using has something to convert the selection first. Try adding this line into your shelf button: ConvertSelectionToFaces;
macroScript LockAllTransforms category: "HowTo"
(
setTransformLockFlags selection #all
) If you select the code, then click the P button, and choose Code, you get this. Imperfect however, hmmm.
well that code snippet doesn't work apparently. i found the bug by individually selecting objects for baking, and got the exception when i selected the object with no mesh.
Right-click on the viewport name, and select 'configure'. Then, go to Statistics and you can enable and disable polygon / triangle count from there, for the scene or scene and the selected object.
This might help. I started off with a box, illustrated by the selected faces, then I extruded outwards and did a Select and Uniform scale on them to achieve a rounded shape.
https://www.youtube.com/watch?v=X7i8tsdNN2I Key Features: * Automatic Surface Alignment: Greeble parts automatically align to each face’s normal—no manual rotation required. * Instant Parenting: Each newly scattered part is parented to its target mesh, so moving or transforming the original object keeps all the detailing…