1

how do we manipulate a hair particle in bpy ? there's many basic individual properties i'd like to manipulate with python. mainly hair position, rotation, scale and a way to delete some ? or make some invisible ? i'm not sure what's possible to do ?

enter image description here

here i have my suzanne with some hairs let say that i want to replace thoses hairs by a custom matrix of mine:

hair_matrix = #xyz location, xyz rotation, scale
[
  [[0,0,0],[1,1,1],[1]],
  [[1,0,0],[1,1,1],[1]],
  [[2,2,2],[1,1,1],[1]],
  [[3,3,3],[1,1,1],[1]],
  [[4,4,4],[1,1,1],[1]],
  [[5,5,5],[1,1,1],[1]],
  [[6,6,6],[1,1,1],[1]],
  [[7,7,7],[1,1,1],[1]],
  [[8,8,8],[1,1,1],[1]],
  [[9,9,9],[1,1,1],[1]],
]

is there a fast access to a hair matrix like so? or i will need to do my own function and assign individually position, rotation and scale ? i suppose there's a foreach_get/set i could use ? i'm not sure where i need to find the properties. i saw that there's some weird despgraph manipulation to do. the data seem a bit hidden but i may be wrong ?

also, let say that i'd like to delete/hide particles located above 50cm in Z height position, possible to do so ?

dd b
  • 57
  • 3
  • https://blender.stackexchange.com/questions/142741/how-do-i-programmatically-set-hair-position-and-shape-in-blender-2-8 – batFINGER Aug 09 '20 at 19:23

0 Answers0