aah yes! i didn't have it instanced in the scene yet. this is interesting
too, ICEAttributes property on a shader node?

from siutils import si
si = si() # win32com.client.Dispatch('XSI.Application')
from siutils import log # LogMessage
from siutils import disp # win32com.client.Dispatch
from siutils import C # win32com.client.constants


for shaderdef in si.ShaderDefinitions:
    if shaderdef.Name == "Softimage.BA_particle_density3.1.0":
        for shader in shaderdef.ShaderInstances:
            for attr in shader.ICEAttributes:
                log(attr.Name)



On Mon, Jan 28, 2013 at 12:07 PM, Stephen Blair <[email protected]>wrote:

>  I found I could get the ICEattribute for Particle Density if the shader
> exists in the scene (in 2013sp1). But that's not true for the other shaders
> that have ICEattribute.
>
> In 2013 SP1, in Python:
>
> sdef = Application.GetShaderDef( "Softimage.BA_particle_density3.1.0" )
> for i in range( len(sdef.Attributes.Names) ):
>     print "%s=%s" % ( sdef.Attributes.Names[i], sdef.Attributes.Values[i]
> )
>
> If you run that snippet in a blank scene, you get:
>
> // INFO : Softimage.BA_particle_density3.1.0
> // INFO : Softimage.BA_particle_density3.1.0 has 2 attribute name(s) and 2
> value(s):
> // INFO :     - shaderlocation == 3
> // INFO :     - thumbnail == particle.bmp
>
> If you run this script first:
>
> CreatePrim("Grid", "MeshSurface", null, null);
> ICEFlow_CreateParticles(null, null, null);
> ApplyShader("ICEParticleVolumeShader", "", "ICEParticleVolumeShader", "",
> siLetLocalMaterialsOverlap);
>
> then you get this:
>
> # shaderlocation=3
> # thumbnail=particle.bmp
> # {C535FA4D-E44A-45EB-AEE0-9F9AAEA91745}=None
> #
> {20ECB4F8-A4A1-44FE-956A-0F6E98D541A8}=Color,Id,PointVelocity,Orientation,Size,PointPosition,Age,AgeLimit,StrandPosition,StrandVelocity,StrandSize,StrandOrientation,StrandColor
>
>
>
>
>
> On 28/01/2013 3:01 PM, Steven Caron wrote:
>
> i thought this might be it but i tried it in scripting and didn't get
> anything related to iceattributes...
>
>
> http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/si_cpp/classXSI_1_1ShaderDef.html#a558539353bd99263d936703078f01369
>
>  no other ideas from me
>
> On Mon, Jan 28, 2013 at 11:46 AM, Stefano Jannuzzo <
> [email protected]> wrote:
>
>> Hi folks.
>> There are a few shaders that declare the list of ICE attributes they
>> require to work, by listing their names in the output parameter section of
>> their spdl.
>> For instance, if you edit particle_Density, you can read
>>
>> ICEattribute =
>> "Color,Id,PointVelocity,Orientation,Size,PointPosition,Age,AgeLimit,StrandPosition,StrandVelocity,StrandSize,StrandOrientation,StrandColor";
>>
>> I need to retrieve this list in a cpp command (2011 and above), with no
>> success yet. Any idea?
>> Stefano
>>
>
>
>

Reply via email to