[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11518] branches/soc-2007-red_fox/source/ blender: Editmesh tool interaction working, memleaks fixed, etc.

Martin Poirier theeth at yahoo.com
Thu Aug 9 00:49:05 CEST 2007


Hi,

Was there a good reason for abusing TransData's factor
member to store bevel values instead of ival and val?

The use of global is a bit weird too, not sure I like
that (haven't look much at that part though).

Also, you shouldn't hold on to a pointer to the
TransInfo data structure (outside of the transform
engine), you should use BIF_GetTransInfo. This is
safer for future "unglobalizing".

Thanks,
Martin

--- Levi Schooley <redfox at hhofministries.org> wrote:

> Revision: 11518
>          
>
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11518
> Author:   red_fox
> Date:     2007-08-08 20:02:24 +0200 (Wed, 08 Aug
> 2007)
> 
> Log Message:
> -----------
> Editmesh tool interaction working, memleaks fixed,
> etc.
> 
> First off, I removed all memory leaks (as far as I
> can tell).
> I did this by correctly handling editmesh, adding 
> CustomData_free() functions to BME_free_mesh() in
> BME_Mesh.c, 
> and changing the CustomData_copy() functions to 
> CustomData_merge() in BME_bmesh_to_derivedmesh().
> 
> Second, I wrapped BME_SFME() with BME_split_face()
> so that 
> face and edge flags were propagated to the new
> geometry.
> 
> Third, and this is the big one, I infiltrated the
> Transform() 
> system so that the editmode tool now works
> interactively. The 
> tool uses the horizontal mouse position to determine
> the 
> bevel distance. Also, you can click the middle mouse
> button 
> during transform to toggle between vert-only and
> edge-based 
> methods of beveling.
> To do this, I added a new global struct, editBMesh,
> to Global 
> G that holds pointers to all of the information I
> need. I 
> capture events during Transform(), and if they
> change a 
> significant option, the option is set globally, and 
> Transform() is cancelled. Trans.state and the global
> options 
> are tested by the calling function, bevel_menu(),
> after 
> Transform() completes. If they signal an option
> change during 
> Transform(), the tool is reset with the new options.
> 
> Fourth, and last (except for some other little
> stuff, like to 
> fix warnings), I added a limiting value (that only
> works to 
> the fullest in special circumstances) that prevents
> the bevel 
> from "overshooting." This definitely needs some more
> math and 
> tweaking work, though.



       
____________________________________________________________________________________
Choose the right car based on your needs.  Check out Yahoo! Autos new Car Finder tool.
http://autos.yahoo.com/carfinder/


More information about the Bf-committers mailing list