9992e6a169
Fix a few compiler warnings with macOS / clang.
2017-02-18 23:59:34 +01:00
a1a8343281
Cleanup: redundant index loop for monkey-create
...
Also rename face vars (the faces aren't temp),
and quiet old-style-definition warning.
2016-11-18 06:10:53 +11:00
5bdff9ea80
Quiet shadow warning
...
No need to declare new iterator for second loop.
2016-09-25 12:19:38 +10:00
Peter Lu
a070a5befa
Mesh: added default UVs for Monkey, improved UVs for UV Sphere and Icosphere.
...
Fixes T47488 and T47478.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D2224
2016-09-24 16:39:23 +02:00
0a026033ae
BMesh: make toolflags optional
...
Saves 8 bytes per vert/edge/face.
Gives overall ~20-25% memory saving for dyntopo sculpting
and modifiers that use BMesh.
2016-07-01 19:29:22 +10:00
b9996a3cc3
Fix Cube generated UV's rotated incorrectly
2016-05-14 23:01:59 +10:00
5231b049d7
Fix T47443: Circle & UV Sphere aren't aligned
...
D1912 by @samb96
Change the starting point of the UV sphere so that it is aligned with the circle, cylinder, and cone primitives.
2016-04-12 19:47:29 +10:00
4e500101a7
Cleanup: quiet -Wcomma, cast to void where needed
2016-03-05 09:16:12 +11:00
fdcec62dad
Cleanup: invalid comment & style
2015-12-21 00:14:41 +11:00
dc98a3b0a7
Cleanup: style/spelling
2015-12-12 15:10:03 +11:00
258564a7b4
Fix (unreported) Newly added grid's vertices not being selected.
...
`bmo_create_grid_exec` was not tagging created vertices with `MARK_VERT`, which seems
mandatory to get them selected? This sounds a bit hacky/odd to me, but that's what
all other primitive funcs do...
2015-12-05 00:48:27 +01:00
3c6709a63c
Fix T37879: Default UV generation for mesh primitives.
...
Adds default-generated UVs to mesh primitives (cone, cylinder, icosphere, uvsphere, cube, circle, grid)
when they are added to the scene, since some of them can be pretty awkward to unwrap manually.
Original patch: Liam Mitchell (CommanderCorianderSalamander).
Main review work: Campbell Barton (campbellbarton).
Finalization, fixes and cleanup: Bastien Montagne (mont29).
Reviewers: mont29, #mesh_modeling, campbellbarton
Reviewed By: mont29, campbellbarton
Subscribers: lkruel, campbellbarton, michaelknubben, kevindietrich
Maniphest Tasks: T37879
Differential Revision: https://developer.blender.org/D481
2015-12-04 23:49:55 +01:00
fd9b25df75
cleanup: create cube, use index lookups
2015-01-04 14:21:16 +11:00
90e1746d89
BMesh: correct flag use
...
Allowed fill to make duplicate faces
2014-08-21 13:08:13 +10:00
38e683cbb1
Fix T38217: Fix glitch adding Monkey with view align
...
added an option so view-align can default to a different axis.
2014-01-16 23:54:04 +11:00
aa3933b411
Fix own regression - adding a grid had rotated face.
...
some scripts depended on uv's default values
2013-11-29 10:15:26 +11:00
46cc02c5cd
Correct fix for T37617, (own recent regression)
2013-11-26 07:13:34 +11:00
1768bd2c33
Fix T37617: "Add plane" was adding a 2*2 grid
...
Was a regression from rBaa3c06b41ca9, hope this time all things are OK again (note the X/Y subdivision values still are different than before (-1 for same result), but imho they make more sense this way).
2013-11-25 21:01:22 +01:00
aa3c06b41c
Fix T37573: Adding grid primitive slow for many subdivisions
2013-11-25 20:35:56 +11:00
1decd824f3
Code Cleanup: use math functions and reduce View3d axis drawing into a loop
2013-11-24 21:26:16 +11:00
afab39b9d6
code cleanup: use const's for static arrays
2013-10-10 20:22:17 +00:00
8937a8b839
use BM_CREATE_NOP arg rather then zero, with pointer and bool args in either side in some cases it gets a bit confusing.
...
also correct edge-rotate where bool->flag conversion worked by accident.
2013-08-21 05:39:46 +00:00
b1f4e2b4db
code comments: bmesh operator doxy header descriptions.
2013-03-30 08:54:50 +00:00
6f9f1399a0
code cleanup: operator headers
2013-03-25 22:40:11 +00:00
b27854bd47
use booleans for bmesh api.
2013-01-14 16:42:43 +00:00
07ccd3ee3f
fix [ #33029 ] Applying modifier leaks memory
...
Thanks for Sergey for finding the bug & patching, This fix works a bit differently.
Theres no need to allocate the customdata in the first place - since its written into. So add a flag for vert/edge/face/loop creation functions so they can skip customdata creation.
2012-11-29 16:26:39 +00:00
cac253a502
fix for minor annoyance - when extruding a circle there would always be one face flipped, now edges are all ordered in the same direction.
2012-11-28 14:15:54 +00:00
8ecce451ab
bmesh operator naming - use clearer names for args eg: (mat -> matrix, use_singleedge -> use_single_edge)
...
also remove duplicate docs for operator arg formatting.
2012-11-28 00:16:06 +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
9b948717b0
code cleanup: float <> double conversion.
2012-11-03 18:23:30 +00:00
ed1cda9a6c
style cleanup
2012-09-30 06:12:47 +00:00
f3850ca13b
fix for adding triangle-fan filled circle not tagging the center vertex.
2012-09-27 03:32:13 +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
69a7e0af02
rename bmesh ops since they are exposed in an api now.
2012-06-30 15:27:13 +00:00
3e305c1018
bmesh.ops module for bmesh operator access, only remove_doubles and convex_hull at the moment.
2012-06-26 21:40:01 +00:00
5d4fd04f05
Fix #31230 : Grid primitive changes size with changing resolution
2012-05-02 09:03:15 +00:00
4cfa761951
source code style checker to, (similar to pythons pep8 checker)
...
currently checks for brace placement and some whitespace use.
can be accessed with:
make test_style
or...
source/tools/check_style_c.py source/blender
also style cleanup on bmo_primitives.c
2012-05-01 20:36:39 +00:00
8baa5fbde2
- fix for python freeing its own bmesh clearing the global mirror cache.
...
- fix for own mistake (Ctrl+T didnt set beauty peroperty).
- remove bad level includes in bmesh.
2012-04-23 04:24:11 +00:00
b51590d55d
code cleanup: bmesh subdivide code - BM_mesh_esubdivideflag() & "esubd" bmesh operator was passing a flag about in a fairly confusing way.
...
since we will eventually have python bmesh operator access better expose this as multiple booleans.
remove remaining editbutflag's
2012-04-23 03:43:02 +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
58064bdfc4
code cleanup: add doxygen headers to bmesh operator files, also add own include so definitions dont get out of sync.
2012-04-06 09:21:19 +00:00
b68dde68b5
Small improvement to bmo icosphere primitive: instead of calling n times the subdivide bmo with one cut, call it once, with the right number of cuts (which is (2^(n-1)) - 1).
2012-04-05 06:47:14 +00:00
c7aed8b2af
For BMesh functions that test flags, add enabled/disabled variants.
2012-03-30 17:30:49 +00:00
1e7bcece44
Fix bug 30696, circular mesh objects had wrong orientation.
...
Behavior now matches 2.62, circle, cone, and cylinder get first vertex
at 0 degrees.
Also fixed range for vertex property of add-cone and add-cylinder
operators, changed minumum from two to three.
2012-03-27 10:28:06 +00:00
d76c05cd36
style cleanup: bmesh
2012-03-21 09:10:08 +00:00
6f104aad3a
code cleanup: bmesh api - make arg order consistent - htype before hflag or oflag.
2012-03-19 08:36:27 +00:00
4f19c1a995
spelling cleanup
2012-03-18 07:38:51 +00:00
e61339a76f
code cleanup: duplicate checks and double assignments.
2012-03-08 04:38:35 +00:00