On Jun 25, 2005, at 10:36 AM, Daniel Lurie wrote:
Is there a way to make multiple object 3Ds share the same texture?
At the moment, not without declares. You can use Frank's Quesa Wrappers.
Here's a snippet of code that should work using Quesa Wrappers. This
assumes that the obj has a pre-existing texture to be replaced and will
ONLY affect the first trimesh's texture. This means, in Meshwork terms,
if you've applied multiple materials only the first one will be
affected. You'll need to do a bit more legwork to get to the other
textures.
Sub UpdateObjTexture(obj As Object3D, texture As Picture)
Dim tmsh as Trimesh3D
Dim mat as AttributeSet3D
Dim tex as TextureShader3D
// Get existing texture on obj.
// NOTE: This only affects first trimesh only!
tmsh = obj.GetFirstTrimeshInShape(i)
mat = tmsh.GetMaterial
tex = mat.GetTextureShader
// Replace texture
tex.SetTexture texture, tex.kPixelTypeRGB32
==
Jeff Quan
jquan at mindspring dot com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|