Scripting – Creating an empty polygon mesh


There’s several ways to create an empty polygon mesh with the Object Model.

from sipyutils import si			# win32com.client.Dispatch('XSI.Application')
from sipyutils import log		# LogMessage
from sipyutils import C			# win32com.client.constants

si = si()
o = si.Selection(0)

if o.IsClassOf( C.siX3DObjectID ):
	o.AddPolygonMesh()
	o.AddPrimitive( "EmptyPolygonMesh"  )
	o.AddGeometry( "EmptyPolygonMesh" )

AddPolygonMesh() courtesy of Vladimir

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s