Jump to content

Setting Up Local Variables From The Second Input


Recommended Posts

Hi,

I was wondering how you'd go about setting up local variables from the second input

of your sop.

Things like $NX2, $TY2, $FOO2 etc.

is there a way to get setupLocalVars() to do this for you?

thanks

L

Link to comment
Share on other sites

  • 5 weeks later...

here you go

	myCurGdp[0] = gdp;
	myCurGdp[1] = inputGeo(1,context); 
	setupLocalVars();

	GU_Detail *igdp = (GU_Detail *) inputGeo(1, context);

...

	if (error() < UT_ERROR_ABORT && cookInputGroups(context) < UT_ERROR_ABORT)
	{
	FOR_ALL_OPT_GROUP_POINTS(gdp, myGroup, ppt)
	{
		myCurPt[0] = ppt;
		if(igdp!=NULL) {
			if (ppt->getNum() >= igdp->points().entries())
				myCurPt[1] = 0;
			else
				myCurPt[1] = igdp->points()(ppt->getNum());
		}

and that should do the trick, let me know if you run into trouble.

L

Edited by doc
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...