Added the select random functionality in particle edit mode for hairs or control points.
Details
Diff Detail
- Repository
- rB Blender
Event Timeline
You should perhaps read Blender's code style, especially about braces placement. Also, proper English would say 'Hair', not 'Hairs'.
| source/blender/editors/physics/particle_edit.c | ||
|---|---|---|
| 1602–1603 | Unused variables | |
| 1607 | There's a trailing whitespace here. | |
| 1667–1668 | Unused variables | |
| 1681–1684 | This could be done in one go, like int flag = (BLI_frand() < randf) ? SEL_SELECT : SEL_DESELECT and then pass flag to select_action_apply(). Same above. | |
Thanks @Kévin Dietrich (kevindietrich). Will make these changes.
Concerning the English, I'll just change it to hair as both seem to be accepted (according to a quick google search). As a native speaker, the use of the plural hairs for a specific selection seems right to me, as opposed to the 'mass plural' hair. But I've been wrong in the past many times!
Prefer this is just a single operator, PARTICLE_OT_select_random hair/points can just be an option. see RNA_def_enum usage.