Changeset View
Changeset View
Standalone View
Standalone View
source/blender/bmesh/intern/bmesh_opdefines.c
| Show First 20 Lines • Show All 1,422 Lines • ▼ Show 20 Lines | |||||
| */ | */ | ||||
| static BMOpDefine bmo_create_grid_def = { | static BMOpDefine bmo_create_grid_def = { | ||||
| "create_grid", | "create_grid", | ||||
| /* slots_in */ | /* slots_in */ | ||||
| {{"x_segments", BMO_OP_SLOT_INT}, /* number of x segments */ | {{"x_segments", BMO_OP_SLOT_INT}, /* number of x segments */ | ||||
| {"y_segments", BMO_OP_SLOT_INT}, /* number of y segments */ | {"y_segments", BMO_OP_SLOT_INT}, /* number of y segments */ | ||||
| {"size", BMO_OP_SLOT_FLT}, /* size of the grid */ | {"size", BMO_OP_SLOT_FLT}, /* size of the grid */ | ||||
| {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ | {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ | ||||
| {"calc_uvs", BMO_OP_SLOT_BOOL}, /* calculate default UVs */ | |||||
| {{'\0'}}, | {{'\0'}}, | ||||
| }, | }, | ||||
| /* slots_out */ | /* slots_out */ | ||||
| {{"verts.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}}, /* output verts */ | {{"verts.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}}, /* output verts */ | ||||
| {{'\0'}}, | {{'\0'}}, | ||||
| }, | }, | ||||
| bmo_create_grid_exec, | bmo_create_grid_exec, | ||||
| BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH, | BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH, | ||||
| }; | }; | ||||
| /* | /* | ||||
| * Create UV Sphere. | * Create UV Sphere. | ||||
| * | * | ||||
| * Creates a grid with a variable number of subdivisions | * Creates a grid with a variable number of subdivisions | ||||
| */ | */ | ||||
| static BMOpDefine bmo_create_uvsphere_def = { | static BMOpDefine bmo_create_uvsphere_def = { | ||||
| "create_uvsphere", | "create_uvsphere", | ||||
| /* slots_in */ | /* slots_in */ | ||||
| {{"u_segments", BMO_OP_SLOT_INT}, /* number of u segments */ | {{"u_segments", BMO_OP_SLOT_INT}, /* number of u segments */ | ||||
| {"v_segments", BMO_OP_SLOT_INT}, /* number of v segment */ | {"v_segments", BMO_OP_SLOT_INT}, /* number of v segment */ | ||||
| {"diameter", BMO_OP_SLOT_FLT}, /* diameter */ | {"diameter", BMO_OP_SLOT_FLT}, /* diameter */ | ||||
| {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ | {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ | ||||
| {"calc_uvs", BMO_OP_SLOT_BOOL}, /* calculate default UVs */ | |||||
| {{'\0'}}, | {{'\0'}}, | ||||
| }, | }, | ||||
| /* slots_out */ | /* slots_out */ | ||||
| {{"verts.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}}, /* output verts */ | {{"verts.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}}, /* output verts */ | ||||
| {{'\0'}}, | {{'\0'}}, | ||||
| }, | }, | ||||
| bmo_create_uvsphere_exec, | bmo_create_uvsphere_exec, | ||||
| BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH, | BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH, | ||||
| }; | }; | ||||
| /* | /* | ||||
| * Create Ico-Sphere. | * Create Ico-Sphere. | ||||
| * | * | ||||
| * Creates a grid with a variable number of subdivisions | * Creates a grid with a variable number of subdivisions | ||||
| */ | */ | ||||
| static BMOpDefine bmo_create_icosphere_def = { | static BMOpDefine bmo_create_icosphere_def = { | ||||
| "create_icosphere", | "create_icosphere", | ||||
| /* slots_in */ | /* slots_in */ | ||||
| {{"subdivisions", BMO_OP_SLOT_INT}, /* how many times to recursively subdivide the sphere */ | {{"subdivisions", BMO_OP_SLOT_INT}, /* how many times to recursively subdivide the sphere */ | ||||
| {"diameter", BMO_OP_SLOT_FLT}, /* diameter */ | {"diameter", BMO_OP_SLOT_FLT}, /* diameter */ | ||||
| {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ | {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ | ||||
| {"calc_uvs", BMO_OP_SLOT_BOOL}, /* calculate default UVs */ | |||||
| {{'\0'}}, | {{'\0'}}, | ||||
| }, | }, | ||||
| /* slots_out */ | /* slots_out */ | ||||
| {{"verts.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}}, /* output verts */ | {{"verts.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}}, /* output verts */ | ||||
| {{'\0'}}, | {{'\0'}}, | ||||
| }, | }, | ||||
| bmo_create_icosphere_exec, | bmo_create_icosphere_exec, | ||||
| BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH, | BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH, | ||||
| Show All 28 Lines | static BMOpDefine bmo_create_cone_def = { | ||||
| /* slots_in */ | /* slots_in */ | ||||
| {{"cap_ends", BMO_OP_SLOT_BOOL}, /* whether or not to fill in the ends with faces */ | {{"cap_ends", BMO_OP_SLOT_BOOL}, /* whether or not to fill in the ends with faces */ | ||||
| {"cap_tris", BMO_OP_SLOT_BOOL}, /* fill ends with triangles instead of ngons */ | {"cap_tris", BMO_OP_SLOT_BOOL}, /* fill ends with triangles instead of ngons */ | ||||
| {"segments", BMO_OP_SLOT_INT}, | {"segments", BMO_OP_SLOT_INT}, | ||||
| {"diameter1", BMO_OP_SLOT_FLT}, /* diameter of one end */ | {"diameter1", BMO_OP_SLOT_FLT}, /* diameter of one end */ | ||||
| {"diameter2", BMO_OP_SLOT_FLT}, /* diameter of the opposite */ | {"diameter2", BMO_OP_SLOT_FLT}, /* diameter of the opposite */ | ||||
| {"depth", BMO_OP_SLOT_FLT}, /* distance between ends */ | {"depth", BMO_OP_SLOT_FLT}, /* distance between ends */ | ||||
| {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ | {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ | ||||
| {"calc_uvs", BMO_OP_SLOT_BOOL}, /* calculate default UVs */ | |||||
| {{'\0'}}, | {{'\0'}}, | ||||
| }, | }, | ||||
| /* slots_out */ | /* slots_out */ | ||||
| {{"verts.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}}, /* output verts */ | {{"verts.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}}, /* output verts */ | ||||
| {{'\0'}}, | {{'\0'}}, | ||||
| }, | }, | ||||
| bmo_create_cone_exec, | bmo_create_cone_exec, | ||||
| BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH, | BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH, | ||||
| }; | }; | ||||
| /* | /* | ||||
| * Creates a Circle. | * Creates a Circle. | ||||
| */ | */ | ||||
| static BMOpDefine bmo_create_circle_def = { | static BMOpDefine bmo_create_circle_def = { | ||||
| "create_circle", | "create_circle", | ||||
| /* slots_in */ | /* slots_in */ | ||||
| {{"cap_ends", BMO_OP_SLOT_BOOL}, /* whether or not to fill in the ends with faces */ | {{"cap_ends", BMO_OP_SLOT_BOOL}, /* whether or not to fill in the ends with faces */ | ||||
| {"cap_tris", BMO_OP_SLOT_BOOL}, /* fill ends with triangles instead of ngons */ | {"cap_tris", BMO_OP_SLOT_BOOL}, /* fill ends with triangles instead of ngons */ | ||||
| {"segments", BMO_OP_SLOT_INT}, | {"segments", BMO_OP_SLOT_INT}, | ||||
| {"diameter", BMO_OP_SLOT_FLT}, /* diameter of one end */ | {"diameter", BMO_OP_SLOT_FLT}, /* diameter of one end */ | ||||
| {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ | {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ | ||||
| {"calc_uvs", BMO_OP_SLOT_BOOL}, /* calculate default UVs */ | |||||
| {{'\0'}}, | {{'\0'}}, | ||||
| }, | }, | ||||
| /* slots_out */ | /* slots_out */ | ||||
| {{"verts.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}}, /* output verts */ | {{"verts.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}}, /* output verts */ | ||||
| {{'\0'}}, | {{'\0'}}, | ||||
| }, | }, | ||||
| bmo_create_circle_exec, | bmo_create_circle_exec, | ||||
| BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH, | BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH, | ||||
| }; | }; | ||||
| /* | /* | ||||
| * Create Cube | * Create Cube | ||||
| * | * | ||||
| * Creates a cube. | * Creates a cube. | ||||
| */ | */ | ||||
| static BMOpDefine bmo_create_cube_def = { | static BMOpDefine bmo_create_cube_def = { | ||||
| "create_cube", | "create_cube", | ||||
| /* slots_in */ | /* slots_in */ | ||||
| {{"size", BMO_OP_SLOT_FLT}, /* size of the cube */ | {{"size", BMO_OP_SLOT_FLT}, /* size of the cube */ | ||||
| {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ | {"matrix", BMO_OP_SLOT_MAT}, /* matrix to multiply the new geometry with */ | ||||
| {"calc_uvs", BMO_OP_SLOT_BOOL}, /* calculate default UVs */ | |||||
| {{'\0'}}, | {{'\0'}}, | ||||
| }, | }, | ||||
| /* slots_out */ | /* slots_out */ | ||||
| {{"verts.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}}, /* output verts */ | {{"verts.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT}}, /* output verts */ | ||||
| {{'\0'}}, | {{'\0'}}, | ||||
| }, | }, | ||||
| bmo_create_cube_exec, | bmo_create_cube_exec, | ||||
| BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH, | BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH, | ||||
| ▲ Show 20 Lines • Show All 342 Lines • Show Last 20 Lines | |||||