[Bf-taskforce25] Editmesh accessor functions

joe joeedh at gmail.com
Tue Mar 17 19:37:12 CET 2009


On Tue, Mar 17, 2009 at 11:00 AM, Campbell Barton <ideasman42 at gmail.com> wrote:
> In general making 2.5 ready for BMesh integration seems good, (by
> using functions access functions of thats what you need)
>
> * How many lines roughly would need changing (trying to get an idea of
> how big this is),
At a guess. . .500 lines? 1000 maybe.  It should only take two line
changes per operator or function that uses obedit->data->edit-mesh.

>will this mess up merging from 2.4x (etch-a-ton) or
> other projects?

No it won't.  It basically just means changing every function that
accesses obedit->data->edit_mesh to instead use the accessors.  It
won't affect merging with other projects, as far as I know.

> * Assume the accessor functions will be there for your convenience in
> 2.5 making no real changes, the slowdown will be in the BMesh branch
> (with conversion from/to editmesh)

Yeah that's right.

> * Make an example patch and check with Briggs && (Ton || Brecht), if
> they are ok then go ahead IMHO.

Not sure if there's much point.  It's just two functions, for example:

//gets an editmesh from ob
EditMesh *EM_GetEditMesh(Object *ob);
//called after your finished with the editmesh
EM_EndEditMesh(Object *ob, EditMesh *em);

Only real issue is what to name them, I think.

Joe

>
> On Tue, Mar 17, 2009 at 9:26 AM, Shaul Kedem <shaul.kedem at gmail.com> wrote:
>> won't conversion back and forth will slow blender?
>>
>> On Mon, Mar 16, 2009 at 7:38 PM, joe <joeedh at gmail.com> wrote:
>>> Yeah.  Or well not necassarily *in* 2.5, but whenever bmesh integrated
>>> into the main development branch.
>>>
>>> On Mon, Mar 16, 2009 at 4:01 PM, Shaul Kedem <shaul.kedem at gmail.com> wrote:
>>>> Joe,
>>>>  From what you wrote, it sounds like you want both editmesh and bmesh
>>>> structures to reside in 2.5, is that true?
>>>>
>>>> Shaul
>>>>
>>>> On Mon, Mar 16, 2009 at 11:51 AM, joe <joeedh at gmail.com> wrote:
>>>>> For bmesh development (to have an easier migration from editmesh) it'd
>>>>> be nice if certain tools that use editmesh could still work even after
>>>>> bmesh replaces editmesh.  Given the nonglobal design of 2.5, this
>>>>> shouldn't be hard; simply have uses of editmesh go through accessors
>>>>> functions.  These accessor functions would handle the necessary
>>>>> conversions for editmesh tools to work with a bmesh.
>>>>>
>>>>> It seems to me that the use of such accessor functions should be done
>>>>> in the 2.5 branch, then merged over to bmesh, instead of the other way
>>>>> around.  The 2.5 versions would obviously be fairly simple, just give
>>>>> access to Mesh->edit_mesh; while the ones in bmesh would do the more
>>>>> complex conversion necassary for editmesh operators to work.
>>>>>
>>>>> Anyway, what does everyone else think?
>>>>>
>>>>> Joe
>>>>> _______________________________________________
>>>>> Bf-taskforce25 mailing list
>>>>> Bf-taskforce25 at blender.org
>>>>> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>>>>>
>>>> _______________________________________________
>>>> Bf-taskforce25 mailing list
>>>> Bf-taskforce25 at blender.org
>>>> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>>>>
>>> _______________________________________________
>>> Bf-taskforce25 mailing list
>>> Bf-taskforce25 at blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>>>
>> _______________________________________________
>> Bf-taskforce25 mailing list
>> Bf-taskforce25 at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>>
>
>
>
> --
> - Campbell
> _______________________________________________
> Bf-taskforce25 mailing list
> Bf-taskforce25 at blender.org
> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>


More information about the Bf-taskforce25 mailing list