Commit Graph

202 Commits

Author SHA1 Message Date
0d0291f6e1 code cleanup: incorrect sized array args, remove some redundant code. 2013-03-17 10:26:23 +00:00
3d64381e4d use more rigid type checking for bmesh slot subtypes. 2012-11-26 03:16:29 +00:00
3583686433 Fix #33264: Array MOD First Last option does nothing 2012-11-22 12:03:15 +00:00
ebaf1306b8 bmesh operator api:
avoid per vert/edge/face string lookups in BMO_slot_map_* functions --- used in array modifier, subdivide, remove doubles and other tools.
2012-11-20 13:29:27 +00:00
dbdc76c9d0 code cleanup: make bmesh operator names more consistant since python has access to these as input arguments and return values.
all output values currently have ".out" suffix, this may go in the future, but for now it makes it clear in C code what are inputs and outputs.
2012-11-20 05:50:19 +00:00
48639af5f8 use input and output slots for bmesh operators, needed for the python api to get return values. 2012-11-19 14:58:31 +00:00
a9af563526 bmesh: lazy initialize bmesh tool flag pool, has the advantage that modifiers that dont use bmesh operators can skip allocating it. 2012-11-18 12:14:22 +00:00
eb69d1c1ae style cleanup: also quiet harmless compiler warning. 2012-10-29 15:43:54 +00:00
2de2acc681 add CDDM_from_bmesh(), avoids using BMEditMesh in modifiers. 2012-10-24 07:24:11 +00:00
90d215535e add option so operators can be called with a flag, currently the only flag is to respect hidden geometry.
this is useful for bmesh tools that operate in object mode or for modifiers which would previously use hidden faces in some cases.
2012-07-21 00:58:02 +00:00
32cf7fcdb1 code cleanup: spelling 2012-07-16 23:23:33 +00:00
8b865c01cd style cleanup: comments 2012-06-30 22:49:33 +00:00
2932cded40 fix for own error renaming bmesh operator dupe 2012-06-30 21:19:12 +00:00
69a7e0af02 rename bmesh ops since they are exposed in an api now. 2012-06-30 15:27:13 +00:00
a18b303a76 Fix incorrectly deleted elements in array modifier caps.
Add check for merging vertices into vertices that are themselves
marked for merge, was already done for array eleements but not end
caps.

Fixes bug [#31695] Array Modifier: End Cap fails if all vertices are merged

Also corrected some reversed assert arguments.
2012-06-11 09:41:08 +00:00
318b44fe5d Refactor of modifiers' apply function: now use a single bit-flag parameter to pass options, instead of having one parameter per boolean flag (i.e. replaces current useRenderParams and isFinalCalc by a single ModifierApplyFlag flag. ModifierApplyFlag is an enum defined in BKE_modifier.h). This way we won't anymore have to edit all modifier files when e.g. adding a new control flag!
Should have no effect over modifier behavior.
2012-05-09 15:00:26 +00:00
d20c129a9c style cleanup: whitespace/operators 2012-05-09 09:24:15 +00:00
3ef11693f5 Style cleanup: displist module 2012-05-07 06:58:03 +00:00
3d8e58751c style cleanup: modifiers 2012-05-06 13:38:33 +00:00
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
5c89138684 style cleanup: comments 2012-04-22 11:54:53 +00:00
b56aabf815 style cleanup: multi-line if statements. 2012-04-21 15:11:03 +00:00
6701933f5c style cleanup 2012-04-21 12:51:47 +00:00
475ecbb0ce remove BM_ITER, BM_ITER_INDEX macros, use ELEM or MESH variants only (the maceros had unused args in both cases). 2012-04-19 13:47:58 +00:00
75b869e428 style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER 2012-04-19 11:44:12 +00:00
e9358a3806 bmesh api changes:
- remove recently added BM_mesh_select_flush_strip(), functions purpose wasn't clear.
- add BM_mesh_elem_hflag_disable_test(), BM_mesh_elem_hflag_enable_test()
  to match existing BM_mesh_elem_hflag_enable/disable_all(), these take a hflag to test before editing each element.
  This replaces the need for BM_mesh_select_flush_strip().
2012-04-13 04:02:26 +00:00
4253e52771 fix [#30768] Project from View UV map tool includes hidden geometry r45323
select all could select hidden faces, now BM_mesh_elem_flag_enable/disable_all takes an argument to skip hidden elements.
2012-04-02 04:45:44 +00:00
ce8f3b4afa Small array modifier performance improvement.
Transform vertices directly rather than using BMOp.
2012-03-31 12:29:41 +00:00
ebb229110e Fix bug 30195, Array modifier fails to merge vertices.
All cases should work now -- that's adjacent duplicate merging,
first-last duplicate merging, and start/end cap merging. A lot of
complexity really, wonder if it might not be better to just do a full
"remove doubles" rather than try to match pre-BMesh behavior exactly.
2012-03-30 17:30:56 +00:00
9c5907cc79 Small code cleanups related to arrays.
* Added helpful comment on 'keepverts' slot of bmop finddoubles.
* Removed unused macro 'E' from MOD_array.
2012-03-29 23:13:44 +00:00
7816eb7bd8 Fix "First Last" merge option in array modifier (partial fix for bug 30195) 2012-03-29 20:58:25 +00:00
7474397f85 More array modifier fixes.
* Skip calculation of merge indices if merging isn't enabled
* Clean up usage of BMesh operators to fix small memory leak
* Fix harmless BLI_assert in CustomData_bmesh_merge
* Another null-initialization fix in CustomData_bmesh_merge
2012-03-29 11:31:44 +00:00
b8bb3f2e3c Partial fix for array modifier vertex merge (bug 30195).
Two fixes:

* The find-doubles operator was overriding the "dirty" element
  indices, so vertices were not being mapped correctly.

* In some cases a vertex can be set to merge with a vertex that is
  also set to be merged, so added a loop to find the first unmerged
  vert in this case.

Not yet working is the "First Last" merge option.

Also made some cleanups and added comments in the array/remove doubles
code.
2012-03-28 22:03:46 +00:00
df5e551535 Fix bug 30697, strange shading on array modifier with offset object.
* An offset object can rotate output, so need to update normals to
  reflect that. Fix by adding a normals recalc, but only if there's an
  offset object.

* Added BMESH_TODO comment to check whether there are other cases were
  normals need to be updated.
2012-03-27 13:08:40 +00:00
57f7aca8ee Fix for position of array-modifier end cap when not using a fixed count.
Moved calculation of final offset so that correct count value has been set.
2012-03-26 19:50:45 +00:00
f02d679183 Fix run-time warning of freeing null pointer in array modifier. 2012-03-26 19:44:25 +00:00
5a90ea77bc style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:24:53 +00:00
7ff77ed4ea code cleanup: use zero_v3 2012-03-23 20:18:09 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
b330abc290 remove Object member from BMesh struct - was only used for undo and BMEditMesh already stores an object pointer.
also fix for own mistake with mesh conversion refactor, shape key index was off by 1 when switching editmode.
2012-03-11 19:58:56 +00:00
89a963fb7f style cleanup: comment blocks 2012-03-09 18:28:30 +00:00
2a7f1af61e Code Cleanup:
- apply some rules for function naming conventions, added to main bmesh doc in bmesh.h.
- remove unused function BM_loops_to_corners().
2012-02-28 19:10:53 +00:00
130668b12f minor bmesh api naming edits. 2012-02-27 14:07:19 +00:00
c65b3b73fd bmesh api cleanup
* better type safety for BM_elem_flag_* and BM_elem_index_* functions.
* add BMElem type to be used where BMFace/Edge/Vert/Loop can be interchanged.
* fix bug in select manifold, found when making functions more strict.
2012-02-25 22:23:40 +00:00
98aececc8e bmesh code cleanup
* change BMO_elem_flag_* defines to inline functions.
* BMO_slot_map_insert() is too big for an inline function - un-inline it.
* remove redundant casts.
2012-02-25 20:58:03 +00:00
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
7d18115e14 own error - mixup with BMO_slot_mat_get/set 2012-02-13 05:59:14 +00:00
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
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
1dc3536268 mode bmesh include cleanup, remove unused file too. 2012-02-11 10:15:11 +00:00