diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-12-05 01:49:55 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-12-05 01:49:55 +0300 |
commit | 3c6709a63c267dc3cb3898efd9d6466c2300876c (patch) | |
tree | 522d9cd6f83c09f9a9ba92b858b307cc0b073867 /source/blender/bmesh/intern/bmesh_opdefines.c | |
parent | 24be453938c49cd45d910a8ad0ee144fddd843ee (diff) |
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
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_opdefines.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_opdefines.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index d92bdc6ea69..72a8dac534a 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -1567,6 +1567,7 @@ static BMOpDefine bmo_create_grid_def = { {"y_segments", BMO_OP_SLOT_INT}, /* number of y segments */ {"size", BMO_OP_SLOT_FLT}, /* size of the grid */ {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ + {"calc_uvs", BMO_OP_SLOT_BOOL}, /* calculate default UVs */ {{'\0'}}, }, /* slots_out */ @@ -1590,6 +1591,7 @@ static BMOpDefine bmo_create_uvsphere_def = { {"v_segments", BMO_OP_SLOT_INT}, /* number of v segment */ {"diameter", BMO_OP_SLOT_FLT}, /* diameter */ {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ + {"calc_uvs", BMO_OP_SLOT_BOOL}, /* calculate default UVs */ {{'\0'}}, }, /* slots_out */ @@ -1612,6 +1614,7 @@ static BMOpDefine bmo_create_icosphere_def = { {{"subdivisions", BMO_OP_SLOT_INT}, /* how many times to recursively subdivide the sphere */ {"diameter", BMO_OP_SLOT_FLT}, /* diameter */ {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ + {"calc_uvs", BMO_OP_SLOT_BOOL}, /* calculate default UVs */ {{'\0'}}, }, /* slots_out */ @@ -1658,6 +1661,7 @@ static BMOpDefine bmo_create_cone_def = { {"diameter2", BMO_OP_SLOT_FLT}, /* diameter of the opposite */ {"depth", BMO_OP_SLOT_FLT}, /* distance between ends */ {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ + {"calc_uvs", BMO_OP_SLOT_BOOL}, /* calculate default UVs */ {{'\0'}}, }, /* slots_out */ @@ -1680,6 +1684,7 @@ static BMOpDefine bmo_create_circle_def = { {"segments", BMO_OP_SLOT_INT}, {"diameter", BMO_OP_SLOT_FLT}, /* diameter of one end */ {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ + {"calc_uvs", BMO_OP_SLOT_BOOL}, /* calculate default UVs */ {{'\0'}}, }, /* slots_out */ @@ -1701,6 +1706,7 @@ static BMOpDefine bmo_create_cube_def = { /* slots_in */ {{"size", BMO_OP_SLOT_FLT}, /* size of the cube */ {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ + {"calc_uvs", BMO_OP_SLOT_BOOL}, /* calculate default UVs */ {{'\0'}}, }, /* slots_out */ |