Saturday 4 November 2017

moving specific Mash points

How to manually move points in MASH, using the python node..
Bold bits are the important lines of code, where 7 and 16 are the point numbers (add a Points node to see numbers). I'd assume you could hide specific points here too?



import openMASH

#initialise the MASH network data
md = openMASH.MASHData(thisNode)

#this is how to get the frame number
frame = md.getFrame()
#and this gets the number of objects in the network
count = md.count()

#add the index to the Y position
#for i in range(count):
#    md.outPosition[i].y=i

md.outPosition[7].y+=2;
md.outPosition[16].z+=3;
md.outVisibility[12]=0;
md.outRotation[12].x=12;

#tell MASH to write the network data
md.setData()


The docs say you can change -
  • outPosition
  • outScale
  • outRotation
  • outId
  • outVisibility