Main
|
Resume
|
Showreel
|
Blog
|
Script
|
Contact
connexion
go to footer
expand all
|
collapse all
languages
class
All
JScript|XSI
Python|XSI
JScript|WEB
Python|Maya
All
Memo
learning
DDD
php
tool
keyboard tooltips
rig
DeletePropertyonSelectedGeometry()
- tool - felixlecha
function DeletePropertyonSelectedGeometry() { var cSel = GetValue("SelectionList"); var oProperty, sProperty, sLog; sProperty = "CrosswalkProps" sLog = "Log : " // Init ProgressBar var oProgressBar = XSIUIToolkit.progressbar; var iPBMax = cSel.count; var iProgress = 0; var iCountLoop = 0; oProgressBar.maximum = iPBMax; oProgressBar.visible = true; oProgressBar.caption = "Delete property on Selected Geometry"; for ( var i = 0; i < cSel.count && !oProgressBar.cancelpressed; i++ ) { // Round Progress Value iCountLoop ++; iProgress = Math.round( iCountLoop / iPBMax * 100 ); oProgressBar.statustext = oProgressBar.statustext = iProgress + "%"; oProgressBar.increment(); if( cSel(i).Type == "polymsh" ) { if( cSel(i).Properties( sProperty ) ) { oProperty = cSel(i).Properties( sProperty ); DeleteObj( oProperty ); sLog = sLog + "\n" + " Property deleted on " + cSel(i); } } else { // Do nothing } } // Hide ProgressBar oProgressBar.visible = false; LogMessage( sLog ); } DeletePropertyonSelectedGeometry();