Merged changes in the trunk up to revision 50257.
Conflicts resolved: source/blender/blenkernel/CMakeLists.txt
This commit is contained in:
@@ -97,9 +97,9 @@ static PyObject *bpy_bm_from_edit_mesh(PyObject *UNUSED(self), PyObject *value)
|
||||
}
|
||||
|
||||
static struct PyMethodDef BPy_BM_methods[] = {
|
||||
{"new", (PyCFunction)bpy_bm_new, METH_NOARGS, bpy_bm_new_doc},
|
||||
{"from_edit_mesh", (PyCFunction)bpy_bm_from_edit_mesh, METH_O, bpy_bm_from_edit_mesh_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
{"new", (PyCFunction)bpy_bm_new, METH_NOARGS, bpy_bm_new_doc},
|
||||
{"from_edit_mesh", (PyCFunction)bpy_bm_from_edit_mesh, METH_O, bpy_bm_from_edit_mesh_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
PyDoc_STRVAR(BPy_BM_doc,
|
||||
|
||||
@@ -420,7 +420,7 @@ static PyObject *bpy_bmesh_fmod_getattro(PyObject *UNUSED(self), PyObject *pynam
|
||||
}
|
||||
|
||||
PyErr_Format(PyExc_AttributeError,
|
||||
"BMeshOpsModule: operator \"%.200s\" doesn't exist",
|
||||
"BMeshOpsModule: operator \"%.200s\" doesn't exist",
|
||||
name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -55,34 +55,34 @@
|
||||
|
||||
/* scene does not use BM_* flags. */
|
||||
PyC_FlagSet bpy_bm_scene_vert_edge_face_flags[] = {
|
||||
{1, "VERT"},
|
||||
{2, "EDGE"},
|
||||
{4, "FACE"},
|
||||
{0, NULL}
|
||||
{1, "VERT"},
|
||||
{2, "EDGE"},
|
||||
{4, "FACE"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
PyC_FlagSet bpy_bm_htype_vert_edge_face_flags[] = {
|
||||
{BM_VERT, "VERT"},
|
||||
{BM_EDGE, "EDGE"},
|
||||
{BM_FACE, "FACE"},
|
||||
{0, NULL}
|
||||
{BM_VERT, "VERT"},
|
||||
{BM_EDGE, "EDGE"},
|
||||
{BM_FACE, "FACE"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
PyC_FlagSet bpy_bm_htype_all_flags[] = {
|
||||
{BM_VERT, "VERT"},
|
||||
{BM_LOOP, "EDGE"},
|
||||
{BM_FACE, "FACE"},
|
||||
{BM_LOOP, "LOOP"},
|
||||
{0, NULL}
|
||||
{BM_VERT, "VERT"},
|
||||
{BM_LOOP, "EDGE"},
|
||||
{BM_FACE, "FACE"},
|
||||
{BM_LOOP, "LOOP"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
PyC_FlagSet bpy_bm_hflag_all_flags[] = {
|
||||
{BM_ELEM_SELECT, "SELECT"},
|
||||
{BM_ELEM_HIDDEN, "HIDE"},
|
||||
{BM_ELEM_SEAM, "SEAM"},
|
||||
{BM_ELEM_SMOOTH, "SMOOTH"},
|
||||
{BM_ELEM_TAG, "TAG"},
|
||||
{0, NULL}
|
||||
{BM_ELEM_SELECT, "SELECT"},
|
||||
{BM_ELEM_HIDDEN, "HIDE"},
|
||||
{BM_ELEM_SEAM, "SEAM"},
|
||||
{BM_ELEM_SMOOTH, "SMOOTH"},
|
||||
{BM_ELEM_TAG, "TAG"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
/* py-type definitions
|
||||
@@ -556,131 +556,131 @@ static PyObject *bpy_bmelemseq_layers_get(BPy_BMElemSeq *self, void *htype)
|
||||
}
|
||||
|
||||
static PyGetSetDef bpy_bmesh_getseters[] = {
|
||||
{(char *)"verts", (getter)bpy_bmvertseq_get, (setter)NULL, (char *)bpy_bmvertseq_doc, NULL},
|
||||
{(char *)"edges", (getter)bpy_bmedgeseq_get, (setter)NULL, (char *)bpy_bmedgeseq_doc, NULL},
|
||||
{(char *)"faces", (getter)bpy_bmfaceseq_get, (setter)NULL, (char *)bpy_bmfaceseq_doc, NULL},
|
||||
{(char *)"loops", (getter)bpy_bmloopseq_get, (setter)NULL, (char *)bpy_bmloopseq_doc, NULL},
|
||||
{(char *)"select_mode", (getter)bpy_bmesh_select_mode_get, (setter)bpy_bmesh_select_mode_set, (char *)bpy_bmesh_select_mode_doc, NULL},
|
||||
{(char *)"verts", (getter)bpy_bmvertseq_get, (setter)NULL, (char *)bpy_bmvertseq_doc, NULL},
|
||||
{(char *)"edges", (getter)bpy_bmedgeseq_get, (setter)NULL, (char *)bpy_bmedgeseq_doc, NULL},
|
||||
{(char *)"faces", (getter)bpy_bmfaceseq_get, (setter)NULL, (char *)bpy_bmfaceseq_doc, NULL},
|
||||
{(char *)"loops", (getter)bpy_bmloopseq_get, (setter)NULL, (char *)bpy_bmloopseq_doc, NULL},
|
||||
{(char *)"select_mode", (getter)bpy_bmesh_select_mode_get, (setter)bpy_bmesh_select_mode_set, (char *)bpy_bmesh_select_mode_doc, NULL},
|
||||
|
||||
{(char *)"select_history", (getter)bpy_bmesh_select_history_get, (setter)bpy_bmesh_select_history_set, (char *)bpy_bmesh_select_history_doc, NULL},
|
||||
{(char *)"select_history", (getter)bpy_bmesh_select_history_get, (setter)bpy_bmesh_select_history_set, (char *)bpy_bmesh_select_history_doc, NULL},
|
||||
|
||||
/* readonly checks */
|
||||
{(char *)"is_wrapped", (getter)bpy_bmesh_is_wrapped_get, (setter)NULL, (char *)bpy_bmesh_is_wrapped_doc, NULL}, /* as with mathutils */
|
||||
{(char *)"is_valid", (getter)bpy_bm_is_valid_get, (setter)NULL, (char *)bpy_bm_is_valid_doc, NULL},
|
||||
/* readonly checks */
|
||||
{(char *)"is_wrapped", (getter)bpy_bmesh_is_wrapped_get, (setter)NULL, (char *)bpy_bmesh_is_wrapped_doc, NULL}, /* as with mathutils */
|
||||
{(char *)"is_valid", (getter)bpy_bm_is_valid_get, (setter)NULL, (char *)bpy_bm_is_valid_doc, NULL},
|
||||
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
static PyGetSetDef bpy_bmvert_getseters[] = {
|
||||
/* generic */
|
||||
{(char *)"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT},
|
||||
{(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN},
|
||||
{(char *)"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG},
|
||||
{(char *)"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, (char *)bpy_bm_elem_index_doc, NULL},
|
||||
/* generic */
|
||||
{(char *)"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT},
|
||||
{(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN},
|
||||
{(char *)"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG},
|
||||
{(char *)"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, (char *)bpy_bm_elem_index_doc, NULL},
|
||||
|
||||
{(char *)"co", (getter)bpy_bmvert_co_get, (setter)bpy_bmvert_co_set, (char *)bpy_bmvert_co_doc, NULL},
|
||||
{(char *)"normal", (getter)bpy_bmvert_normal_get, (setter)bpy_bmvert_normal_set, (char *)bpy_bmvert_normal_doc, NULL},
|
||||
{(char *)"co", (getter)bpy_bmvert_co_get, (setter)bpy_bmvert_co_set, (char *)bpy_bmvert_co_doc, NULL},
|
||||
{(char *)"normal", (getter)bpy_bmvert_normal_get, (setter)bpy_bmvert_normal_set, (char *)bpy_bmvert_normal_doc, NULL},
|
||||
|
||||
/* connectivity data */
|
||||
{(char *)"link_edges", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmvert_link_edges_doc, (void *)BM_EDGES_OF_VERT},
|
||||
{(char *)"link_faces", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmvert_link_faces_doc, (void *)BM_FACES_OF_VERT},
|
||||
{(char *)"link_loops", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmvert_link_loops_doc, (void *)BM_LOOPS_OF_VERT},
|
||||
/* connectivity data */
|
||||
{(char *)"link_edges", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmvert_link_edges_doc, (void *)BM_EDGES_OF_VERT},
|
||||
{(char *)"link_faces", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmvert_link_faces_doc, (void *)BM_FACES_OF_VERT},
|
||||
{(char *)"link_loops", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmvert_link_loops_doc, (void *)BM_LOOPS_OF_VERT},
|
||||
|
||||
/* readonly checks */
|
||||
{(char *)"is_manifold", (getter)bpy_bmvert_is_manifold_get, (setter)NULL, (char *)bpy_bmvert_is_manifold_doc, NULL},
|
||||
{(char *)"is_wire", (getter)bpy_bmvert_is_wire_get, (setter)NULL, (char *)bpy_bmvert_is_wire_doc, NULL},
|
||||
{(char *)"is_valid", (getter)bpy_bm_is_valid_get, (setter)NULL, (char *)bpy_bm_is_valid_doc, NULL},
|
||||
/* readonly checks */
|
||||
{(char *)"is_manifold", (getter)bpy_bmvert_is_manifold_get, (setter)NULL, (char *)bpy_bmvert_is_manifold_doc, NULL},
|
||||
{(char *)"is_wire", (getter)bpy_bmvert_is_wire_get, (setter)NULL, (char *)bpy_bmvert_is_wire_doc, NULL},
|
||||
{(char *)"is_valid", (getter)bpy_bm_is_valid_get, (setter)NULL, (char *)bpy_bm_is_valid_doc, NULL},
|
||||
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
static PyGetSetDef bpy_bmedge_getseters[] = {
|
||||
/* generic */
|
||||
{(char *)"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT},
|
||||
{(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN},
|
||||
{(char *)"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG},
|
||||
{(char *)"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, (char *)bpy_bm_elem_index_doc, NULL},
|
||||
/* generic */
|
||||
{(char *)"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT},
|
||||
{(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN},
|
||||
{(char *)"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG},
|
||||
{(char *)"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, (char *)bpy_bm_elem_index_doc, NULL},
|
||||
|
||||
{(char *)"smooth", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_smooth_doc, (void *)BM_ELEM_SMOOTH},
|
||||
{(char *)"seam", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_seam_doc, (void *)BM_ELEM_SEAM},
|
||||
{(char *)"smooth", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_smooth_doc, (void *)BM_ELEM_SMOOTH},
|
||||
{(char *)"seam", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_seam_doc, (void *)BM_ELEM_SEAM},
|
||||
|
||||
/* connectivity data */
|
||||
{(char *)"verts", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmedge_verts_doc, (void *)BM_VERTS_OF_EDGE},
|
||||
/* connectivity data */
|
||||
{(char *)"verts", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmedge_verts_doc, (void *)BM_VERTS_OF_EDGE},
|
||||
|
||||
{(char *)"link_faces", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmedge_link_faces_doc, (void *)BM_FACES_OF_EDGE},
|
||||
{(char *)"link_loops", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmedge_link_loops_doc, (void *)BM_LOOPS_OF_EDGE},
|
||||
{(char *)"link_faces", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmedge_link_faces_doc, (void *)BM_FACES_OF_EDGE},
|
||||
{(char *)"link_loops", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmedge_link_loops_doc, (void *)BM_LOOPS_OF_EDGE},
|
||||
|
||||
/* readonly checks */
|
||||
{(char *)"is_manifold", (getter)bpy_bmedge_is_manifold_get, (setter)NULL, (char *)bpy_bmedge_is_manifold_doc, NULL},
|
||||
{(char *)"is_wire", (getter)bpy_bmedge_is_wire_get, (setter)NULL, (char *)bpy_bmedge_is_wire_doc, NULL},
|
||||
{(char *)"is_boundary", (getter)bpy_bmedge_is_boundary_get, (setter)NULL, (char *)bpy_bmedge_is_boundary_doc, NULL},
|
||||
{(char *)"is_valid", (getter)bpy_bm_is_valid_get, (setter)NULL, (char *)bpy_bm_is_valid_doc, NULL},
|
||||
/* readonly checks */
|
||||
{(char *)"is_manifold", (getter)bpy_bmedge_is_manifold_get, (setter)NULL, (char *)bpy_bmedge_is_manifold_doc, NULL},
|
||||
{(char *)"is_wire", (getter)bpy_bmedge_is_wire_get, (setter)NULL, (char *)bpy_bmedge_is_wire_doc, NULL},
|
||||
{(char *)"is_boundary", (getter)bpy_bmedge_is_boundary_get, (setter)NULL, (char *)bpy_bmedge_is_boundary_doc, NULL},
|
||||
{(char *)"is_valid", (getter)bpy_bm_is_valid_get, (setter)NULL, (char *)bpy_bm_is_valid_doc, NULL},
|
||||
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
static PyGetSetDef bpy_bmface_getseters[] = {
|
||||
/* generic */
|
||||
{(char *)"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT},
|
||||
{(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN},
|
||||
{(char *)"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG},
|
||||
{(char *)"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, (char *)bpy_bm_elem_index_doc, NULL},
|
||||
/* generic */
|
||||
{(char *)"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT},
|
||||
{(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN},
|
||||
{(char *)"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG},
|
||||
{(char *)"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, (char *)bpy_bm_elem_index_doc, NULL},
|
||||
|
||||
{(char *)"smooth", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_smooth_doc, (void *)BM_ELEM_SMOOTH},
|
||||
{(char *)"smooth", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_smooth_doc, (void *)BM_ELEM_SMOOTH},
|
||||
|
||||
{(char *)"normal", (getter)bpy_bmface_normal_get, (setter)bpy_bmface_normal_set, (char *)bpy_bmface_normal_doc, NULL},
|
||||
{(char *)"normal", (getter)bpy_bmface_normal_get, (setter)bpy_bmface_normal_set, (char *)bpy_bmface_normal_doc, NULL},
|
||||
|
||||
{(char *)"material_index", (getter)bpy_bmface_material_index_get, (setter)bpy_bmface_material_index_set, (char *)bpy_bmface_material_index_doc, NULL},
|
||||
{(char *)"material_index", (getter)bpy_bmface_material_index_get, (setter)bpy_bmface_material_index_set, (char *)bpy_bmface_material_index_doc, NULL},
|
||||
|
||||
/* connectivity data */
|
||||
{(char *)"verts", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmface_verts_doc, (void *)BM_VERTS_OF_FACE},
|
||||
{(char *)"edges", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmface_edges_doc, (void *)BM_EDGES_OF_FACE},
|
||||
{(char *)"loops", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmface_loops_doc, (void *)BM_LOOPS_OF_FACE},
|
||||
/* connectivity data */
|
||||
{(char *)"verts", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmface_verts_doc, (void *)BM_VERTS_OF_FACE},
|
||||
{(char *)"edges", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmface_edges_doc, (void *)BM_EDGES_OF_FACE},
|
||||
{(char *)"loops", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmface_loops_doc, (void *)BM_LOOPS_OF_FACE},
|
||||
|
||||
/* readonly checks */
|
||||
{(char *)"is_valid", (getter)bpy_bm_is_valid_get, (setter)NULL, (char *)bpy_bm_is_valid_doc, NULL},
|
||||
/* readonly checks */
|
||||
{(char *)"is_valid", (getter)bpy_bm_is_valid_get, (setter)NULL, (char *)bpy_bm_is_valid_doc, NULL},
|
||||
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
static PyGetSetDef bpy_bmloop_getseters[] = {
|
||||
/* generic */
|
||||
// flags are available but not used for loops.
|
||||
// {(char *)"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT},
|
||||
// {(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN},
|
||||
{(char *)"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG},
|
||||
{(char *)"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, (char *)bpy_bm_elem_index_doc, NULL},
|
||||
/* generic */
|
||||
// flags are available but not used for loops.
|
||||
// {(char *)"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT},
|
||||
// {(char *)"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN},
|
||||
{(char *)"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, (char *)bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG},
|
||||
{(char *)"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, (char *)bpy_bm_elem_index_doc, NULL},
|
||||
|
||||
{(char *)"vert", (getter)bpy_bmloop_vert_get, (setter)NULL, (char *)bpy_bmloop_vert_doc, NULL},
|
||||
{(char *)"edge", (getter)bpy_bmloop_edge_get, (setter)NULL, (char *)bpy_bmloop_edge_doc, NULL},
|
||||
{(char *)"face", (getter)bpy_bmloop_face_get, (setter)NULL, (char *)bpy_bmloop_face_doc, NULL},
|
||||
{(char *)"vert", (getter)bpy_bmloop_vert_get, (setter)NULL, (char *)bpy_bmloop_vert_doc, NULL},
|
||||
{(char *)"edge", (getter)bpy_bmloop_edge_get, (setter)NULL, (char *)bpy_bmloop_edge_doc, NULL},
|
||||
{(char *)"face", (getter)bpy_bmloop_face_get, (setter)NULL, (char *)bpy_bmloop_face_doc, NULL},
|
||||
|
||||
/* connectivity data */
|
||||
{(char *)"link_loops", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmloops_link_loops_doc, (void *)BM_LOOPS_OF_LOOP},
|
||||
{(char *)"link_loop_next", (getter)bpy_bmloop_link_loop_next_get, (setter)NULL, (char *)bpy_bmloop_link_loop_next_doc, NULL},
|
||||
{(char *)"link_loop_prev", (getter)bpy_bmloop_link_loop_prev_get, (setter)NULL, (char *)bpy_bmloop_link_loop_prev_doc, NULL},
|
||||
/* connectivity data */
|
||||
{(char *)"link_loops", (getter)bpy_bmelemseq_elem_get, (setter)NULL, (char *)bpy_bmloops_link_loops_doc, (void *)BM_LOOPS_OF_LOOP},
|
||||
{(char *)"link_loop_next", (getter)bpy_bmloop_link_loop_next_get, (setter)NULL, (char *)bpy_bmloop_link_loop_next_doc, NULL},
|
||||
{(char *)"link_loop_prev", (getter)bpy_bmloop_link_loop_prev_get, (setter)NULL, (char *)bpy_bmloop_link_loop_prev_doc, NULL},
|
||||
|
||||
/* readonly checks */
|
||||
{(char *)"is_valid", (getter)bpy_bm_is_valid_get, (setter)NULL, (char *)bpy_bm_is_valid_doc, NULL},
|
||||
/* readonly checks */
|
||||
{(char *)"is_valid", (getter)bpy_bm_is_valid_get, (setter)NULL, (char *)bpy_bm_is_valid_doc, NULL},
|
||||
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
static PyGetSetDef bpy_bmvertseq_getseters[] = {
|
||||
{(char *)"layers", (getter)bpy_bmelemseq_layers_get, (setter)NULL, (char *)bpy_bmelemseq_layers_doc, (void *)BM_VERT},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{(char *)"layers", (getter)bpy_bmelemseq_layers_get, (setter)NULL, (char *)bpy_bmelemseq_layers_doc, (void *)BM_VERT},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
static PyGetSetDef bpy_bmedgeseq_getseters[] = {
|
||||
{(char *)"layers", (getter)bpy_bmelemseq_layers_get, (setter)NULL, (char *)bpy_bmelemseq_layers_doc, (void *)BM_EDGE},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{(char *)"layers", (getter)bpy_bmelemseq_layers_get, (setter)NULL, (char *)bpy_bmelemseq_layers_doc, (void *)BM_EDGE},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
static PyGetSetDef bpy_bmfaceseq_getseters[] = {
|
||||
{(char *)"layers", (getter)bpy_bmelemseq_layers_get, (setter)NULL, (char *)bpy_bmelemseq_layers_doc, (void *)BM_FACE},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{(char *)"layers", (getter)bpy_bmelemseq_layers_get, (setter)NULL, (char *)bpy_bmelemseq_layers_doc, (void *)BM_FACE},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
static PyGetSetDef bpy_bmloopseq_getseters[] = {
|
||||
{(char *)"layers", (getter)bpy_bmelemseq_layers_get, (setter)NULL, (char *)bpy_bmelemseq_layers_doc, (void *)BM_LOOP},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{(char *)"layers", (getter)bpy_bmelemseq_layers_get, (setter)NULL, (char *)bpy_bmelemseq_layers_doc, (void *)BM_LOOP},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
|
||||
@@ -2159,12 +2159,14 @@ static PyObject *bpy_bmelemseq_sort(BPy_BMElemSeq *self, PyObject *args, PyObjec
|
||||
"|Oi:BMElemSeq.sort",
|
||||
(char **)kwlist,
|
||||
&keyfunc, &reverse))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyfunc != NULL && !PyCallable_Check(keyfunc)) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"the 'key' argument is not a callable object");
|
||||
"the 'key' argument is not a callable object");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -2278,129 +2280,129 @@ static PyObject *bpy_bmelemseq_sort(BPy_BMElemSeq *self, PyObject *args, PyObjec
|
||||
}
|
||||
|
||||
static struct PyMethodDef bpy_bmesh_methods[] = {
|
||||
/* utility */
|
||||
{"copy", (PyCFunction)bpy_bmesh_copy, METH_NOARGS, bpy_bmesh_copy_doc},
|
||||
{"clear", (PyCFunction)bpy_bmesh_clear, METH_NOARGS, bpy_bmesh_clear_doc},
|
||||
{"free", (PyCFunction)bpy_bmesh_free, METH_NOARGS, bpy_bmesh_free_doc},
|
||||
/* utility */
|
||||
{"copy", (PyCFunction)bpy_bmesh_copy, METH_NOARGS, bpy_bmesh_copy_doc},
|
||||
{"clear", (PyCFunction)bpy_bmesh_clear, METH_NOARGS, bpy_bmesh_clear_doc},
|
||||
{"free", (PyCFunction)bpy_bmesh_free, METH_NOARGS, bpy_bmesh_free_doc},
|
||||
|
||||
/* conversion */
|
||||
{"from_object", (PyCFunction)bpy_bmesh_from_object, METH_VARARGS | METH_KEYWORDS, bpy_bmesh_from_object_doc},
|
||||
{"from_mesh", (PyCFunction)bpy_bmesh_from_mesh, METH_VARARGS | METH_KEYWORDS, bpy_bmesh_from_mesh_doc},
|
||||
{"to_mesh", (PyCFunction)bpy_bmesh_to_mesh, METH_VARARGS, bpy_bmesh_to_mesh_doc},
|
||||
/* conversion */
|
||||
{"from_object", (PyCFunction)bpy_bmesh_from_object, METH_VARARGS | METH_KEYWORDS, bpy_bmesh_from_object_doc},
|
||||
{"from_mesh", (PyCFunction)bpy_bmesh_from_mesh, METH_VARARGS | METH_KEYWORDS, bpy_bmesh_from_mesh_doc},
|
||||
{"to_mesh", (PyCFunction)bpy_bmesh_to_mesh, METH_VARARGS, bpy_bmesh_to_mesh_doc},
|
||||
|
||||
/* meshdata */
|
||||
{"select_flush_mode", (PyCFunction)bpy_bmesh_select_flush_mode, METH_NOARGS, bpy_bmesh_select_flush_mode_doc},
|
||||
{"select_flush", (PyCFunction)bpy_bmesh_select_flush, METH_O, bpy_bmesh_select_flush_doc},
|
||||
{"normal_update", (PyCFunction)bpy_bmesh_normal_update, METH_VARARGS, bpy_bmesh_normal_update_doc},
|
||||
{"transform", (PyCFunction)bpy_bmesh_transform, METH_VARARGS | METH_KEYWORDS, bpy_bmesh_transform_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
/* meshdata */
|
||||
{"select_flush_mode", (PyCFunction)bpy_bmesh_select_flush_mode, METH_NOARGS, bpy_bmesh_select_flush_mode_doc},
|
||||
{"select_flush", (PyCFunction)bpy_bmesh_select_flush, METH_O, bpy_bmesh_select_flush_doc},
|
||||
{"normal_update", (PyCFunction)bpy_bmesh_normal_update, METH_VARARGS, bpy_bmesh_normal_update_doc},
|
||||
{"transform", (PyCFunction)bpy_bmesh_transform, METH_VARARGS | METH_KEYWORDS, bpy_bmesh_transform_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
static struct PyMethodDef bpy_bmvert_methods[] = {
|
||||
{"select_set", (PyCFunction)bpy_bm_elem_select_set, METH_O, bpy_bm_elem_select_set_doc},
|
||||
{"hide_set", (PyCFunction)bpy_bm_elem_hide_set, METH_O, bpy_bm_elem_hide_set_doc},
|
||||
{"copy_from", (PyCFunction)bpy_bm_elem_copy_from, METH_O, bpy_bm_elem_copy_from_doc},
|
||||
{"copy_from_face_interp", (PyCFunction)bpy_bmvert_copy_from_face_interp, METH_VARARGS, bpy_bmvert_copy_from_face_interp_doc},
|
||||
{"copy_from_vert_interp", (PyCFunction)bpy_bmvert_copy_from_vert_interp, METH_VARARGS, bpy_bmvert_copy_from_vert_interp_doc},
|
||||
{"select_set", (PyCFunction)bpy_bm_elem_select_set, METH_O, bpy_bm_elem_select_set_doc},
|
||||
{"hide_set", (PyCFunction)bpy_bm_elem_hide_set, METH_O, bpy_bm_elem_hide_set_doc},
|
||||
{"copy_from", (PyCFunction)bpy_bm_elem_copy_from, METH_O, bpy_bm_elem_copy_from_doc},
|
||||
{"copy_from_face_interp", (PyCFunction)bpy_bmvert_copy_from_face_interp, METH_VARARGS, bpy_bmvert_copy_from_face_interp_doc},
|
||||
{"copy_from_vert_interp", (PyCFunction)bpy_bmvert_copy_from_vert_interp, METH_VARARGS, bpy_bmvert_copy_from_vert_interp_doc},
|
||||
|
||||
{"calc_vert_angle", (PyCFunction)bpy_bmvert_calc_edge_angle, METH_NOARGS, bpy_bmvert_calc_edge_angle_doc},
|
||||
{"calc_shell_factor", (PyCFunction)bpy_bmvert_calc_shell_factor, METH_NOARGS, bpy_bmvert_calc_shell_factor_doc},
|
||||
{"calc_vert_angle", (PyCFunction)bpy_bmvert_calc_edge_angle, METH_NOARGS, bpy_bmvert_calc_edge_angle_doc},
|
||||
{"calc_shell_factor", (PyCFunction)bpy_bmvert_calc_shell_factor, METH_NOARGS, bpy_bmvert_calc_shell_factor_doc},
|
||||
|
||||
{"normal_update", (PyCFunction)bpy_bmvert_normal_update, METH_NOARGS, bpy_bmvert_normal_update_doc},
|
||||
{"normal_update", (PyCFunction)bpy_bmvert_normal_update, METH_NOARGS, bpy_bmvert_normal_update_doc},
|
||||
|
||||
{NULL, NULL, 0, NULL}
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
static struct PyMethodDef bpy_bmedge_methods[] = {
|
||||
{"select_set", (PyCFunction)bpy_bm_elem_select_set, METH_O, bpy_bm_elem_select_set_doc},
|
||||
{"hide_set", (PyCFunction)bpy_bm_elem_hide_set, METH_O, bpy_bm_elem_hide_set_doc},
|
||||
{"copy_from", (PyCFunction)bpy_bm_elem_copy_from, METH_O, bpy_bm_elem_copy_from_doc},
|
||||
{"select_set", (PyCFunction)bpy_bm_elem_select_set, METH_O, bpy_bm_elem_select_set_doc},
|
||||
{"hide_set", (PyCFunction)bpy_bm_elem_hide_set, METH_O, bpy_bm_elem_hide_set_doc},
|
||||
{"copy_from", (PyCFunction)bpy_bm_elem_copy_from, METH_O, bpy_bm_elem_copy_from_doc},
|
||||
|
||||
{"other_vert", (PyCFunction)bpy_bmedge_other_vert, METH_O, bpy_bmedge_other_vert_doc},
|
||||
{"other_vert", (PyCFunction)bpy_bmedge_other_vert, METH_O, bpy_bmedge_other_vert_doc},
|
||||
|
||||
{"calc_length", (PyCFunction)bpy_bmedge_calc_length, METH_NOARGS, bpy_bmedge_calc_length_doc},
|
||||
{"calc_face_angle", (PyCFunction)bpy_bmedge_calc_face_angle, METH_NOARGS, bpy_bmedge_calc_face_angle_doc},
|
||||
{"calc_tangent", (PyCFunction)bpy_bmedge_calc_tangent, METH_VARARGS, bpy_bmedge_calc_tangent_doc},
|
||||
{"calc_length", (PyCFunction)bpy_bmedge_calc_length, METH_NOARGS, bpy_bmedge_calc_length_doc},
|
||||
{"calc_face_angle", (PyCFunction)bpy_bmedge_calc_face_angle, METH_NOARGS, bpy_bmedge_calc_face_angle_doc},
|
||||
{"calc_tangent", (PyCFunction)bpy_bmedge_calc_tangent, METH_VARARGS, bpy_bmedge_calc_tangent_doc},
|
||||
|
||||
{"normal_update", (PyCFunction)bpy_bmedge_normal_update, METH_NOARGS, bpy_bmedge_normal_update_doc},
|
||||
{"normal_update", (PyCFunction)bpy_bmedge_normal_update, METH_NOARGS, bpy_bmedge_normal_update_doc},
|
||||
|
||||
{NULL, NULL, 0, NULL}
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
static struct PyMethodDef bpy_bmface_methods[] = {
|
||||
{"select_set", (PyCFunction)bpy_bm_elem_select_set, METH_O, bpy_bm_elem_select_set_doc},
|
||||
{"hide_set", (PyCFunction)bpy_bm_elem_hide_set, METH_O, bpy_bm_elem_hide_set_doc},
|
||||
{"select_set", (PyCFunction)bpy_bm_elem_select_set, METH_O, bpy_bm_elem_select_set_doc},
|
||||
{"hide_set", (PyCFunction)bpy_bm_elem_hide_set, METH_O, bpy_bm_elem_hide_set_doc},
|
||||
|
||||
{"copy_from", (PyCFunction)bpy_bm_elem_copy_from, METH_O, bpy_bm_elem_copy_from_doc},
|
||||
{"copy_from_face_interp", (PyCFunction)bpy_bmface_copy_from_face_interp, METH_O, bpy_bmface_copy_from_face_interp_doc},
|
||||
{"copy_from", (PyCFunction)bpy_bm_elem_copy_from, METH_O, bpy_bm_elem_copy_from_doc},
|
||||
{"copy_from_face_interp", (PyCFunction)bpy_bmface_copy_from_face_interp, METH_O, bpy_bmface_copy_from_face_interp_doc},
|
||||
|
||||
{"copy", (PyCFunction)bpy_bmface_copy, METH_VARARGS | METH_KEYWORDS, bpy_bmface_copy_doc},
|
||||
{"copy", (PyCFunction)bpy_bmface_copy, METH_VARARGS | METH_KEYWORDS, bpy_bmface_copy_doc},
|
||||
|
||||
{"calc_area", (PyCFunction)bpy_bmface_calc_area, METH_NOARGS, bpy_bmface_calc_area_doc},
|
||||
{"calc_perimeter", (PyCFunction)bpy_bmface_calc_perimeter, METH_NOARGS, bpy_bmface_calc_perimeter_doc},
|
||||
{"calc_center_median", (PyCFunction)bpy_bmface_calc_center_mean, METH_NOARGS, bpy_bmface_calc_center_mean_doc},
|
||||
{"calc_center_bounds", (PyCFunction)bpy_bmface_calc_center_bounds, METH_NOARGS, bpy_bmface_calc_center_bounds_doc},
|
||||
{"calc_area", (PyCFunction)bpy_bmface_calc_area, METH_NOARGS, bpy_bmface_calc_area_doc},
|
||||
{"calc_perimeter", (PyCFunction)bpy_bmface_calc_perimeter, METH_NOARGS, bpy_bmface_calc_perimeter_doc},
|
||||
{"calc_center_median", (PyCFunction)bpy_bmface_calc_center_mean, METH_NOARGS, bpy_bmface_calc_center_mean_doc},
|
||||
{"calc_center_bounds", (PyCFunction)bpy_bmface_calc_center_bounds, METH_NOARGS, bpy_bmface_calc_center_bounds_doc},
|
||||
|
||||
{"normal_update", (PyCFunction)bpy_bmface_normal_update, METH_NOARGS, bpy_bmface_normal_update_doc},
|
||||
{"normal_update", (PyCFunction)bpy_bmface_normal_update, METH_NOARGS, bpy_bmface_normal_update_doc},
|
||||
|
||||
{NULL, NULL, 0, NULL}
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
static struct PyMethodDef bpy_bmloop_methods[] = {
|
||||
{"copy_from", (PyCFunction)bpy_bm_elem_copy_from, METH_O, bpy_bm_elem_copy_from_doc},
|
||||
{"copy_from_face_interp", (PyCFunction)bpy_bmloop_copy_from_face_interp, METH_O, bpy_bmloop_copy_from_face_interp_doc},
|
||||
{"copy_from", (PyCFunction)bpy_bm_elem_copy_from, METH_O, bpy_bm_elem_copy_from_doc},
|
||||
{"copy_from_face_interp", (PyCFunction)bpy_bmloop_copy_from_face_interp, METH_O, bpy_bmloop_copy_from_face_interp_doc},
|
||||
|
||||
{"calc_angle", (PyCFunction)bpy_bmloop_calc_angle, METH_NOARGS, bpy_bmloop_calc_angle_doc},
|
||||
{"calc_normal", (PyCFunction)bpy_bmloop_calc_normal, METH_NOARGS, bpy_bmloop_calc_normal_doc},
|
||||
{"calc_tangent", (PyCFunction)bpy_bmloop_calc_tangent, METH_NOARGS, bpy_bmloop_calc_tangent_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
{"calc_angle", (PyCFunction)bpy_bmloop_calc_angle, METH_NOARGS, bpy_bmloop_calc_angle_doc},
|
||||
{"calc_normal", (PyCFunction)bpy_bmloop_calc_normal, METH_NOARGS, bpy_bmloop_calc_normal_doc},
|
||||
{"calc_tangent", (PyCFunction)bpy_bmloop_calc_tangent, METH_NOARGS, bpy_bmloop_calc_tangent_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
static struct PyMethodDef bpy_bmelemseq_methods[] = {
|
||||
/* odd function, initializes index values */
|
||||
{"index_update", (PyCFunction)bpy_bmelemseq_index_update, METH_NOARGS, bpy_bmelemseq_index_update_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
/* odd function, initializes index values */
|
||||
{"index_update", (PyCFunction)bpy_bmelemseq_index_update, METH_NOARGS, bpy_bmelemseq_index_update_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
static struct PyMethodDef bpy_bmvertseq_methods[] = {
|
||||
{"new", (PyCFunction)bpy_bmvertseq_new, METH_VARARGS, bpy_bmvertseq_new_doc},
|
||||
{"remove", (PyCFunction)bpy_bmvertseq_remove, METH_O, bpy_bmvertseq_remove_doc},
|
||||
{"new", (PyCFunction)bpy_bmvertseq_new, METH_VARARGS, bpy_bmvertseq_new_doc},
|
||||
{"remove", (PyCFunction)bpy_bmvertseq_remove, METH_O, bpy_bmvertseq_remove_doc},
|
||||
|
||||
/* odd function, initializes index values */
|
||||
{"index_update", (PyCFunction)bpy_bmelemseq_index_update, METH_NOARGS, bpy_bmelemseq_index_update_doc},
|
||||
{"sort", (PyCFunction)bpy_bmelemseq_sort, METH_VARARGS | METH_KEYWORDS, bpy_bmelemseq_sort_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
/* odd function, initializes index values */
|
||||
{"index_update", (PyCFunction)bpy_bmelemseq_index_update, METH_NOARGS, bpy_bmelemseq_index_update_doc},
|
||||
{"sort", (PyCFunction)bpy_bmelemseq_sort, METH_VARARGS | METH_KEYWORDS, bpy_bmelemseq_sort_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
static struct PyMethodDef bpy_bmedgeseq_methods[] = {
|
||||
{"new", (PyCFunction)bpy_bmedgeseq_new, METH_VARARGS, bpy_bmedgeseq_new_doc},
|
||||
{"remove", (PyCFunction)bpy_bmedgeseq_remove, METH_O, bpy_bmedgeseq_remove_doc},
|
||||
/* 'bpy_bmelemseq_get' for different purpose */
|
||||
{"get", (PyCFunction)bpy_bmedgeseq_get__method, METH_VARARGS, bpy_bmedgeseq_get__method_doc},
|
||||
{"new", (PyCFunction)bpy_bmedgeseq_new, METH_VARARGS, bpy_bmedgeseq_new_doc},
|
||||
{"remove", (PyCFunction)bpy_bmedgeseq_remove, METH_O, bpy_bmedgeseq_remove_doc},
|
||||
/* 'bpy_bmelemseq_get' for different purpose */
|
||||
{"get", (PyCFunction)bpy_bmedgeseq_get__method, METH_VARARGS, bpy_bmedgeseq_get__method_doc},
|
||||
|
||||
/* odd function, initializes index values */
|
||||
{"index_update", (PyCFunction)bpy_bmelemseq_index_update, METH_NOARGS, bpy_bmelemseq_index_update_doc},
|
||||
{"sort", (PyCFunction)bpy_bmelemseq_sort, METH_VARARGS | METH_KEYWORDS, bpy_bmelemseq_sort_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
/* odd function, initializes index values */
|
||||
{"index_update", (PyCFunction)bpy_bmelemseq_index_update, METH_NOARGS, bpy_bmelemseq_index_update_doc},
|
||||
{"sort", (PyCFunction)bpy_bmelemseq_sort, METH_VARARGS | METH_KEYWORDS, bpy_bmelemseq_sort_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
static struct PyMethodDef bpy_bmfaceseq_methods[] = {
|
||||
{"new", (PyCFunction)bpy_bmfaceseq_new, METH_VARARGS, bpy_bmfaceseq_new_doc},
|
||||
{"remove", (PyCFunction)bpy_bmfaceseq_remove, METH_O, bpy_bmfaceseq_remove_doc},
|
||||
/* 'bpy_bmelemseq_get' for different purpose */
|
||||
{"get", (PyCFunction)bpy_bmfaceseq_get__method, METH_VARARGS, bpy_bmfaceseq_get__method_doc},
|
||||
{"new", (PyCFunction)bpy_bmfaceseq_new, METH_VARARGS, bpy_bmfaceseq_new_doc},
|
||||
{"remove", (PyCFunction)bpy_bmfaceseq_remove, METH_O, bpy_bmfaceseq_remove_doc},
|
||||
/* 'bpy_bmelemseq_get' for different purpose */
|
||||
{"get", (PyCFunction)bpy_bmfaceseq_get__method, METH_VARARGS, bpy_bmfaceseq_get__method_doc},
|
||||
|
||||
/* odd function, initializes index values */
|
||||
{"index_update", (PyCFunction)bpy_bmelemseq_index_update, METH_NOARGS, bpy_bmelemseq_index_update_doc},
|
||||
{"sort", (PyCFunction)bpy_bmelemseq_sort, METH_VARARGS | METH_KEYWORDS, bpy_bmelemseq_sort_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
/* odd function, initializes index values */
|
||||
{"index_update", (PyCFunction)bpy_bmelemseq_index_update, METH_NOARGS, bpy_bmelemseq_index_update_doc},
|
||||
{"sort", (PyCFunction)bpy_bmelemseq_sort, METH_VARARGS | METH_KEYWORDS, bpy_bmelemseq_sort_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
static struct PyMethodDef bpy_bmloopseq_methods[] = {
|
||||
/* odd function, initializes index values */
|
||||
/* no: index_update() function since we cant iterate over loops */
|
||||
/* no: sort() function since we cant iterate over loops */
|
||||
{NULL, NULL, 0, NULL}
|
||||
/* odd function, initializes index values */
|
||||
/* no: index_update() function since we cant iterate over loops */
|
||||
/* no: sort() function since we cant iterate over loops */
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
/* Sequences
|
||||
@@ -2635,29 +2637,29 @@ static int bpy_bmelem_ass_subscript(BPy_BMElem *self, BPy_BMLayerItem *key, PyOb
|
||||
}
|
||||
|
||||
static PySequenceMethods bpy_bmelemseq_as_sequence = {
|
||||
(lenfunc)bpy_bmelemseq_length, /* sq_length */
|
||||
NULL, /* sq_concat */
|
||||
NULL, /* sq_repeat */
|
||||
(ssizeargfunc)bpy_bmelemseq_subscript_int, /* sq_item */ /* Only set this so PySequence_Check() returns True */
|
||||
NULL, /* sq_slice */
|
||||
(ssizeobjargproc)NULL, /* sq_ass_item */
|
||||
NULL, /* *was* sq_ass_slice */
|
||||
(objobjproc)bpy_bmelemseq_contains, /* sq_contains */
|
||||
(binaryfunc) NULL, /* sq_inplace_concat */
|
||||
(ssizeargfunc) NULL, /* sq_inplace_repeat */
|
||||
(lenfunc)bpy_bmelemseq_length, /* sq_length */
|
||||
NULL, /* sq_concat */
|
||||
NULL, /* sq_repeat */
|
||||
(ssizeargfunc)bpy_bmelemseq_subscript_int, /* sq_item */ /* Only set this so PySequence_Check() returns True */
|
||||
NULL, /* sq_slice */
|
||||
(ssizeobjargproc)NULL, /* sq_ass_item */
|
||||
NULL, /* *was* sq_ass_slice */
|
||||
(objobjproc)bpy_bmelemseq_contains, /* sq_contains */
|
||||
(binaryfunc) NULL, /* sq_inplace_concat */
|
||||
(ssizeargfunc) NULL, /* sq_inplace_repeat */
|
||||
};
|
||||
|
||||
static PyMappingMethods bpy_bmelemseq_as_mapping = {
|
||||
(lenfunc)bpy_bmelemseq_length, /* mp_length */
|
||||
(binaryfunc)bpy_bmelemseq_subscript, /* mp_subscript */
|
||||
(objobjargproc)NULL, /* mp_ass_subscript */
|
||||
(lenfunc)bpy_bmelemseq_length, /* mp_length */
|
||||
(binaryfunc)bpy_bmelemseq_subscript, /* mp_subscript */
|
||||
(objobjargproc)NULL, /* mp_ass_subscript */
|
||||
};
|
||||
|
||||
/* for customdata access */
|
||||
static PyMappingMethods bpy_bm_elem_as_mapping = {
|
||||
(lenfunc)NULL, /* mp_length */ /* keep this empty, messes up 'if elem: ...' test */
|
||||
(binaryfunc)bpy_bmelem_subscript, /* mp_subscript */
|
||||
(objobjargproc)bpy_bmelem_ass_subscript, /* mp_ass_subscript */
|
||||
(lenfunc)NULL, /* mp_length */ /* keep this empty, messes up 'if elem: ...' test */
|
||||
(binaryfunc)bpy_bmelem_subscript, /* mp_subscript */
|
||||
(objobjargproc)bpy_bmelem_ass_subscript, /* mp_ass_subscript */
|
||||
};
|
||||
|
||||
/* Iterator
|
||||
@@ -3053,15 +3055,15 @@ void BPy_BM_init_types(void)
|
||||
* ********************* */
|
||||
|
||||
static struct PyModuleDef BPy_BM_types_module_def = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"bmesh.types", /* m_name */
|
||||
NULL, /* m_doc */
|
||||
0, /* m_size */
|
||||
NULL, /* m_methods */
|
||||
NULL, /* m_reload */
|
||||
NULL, /* m_traverse */
|
||||
NULL, /* m_clear */
|
||||
NULL, /* m_free */
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"bmesh.types", /* m_name */
|
||||
NULL, /* m_doc */
|
||||
0, /* m_size */
|
||||
NULL, /* m_methods */
|
||||
NULL, /* m_reload */
|
||||
NULL, /* m_traverse */
|
||||
NULL, /* m_clear */
|
||||
NULL, /* m_free */
|
||||
};
|
||||
|
||||
PyObject *BPyInit_bmesh_types(void)
|
||||
|
||||
@@ -175,64 +175,64 @@ static PyObject *bpy_bmlayeritem_name_get(BPy_BMLayerItem *self, void *UNUSED(fl
|
||||
}
|
||||
|
||||
static PyGetSetDef bpy_bmlayeraccess_vert_getseters[] = {
|
||||
{(char *)"deform", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__deform_doc, (void *)CD_MDEFORMVERT},
|
||||
{(char *)"deform", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__deform_doc, (void *)CD_MDEFORMVERT},
|
||||
|
||||
{(char *)"float", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__float_doc, (void *)CD_PROP_FLT},
|
||||
{(char *)"int", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__int_doc, (void *)CD_PROP_INT},
|
||||
{(char *)"string", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__string_doc, (void *)CD_PROP_STR},
|
||||
{(char *)"float", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__float_doc, (void *)CD_PROP_FLT},
|
||||
{(char *)"int", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__int_doc, (void *)CD_PROP_INT},
|
||||
{(char *)"string", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__string_doc, (void *)CD_PROP_STR},
|
||||
|
||||
{(char *)"shape", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__shape_doc, (void *)CD_SHAPEKEY},
|
||||
{(char *)"bevel_weight", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__bevel_weight_doc, (void *)CD_BWEIGHT},
|
||||
{(char *)"shape", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__shape_doc, (void *)CD_SHAPEKEY},
|
||||
{(char *)"bevel_weight", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__bevel_weight_doc, (void *)CD_BWEIGHT},
|
||||
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
static PyGetSetDef bpy_bmlayeraccess_edge_getseters[] = {
|
||||
{(char *)"float", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__float_doc, (void *)CD_PROP_FLT},
|
||||
{(char *)"int", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__int_doc, (void *)CD_PROP_INT},
|
||||
{(char *)"string", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__string_doc, (void *)CD_PROP_STR},
|
||||
{(char *)"float", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__float_doc, (void *)CD_PROP_FLT},
|
||||
{(char *)"int", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__int_doc, (void *)CD_PROP_INT},
|
||||
{(char *)"string", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__string_doc, (void *)CD_PROP_STR},
|
||||
|
||||
{(char *)"bevel_weight", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__bevel_weight_doc, (void *)CD_BWEIGHT},
|
||||
{(char *)"crease", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__crease_doc, (void *)CD_CREASE},
|
||||
{(char *)"bevel_weight", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__bevel_weight_doc, (void *)CD_BWEIGHT},
|
||||
{(char *)"crease", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__crease_doc, (void *)CD_CREASE},
|
||||
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
static PyGetSetDef bpy_bmlayeraccess_face_getseters[] = {
|
||||
{(char *)"float", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__float_doc, (void *)CD_PROP_FLT},
|
||||
{(char *)"int", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__int_doc, (void *)CD_PROP_INT},
|
||||
{(char *)"string", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__string_doc, (void *)CD_PROP_STR},
|
||||
{(char *)"float", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__float_doc, (void *)CD_PROP_FLT},
|
||||
{(char *)"int", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__int_doc, (void *)CD_PROP_INT},
|
||||
{(char *)"string", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__string_doc, (void *)CD_PROP_STR},
|
||||
|
||||
{(char *)"tex", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__tex_doc, (void *)CD_MTEXPOLY},
|
||||
{(char *)"tex", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__tex_doc, (void *)CD_MTEXPOLY},
|
||||
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
static PyGetSetDef bpy_bmlayeraccess_loop_getseters[] = {
|
||||
{(char *)"float", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__float_doc, (void *)CD_PROP_FLT},
|
||||
{(char *)"int", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__int_doc, (void *)CD_PROP_INT},
|
||||
{(char *)"string", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__string_doc, (void *)CD_PROP_STR},
|
||||
{(char *)"float", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__float_doc, (void *)CD_PROP_FLT},
|
||||
{(char *)"int", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__int_doc, (void *)CD_PROP_INT},
|
||||
{(char *)"string", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__string_doc, (void *)CD_PROP_STR},
|
||||
|
||||
{(char *)"uv", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__uv_doc, (void *)CD_MLOOPUV},
|
||||
{(char *)"color", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__color_doc, (void *)CD_MLOOPCOL},
|
||||
{(char *)"uv", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__uv_doc, (void *)CD_MLOOPUV},
|
||||
{(char *)"color", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, (char *)bpy_bmlayeraccess_collection__color_doc, (void *)CD_MLOOPCOL},
|
||||
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
|
||||
static PyGetSetDef bpy_bmlayercollection_getseters[] = {
|
||||
/* BMESH_TODO, make writeable */
|
||||
{(char *)"active", (getter)bpy_bmlayercollection_active_get, (setter)NULL, (char *)bpy_bmlayercollection_active_doc, NULL},
|
||||
{(char *)"is_singleton", (getter)bpy_bmlayercollection_is_singleton_get, (setter)NULL, (char *)bpy_bmlayercollection_is_singleton_doc, NULL},
|
||||
/* BMESH_TODO, make writeable */
|
||||
{(char *)"active", (getter)bpy_bmlayercollection_active_get, (setter)NULL, (char *)bpy_bmlayercollection_active_doc, NULL},
|
||||
{(char *)"is_singleton", (getter)bpy_bmlayercollection_is_singleton_get, (setter)NULL, (char *)bpy_bmlayercollection_is_singleton_doc, NULL},
|
||||
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
static PyGetSetDef bpy_bmlayeritem_getseters[] = {
|
||||
/* BMESH_TODO, make writeable */
|
||||
{(char *)"name", (getter)bpy_bmlayeritem_name_get, (setter)NULL, (char *)bpy_bmlayercollection_name_doc, NULL},
|
||||
/* BMESH_TODO, make writeable */
|
||||
{(char *)"name", (getter)bpy_bmlayeritem_name_get, (setter)NULL, (char *)bpy_bmlayercollection_name_doc, NULL},
|
||||
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
|
||||
@@ -556,20 +556,20 @@ static PyObject *bpy_bmlayercollection_get(BPy_BMLayerCollection *self, PyObject
|
||||
}
|
||||
|
||||
static struct PyMethodDef bpy_bmlayeritem_methods[] = {
|
||||
{"copy_from", (PyCFunction)bpy_bmlayeritem_copy_from, METH_O, bpy_bmlayeritem_copy_from_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
{"copy_from", (PyCFunction)bpy_bmlayeritem_copy_from, METH_O, bpy_bmlayeritem_copy_from_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
static struct PyMethodDef bpy_bmelemseq_methods[] = {
|
||||
{"verify", (PyCFunction)bpy_bmlayercollection_verify, METH_NOARGS, bpy_bmlayercollection_verify_doc},
|
||||
{"new", (PyCFunction)bpy_bmlayercollection_new, METH_VARARGS, bpy_bmlayercollection_new_doc},
|
||||
{"remove", (PyCFunction)bpy_bmlayercollection_remove, METH_O, bpy_bmlayercollection_remove_doc},
|
||||
{"verify", (PyCFunction)bpy_bmlayercollection_verify, METH_NOARGS, bpy_bmlayercollection_verify_doc},
|
||||
{"new", (PyCFunction)bpy_bmlayercollection_new, METH_VARARGS, bpy_bmlayercollection_new_doc},
|
||||
{"remove", (PyCFunction)bpy_bmlayercollection_remove, METH_O, bpy_bmlayercollection_remove_doc},
|
||||
|
||||
{"keys", (PyCFunction)bpy_bmlayercollection_keys, METH_NOARGS, bpy_bmlayercollection_keys_doc},
|
||||
{"values", (PyCFunction)bpy_bmlayercollection_values, METH_NOARGS, bpy_bmlayercollection_values_doc},
|
||||
{"items", (PyCFunction)bpy_bmlayercollection_items, METH_NOARGS, bpy_bmlayercollection_items_doc},
|
||||
{"get", (PyCFunction)bpy_bmlayercollection_get, METH_VARARGS, bpy_bmlayercollection_get_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
{"keys", (PyCFunction)bpy_bmlayercollection_keys, METH_NOARGS, bpy_bmlayercollection_keys_doc},
|
||||
{"values", (PyCFunction)bpy_bmlayercollection_values, METH_NOARGS, bpy_bmlayercollection_values_doc},
|
||||
{"items", (PyCFunction)bpy_bmlayercollection_items, METH_NOARGS, bpy_bmlayercollection_items_doc},
|
||||
{"get", (PyCFunction)bpy_bmlayercollection_get, METH_VARARGS, bpy_bmlayercollection_get_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
/* Sequences
|
||||
@@ -724,22 +724,22 @@ static int bpy_bmlayercollection_contains(BPy_BMLayerCollection *self, PyObject
|
||||
}
|
||||
|
||||
static PySequenceMethods bpy_bmlayercollection_as_sequence = {
|
||||
(lenfunc)bpy_bmlayercollection_length, /* sq_length */
|
||||
NULL, /* sq_concat */
|
||||
NULL, /* sq_repeat */
|
||||
(ssizeargfunc)bpy_bmlayercollection_subscript_int, /* sq_item */ /* Only set this so PySequence_Check() returns True */
|
||||
NULL, /* sq_slice */
|
||||
(ssizeobjargproc)NULL, /* sq_ass_item */
|
||||
NULL, /* *was* sq_ass_slice */
|
||||
(objobjproc)bpy_bmlayercollection_contains, /* sq_contains */
|
||||
(binaryfunc) NULL, /* sq_inplace_concat */
|
||||
(ssizeargfunc) NULL, /* sq_inplace_repeat */
|
||||
(lenfunc)bpy_bmlayercollection_length, /* sq_length */
|
||||
NULL, /* sq_concat */
|
||||
NULL, /* sq_repeat */
|
||||
(ssizeargfunc)bpy_bmlayercollection_subscript_int, /* sq_item */ /* Only set this so PySequence_Check() returns True */
|
||||
NULL, /* sq_slice */
|
||||
(ssizeobjargproc)NULL, /* sq_ass_item */
|
||||
NULL, /* *was* sq_ass_slice */
|
||||
(objobjproc)bpy_bmlayercollection_contains, /* sq_contains */
|
||||
(binaryfunc) NULL, /* sq_inplace_concat */
|
||||
(ssizeargfunc) NULL, /* sq_inplace_repeat */
|
||||
};
|
||||
|
||||
static PyMappingMethods bpy_bmlayercollection_as_mapping = {
|
||||
(lenfunc)bpy_bmlayercollection_length, /* mp_length */
|
||||
(binaryfunc)bpy_bmlayercollection_subscript, /* mp_subscript */
|
||||
(objobjargproc)NULL, /* mp_ass_subscript */
|
||||
(lenfunc)bpy_bmlayercollection_length, /* mp_length */
|
||||
(binaryfunc)bpy_bmlayercollection_subscript, /* mp_subscript */
|
||||
(objobjargproc)NULL, /* mp_ass_subscript */
|
||||
};
|
||||
|
||||
/* Iterator
|
||||
|
||||
@@ -91,10 +91,10 @@ static int bpy_bmtexpoly_image_set(BPy_BMTexPoly *self, PyObject *value, void *U
|
||||
}
|
||||
|
||||
static PyGetSetDef bpy_bmtexpoly_getseters[] = {
|
||||
/* attributes match rna_def_mtpoly */
|
||||
{(char *)"image", (getter)bpy_bmtexpoly_image_get, (setter)bpy_bmtexpoly_image_set, (char *)bpy_bmtexpoly_image_doc, NULL},
|
||||
/* attributes match rna_def_mtpoly */
|
||||
{(char *)"image", (getter)bpy_bmtexpoly_image_get, (setter)bpy_bmtexpoly_image_set, (char *)bpy_bmtexpoly_image_doc, NULL},
|
||||
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
PyTypeObject BPy_BMTexPoly_Type = {{{0}}}; /* bm.loops.layers.uv.active */
|
||||
@@ -201,13 +201,13 @@ static int bpy_bmloopuv_flag_set(BPy_BMLoopUV *self, PyObject *value, void *flag
|
||||
}
|
||||
|
||||
static PyGetSetDef bpy_bmloopuv_getseters[] = {
|
||||
/* attributes match rna_def_mloopuv */
|
||||
{(char *)"uv", (getter)bpy_bmloopuv_uv_get, (setter)bpy_bmloopuv_uv_set, (char *)bpy_bmloopuv_uv_doc, NULL},
|
||||
{(char *)"pin_uv", (getter)bpy_bmloopuv_flag_get, (setter)bpy_bmloopuv_flag_set, (char *)bpy_bmloopuv_flag__pin_uv_doc, (void *)MLOOPUV_PINNED},
|
||||
{(char *)"select", (getter)bpy_bmloopuv_flag_get, (setter)bpy_bmloopuv_flag_set, (char *)bpy_bmloopuv_flag__select_doc, (void *)MLOOPUV_VERTSEL},
|
||||
{(char *)"select_edge", (getter)bpy_bmloopuv_flag_get, (setter)bpy_bmloopuv_flag_set, (char *)bpy_bmloopuv_flag__select_edge_doc, (void *)MLOOPUV_EDGESEL},
|
||||
/* attributes match rna_def_mloopuv */
|
||||
{(char *)"uv", (getter)bpy_bmloopuv_uv_get, (setter)bpy_bmloopuv_uv_set, (char *)bpy_bmloopuv_uv_doc, NULL},
|
||||
{(char *)"pin_uv", (getter)bpy_bmloopuv_flag_get, (setter)bpy_bmloopuv_flag_set, (char *)bpy_bmloopuv_flag__pin_uv_doc, (void *)MLOOPUV_PINNED},
|
||||
{(char *)"select", (getter)bpy_bmloopuv_flag_get, (setter)bpy_bmloopuv_flag_set, (char *)bpy_bmloopuv_flag__select_doc, (void *)MLOOPUV_VERTSEL},
|
||||
{(char *)"select_edge", (getter)bpy_bmloopuv_flag_get, (setter)bpy_bmloopuv_flag_set, (char *)bpy_bmloopuv_flag__select_edge_doc, (void *)MLOOPUV_EDGESEL},
|
||||
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
PyTypeObject BPy_BMLoopUV_Type = {{{0}}}; /* bm.loops.layers.uv.active */
|
||||
@@ -485,21 +485,21 @@ static int bpy_bmdeformvert_contains(BPy_BMDeformVert *self, PyObject *value)
|
||||
|
||||
/* only defined for __contains__ */
|
||||
static PySequenceMethods bpy_bmdeformvert_as_sequence = {
|
||||
(lenfunc)bpy_bmdeformvert_len, /* sq_length */
|
||||
NULL, /* sq_concat */
|
||||
NULL, /* sq_repeat */
|
||||
(lenfunc)bpy_bmdeformvert_len, /* sq_length */
|
||||
NULL, /* sq_concat */
|
||||
NULL, /* sq_repeat */
|
||||
|
||||
/* note: if this is set PySequence_Check() returns True,
|
||||
* but in this case we dont want to be treated as a seq */
|
||||
NULL, /* sq_item */
|
||||
/* note: if this is set PySequence_Check() returns True,
|
||||
* but in this case we dont want to be treated as a seq */
|
||||
NULL, /* sq_item */
|
||||
|
||||
NULL, /* sq_slice */
|
||||
NULL, /* sq_ass_item */
|
||||
NULL, /* *was* sq_ass_slice */
|
||||
(objobjproc)bpy_bmdeformvert_contains, /* sq_contains */
|
||||
(binaryfunc) NULL, /* sq_inplace_concat */
|
||||
(ssizeargfunc) NULL, /* sq_inplace_repeat */
|
||||
};
|
||||
NULL, /* sq_slice */
|
||||
NULL, /* sq_ass_item */
|
||||
NULL, /* *was* sq_ass_slice */
|
||||
(objobjproc)bpy_bmdeformvert_contains, /* sq_contains */
|
||||
(binaryfunc) NULL, /* sq_inplace_concat */
|
||||
(ssizeargfunc) NULL, /* sq_inplace_repeat */
|
||||
};
|
||||
|
||||
static PyMappingMethods bpy_bmdeformvert_as_mapping = {
|
||||
(lenfunc)bpy_bmdeformvert_len,
|
||||
@@ -631,13 +631,13 @@ static PyObject *bpy_bmdeformvert_clear(BPy_BMDeformVert *self)
|
||||
}
|
||||
|
||||
static struct PyMethodDef bpy_bmdeformvert_methods[] = {
|
||||
{"keys", (PyCFunction)bpy_bmdeformvert_keys, METH_NOARGS, bpy_bmdeformvert_keys_doc},
|
||||
{"values", (PyCFunction)bpy_bmdeformvert_values, METH_NOARGS, bpy_bmdeformvert_values_doc},
|
||||
{"items", (PyCFunction)bpy_bmdeformvert_items, METH_NOARGS, bpy_bmdeformvert_items_doc},
|
||||
{"get", (PyCFunction)bpy_bmdeformvert_get, METH_VARARGS, bpy_bmdeformvert_get_doc},
|
||||
/* BMESH_TODO pop, popitem, update */
|
||||
{"clear", (PyCFunction)bpy_bmdeformvert_clear, METH_NOARGS, bpy_bmdeformvert_clear_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
{"keys", (PyCFunction)bpy_bmdeformvert_keys, METH_NOARGS, bpy_bmdeformvert_keys_doc},
|
||||
{"values", (PyCFunction)bpy_bmdeformvert_values, METH_NOARGS, bpy_bmdeformvert_values_doc},
|
||||
{"items", (PyCFunction)bpy_bmdeformvert_items, METH_NOARGS, bpy_bmdeformvert_items_doc},
|
||||
{"get", (PyCFunction)bpy_bmdeformvert_get, METH_VARARGS, bpy_bmdeformvert_get_doc},
|
||||
/* BMESH_TODO pop, popitem, update */
|
||||
{"clear", (PyCFunction)bpy_bmdeformvert_clear, METH_NOARGS, bpy_bmdeformvert_clear_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
PyTypeObject BPy_BMDeformVert_Type = {{{0}}}; /* bm.loops.layers.uv.active */
|
||||
|
||||
@@ -68,8 +68,8 @@ static PyObject *bpy_bmeditselseq_active_get(BPy_BMEditSelSeq *self, void *UNUSE
|
||||
}
|
||||
|
||||
static PyGetSetDef bpy_bmeditselseq_getseters[] = {
|
||||
{(char *)"active", (getter)bpy_bmeditselseq_active_get, (setter)NULL, (char *)bpy_bmeditselseq_active_doc, NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
{(char *)"active", (getter)bpy_bmeditselseq_active_get, (setter)NULL, (char *)bpy_bmeditselseq_active_doc, NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
PyDoc_STRVAR(bpy_bmeditselseq_validate_doc,
|
||||
@@ -159,12 +159,12 @@ static PyObject *bpy_bmeditselseq_remove(BPy_BMEditSelSeq *self, BPy_BMElem *val
|
||||
}
|
||||
|
||||
static struct PyMethodDef bpy_bmeditselseq_methods[] = {
|
||||
{"validate", (PyCFunction)bpy_bmeditselseq_validate, METH_NOARGS, bpy_bmeditselseq_validate_doc},
|
||||
{"clear", (PyCFunction)bpy_bmeditselseq_clear, METH_NOARGS, bpy_bmeditselseq_clear_doc},
|
||||
{"validate", (PyCFunction)bpy_bmeditselseq_validate, METH_NOARGS, bpy_bmeditselseq_validate_doc},
|
||||
{"clear", (PyCFunction)bpy_bmeditselseq_clear, METH_NOARGS, bpy_bmeditselseq_clear_doc},
|
||||
|
||||
{"add", (PyCFunction)bpy_bmeditselseq_add, METH_O, bpy_bmeditselseq_add_doc},
|
||||
{"remove", (PyCFunction)bpy_bmeditselseq_remove, METH_O, bpy_bmeditselseq_remove_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
{"add", (PyCFunction)bpy_bmeditselseq_add, METH_O, bpy_bmeditselseq_add_doc},
|
||||
{"remove", (PyCFunction)bpy_bmeditselseq_remove, METH_O, bpy_bmeditselseq_remove_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
|
||||
@@ -313,22 +313,22 @@ static int bpy_bmeditselseq_contains(BPy_BMEditSelSeq *self, PyObject *value)
|
||||
}
|
||||
|
||||
static PySequenceMethods bpy_bmeditselseq_as_sequence = {
|
||||
(lenfunc)bpy_bmeditselseq_length, /* sq_length */
|
||||
NULL, /* sq_concat */
|
||||
NULL, /* sq_repeat */
|
||||
(ssizeargfunc)bpy_bmeditselseq_subscript_int,/* sq_item */ /* Only set this so PySequence_Check() returns True */
|
||||
NULL, /* sq_slice */
|
||||
(ssizeobjargproc)NULL, /* sq_ass_item */
|
||||
NULL, /* *was* sq_ass_slice */
|
||||
(objobjproc)bpy_bmeditselseq_contains, /* sq_contains */
|
||||
(binaryfunc) NULL, /* sq_inplace_concat */
|
||||
(ssizeargfunc) NULL, /* sq_inplace_repeat */
|
||||
(lenfunc)bpy_bmeditselseq_length, /* sq_length */
|
||||
NULL, /* sq_concat */
|
||||
NULL, /* sq_repeat */
|
||||
(ssizeargfunc)bpy_bmeditselseq_subscript_int,/* sq_item */ /* Only set this so PySequence_Check() returns True */
|
||||
NULL, /* sq_slice */
|
||||
(ssizeobjargproc)NULL, /* sq_ass_item */
|
||||
NULL, /* *was* sq_ass_slice */
|
||||
(objobjproc)bpy_bmeditselseq_contains, /* sq_contains */
|
||||
(binaryfunc) NULL, /* sq_inplace_concat */
|
||||
(ssizeargfunc) NULL, /* sq_inplace_repeat */
|
||||
};
|
||||
|
||||
static PyMappingMethods bpy_bmeditselseq_as_mapping = {
|
||||
(lenfunc)bpy_bmeditselseq_length, /* mp_length */
|
||||
(binaryfunc)bpy_bmeditselseq_subscript, /* mp_subscript */
|
||||
(objobjargproc)NULL, /* mp_ass_subscript */
|
||||
(lenfunc)bpy_bmeditselseq_length, /* mp_length */
|
||||
(binaryfunc)bpy_bmeditselseq_subscript, /* mp_subscript */
|
||||
(objobjargproc)NULL, /* mp_ass_subscript */
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -39,9 +39,7 @@
|
||||
#include "../mathutils/mathutils.h"
|
||||
|
||||
#include "bmesh.h"
|
||||
|
||||
#include "bmesh_py_types.h"
|
||||
|
||||
#include "bmesh_py_utils.h" /* own include */
|
||||
|
||||
|
||||
@@ -653,18 +651,18 @@ static PyObject *bpy_bm_utils_loop_separate(PyObject *UNUSED(self), BPy_BMLoop *
|
||||
|
||||
|
||||
static struct PyMethodDef BPy_BM_utils_methods[] = {
|
||||
{"vert_collapse_edge", (PyCFunction)bpy_bm_utils_vert_collapse_edge, METH_VARARGS, bpy_bm_utils_vert_collapse_edge_doc},
|
||||
{"vert_collapse_faces", (PyCFunction)bpy_bm_utils_vert_collapse_faces, METH_VARARGS, bpy_bm_utils_vert_collapse_faces_doc},
|
||||
{"vert_dissolve", (PyCFunction)bpy_bm_utils_vert_dissolve, METH_VARARGS, bpy_bm_utils_vert_dissolve_doc}, /* could use METH_O */
|
||||
{"vert_separate", (PyCFunction)bpy_bm_utils_vert_separate, METH_VARARGS, bpy_bm_utils_vert_separate_doc},
|
||||
{"edge_split", (PyCFunction)bpy_bm_utils_edge_split, METH_VARARGS, bpy_bm_utils_edge_split_doc},
|
||||
{"edge_rotate", (PyCFunction)bpy_bm_utils_edge_rotate, METH_VARARGS, bpy_bm_utils_edge_rotate_doc},
|
||||
{"face_split", (PyCFunction)bpy_bm_utils_face_split, METH_VARARGS | METH_KEYWORDS, bpy_bm_utils_face_split_doc},
|
||||
{"face_join", (PyCFunction)bpy_bm_utils_face_join, METH_VARARGS, bpy_bm_utils_face_join_doc},
|
||||
{"face_vert_separate", (PyCFunction)bpy_bm_utils_face_vert_separate, METH_VARARGS, bpy_bm_utils_face_vert_separate_doc},
|
||||
{"face_flip", (PyCFunction)bpy_bm_utils_face_flip, METH_O, bpy_bm_utils_face_flip_doc},
|
||||
{"loop_separate", (PyCFunction)bpy_bm_utils_loop_separate, METH_O, bpy_bm_utils_loop_separate_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
{"vert_collapse_edge", (PyCFunction)bpy_bm_utils_vert_collapse_edge, METH_VARARGS, bpy_bm_utils_vert_collapse_edge_doc},
|
||||
{"vert_collapse_faces", (PyCFunction)bpy_bm_utils_vert_collapse_faces, METH_VARARGS, bpy_bm_utils_vert_collapse_faces_doc},
|
||||
{"vert_dissolve", (PyCFunction)bpy_bm_utils_vert_dissolve, METH_VARARGS, bpy_bm_utils_vert_dissolve_doc}, /* could use METH_O */
|
||||
{"vert_separate", (PyCFunction)bpy_bm_utils_vert_separate, METH_VARARGS, bpy_bm_utils_vert_separate_doc},
|
||||
{"edge_split", (PyCFunction)bpy_bm_utils_edge_split, METH_VARARGS, bpy_bm_utils_edge_split_doc},
|
||||
{"edge_rotate", (PyCFunction)bpy_bm_utils_edge_rotate, METH_VARARGS, bpy_bm_utils_edge_rotate_doc},
|
||||
{"face_split", (PyCFunction)bpy_bm_utils_face_split, METH_VARARGS | METH_KEYWORDS, bpy_bm_utils_face_split_doc},
|
||||
{"face_join", (PyCFunction)bpy_bm_utils_face_join, METH_VARARGS, bpy_bm_utils_face_join_doc},
|
||||
{"face_vert_separate", (PyCFunction)bpy_bm_utils_face_vert_separate, METH_VARARGS, bpy_bm_utils_face_vert_separate_doc},
|
||||
{"face_flip", (PyCFunction)bpy_bm_utils_face_flip, METH_O, bpy_bm_utils_face_flip_doc},
|
||||
{"loop_separate", (PyCFunction)bpy_bm_utils_loop_separate, METH_O, bpy_bm_utils_loop_separate_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
|
||||
@@ -672,15 +670,15 @@ PyDoc_STRVAR(BPy_BM_utils_doc,
|
||||
"This module provides access to blenders bmesh data structures."
|
||||
);
|
||||
static struct PyModuleDef BPy_BM_utils_module_def = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"bmesh.utils", /* m_name */
|
||||
BPy_BM_utils_doc, /* m_doc */
|
||||
0, /* m_size */
|
||||
BPy_BM_utils_methods, /* m_methods */
|
||||
NULL, /* m_reload */
|
||||
NULL, /* m_traverse */
|
||||
NULL, /* m_clear */
|
||||
NULL, /* m_free */
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"bmesh.utils", /* m_name */
|
||||
BPy_BM_utils_doc, /* m_doc */
|
||||
0, /* m_size */
|
||||
BPy_BM_utils_methods, /* m_methods */
|
||||
NULL, /* m_reload */
|
||||
NULL, /* m_traverse */
|
||||
NULL, /* m_clear */
|
||||
NULL, /* m_free */
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -523,7 +523,9 @@ void PyC_SetHomePath(const char *py_path_bundle)
|
||||
}
|
||||
}
|
||||
|
||||
/* Would be nice if python had this built in */
|
||||
/* Would be nice if python had this built in
|
||||
* See: http://wiki.blender.org/index.php/Dev:Doc/Tools/Debugging/PyFromC
|
||||
*/
|
||||
void PyC_RunQuicky(const char *filepath, int n, ...)
|
||||
{
|
||||
FILE *fp = fopen(filepath, "r");
|
||||
|
||||
@@ -117,12 +117,12 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec
|
||||
PyObject *list;
|
||||
|
||||
int absolute = FALSE;
|
||||
int packed = FALSE;
|
||||
int local = FALSE;
|
||||
int packed = FALSE;
|
||||
int local = FALSE;
|
||||
static const char *kwlist[] = {"absolute", "packed", "local", NULL};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kw, "|ii:blend_paths",
|
||||
(char **)kwlist, &absolute, &packed))
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kw, "|iii:blend_paths",
|
||||
(char **)kwlist, &absolute, &packed, &local))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,9 @@ static PyObject *pyop_call(PyObject *UNUSED(self), PyObject *args)
|
||||
|
||||
if (!PyArg_ParseTuple(args, "sO|O!si:_bpy.ops.call",
|
||||
&opname, &context_dict, &PyDict_Type, &kw, &context_str, &is_undo))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ot = WM_operatortype_find(opname, TRUE);
|
||||
|
||||
|
||||
@@ -369,7 +369,7 @@ static int deferred_register_prop(StructRNA *srna, PyObject *key, PyObject *item
|
||||
|
||||
static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, PointerRNA *ptr, PropertyRNA *prop,
|
||||
Py_ssize_t start, Py_ssize_t stop, Py_ssize_t length);
|
||||
static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, short order_fallback);
|
||||
static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, const short order_fallback);
|
||||
|
||||
/* bpyrna vector/euler/quat callbacks */
|
||||
static unsigned char mathutils_rna_array_cb_index = -1; /* index for our callbacks */
|
||||
@@ -571,7 +571,7 @@ static Mathutils_Callback mathutils_rna_matrix_cb = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, short order_fallback)
|
||||
static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, const short order_fallback)
|
||||
{
|
||||
/* attempt to get order */
|
||||
if (*prop_eul_order == NULL)
|
||||
|
||||
@@ -644,8 +644,8 @@ static PyNumberMethods Color_NumMethods = {
|
||||
NULL, /*nb_remainder*/
|
||||
NULL, /*nb_divmod*/
|
||||
NULL, /*nb_power*/
|
||||
(unaryfunc) Color_neg, /*nb_negative*/
|
||||
(unaryfunc) NULL, /*tp_positive*/
|
||||
(unaryfunc) Color_neg, /*nb_negative*/
|
||||
(unaryfunc) Color_copy, /*tp_positive*/
|
||||
(unaryfunc) NULL, /*tp_absolute*/
|
||||
(inquiry) NULL, /*tp_bool*/
|
||||
(unaryfunc) NULL, /*nb_invert*/
|
||||
|
||||
@@ -701,7 +701,7 @@ PyTypeObject euler_Type = {
|
||||
* (i.e. it was allocated elsewhere by MEM_mallocN())
|
||||
* pass Py_NEW - if vector is not a WRAPPER and managed by PYTHON
|
||||
* (i.e. it must be created here with PyMEM_malloc())*/
|
||||
PyObject *Euler_CreatePyObject(float *eul, short order, int type, PyTypeObject *base_type)
|
||||
PyObject *Euler_CreatePyObject(float *eul, const short order, int type, PyTypeObject *base_type)
|
||||
{
|
||||
EulerObject *self;
|
||||
|
||||
@@ -738,7 +738,7 @@ PyObject *Euler_CreatePyObject(float *eul, short order, int type, PyTypeObject *
|
||||
return (PyObject *)self;
|
||||
}
|
||||
|
||||
PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, short order,
|
||||
PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, const short order,
|
||||
unsigned char cb_type, unsigned char cb_subtype)
|
||||
{
|
||||
EulerObject *self = (EulerObject *)Euler_CreatePyObject(NULL, order, Py_NEW, NULL);
|
||||
|
||||
@@ -48,8 +48,8 @@ typedef struct {
|
||||
* blender (stored in blend_data). This is an either/or struct not both */
|
||||
|
||||
//prototypes
|
||||
PyObject *Euler_CreatePyObject(float *eul, short order, int type, PyTypeObject *base_type);
|
||||
PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, short order,
|
||||
PyObject *Euler_CreatePyObject(float *eul, const short order, int type, PyTypeObject *base_type);
|
||||
PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, const short order,
|
||||
unsigned char cb_type, unsigned char cb_subtype);
|
||||
|
||||
short euler_order_from_string(const char *str, const char *error_prefix);
|
||||
|
||||
@@ -995,7 +995,7 @@ static PyObject *Matrix_to_euler(MatrixObject *self, PyObject *args)
|
||||
|
||||
if (eul_compat) {
|
||||
if (order == 1) mat3_to_compatible_eul(eul, eul_compatf, mat);
|
||||
else mat3_to_compatible_eulO(eul, eul_compatf, order, mat);
|
||||
else mat3_to_compatible_eulO(eul, eul_compatf, order, mat);
|
||||
}
|
||||
else {
|
||||
if (order == 1) mat3_to_eul(eul, mat);
|
||||
|
||||
@@ -903,7 +903,7 @@ static PyNumberMethods Quaternion_NumMethods = {
|
||||
NULL, /*nb_divmod*/
|
||||
NULL, /*nb_power*/
|
||||
(unaryfunc) Quaternion_neg, /*nb_negative*/
|
||||
(unaryfunc) 0, /*tp_positive*/
|
||||
(unaryfunc) Quaternion_copy,/*tp_positive*/
|
||||
(unaryfunc) 0, /*tp_absolute*/
|
||||
(inquiry) 0, /*tp_bool*/
|
||||
(unaryfunc) 0, /*nb_invert*/
|
||||
|
||||
@@ -2046,7 +2046,7 @@ static PyNumberMethods Vector_NumMethods = {
|
||||
NULL, /*nb_divmod*/
|
||||
NULL, /*nb_power*/
|
||||
(unaryfunc) Vector_neg, /*nb_negative*/
|
||||
(unaryfunc) NULL, /*tp_positive*/
|
||||
(unaryfunc) Vector_copy,/*tp_positive*/
|
||||
(unaryfunc) NULL, /*tp_absolute*/
|
||||
(inquiry) NULL, /*tp_bool*/
|
||||
(unaryfunc) NULL, /*nb_invert*/
|
||||
|
||||
@@ -728,6 +728,7 @@ static PyObject *M_Geometry_intersect_point_line(PyObject *UNUSED(self), PyObjec
|
||||
float pt_in[3], pt_out[3], l1[3], l2[3];
|
||||
float lambda;
|
||||
PyObject *ret;
|
||||
int size = 2;
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O!O!O!:intersect_point_line",
|
||||
&vector_Type, &pt,
|
||||
@@ -745,20 +746,20 @@ static PyObject *M_Geometry_intersect_point_line(PyObject *UNUSED(self), PyObjec
|
||||
}
|
||||
|
||||
/* accept 2d verts */
|
||||
if (pt->size == 3) { copy_v3_v3(pt_in, pt->vec); }
|
||||
else { pt_in[2] = 0.0f; copy_v2_v2(pt_in, pt->vec); }
|
||||
if (pt->size >= 3) { copy_v3_v3(pt_in, pt->vec); size = 3; }
|
||||
else { copy_v2_v2(pt_in, pt->vec); pt_in[2] = 0.0f; }
|
||||
|
||||
if (line_1->size == 3) { copy_v3_v3(l1, line_1->vec); }
|
||||
else { l1[2] = 0.0f; copy_v2_v2(l1, line_1->vec); }
|
||||
if (line_1->size >= 3) { copy_v3_v3(l1, line_1->vec); size = 3; }
|
||||
else { copy_v2_v2(l1, line_1->vec); l1[2] = 0.0f; }
|
||||
|
||||
if (line_2->size == 3) { copy_v3_v3(l2, line_2->vec); }
|
||||
else { l2[2] = 0.0f; copy_v2_v2(l2, line_2->vec); }
|
||||
if (line_2->size >= 3) { copy_v3_v3(l2, line_2->vec); size = 3; }
|
||||
else { copy_v2_v2(l2, line_2->vec); l2[2] = 0.0f; }
|
||||
|
||||
/* do the calculation */
|
||||
lambda = closest_to_line_v3(pt_out, pt_in, l1, l2);
|
||||
|
||||
ret = PyTuple_New(2);
|
||||
PyTuple_SET_ITEM(ret, 0, Vector_CreatePyObject(pt_out, 3, Py_NEW, NULL));
|
||||
PyTuple_SET_ITEM(ret, 0, Vector_CreatePyObject(pt_out, size, Py_NEW, NULL));
|
||||
PyTuple_SET_ITEM(ret, 1, PyFloat_FromDouble(lambda));
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user