Any example code on how to access the Transform and other properties from each Point in a PointCloud via Python?
Also, some code to access Mesh data via Python?
Thanks
-TS-
Python access to PointCloud & Mesh
-
csaez
- Posts: 253
- Joined: 09 Jul 2012, 13:31
- Skype: csaezmargotta
- Location: Sydney, Australia
Re: Python access to PointCloud & Mesh
TwinSnakes007 wrote:Any example code on how to access the Transform and other properties from each Point in a PointCloud via Python?
Code: Select all
from siutils import si, log
oPCloud = si.Selection(0)
oGeo = oPCloud.ActivePrimitive.Geometry
lData = oGeo.ICEAttributes("PointPosition").DataArray
for i, oVector in enumerate(lData):
log("ID: %d" % i)
log("PointPosition: %s" % str(oVector.Get2()))
log("---")
Also, some code to access Mesh data via Python?
Code: Select all
from siutils import si, log
oCube = si.Selection(0)
oGeo = oCube.ActivePrimitive.Geometry
lPoints = oGeo.Points
for i, oPoint in enumerate(lPoints):
log("ID: %d" % i)
log("PointPosition: %s" % str(oPoint.Position.Get2()))
log("---")* Added url tags around link - Eric T.
-
TwinSnakes007
- Posts: 316
- Joined: 06 Jun 2011, 14:00
Re: Python access to PointCloud & Mesh
Thank you very much.

