Re: Vertex Color scripting voodoo?

Date : Mon, 20 Nov 2006 13:06:07 +0100
To : XSI(at)Softimage.COM
From : André Adam <a_adam(at)49games.de>
Subject : Re: Vertex Color scripting voodoo?
Thanks Guillaume, that's the command-based approach we currently use as well (CreateVertexColorSupport()), but I thought there should be a way through the object model as well. Basically I don't get why my code snippet below does not create a vertexcolor type property...

However, thanks again!

   -André


guillaume laforge wrote:
Hi Andre,

I used vertex color in this script : http://www.vol2nuit.fr/guillaume/xsi_scripts/rendering/scripts/RGB_MixerShader.js <http://www.vol2nuit.fr/guillaume/xsi_scripts/rendering/scripts/RGB_MixerShader.js>

Take a look at the "PaintCluster" function, maybe it  will help.

Cheers

--
Guillaume Laforge
freelance TD | cg Artist
my blog ! http://vol2blog.blogspot.com/ <http://vol2blog.blogspot.com/>


On 11/20/06, *André Adam* <a_adam(at)49games.de <mailto:a_adam(at)49games.de>> wrote:

    Hi!

    What is the magic behind the creation of a simple vertex color
    property
    through the object model? If created through the UI, the type of
    the vc
    property returns "vertexcolor", as expected. When executing the
    following piece of object model code, the type is "clscolor", and the
    property is plain empty and not recognised as a vertex color property:

    -----
    var oTorus = ActiveSceneRoot.AddGeometry("Torus", "MeshSurface");
    var oVC =
    oTorus.ActivePrimitive.Geometry.AddCluster(siSampledPointCluster).AddProperty("ColorAtVertices",
    false, "VC");
    LogMessage(oVC.Type);
    -----

    I can see that an operator gets attached to the vc property when
    created
    through the UI, but I can't seem to recreate that process manually...

    Any little piece of insight is highly appreciated, cheers!

        -André


--- 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.