ページ内コンテンツ

addNulltoPolyClster.js anchor.png Edit

SI0223.JPG


Page Top
//AddNullToPoly Selection

var oSel = Selection(0);
var oSub = oSel.SubComponent;
var oCol = oSub.ComponentCollection;

var nullname = "CNT_P_";

var digit = 3;

var oRoot = ActiveSceneRoot;

var oObj = oSub.Parent3DObject;

var oGeo = oObj.ActivePrimitive.Geometry;

var oParent = oObj;

for(i = 0;i < oCol.Count; i++){

	var oCls = oGeo.AddCluster(  siPolygonCluster,"",oCol(i).index ) ;

	id = id_string( i, digit );
	var oNull = oParent.AddNull(nullname + id);

	SetValue(oNull + ".null.primary_icon", 8, null);

	SetValue(oNull + ".null.size", 0.05, null);

	oParent = oNull;

	ApplyCns("ObjectToCluster", oNull, oCls, null);

	SetValue(oNull + ".kine.objclscns.upvct_active", true, null);

	SetValue(oNull + ".kine.objclscns.tangent", true, null);

}
function id_string( in_num, in_digit ) {
	id = ("00000").slice( 0, in_digit -String(in_num).length ) +in_num;
	return(id);
}

       
Counter: 12317, today: 2, yesterday: 2
最終更新: 2011-03-10 (木) 23:56:24 (JST) (3175d) by Land-Y
GoogleWiki
WikiMenu

ホーム ニュース フォーラム UserBlog 道場Wiki
Powered by XOOPS Cube Legacy 2.1.7 2001-2009 XOOPS Cube Project
cvELD.net project [ Softimage & XSI道場 ] since 2004 1/1