Commit Graph

47594 Commits

Author SHA1 Message Date
Howard Trickey
cf0967bfe6 Code cleanup: add and use knife list utility functions
In preparation for code in progress that uses lists
allocated out of the knife arena.  This also makes
existing code more readable and understandable IMO.

Also removed an #if'd out function that will not
ever be needed.
2012-02-13 14:45:17 +00:00
Campbell Barton
cde2f11244 new bmesh tool - limited dissolve.
This is a kind of simplification/cleanup tool which joins adjacent faces and edges based on the angle.

I've written this as an exercise (since I havnt written a bmesh operator before), and because quite a few users were asking for the dissolve operator to be extended, but I think this kind of functionality needs its own operator.

access from specials menu and mesh menu.

notes
* this exposed a bug in angle_v3v3v3(). will merge fix into trunk after release.
* added utility function BM_vert_edge_angle(), to get the angle between 2 connecting edges of a vert.
2012-02-13 14:37:07 +00:00
Campbell Barton
74f268c442 bring array cap ends back, with 2 todo's
* they are not drawn in editmode
* weld does't work foe the caps
2012-02-13 08:06:44 +00:00
Campbell Barton
db173f6ef8 Minor API Edits.
added BM_mesh_elem_flag_enable_all (only had disable function), and add
argunt for vert/edge/face type.

use these functions from EDBM_flag_enable/disable_all (had duplicate
code).
2012-02-13 06:59:25 +00:00
Campbell Barton
7d18115e14 own error - mixup with BMO_slot_mat_get/set 2012-02-13 05:59:14 +00:00
Campbell Barton
68a97d168d style cleanup > 120 line length. 2012-02-13 05:36:31 +00:00
Campbell Barton
cf0aeddfc9 marked navmesh as BMESH_TODO, mixed mface/mpoly functions were being used for navmesh too, now editing funcs use polygons only. 2012-02-13 04:52:41 +00:00
Campbell Barton
0f5e7e8518 heat weight
* use polygons for selection (was using tessface)
* ensure tessfaces are created
* mirroring was commented as BMESH_TODO, but api calls now work so add back.
2012-02-13 04:21:22 +00:00
Campbell Barton
2d1a05874b svn merge ^/trunk/blender -r44024:44076 2012-02-13 04:14:35 +00:00
Campbell Barton
764c8c76ea remove unused var 2012-02-13 04:12:40 +00:00
Campbell Barton
399ad54204 fix for bug introduced with weight paint vertex selection.
heat weighting ignored selected faces.
2012-02-13 03:32:47 +00:00
Campbell Barton
7be1cd733d more bmesh minor api cleanup
* remove BMO_elem_flag_* functions, since there are already defines for this.
* ifdef unused bevel functions.
* rename defines BMOP_ --> BMO_OP_
2012-02-13 02:42:50 +00:00
Thomas Dinges
9c2d3a8ed1 2.6 UI Modifier Icons:
* New Ocean Icon, created by Leon Cheung. Thanks! Approved by Lukas and myself.
* New Warp Icon, created by "Zafio"

Blender artists Thread where the Icons come from: http://blenderartists.org/forum/showthread.php?243354-Call-for-Modifier-Icons!
2012-02-12 19:57:47 +00:00
Campbell Barton
992087a0de api name conventions, more minor changes: flag set/clear --> enable/disable 2012-02-12 19:18:30 +00:00
Campbell Barton
59d45d0ea6 * remove the MFace parts of join (we only need polygon data)
* other minor cleanups
2012-02-12 19:11:09 +00:00
Sergey Sharybin
bcf4491304 Merging r44003 through r44069 from trunk into soc-2011-tomato 2012-02-12 19:00:13 +00:00
Sergey Sharybin
875f616ab8 Fix for outliner notifiers for inserting keyframes on visibility/selectivity/renderability
flags and toggling renderability from shortcut.
2012-02-12 18:57:05 +00:00
Campbell Barton
5b2ea6f8a4 remove bm_get_cd_float, use CustomData_bmesh_get instead, this function only casts to a float, and doesnt simplify args. 2012-02-12 18:49:56 +00:00
Campbell Barton
37ff2a291f BMesh api function naming.
`_set` suffix was used in two ways (confusing)
* to set a flag to be enabled.
* to set a value passed as an argument.

now use enable/disable rather then set/clear for functions which change flags.

also remove BME_weld.c, the file didnt contain much code and the current extrude works well
2012-02-12 18:43:59 +00:00
Bastien Montagne
c34af2c9b1 Fix for bevel weights not being set in toolbar buttons (edit mode).
Code simply mimics crease one...
2012-02-12 18:17:30 +00:00
Campbell Barton
9a92cd8008 bmesh minor refactor
* add DM_to_bmesh_ex, DM_to_bmesh for converting a derived mesh to a BMesh (rather than a BMEditMesh)
* have a generic variable for allocsize: bm_mesh_allocsize_default, rather than copying the values about.
2012-02-12 17:44:10 +00:00
Campbell Barton
9099e59da8 fix error with mesh conversion, a mesh with no faces would not have selection history kept when converting from mesh to bmesh. 2012-02-12 17:16:47 +00:00
Janne Karhu
39daef28a1 Bug fix: Explode modifier created invalid faces if "unborn", "alive" or "dead" setting was unchecked
* Exploded faces that were meant to be hidden were still created with invalid vertices (0,0,0,0).
* In normal cases this went unnoticed, but for example edge split modifier crashed when it encountered these faces.
2012-02-12 16:47:03 +00:00
Juha Mäki-Kanto
c61e03c229 collada export: Don't write parentinverse if ob->parent is NULL 2012-02-12 15:30:07 +00:00
Campbell Barton
7c2715a7ad rename CDDM_To_BMesh to DM_to_editbmesh, since theres no requirement for
the input to be a CDDM.

remove conversions to CDDM for edge split and bevel (will give some
speedup).
2012-02-12 15:02:33 +00:00
Campbell Barton
2fcb6d058e style cleanup for bmesh headers
- use consistant header guards
- correct doxy comments
- remove ED_toolmode.h (unused)
2012-02-12 14:40:08 +00:00
Sergey Sharybin
58475ba981 Fix #30110: Outliner view: restriction icons not updating when toggling from Groups view
Fixed by using proper button type.
2012-02-12 12:07:02 +00:00
Campbell Barton
07ca47fc52 indentation cleanup 2012-02-12 11:58:41 +00:00
Sergey Sharybin
3e134b65af Fix #30151: Allow Negative Frames does not affect arrow keys
Patch by Tobias Johansson, thanks!
2012-02-12 11:42:17 +00:00
Campbell Barton
883788ee56 prefix bmesh operator files with bmo_ (otherwise adding breakpoints in files like utils.c can be a pain).
also remove bmesh_filters.h which wasnt used.
2012-02-12 11:39:40 +00:00
Antony Riakiotakis
6e38297b82 Fix: Avoid freeing frect, it always points to a buffer that will be freed later, like srgb_frect or ftilerect on or must not be freed, like Imbuf array itself. 2012-02-12 11:27:51 +00:00
Sergey Sharybin
6afa4da928 Fix #30152: Several drag and drop of image on mesh crashes
Issue was caused by making and loading editMesh in drop_named_image_invoke,
which lead to freeing/changing pointers used by CustomData layers. Some of
this pointers might be used by DerivedMesh, so we need to update DerivedMesh
after loading EditMesh.
2012-02-12 11:21:35 +00:00
Campbell Barton
b6dcdb065d code refactor, function renaming for bmesh.
These changes are to make the bmesh api more consistent and easier to learn, grouping similar functions which is convenient for autocomplete.
This uses similar convention to RNA. 

* use face/loop/edge/vert as a prefix for functions.
* use 'elem' as a prefix too for functions that can take any type with a BMHeader.
* changed from camel case to underscore separated (like RNA).
2012-02-12 10:51:45 +00:00
Sergey Sharybin
6bfd6c01fd Regression fix for "Show Seconds" in Sequencer.
It was missed RNA property in Sequencer space which lead to issues after recent
refactoring of related areas.
2012-02-12 09:04:12 +00:00
Campbell Barton
8b43813b69 rename BM_ flags for BMHeader->hflag to BM_ELEM_ to be more clear that these flags apply to bmesh elements. 2012-02-12 06:24:12 +00:00
Campbell Barton
467e49e5e5 remove some unused defines 2012-02-12 06:09:22 +00:00
Janne Karhu
5a2454c3f8 Fix [#29737] Can't edit particle hair if particle count is 0.
* Hair wasn't flagged as "done" if particle count was 0 before setting particles as hair, so particle edit mode didn't work.
2012-02-12 00:43:57 +00:00
Janne Karhu
670bde28dd Fix [#29530] Changing to particle mode could crash in some cases
* If a baked particle didn't have any cached keys creating an edit path for it crashed.
2012-02-12 00:32:31 +00:00
Janne Karhu
a7458742b1 Fix [#29265] Particle Instance: Create Along Paths + Children inconsistent with actual children hair particles
* Hair particle rotations weren't calculated properly for particle locations along a path and the "particle on path" calculations were not correct in many other ways too.
* Now the particle's location along a path is interpolated directly from the cached paths if it exist. These paths are always correctly calculated.
* Paths are now cached if a particle instance modifier using the particle system with the path option exists.
2012-02-12 00:25:52 +00:00
Tamito Kajiyama
5c5685f6c5 Merged changes in the trunk up to revision 44039. 2012-02-12 00:09:48 +00:00
Campbell Barton
566464366f solidify modifier fix for material offset. 2012-02-11 21:39:09 +00:00
Campbell Barton
0327b9a0cf minor include cleanup, add GPL header (copied from BKE_animsys.h 2012-02-11 19:43:06 +00:00
Bastien Montagne
24fc50907d Fix [#30136] Adding Sequence Plugin fails.
Problem was in how file selector is called by the effect_strip_add operator invoke. WM_operator_filesel() is not suited, as it directly calls exec if filepath is already set, and sequencer_generic_invoke_xy__internal() will set that path unless otherwise told. So using rather the same way to do as the one used by the other "strip_add" operators...
2012-02-11 16:08:45 +00:00
Bastien Montagne
3af2f8a50d Fix [#30122] "Tweak" mouse event values were not loaded from keymap files.
The problem was, those values were not included in the event type agnostic event_value_items list, hence RNA keymap item creation just ignored them.
2012-02-11 14:50:26 +00:00
Campbell Barton
b81bfd86b4 use ValueError when vector/matrix multiplications sizes are not supported, was using TypeError for mat*vec and ValueError for vec*mat. 2012-02-11 14:27:36 +00:00
Campbell Barton
5e1f6f0174 fix for crash adding movie strips that were not a supported format. 2012-02-11 13:19:25 +00:00
Campbell Barton
2ff2d345f5 dont add the name field to theme presets for now. 2012-02-11 12:23:23 +00:00
Campbell Barton
dbea322b26 resetting the theme wasnt changign the panel header. 2012-02-11 12:16:34 +00:00
Campbell Barton
025b10f7f2 correct bad level include. 2012-02-11 10:56:07 +00:00
Campbell Barton
83a8f4c19e another include cleanup 2012-02-11 10:50:48 +00:00