[Bf-committers] tfaces, makesdna and custom blobs

Ton Roosendaal ton at blender.org
Mon Feb 20 23:06:43 CET 2006


I think the feature (multiple UV sets) allows breaking upward compat. :)
Wonder how you'll exactly do this though... will new UVs be like with  
the layer structure?


On 20 Feb, 2006, at 18:39, Brecht Van Lommel wrote:

> Hi
> I'm working on support for multiple UV sets. At this point I have code
> support for multiple TFace sets, that contain color, UV's, a texture  
> image
> and game engine flags. The next step is to split the color off from  
> TFace,
> to also allow multiple color sets, and get rid of the double storage  
> for color
> in MCol and TFace.
> Makesdna, however, does not allow to read members that have been
> removed from a struct, so in order to keep backwards compat, my idea
> is to deprecate the TFace struct, and replace it by MCol and MTFace.
> typedef struct MCol {
>     char a, r, g, b;
> } MCol;
> typedef struct MTFace {
>     struct Image *image;
>     float uv[4][2];
>     char flag, transp;
>     short mode, tile, unwrap;
> } MTFace;
> This means breaking forward compat, so Blender 2.41 and earlier will
> not be able to read UV's, colors, or any game engine data from newer
> Blender versions. This is not that great, but it is the only solution  
> I can
> come up with that does not involve placing custom hacks makesdna
> code. Is losing forward compat acceptable?
> But I was thinking, if we break forward compat anyway, we might as  
> well,
> you know, break it properly. Like allowing a custom blobs of data to be
> attached to verts, edges, and faces, without unified handling of uv's,  
> colors,
> vertex groups, and user defined data, for meshes, nurbes, lattices, ..  
> .
> That's maybe a bit ambitious, and will further delay multiple UV sets  
> for
> those who really want it (hi Campbell :). It doesn't seem impossible,
> but clearly won't be for 2.42 then.
> Good idea? Bad idea?
> Cheers,
> Brecht.
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
Ton Roosendaal  Blender Foundation ton at blender.org  

More information about the Bf-committers mailing list