Commit Graph

1176 Commits

Author SHA1 Message Date
dbdd1c2ea7 Remove vestigial retopo/retopo-paint code. 2012-01-12 22:12:07 +00:00
0d3604679d remove commented editmesh code which is now moved to transform.c 2012-01-12 06:32:07 +00:00
f66f33cefc rename RNA_property_is_set() --> RNA_struct_property_is_set() in preperation to add a second version of the function which takes the property rather then its name. 2012-01-11 16:32:12 +00:00
a7b0a11811 svn merge ^/trunk/blender -r43278:43294 2012-01-11 15:04:54 +00:00
51bada696f Longer names support for all ID and other object names
This commit extends limit of ID and objects to 64 (it means 63 meaning
characters and 1 for zero-terminator). CustomData layers names are also
extended.
Changed DNA structures and all places where length constants were hardcoded.

All names which are "generating" from ID block should be limited by MAX_ID_NAME-2,
all non-id names now has got own define called MAX_NAME which should be used all
over for non-id names to make further name migration stuff easier.

All name fields in DNA now have comment with constant which corresponds to
hardcoded numeric value which should make it easier to further update this
limits or even switch to non-hardcoded values in DNA.

Special thanks to Campbell who helped figuring out some issues and helped a lot
in finding all cases where hardcoded valued were still used in code.

Both of forwards and backwards compatibility is stored with blender versions newer
than January 5, 2011. Older versions had issue with placing null-terminator to
DNA strings on file load which will lead to some unpredictable behavior or even
crashes.
2012-01-11 08:51:06 +00:00
2b2c1007f6 rename normal calc functions.
comparing bmesh to trunk, mesh_calc_normals() in bmesh is a much more comprehensive function, calculating mpoly,mface normals, where trunk only calculated vertex normals.

renamed:
* mesh_calc_normals() --> mesh_calc_normals_mapping_ex
* mesh_calc_tessface_normals --> mesh_calc_normals_tessface() - only calculates normals from tessface
* added mesh_calc_normals() - only calculates normals from poltys

this way we can have mesh_calc_normals() remain fast for parts of the code which only need vertex normals to be updated.

only refactor, no func changes- didnt replace mesh_calc_normals_mapping_ex() with mesh_calc_normals() anywhere yet.
2012-01-06 00:08:37 +00:00
46b1ad99d3 Add ability to constrain knife cut angle to 0, 45, or 90 degrees
Notes:
- uses 'c' as toggle key in and out of angle snapping
 (aka constrain) mode
- when in angle snapping mode, after first click, will
 constrain line to nears 0, 45, or 90 degree line
- constraint is in screen space, not model space,
 so will usually be used in axis aligned view
2012-01-04 13:43:40 +00:00
c0eec8f379 svn merge ^/trunk/blender -r43062:43085 2012-01-03 02:16:52 +00:00
1e18da32fb replace:
CTX_data_pointer_get_type(C, "object", &RNA_Object).data
with api call:
  ED_object_context(C)

... since getting the context object is such a common operation.
2012-01-02 17:15:24 +00:00
6d965f4493 style edits for function declarations 2011-12-30 07:55:15 +00:00
7ee3da151d Add code to make knife cut through whole mesh optionally.
Notes:
- only cuts through when the occlude geometry button is unpushed,
  else the old behavior
- doesn't add points in middle of occluded faces yet, so will not
  make partial cuts or hole cuts in occluded faces; for best
  results, start and finish cuts completely outside the mesh
- also made slight improvement to behavior when starting cut
  off the model
- a small refactor: added knife_add_to_vert_edges for code
  used a number of times
2011-12-29 13:43:59 +00:00
ac4579d4c9 syncing with trunk, remove unused function 2011-12-28 14:22:46 +00:00
2e92b14bc6 copy BLI_edgehash changes from bmesh branch, main change is use of mempool. 2011-12-28 10:20:37 +00:00
dab41e0499 macro for getting next/previous MPoly loops 2011-12-28 07:10:27 +00:00
dab71f9b12 svn merge ^/trunk/blender -r42882:42886 2011-12-27 04:08:21 +00:00
397d7d949f remove unneeded casts from 'unsigned int' to 'int' 2011-12-27 03:54:23 +00:00
51016c4dea split >120 length lines (mostly if statements) 2011-12-22 00:03:20 +00:00
8a8cb2c3ef minor formatting edits 2011-12-21 04:56:04 +00:00
57e6ac47a0 use TRUE/FALSE rather then 1/0, no functional changes. 2011-12-21 03:33:32 +00:00
c5f8669112 fix error in own recent merge 2011-12-21 00:47:59 +00:00
45b9a5a3e1 more mirror cleanup
- remove BMBVH_FindClosestVertTop
- update select mirror operator to EDBM_CacheMirrorVerts
2011-12-21 00:09:44 +00:00
cc551b4189 svn merge ^/trunk/blender -r42776:42778 2011-12-20 23:17:24 +00:00
0e4f1ad43d topo mirror and sync with minor edits made to bmesh, no functional changes 2011-12-20 23:14:29 +00:00
deb3b7e282 replace editmode topo mirror function from the one in trunk (ED_mesh_mirrtopo_init) 2011-12-20 22:01:11 +00:00
cceef0d44f svn merge ^/trunk/blender -r42759:42761 2011-12-20 21:28:57 +00:00
b70174cb93 move topology mirror out into its own functions - needed for bmesh branch so we can use then for bmeshes own internal mirror calculations. 2011-12-20 10:05:58 +00:00
5c6ee6b523 svn merge ^/trunk/blender -r42670:42680 2011-12-17 02:41:53 +00:00
ad96dacbc5 style edit only - move parenthesis onto second line of function definition (in keeping with most of blenders code)
also split some long lines in own code.
2011-12-17 00:52:36 +00:00
db6cb30941 svn merge ^/trunk/blender -r42669:42670 2011-12-16 23:50:55 +00:00
e5b1f9c28d svn merge ^/trunk/blender -r42660:42669 2011-12-16 23:26:29 +00:00
3311164b24 Math lib: matrix multiplication order fix for two functions that were
inconsistent with similar functions & math notation:

mul_m4_m4m4(R, B, A) => mult_m4_m4m4(R, A, B)
mul_m3_m3m4(R, B, A) => mult_m3_m3m4(R, A, B)

For branch maintainers, it should be relatively simple to fix things manually,
it's also possible run this script after merging to do automatic replacement:
http://www.pasteall.org/27459/python
2011-12-16 19:53:12 +00:00
d39adcb478 minor cleanup to mirror code
- MirrTopoPair.hash was 'long' when only needed to be 'int'
- use 'intptr_t' rather than 'long' when the value is cast back to a pointer.
2011-12-16 07:27:56 +00:00
d46712cd29 svn merge ^/trunk/blender -r42655:42660 2011-12-16 04:16:52 +00:00
724868b400 fix [#29620] Topology Mirror: not refreshing vertex UUIDs 2011-12-16 04:01:08 +00:00
6254cc1c70 2 new bevel options for the operator and the modifier.
* even offset, uses same shell distance method as solidify to give even with beveled faces.
* distance offset, this is mostly for compatibility with the modifier in trunk which uses the bevel width as a distance rather then a percentage. at the moment this is awkward for the operator since it makes percent act differently where the 0-1 range doesnt make sense.

still need to bring back more options from trunks bevel modifier.
2011-12-13 09:57:19 +00:00
143a654e6f formatting and minor refactor of some bmesh functions.
* BM_Make_Quadtriangle --> BM_Make_Face_QuadTri_v
* BM_Make_QuadTri      --> BM_Make_Face_QuadTri
2011-12-13 06:56:10 +00:00
8115753fd2 svn merge ^/trunk/blender -r42564:42586 2011-12-12 21:01:39 +00:00
01478a3743 correction to report message 2011-12-12 20:57:10 +00:00
237f6fc3b3 Fix #29599: Side of Active tool not working in Faces/Edges
Added warning message if there's no last selected vertex in the selection stack.
2011-12-12 14:52:00 +00:00
8eab2c66a7 workaround for tessface not being recalculated when undo is disabled 2011-12-11 05:05:37 +00:00
ce86bebfe3 knife_project_v3 can call ED_view3d_project_float directly without having its own check for ortho 2011-12-10 18:24:44 +00:00
c804f40027 Fix #29558: Selecting similar edges doesn't work
Return OPERATOR_FINISHED from select grouped operator in any case so
even if nothing were selected operator would be registered in redo panel
and threshold can be adjusted there.
2011-12-09 16:10:15 +00:00
707e0da6f4 Fix for select similar vertices operator: it's exec used to return selection count
instead of OPERATOR_* return values which used to confuse operators system.
2011-12-09 14:30:44 +00:00
5c377f5f87 Fix #29539 Crash on shortest path 2011-12-08 12:53:43 +00:00
ea6de7626e removed some bmesh todo comments which are not needed and minor edits on previous commit. 2011-12-08 00:28:42 +00:00
4b09f86c32 rename iterator type from htype to itype (htype means header type for BMesh elements) 2011-12-07 20:55:28 +00:00
35e80c5544 svn merge ^/trunk/blender -r42439:42466 2011-12-06 18:50:45 +00:00
b264fea601 Fix #29511: Separate tool duplicates objects
Do not register separate mesh operator so it can't be redone from operator redo panel.
2011-12-06 14:34:56 +00:00
26db98293f Quiet annoying warning:
Warning! Tesselation uvs or vcol data got out of sync, "had to reset!

This would happen on every editmode edit with UV's and wasn't too reassuring that blender was handling uvs/vcols correctly.

From looking into the problem I found that creating the undo mesh would act as if it was tessellating the existing mesh each time and complain that the data was out of sync, when infact the mesh was just created and being filled in.

Also, allocating uv and vcol customdata arrats for tessfaces isn't needed for undo mesh, so save some memory and dont allocate these in the first place.
2011-12-06 09:28:25 +00:00
0b805fcb5d remove double lookus in BM_GetCDf/BM_SetCDf, also remove bm_cdata_get_single_float which was a duplicate of BM_GetCDf. 2011-12-06 08:07:12 +00:00