Commit Graph

68 Commits

Author SHA1 Message Date
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
61a5cc28be disable re-tesselation for modifiers that use bmesh, array/bevel/edge split - were tesselating 2 times and didnt need to.
also comment array modifier from flushing selection flags.
2012-01-22 21:12:18 +00:00
ad3e9900d6 call CDDM_from_BMEditMesh without creating tessface data for modifiers.
- in the case of deform modifiers this is very safe (assuming the mods themselves dont need tessface data), since the DM is freed right after, so this is an easy speedup.

- in the case of bevel and split edge modifiers this should still work out fine since mods that need tessface data will generate it.
2012-01-18 15:29:25 +00:00
9d782c8a1a argument for CDDM_from_BMEditMesh() so creating tessface data is optional, no functional changes since all callers use this so far. 2012-01-18 15:09:27 +00:00
ded0af482b rename CDDM_calc_normals() --> CDDM_calc_normals_mapping 2012-01-06 00:12:24 +00:00
b527e9f0ac array had its own unused vertgroup_flip_name function. removed. 2011-12-29 04:07:57 +00:00
c174f5682c syncing modifiers with trunk - only small changes 2011-12-29 04:04:27 +00:00
9d05ccf9e8 svn merge -r41899:41926 ^/trunk/blender. also sync mempool with trunk and move BLI_mempool_alloc out of mempools header where it was inlined 2011-11-16 19:06:38 +00:00
707fcc42a3 replace macros with math functions 2011-11-16 17:37:20 +00:00
9087cb91d4 quiet compiler warnings for BLI_array defines, split BLI_array_append into BLI_array_append / BLI_array_append_r, the latter returning the new array location. 2011-11-16 17:09:41 +00:00
0c017bf146 tag index arrays as dirty when any element is removed, also check validity on operator init/exit (check was missed in some cases before) 2011-11-16 14:36:23 +00:00
da849bbfc0 prepare for flagging the bmesh has having invalid index values, so we can skip looping over all elements if its already valid.
- went over every BM_SetIndex call and added comments about its use, if its setting dirty values or correct ones.
- replace loops over all elements _just_ to set index values, with a new function, BM_ElemIndex_Ensure(...), this will eventually only initialize values when they are dirty.
2011-11-16 12:38:40 +00:00
e59ab6486f svn merge -r41751:41779 ^/trunk/blender 2011-11-15 02:05:32 +00:00
e84c0980a3 correct indentation and some whitespace edits (no functional changes) 2011-11-11 13:09:14 +00:00
c914b11614 perf improvement for array modifiers 2011-10-27 17:39:15 +00:00
15e6d6cd75 svn merge ^/trunk/blender -r41226:41227 . 2011-10-24 12:43:08 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
2fa642b6e9 fix memory leak in array modifier not freeing editmesh, also use better names for allocs. 2011-09-12 02:44:17 +00:00
b82b8b4d05 fix [#28587] Array modifier draws an extra object
patch [#28586] from Andrew Wiggin (ender79)
2011-09-12 02:36:14 +00:00
55a560c0c4 svn merge -r39286:39385 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-08-16 06:30:14 +00:00
c265a686d8 Modifiers: add callback to loop over each texture assigned to a modifier. 2011-08-12 18:11:22 +00:00
1d8fa52883 rename BMINDEX_GET/SET to BM_GetIndex/BM_SetIndex 2011-05-13 10:49:26 +00:00
5ba0c2c049 tag unused arguments, quiet some warnings 2011-05-09 14:32:55 +00:00
5a2a3d7d82 more syncing with trunk, also cleared many warnings with gcc4.6 2011-05-09 04:06:48 +00:00
f9f771cd01 converted more mixed tab/space indentations to tabs. only whitespace changes. 2011-04-21 15:53:30 +00:00
c98148a963 =bmesh= merge from trunk at r36153 2011-04-15 01:19:13 +00:00
7d43a48993 =bmesh=
Multires interpolation is considerably better
now, though it still has a problem with occasionally
producing little random tangent spikes.  Still, it's
far better then it was.

Also fixed a bug in dissolve faces.
2011-03-29 05:48:18 +00:00
c7fccc84bf use NULL rather then 0 for pointer assignments & comparison, modifier, imbuf & editors. 2011-03-05 10:29:10 +00:00
065a7f4e2f =bmesh=
Mirror modifier no longer uses bmesh, but is now
100% CDDM.  This is faster; the sluggishness was
driving me crazy.  Still need to deal with UVs,
but that shouldn't be hard.
2011-02-27 07:49:36 +00:00
f01261d040 merge with/from trunk at r35190 2011-02-27 06:19:40 +00:00
Nathan Letwory
caa7bea1c5 doxygendoxygen: blender/modifiers tagged. 2011-02-25 13:57:17 +00:00
4124804b4e many functions in blender are not marked static but should be.
most local modifier,GPU,ImBuf and Interface functions are now static.

also fixed an error were the fluid modifier definition and the header didnt have the same number of args.
2011-02-13 14:16:36 +00:00
0884147698 fix [#25968] Crash on changing merge distance in array modifier with edgesplit modifier in chain 2011-02-09 04:45:53 +00:00
329e2d8037 Todo issue: sculpting on deformed mesh
Used a crazyspace approach (like in edit mode), but only modifiers with
deformMatricies are allowed atm (currently shapekeys and armature modifiers only).
All the rest modifiers had an warning message that they aren't applied because
of sculpt mode. Deformation of multires is also unsupported.

With all this restictions users will always see the actual "layer" (or maybe
mesh state would be more correct word) they are sculpting on.

Internal changes:
- All modifiers could have deformMatricies callback (the same as deformMatriciesEM but
  for non-edit mode usage)
- Added function to build crazyspace for sculpting (sculpt_get_deform_matrices), but it
  could be generalized for usage in other painting modes (particle edit mode, i.e)

Todo:
- Implement crazyspace correction to support all kinds of deformation modifiers
- Maybe deformation of multires isn't so difficult?
- And maybe we could avoid extra bad-level-stub for ED_sculpt_modifiers_changed
  without code duplicating?
2011-01-31 20:02:51 +00:00
8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00