rxgeez
11-24-2009, 12:43 AM
I want to know if there is a way to query all of a particles attributes...but only ones created or added (so all attributes other then the default ones)
The only thing I can think of is to get all the attrs of a fresh newly created particle and then use that list to compare against all the attributes of the other particle.
Basically I want to be able to select a particle and get all the custom attributes the user has added including the rgb or opacity or any of the attributes in the "add Dynamic Attribute" list under the particle tab.........any ideas?
{
*edit* this looks like it will return all the possible attributes i'd want...now i would just have to compare these to a list of the default attributes.
$ppd = `particle -q -perParticleDouble particle1`;
$ppv = `particle -q -perParticleVector particle1`;
does anyone know of a better or more efficient way?
}
{
**edit 2** Heres what I've come up with:
$ppd1 = `nParticle -q -perParticleDouble nParticle1`;
$ppv1 = `nParticle -q -perParticleVector nParticle1`;
$ppAll1 = `sort (stringArrayCatenate($ppd1, $ppv1))`;
$ppd2 = `nParticle -q -perParticleDouble nParticle2`;
$ppv2 = `nParticle -q -perParticleVector nParticle2`;
$ppAll2 = `sort (stringArrayCatenate($ppd2, $ppv2))`;
for($each in $ppAll2){
int $found = stringArrayContains($each, $ppAll1);
if (!$found){
print ("no -- " + $each + "\n");
}
}
}
The only thing I can think of is to get all the attrs of a fresh newly created particle and then use that list to compare against all the attributes of the other particle.
Basically I want to be able to select a particle and get all the custom attributes the user has added including the rgb or opacity or any of the attributes in the "add Dynamic Attribute" list under the particle tab.........any ideas?
{
*edit* this looks like it will return all the possible attributes i'd want...now i would just have to compare these to a list of the default attributes.
$ppd = `particle -q -perParticleDouble particle1`;
$ppv = `particle -q -perParticleVector particle1`;
does anyone know of a better or more efficient way?
}
{
**edit 2** Heres what I've come up with:
$ppd1 = `nParticle -q -perParticleDouble nParticle1`;
$ppv1 = `nParticle -q -perParticleVector nParticle1`;
$ppAll1 = `sort (stringArrayCatenate($ppd1, $ppv1))`;
$ppd2 = `nParticle -q -perParticleDouble nParticle2`;
$ppv2 = `nParticle -q -perParticleVector nParticle2`;
$ppAll2 = `sort (stringArrayCatenate($ppd2, $ppv2))`;
for($each in $ppAll2){
int $found = stringArrayContains($each, $ppAll1);
if (!$found){
print ("no -- " + $each + "\n");
}
}
}
