<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>sherpa</title>
	<atom:link href="http://nickpisca.com/sherpa/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://nickpisca.com/sherpa</link>
	<description>Advanced automation techniques in the AEC and film industries.  If you want a question answered on this blog, email your inquiry to nickpisca@gmail.com</description>
	<lastBuildDate>Tue, 08 May 2012 17:09:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Can You Create / Edit Reactions with Visual Studio as the Editor in CATIA/Digital Project?</title>
		<link>http://nickpisca.com/sherpa/?p=383</link>
		<comments>http://nickpisca.com/sherpa/?p=383#comments</comments>
		<pubDate>Tue, 08 May 2012 17:09:27 +0000</pubDate>
		<dc:creator>Nicholas Pisca</dc:creator>
				<category><![CDATA[Digital]]></category>
		<category><![CDATA[Fabrication]]></category>
		<category><![CDATA[Practice]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[Digital Project]]></category>
		<category><![CDATA[Knowledgeware]]></category>
		<category><![CDATA[Reactions]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://nickpisca.com/sherpa/?p=383</guid>
		<description><![CDATA[Recently I received these questions:
Do you know if it is possible to create / edit reactions with Visual  Studio as the editor? Could you recommend a best practice to instantiate  power copies programmatically?
My response:
Unfortunately, most knowledgeware functions must be written in the KW  editor. As for Reactions, you have the option to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I received these questions:</p>
<p><em>Do you know if it is possible to create / edit reactions with Visual  Studio as the editor? Could you recommend a best practice to instantiate  power copies programmatically?</em></p>
<p>My response:</p>
<p>Unfortunately, most knowledgeware functions must be written in the KW  editor. As for Reactions, you have the option to select a language, and  if you select Visual Basic, then you could theoretically edit your  action in the Visual Basic Editor or Visual Studio (with VB5 settings),  and then copy and paste it into the Reaction editor.  But at that point,  you might as well just use the standard out-of-the-box editor.   (FYI,  not all functions are exposed in the VB Reaction editor that is  available in the main VBA editor, e.g. some error checking, etc.)<br />
This page shows how to instantiate powercopies via VBA:  <a href="http://www.gtwiki.org/mwiki/r4doc/English/online/books/KnowledgeTemplate/cfyugpktmt0005.htm" target="_blank">http://www.gtwiki.org/mwiki/r4doc/English/online/books/KnowledgeTemplate/cfyugpktmt0005.htm</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nickpisca.com/sherpa/?feed=rss2&amp;p=383</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Order the YSYT scripting book in the next 2 days (by Jan 31) and get 30% off!</title>
		<link>http://nickpisca.com/sherpa/?p=380</link>
		<comments>http://nickpisca.com/sherpa/?p=380#comments</comments>
		<pubDate>Mon, 30 Jan 2012 18:24:25 +0000</pubDate>
		<dc:creator>Nicholas Pisca</dc:creator>
				<category><![CDATA[Digital]]></category>
		<category><![CDATA[Maya]]></category>
		<category><![CDATA[MEL]]></category>
		<category><![CDATA[YSYT]]></category>

		<guid isPermaLink="false">http://nickpisca.com/sherpa/?p=380</guid>
		<description><![CDATA[The deals keep coming!  Nick Pisca&#8217;s book, &#8220;YSYT &#8211; Maya MEL Basics for Designers&#8221; is 30% until Jan 31, 2012.  Act fast and get a copy at this discounted rate today!  Use the couponcode at checkout:  SHELFSTOCK305
Click here to review and get the book.
]]></description>
			<content:encoded><![CDATA[<p>The deals keep coming!  Nick Pisca&#8217;s book, &#8220;YSYT &#8211; Maya MEL Basics for Designers&#8221; is 30% until Jan 31, 2012.  Act fast and get a copy at this discounted rate today!  Use the couponcode at checkout:  <strong><span style="font-family: 'Lucida Grande',Arial,sans-serif; font-size: 14px; color: #666666; text-align: left;">SHELFSTOCK305</span></strong></p>
<p><a title="YSTY Book, by Nick Pisca" href="http://www.lulu.com/product/paperback/ysyt/4387353" target="_blank">Click here to review and get the book</a>.</p>
<div class="wp-caption alignnone" style="width: 223px"><a href="http://www.lulu.com/product/paperback/ysyt/4387353"><img title="http://static.lulu.com/product/paperback/ysyt/4387353/thumbnail/320" src="http://static.lulu.com/product/paperback/ysyt/4387353/thumbnail/320" alt="Nick Piscas book, YSYT" width="213" height="320" /></a><p class="wp-caption-text">Nick Pisca&#39;s book, YSYT</p></div>
<div class="wp-caption alignnone" style="width: 560px"><a href="http://www.lulu.com/product/paperback/ysyt/4387353"><img title="http://www.lulu.com/static/images/email_headerSHELFSTOCK305.png" src="http://www.lulu.com/static/images/email_headerSHELFSTOCK305.png" alt="Buy Nick Piscas YSYT Today!" width="550" height="175" /></a><p class="wp-caption-text">Buy Nick Pisca&#39;s YSYT Today!</p></div>
]]></content:encoded>
			<wfw:commentRss>http://nickpisca.com/sherpa/?feed=rss2&amp;p=380</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buy the scripting book YSYT, and get free ground shipping!</title>
		<link>http://nickpisca.com/sherpa/?p=377</link>
		<comments>http://nickpisca.com/sherpa/?p=377#comments</comments>
		<pubDate>Mon, 23 Jan 2012 18:58:57 +0000</pubDate>
		<dc:creator>Nicholas Pisca</dc:creator>
				<category><![CDATA[Animations]]></category>
		<category><![CDATA[Digital]]></category>
		<category><![CDATA[Fabrication]]></category>
		<category><![CDATA[MEL]]></category>
		<category><![CDATA[Practice]]></category>
		<category><![CDATA[Rendering]]></category>
		<category><![CDATA[Representation]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Maya]]></category>
		<category><![CDATA[YSYT]]></category>

		<guid isPermaLink="false">http://nickpisca.com/sherpa/?p=377</guid>
		<description><![CDATA[Looking to learn how to script for the spring semester or supplement your work knowledge?  Then you should look into a copy of YSYT &#8211; Maya MEL Basics for Designers, which has free shipping today!
Just use the coupon code &#8220;WHOASHIPPING305&#8243; at checkout with Ground Shipping before January 31, 2012.   Max savings: $50.
Click here to get [...]]]></description>
			<content:encoded><![CDATA[<p>Looking to learn how to script for the spring semester or supplement your work knowledge?  Then you should look into a copy of <a title="YSTY Book, by Nick Pisca" href="http://www.lulu.com/product/paperback/ysyt/4387353" target="_blank">YSYT &#8211; Maya MEL Basics for Designers</a>, which has free shipping today!</p>
<p>Just use the coupon code <strong>&#8220;WHOASHIPPING305&#8243; </strong>at checkout with Ground Shipping before January 31, 2012.   Max savings: $50.</p>
<p>Click here to get the book:  <a title="YSTY Book, by Nick Pisca" href="http://www.lulu.com/product/paperback/ysyt/4387353" target="_blank">YSYT!</a></p>
<div class="wp-caption aligncenter" style="width: 223px"><a href="http://www.lulu.com/product/paperback/ysyt/4387353"><img title="YSYT Book, by Nicholas Pisca" src="http://static.lulu.com/product/paperback/ysyt/4387353/thumbnail/320" alt="YSYT Book, by Nicholas Pisca" width="213" height="320" /></a><p class="wp-caption-text">YSYT Book, by Nicholas Pisca</p></div>
]]></content:encoded>
			<wfw:commentRss>http://nickpisca.com/sherpa/?feed=rss2&amp;p=377</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Buy YSYT-Maya MEL Scripting Book for 35% off by December 28!</title>
		<link>http://nickpisca.com/sherpa/?p=374</link>
		<comments>http://nickpisca.com/sherpa/?p=374#comments</comments>
		<pubDate>Wed, 28 Dec 2011 05:18:43 +0000</pubDate>
		<dc:creator>Nicholas Pisca</dc:creator>
				<category><![CDATA[Animations]]></category>
		<category><![CDATA[Digital]]></category>
		<category><![CDATA[Fabrication]]></category>
		<category><![CDATA[MEL]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Rendering]]></category>
		<category><![CDATA[Representation]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Maya]]></category>

		<guid isPermaLink="false">http://nickpisca.com/sherpa/?p=374</guid>
		<description><![CDATA[For all of those who want to get a jump start on the spring semester and learn how to script, this is the deal for you.
If you hurry, you can buy the scripting book YSYT-Maya MEL Basics for Designers for 35% off if you order on or before December 28, 2011.  Just enter the code [...]]]></description>
			<content:encoded><![CDATA[<p>For all of those who want to get a jump start on the spring semester and learn how to script, this is the deal for you.</p>
<p>If you hurry, you can buy the scripting book YSYT-Maya MEL Basics for Designers for <em><strong>35% off</strong></em> if you order on or before December 28, 2011.  Just enter the code &#8220;<strong>BLIZZARDS305</strong>&#8221; at checkout.</p>
<p><a title="YSYT - Maya MEL Basics for Designers by Nick Pisca" href="http://www.lulu.com/product/paperback/ysyt/4387353" target="_blank">Click here to check out and buy YSYT &#8211; Maya MEL Basics for Designers</a> by Nick Pisca.</p>
<div class="wp-caption aligncenter" style="width: 560px"><a href="http://www.lulu.com/product/paperback/ysyt/4387353"><img title="emailheader122711_us_BLIZZARDS305.png" src="http://static.lulu.com/static/images/emailheader122711_us_BLIZZARDS305.png" alt="Blizzard Lulu Sale (35% off!)" width="550" height="350" /></a><p class="wp-caption-text">Blizzard Lulu Sale (35% off!)</p></div>
<div class="wp-caption aligncenter" style="width: 223px"><a href="http://www.lulu.com/product/paperback/ysyt/4387353"><img title="320.jpg" src="http://static.lulu.com/product/paperback/ysyt/4387353/thumbnail/320" alt="YSYT! By Nick Pisca" width="213" height="320" /></a><p class="wp-caption-text">YSYT! By Nick Pisca</p></div>
<p>So act now!  <img src='http://nickpisca.com/sherpa/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://nickpisca.com/sherpa/?feed=rss2&amp;p=374</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buy YSYT Maya MEL scripting book for 30% off by December 7!!</title>
		<link>http://nickpisca.com/sherpa/?p=370</link>
		<comments>http://nickpisca.com/sherpa/?p=370#comments</comments>
		<pubDate>Tue, 06 Dec 2011 17:22:00 +0000</pubDate>
		<dc:creator>Nicholas Pisca</dc:creator>
				<category><![CDATA[Animations]]></category>
		<category><![CDATA[Digital]]></category>
		<category><![CDATA[MEL]]></category>
		<category><![CDATA[Practice]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Rendering]]></category>
		<category><![CDATA[Representation]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://nickpisca.com/sherpa/?p=370</guid>
		<description><![CDATA[Great news!  If you act now (before and on December 7) you can get the YSYT Maya MEL Scripting Book for 30% off!!!!
Click here to get the book:  LINK Just use the Coupon Code WINTERSAVE305
Some background&#8230;.
YSYT &#8211; Maya MEL Basics for Designers is the primary scripting resource  for all beginner and veteran scripters in [...]]]></description>
			<content:encoded><![CDATA[<p>Great news!  If you act now (before and on December 7) you can get the YSYT Maya MEL Scripting Book for 30% off!!!!</p>
<p>Click here to get the book:  <a title="YSYT Book" href="http://www.lulu.com/product/paperback/ysyt/4387353?productTrackingContext=search_results/search_shelf/center/1" target="_blank">LINK</a> Just use the Coupon Code <span style="font-family: 'Lucida Grande',Arial,sans-serif; font-size: 14px; color: #666666; text-align: left;">WINTERSAVE305</span></p>
<div class="wp-caption alignnone" style="width: 223px"><a href="http://static.lulu.com/product/paperback/ysyt/4387353/thumbnail/320"><img title="YSYT Book By Nick Pisca" src="http://static.lulu.com/product/paperback/ysyt/4387353/thumbnail/320" alt="YSYT Book By Nick Pisca" width="213" height="320" /></a><p class="wp-caption-text">YSYT Book By Nick Pisca</p></div>
<p>Some background&#8230;.</p>
<p>YSYT &#8211; Maya MEL Basics for Designers is the primary scripting resource  for all beginner and veteran scripters in the application Maya. This  instructional manual covers the fundamentals of computer programming as  well as basic modeling, animating and rendering techniques in Maya.</p>
<p>Feel free to spread the word!</p>
]]></content:encoded>
			<wfw:commentRss>http://nickpisca.com/sherpa/?feed=rss2&amp;p=370</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Only 2 days left!  Make a Pledge to the Veggie Oil Road Trip Project!</title>
		<link>http://nickpisca.com/sherpa/?p=368</link>
		<comments>http://nickpisca.com/sherpa/?p=368#comments</comments>
		<pubDate>Sun, 15 May 2011 05:03:22 +0000</pubDate>
		<dc:creator>Nicholas Pisca</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WVO]]></category>

		<guid isPermaLink="false">http://nickpisca.com/sherpa/?p=368</guid>
		<description><![CDATA[Time is running out! Nick and Glenn&#8217;s Veggie Oil Road Trip Project and Documentary only has two days left.  Time is being counted in hours, and soon minutes!
Quick Summary:  We are driving through eastern Canada, Appalachia, the Atlantic U.S. Coast, and up the Mississippi River all on VEGGIE OIL.  And we are filming our trip [...]]]></description>
			<content:encoded><![CDATA[<p>Time is running out! <a href="http://www.kickstarter.com/projects/1866069608/nick-and-glenns-cheap-and-eco-friendly-road-trip-d" target="_blank">Nick and Glenn&#8217;s Veggie Oil Road Trip Project</a> and Documentary only has two days left.  Time is being counted in hours, and soon <em>minutes</em>!</p>
<p>Quick Summary:  We are driving through eastern Canada, Appalachia, the Atlantic U.S. Coast, and up the Mississippi River all on VEGGIE OIL.  And we are filming our trip so that we can make a documentary about our journey.</p>
<p>If you want to help our project, go to <a href="http://www.kickstarter.com/projects/1866069608/nick-and-glenns-cheap-and-eco-friendly-road-trip-d" target="_blank">our Kickstarter page</a> to make a pledge.  You&#8217;ll be supporting a great cause, helping our environment, and sticking it to those greedy oil companies!</p>
<p>Every little bit helps.  Also, it helps to post our video on Facebook, Twitter, etc.  Helping us spread the word is just as important as making a pledge.  <img src='http://nickpisca.com/sherpa/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks for your help,</p>
<p>from Nick, Glenn, and the Veggie Oil Road Trip Project Team.</p>
<p><a href="http://www.kickstarter.com/projects/1866069608/nick-and-glenns-cheap-and-eco-friendly-road-trip-d" target="_blank">http://www.kickstarter.com/projects/1866069608/nick-and-glenns-cheap-and-eco-friendly-road-trip-d</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nickpisca.com/sherpa/?feed=rss2&amp;p=368</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nick and Glenn&#8217;s Waste Vegetable Oil Car Documentary Kick-Off</title>
		<link>http://nickpisca.com/sherpa/?p=366</link>
		<comments>http://nickpisca.com/sherpa/?p=366#comments</comments>
		<pubDate>Thu, 10 Mar 2011 05:28:06 +0000</pubDate>
		<dc:creator>Nicholas Pisca</dc:creator>
				<category><![CDATA[Fabrication]]></category>
		<category><![CDATA[Alternative Fuels]]></category>
		<category><![CDATA[WVO]]></category>

		<guid isPermaLink="false">http://nickpisca.com/sherpa/?p=366</guid>
		<description><![CDATA[Big News!  We are kicking off the fund-raising for the next big Waste Veggie Oil (WVO) road trip and documentary.
We are raising a small amount of money to produce a documentary about our WVO cars, the conversion process, how to use this type of fuel, and see how one can go across North America using [...]]]></description>
			<content:encoded><![CDATA[<p>Big News!  We are kicking off the fund-raising for the next big Waste Veggie Oil (WVO) road trip and documentary.</p>
<p>We are raising a small amount of money to produce a documentary about our WVO cars, the conversion process, how to use this type of fuel, and see how one can go across North America using alternative fuels.  Also, we are adding a bit of comedy to the mix, so it&#8217;s not just another boring biodiesel documentary.</p>
<p>This is very exciting because it&#8217;s a great opportunity to support a great cause, get a unique reward for your contribution, and stick it to the old oil companies.  <img src='http://nickpisca.com/sherpa/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Every little bit helps.  Also, spread the word!</p>
<p>Here is the link to the video and fund-raising website:</p>
<p><a title="Nick and Glenn's Cheap &amp; Eco-friendly Road Trip Documentary" href="https://www.kickstarter.com/projects/1866069608/nick-and-glenns-cheap-and-eco-friendly-road-trip-d" target="_blank">https://www.kickstarter.com/projects/1866069608/nick-and-glenns-cheap-and-eco-friendly-road-trip-d</a></p>
<p>Here is some more information (from our kickstarter page):</p>
<blockquote><p><em>What is our cause?</em></p>
<p><em>We are putting together a documentary about two friends who converted a car to run on vegetable oil and their upcoming road trip  through eastern Canada, the U.S. Atlantic coast, and Appalachia.  The film will show the biofuel conversion process and document any repairs that happen while traveling.  We plan  to travel over 6000 miles across North America to film interesting  sites, people, and anything we encounter.  Imagine a cross between &#8220;Survivorman&#8221; and  &#8220;Junkyard Wars&#8221; and &#8220;Trailer Park Boys.&#8221;</em></p>
<p><em>Why?</em></p>
<p><em>With increasing fuel costs worldwide, everyone is looking for new types of energy.  Used Vegetable Oil is an exciting alternative to conventional petroleum resources.  We have been experimenting with Vegetable Oil Fuel Systems for years and have been able to develop a system for long-distance travel.</em></p>
<p><em>How to help?</em></p>
<p><em>All donations are welcome.  We are accepting monetary contributions, but also, if you are a greaser on our route, filtered/dewatered veggie oil donations are great too.</em></p>
<p><em>Funding helps us in the following ways.  First, we need to do conversion and automotive repairs/maintenance on the vehicle.  The vehicle will need to last several thousand miles on an experimental fuel, so proper maintenance is a must.  Second, we need to acquire camera, audio, and storage equipment to document the trip.  Since anything can happen on a road trip, we need to keep the cameras rolling.  Last, it will cover any expenses incurred for repairs and other things </em><em>during the road trip.</em></p>
<p><em>Thanks in advance for your support!</em></p></blockquote>
<div class="wp-caption alignnone" style="width: 406px"><a href="https://www.kickstarter.com/projects/1866069608/nick-and-glenns-cheap-and-eco-friendly-road-trip-d"><img class="  " title="N &amp; Gs Road Trip Adventure" src="http://nickpisca.com/tempimages/20110307_tripback.PNG" alt="This is really happening!" width="396" height="229" /></a><p class="wp-caption-text">This is really happening!</p></div>
]]></content:encoded>
			<wfw:commentRss>http://nickpisca.com/sherpa/?feed=rss2&amp;p=366</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>LOLA LASER in LOS ANGELES</title>
		<link>http://nickpisca.com/sherpa/?p=363</link>
		<comments>http://nickpisca.com/sherpa/?p=363#comments</comments>
		<pubDate>Wed, 09 Mar 2011 06:30:15 +0000</pubDate>
		<dc:creator>Nicholas Pisca</dc:creator>
				<category><![CDATA[Digital]]></category>
		<category><![CDATA[Fabrication]]></category>
		<category><![CDATA[Practice]]></category>
		<category><![CDATA[Lasercutting]]></category>
		<category><![CDATA[services]]></category>

		<guid isPermaLink="false">http://nickpisca.com/sherpa/?p=363</guid>
		<description><![CDATA[Tony Castillo has set up a lasercutting service here in Los Angeles.  Time to spread the word!
Ages ago while attending SCI-Arc, I met Tony while jamming in the wood shop.  He&#8217;s a super talented and creative guy, who has great DIY instincts.  If there was anyone who embodied the tradition of  SCI-Arc, it was Tony.  [...]]]></description>
			<content:encoded><![CDATA[<p>Tony Castillo has set up a lasercutting service here in Los Angeles.  Time to spread the word!</p>
<p>Ages ago while attending SCI-Arc, I met Tony while jamming in the wood shop.  He&#8217;s a super talented and creative guy, who has great DIY instincts.  If there was anyone who embodied the tradition of  SCI-Arc, it was Tony.  He always was making, building, inventing, experimenting.</p>
<p>Tony&#8217;s new experiment is the <a title="LOLA" href="http://lasersoverlosangeles.com" target="_blank">Lasers Over Los Angeles (LOLA) service</a>.  He&#8217;ll be providing lasercutting work for inexpensive rates.  This couldn&#8217;t come at a better time&#8230;I can&#8217;t tell you how many times I&#8217;ve wanted access to a cost-effective lasercutter for my DIY home projects and also commercial work.  LOLA will be the first place I think of when the next lasercutting task comes over the horizon.  <img src='http://nickpisca.com/sherpa/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="wp-caption alignnone" style="width: 610px"><a href="http://lasersoverlosangeles.com"><img class=" " title="LASERS OVER LOS ANGELES" src="http://lasersoverlosangeles.com/my%20images/lola%20street.jpg" alt="Tony Castillos LOLA PROJECT" width="600" height="448" /></a><p class="wp-caption-text">Tony Castillo&#39;s LOLA PROJECT</p></div>
]]></content:encoded>
			<wfw:commentRss>http://nickpisca.com/sherpa/?feed=rss2&amp;p=363</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tokenizing in MEL to Remember Empty Strings</title>
		<link>http://nickpisca.com/sherpa/?p=359</link>
		<comments>http://nickpisca.com/sherpa/?p=359#comments</comments>
		<pubDate>Fri, 07 Jan 2011 06:00:07 +0000</pubDate>
		<dc:creator>Nicholas Pisca</dc:creator>
				<category><![CDATA[Digital]]></category>
		<category><![CDATA[MEL]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Translators]]></category>

		<guid isPermaLink="false">http://nickpisca.com/sherpa/?p=359</guid>
		<description><![CDATA[I encountered a strange thing recently.  Turns out when you tokenize a string (the act of splitting up consecutive letters by a delimiter) in MEL scripting, it doesn&#8217;t remember empty strings.  This can be a problem when you need to have the same number of elements in an array, but it resizes to an arbitrary [...]]]></description>
			<content:encoded><![CDATA[<p>I encountered a strange thing recently.  Turns out when you tokenize a string (the act of splitting up consecutive letters by a delimiter) in MEL scripting, it doesn&#8217;t remember empty strings.  This can be a problem when you need to have the same number of elements in an array, but it resizes to an arbitrary count.</p>
<p>For example, using the MEL tokenize command, the string &#8220;d,s,e,,,d&#8221; would be split into an array of only four elements {&#8221;d&#8221; &#8220;s&#8221; &#8220;e&#8221; &#8220;d&#8221;}.  If you wanted to return the empty values, the method as it stands would not do this.</p>
<p>I&#8217;ve authored a small function that will return empty strings.  In the  aforementioned example, it would return {&#8221;d&#8221; &#8220;s&#8221; &#8220;e&#8221; &#8220;&#8221; &#8220;&#8221; &#8220;d&#8221;}.   The command is called &#8220;RealTokenize.&#8221;</p>
<pre>global proc string[] RealTokenize(string $CurStr, string $Delim) {
	//Author: Nick Pisca 2010 0001d
	//string $CurStr = "d,s,d,s,,,,e"; string $Delim = ",";
	//RealTokenize "d,s,d,,,e,e" ",";
	string $PartString;
	string $TempArr[];
	int $t = 0;
	for ($x=1;$x&lt;size($CurStr)+1;$x++) {
		string $CurLetter = `substring $CurStr $x $x`;
		if ($CurLetter == $Delim) {
			$TempArr[$t] = $PartString;
			$t++;
			$PartString = "";
		} else {
			$PartString = $PartString + $CurLetter;
		}
	}
	return $TempArr;
}</pre>
<p>This subroutine is pretty simple to use and unlike &#8220;tokenize,&#8221; it doesn&#8217;t use that dumb syntax that returns the &#8220;count&#8221; of elements.  I never understood why anyone would use that functionality, considering you can just &#8220;size&#8221; the array after relimiting the string.  Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://nickpisca.com/sherpa/?feed=rss2&amp;p=359</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Querying &#8216;Shape,&#8217; &#8216;Make,&#8217; and Material Nodes in Maya MEL Scripting</title>
		<link>http://nickpisca.com/sherpa/?p=351</link>
		<comments>http://nickpisca.com/sherpa/?p=351#comments</comments>
		<pubDate>Tue, 30 Nov 2010 08:55:17 +0000</pubDate>
		<dc:creator>Nicholas Pisca</dc:creator>
				<category><![CDATA[Digital]]></category>
		<category><![CDATA[MEL]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Maya]]></category>
		<category><![CDATA[Nodes]]></category>
		<category><![CDATA[Querying]]></category>

		<guid isPermaLink="false">http://nickpisca.com/sherpa/?p=351</guid>
		<description><![CDATA[Once you get familiarized with MEL scripting, you will inevitably want to traverse the complex nodes structure that Maya sets up for each object.  Just to quickly summarize the node system, all primitives have a &#8216;transform,&#8217; &#8217;shape,&#8217; &#8216;make,&#8217; material node, and possibly some other nodes.  When you call for the name of an object, you [...]]]></description>
			<content:encoded><![CDATA[<p>Once you get familiarized with MEL scripting, you will inevitably want to traverse the complex nodes structure that Maya sets up for each object.  Just to quickly summarize the node system, all primitives have a &#8216;transform,&#8217; &#8217;shape,&#8217; &#8216;make,&#8217; material node, and possibly some other nodes.  When you call for the name of an object, you are actually <strong>only </strong>accessing the base &#8216;transform&#8217; object.  If you want more information or attributes, you&#8217;ll need to traverse the node system to access the others.  I go over this more in depth in my book <a title="YSYT-Maya MEL Basics for Designers, by Nick Pisca" href="http://www.lulu.com/product/paperback/ysyt/4387353" target="_blank">YSYT</a> somewhere in chapter 7 or 8 (I think), and also in 12.</p>
<p>To query the name of a Shape or Make node, use a combination of the commands listHistory,  listConnections, and/or listRelatives from the transform node name  string.  Use backticks to encapsulate the commands to return the connected names, and you may  need to go a few levels down.  A good example of this is my function for <a title="Nick Pisca's MEL Function &quot;GetSubstitutedMaterial&quot;" href="http://www.nickpisca.com/BLAST/index.php?title=GetSubstitutedMaterial" target="_blank">getting an existing material</a> on an object.  (note, getting a material, moves passed the Make and Shape nodes, but it&#8217;s still a good example.)</p>
<pre><span style="font-size: medium;">string $Name = "nurbsSphere1";
string $FF[] = `listRelatives $Name`;
string $GG[] = `listConnections $FF[0]`;
string $HH[] = `listConnections $GG[0]`;</span></pre>
<p>The zeroth member of each $FF and $GG array is the lead string for that  level.  So you may need to print the contents of these arrays and  you&#8217;ll find the pattern leading to the Make or Shape node.  In most cases it will  be the first (second index) from the listed Relatives, or listed  Connections.</p>
<p><strong><br />
Some things to remember: </strong> Every release of Maya is different, so test your indexes prior to  hard-coding.  You may need to shift some index numbers, but the listRelatives  and listConnections should be in the right configuration.  To get the material shader, you&#8217;ll need to make a distinction between objects with the initial material and objects with a substituted material.    Then it will be stored in the final array ($HH in the example above).  Maya 5 through 6.5 is the third index, whereas newer versions have it stored at the 4 or 5 spot.  If you want to make a robust function, you can always use the &#8220;version&#8221; command set up a conditional case programming structure.</p>
<div id="attachment_352" class="wp-caption aligncenter" style="width: 310px"><a href="http://nickpisca.com/sherpa/wp-content/uploads/2010/11/20101129_nodes.PNG"><img class="size-medium wp-image-352" title="20101129_nodes" src="http://nickpisca.com/sherpa/wp-content/uploads/2010/11/20101129_nodes-300x129.PNG" alt="NODES NODES NODES" width="300" height="129" /></a><p class="wp-caption-text">NODES NODES NODES</p></div>
]]></content:encoded>
			<wfw:commentRss>http://nickpisca.com/sherpa/?feed=rss2&amp;p=351</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
