Re: Is it Possible to Animate The End Key of a Particle Age FCurve During a Sim?

Date : Thu, 26 Apr 2007 16:51:28 +0100
To : XSI(at)Softimage.COM
From : "Vince Fortin" <vfortin(at)gmail.com>
Subject : Re: Is it Possible to Animate The End Key of a Particle Age FCurve During a Sim?
It's a little crazy. I have the following in birth:
(Particle Age % 0, Per Trigger Particle, Jscript)
inParticle.Attributes("alphaLimit").Value = 100;
 
Get rid of the line (Particle Age % 0, Per Trigger Particle, Jscript)
I was just pointing out the trigger and context for your pEvent.
 
 
On 4/26/07, Julian Johnson <julian(at)exch.demon.co.uk> wrote:
Vince Fortin wrote:
>
> Are you using the code from the sample scene?
>
> I'm using a null to hold the up-level animation. The name of which is
> hard-coded in the first pEvent.
>
> If not then I can't tell, make sur Jscript is switched on!
>

Hi Vince,

It's a little crazy. I have the following in birth:
(Particle Age % 0, Per Trigger Particle, Jscript)
inParticle.Attributes("alphaLimit").Value = 100;

And the following in runtime:
var alpha;
var age = inParticle.age;
var alphaLimit = inParticle.Attributes("alphaLimit").Value;##this is
where the problem happens.
var color = inParticle.color;
alpha = 1 - (age / alphaLimit);
color.alpha = alpha;
inParticle.color = color;

The script editor throws up the problem with the call to
inParticle.Attributes ("alphaLimit").Value in the birth section. If I
change birth to Particle Trigger  or just give alphaLimit a specific
value in birth i.e.var alphaLimit = 100 I get no errors in the script so
it's definitely something to do with that line. Checked that JScript and
all other parameters were set correctly. Wondering if it is to do with
the fact that the PType is being called from an event emission and, for
some reason, can't get hold of the attribute object...

Julian

========================================

This e-mail (and any attachments) is confidential and may contain personal
views which are not the views of Men-from-Mars unless specifically stated.

If you have received it in error, please delete it from your system. Do not
use, copy or disclose the information in any way nor act in reliance on it
and notify the sender immediately.
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.