From 9a9f39e4661163391bb8e3eb782438e425abe684 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 20 Dec 2019 10:42:57 +1100 Subject: Cleanup: remove redundant 'char *' casts --- source/blender/python/bmesh/bmesh_py_ops.c | 2 +- source/blender/python/bmesh/bmesh_py_types.c | 270 +++++++++------------ .../python/bmesh/bmesh_py_types_customdata.c | 110 ++++----- .../blender/python/bmesh/bmesh_py_types_meshdata.c | 30 +-- .../blender/python/bmesh/bmesh_py_types_select.c | 4 +- 5 files changed, 184 insertions(+), 232 deletions(-) (limited to 'source/blender/python/bmesh') diff --git a/source/blender/python/bmesh/bmesh_py_ops.c b/source/blender/python/bmesh/bmesh_py_ops.c index b6ba119f695..a3bfe791c88 100644 --- a/source/blender/python/bmesh/bmesh_py_ops.c +++ b/source/blender/python/bmesh/bmesh_py_ops.c @@ -154,7 +154,7 @@ static PyObject *bpy_bmesh_op_doc_get(BPy_BMeshOpFunc *self, void *UNUSED(closur } static PyGetSetDef bpy_bmesh_op_getseters[] = { - {(char *)"__doc__", (getter)bpy_bmesh_op_doc_get, (setter)NULL, NULL, NULL}, + {"__doc__", (getter)bpy_bmesh_op_doc_get, (setter)NULL, NULL, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index b601a35f7f2..73107ebc16c 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -613,264 +613,232 @@ static int bpy_bmfaceseq_active_set(BPy_BMElem *self, PyObject *value, void *UNU } 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", + {"verts", (getter)bpy_bmvertseq_get, (setter)NULL, bpy_bmvertseq_doc, NULL}, + {"edges", (getter)bpy_bmedgeseq_get, (setter)NULL, bpy_bmedgeseq_doc, NULL}, + {"faces", (getter)bpy_bmfaceseq_get, (setter)NULL, bpy_bmfaceseq_doc, NULL}, + {"loops", (getter)bpy_bmloopseq_get, (setter)NULL, bpy_bmloopseq_doc, NULL}, + {"select_mode", (getter)bpy_bmesh_select_mode_get, (setter)bpy_bmesh_select_mode_set, - (char *)bpy_bmesh_select_mode_doc, + bpy_bmesh_select_mode_doc, NULL}, - {(char *)"select_history", + {"select_history", (getter)bpy_bmesh_select_history_get, (setter)bpy_bmesh_select_history_set, - (char *)bpy_bmesh_select_history_doc, + bpy_bmesh_select_history_doc, NULL}, /* readonly checks */ - {(char *)"is_wrapped", + {"is_wrapped", (getter)bpy_bmesh_is_wrapped_get, (setter)NULL, - (char *)bpy_bmesh_is_wrapped_doc, + 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}, + {"is_valid", (getter)bpy_bm_is_valid_get, (setter)NULL, bpy_bm_is_valid_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; static PyGetSetDef bpy_bmvert_getseters[] = { /* generic */ - {(char *)"select", + {"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, - (char *)bpy_bm_elem_select_doc, + bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT}, - {(char *)"hide", + {"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, - (char *)bpy_bm_elem_hide_doc, + bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN}, - {(char *)"tag", + {"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, - (char *)bpy_bm_elem_tag_doc, + bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG}, - {(char *)"index", + {"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, - (char *)bpy_bm_elem_index_doc, + 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", + {"co", (getter)bpy_bmvert_co_get, (setter)bpy_bmvert_co_set, bpy_bmvert_co_doc, NULL}, + {"normal", (getter)bpy_bmvert_normal_get, (setter)bpy_bmvert_normal_set, - (char *)bpy_bmvert_normal_doc, + bpy_bmvert_normal_doc, NULL}, /* connectivity data */ - {(char *)"link_edges", + {"link_edges", (getter)bpy_bmelemseq_elem_get, (setter)NULL, - (char *)bpy_bmvert_link_edges_doc, + bpy_bmvert_link_edges_doc, (void *)BM_EDGES_OF_VERT}, - {(char *)"link_faces", + {"link_faces", (getter)bpy_bmelemseq_elem_get, (setter)NULL, - (char *)bpy_bmvert_link_faces_doc, + bpy_bmvert_link_faces_doc, (void *)BM_FACES_OF_VERT}, - {(char *)"link_loops", + {"link_loops", (getter)bpy_bmelemseq_elem_get, (setter)NULL, - (char *)bpy_bmvert_link_loops_doc, + bpy_bmvert_link_loops_doc, (void *)BM_LOOPS_OF_VERT}, /* readonly checks */ - {(char *)"is_manifold", + {"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, + bpy_bmvert_is_manifold_doc, NULL}, - {(char *)"is_boundary", + {"is_wire", (getter)bpy_bmvert_is_wire_get, (setter)NULL, bpy_bmvert_is_wire_doc, NULL}, + {"is_boundary", (getter)bpy_bmvert_is_boundary_get, (setter)NULL, - (char *)bpy_bmvert_is_boundary_doc, - NULL}, - {(char *)"is_valid", - (getter)bpy_bm_is_valid_get, - (setter)NULL, - (char *)bpy_bm_is_valid_doc, + bpy_bmvert_is_boundary_doc, NULL}, + {"is_valid", (getter)bpy_bm_is_valid_get, (setter)NULL, bpy_bm_is_valid_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; static PyGetSetDef bpy_bmedge_getseters[] = { /* generic */ - {(char *)"select", + {"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, - (char *)bpy_bm_elem_select_doc, + bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT}, - {(char *)"hide", + {"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, - (char *)bpy_bm_elem_hide_doc, + bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN}, - {(char *)"tag", + {"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, - (char *)bpy_bm_elem_tag_doc, + bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG}, - {(char *)"index", + {"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, - (char *)bpy_bm_elem_index_doc, + bpy_bm_elem_index_doc, NULL}, - {(char *)"smooth", + {"smooth", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, - (char *)bpy_bm_elem_smooth_doc, + bpy_bm_elem_smooth_doc, (void *)BM_ELEM_SMOOTH}, - {(char *)"seam", + {"seam", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, - (char *)bpy_bm_elem_seam_doc, + bpy_bm_elem_seam_doc, (void *)BM_ELEM_SEAM}, /* connectivity data */ - {(char *)"verts", + {"verts", (getter)bpy_bmelemseq_elem_get, (setter)NULL, - (char *)bpy_bmedge_verts_doc, + bpy_bmedge_verts_doc, (void *)BM_VERTS_OF_EDGE}, - {(char *)"link_faces", + {"link_faces", (getter)bpy_bmelemseq_elem_get, (setter)NULL, - (char *)bpy_bmedge_link_faces_doc, + bpy_bmedge_link_faces_doc, (void *)BM_FACES_OF_EDGE}, - {(char *)"link_loops", + {"link_loops", (getter)bpy_bmelemseq_elem_get, (setter)NULL, - (char *)bpy_bmedge_link_loops_doc, + bpy_bmedge_link_loops_doc, (void *)BM_LOOPS_OF_EDGE}, /* readonly checks */ - {(char *)"is_manifold", + {"is_manifold", (getter)bpy_bmedge_is_manifold_get, (setter)NULL, - (char *)bpy_bmedge_is_manifold_doc, + bpy_bmedge_is_manifold_doc, NULL}, - {(char *)"is_contiguous", + {"is_contiguous", (getter)bpy_bmedge_is_contiguous_get, (setter)NULL, - (char *)bpy_bmedge_is_contiguous_doc, + bpy_bmedge_is_contiguous_doc, NULL}, - {(char *)"is_convex", - (getter)bpy_bmedge_is_convex_get, - (setter)NULL, - (char *)bpy_bmedge_is_convex_doc, - NULL}, - {(char *)"is_wire", - (getter)bpy_bmedge_is_wire_get, - (setter)NULL, - (char *)bpy_bmedge_is_wire_doc, - NULL}, - {(char *)"is_boundary", + {"is_convex", (getter)bpy_bmedge_is_convex_get, (setter)NULL, bpy_bmedge_is_convex_doc, NULL}, + {"is_wire", (getter)bpy_bmedge_is_wire_get, (setter)NULL, bpy_bmedge_is_wire_doc, NULL}, + {"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, + bpy_bmedge_is_boundary_doc, NULL}, + {"is_valid", (getter)bpy_bm_is_valid_get, (setter)NULL, bpy_bm_is_valid_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; static PyGetSetDef bpy_bmface_getseters[] = { /* generic */ - {(char *)"select", + {"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, - (char *)bpy_bm_elem_select_doc, + bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT}, - {(char *)"hide", + {"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, - (char *)bpy_bm_elem_hide_doc, + bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN}, - {(char *)"tag", + {"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, - (char *)bpy_bm_elem_tag_doc, + bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG}, - {(char *)"index", + {"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, - (char *)bpy_bm_elem_index_doc, + bpy_bm_elem_index_doc, NULL}, - {(char *)"smooth", + {"smooth", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, - (char *)bpy_bm_elem_smooth_doc, + bpy_bm_elem_smooth_doc, (void *)BM_ELEM_SMOOTH}, - {(char *)"normal", + {"normal", (getter)bpy_bmface_normal_get, (setter)bpy_bmface_normal_set, - (char *)bpy_bmface_normal_doc, + bpy_bmface_normal_doc, NULL}, - {(char *)"material_index", + {"material_index", (getter)bpy_bmface_material_index_get, (setter)bpy_bmface_material_index_set, - (char *)bpy_bmface_material_index_doc, + bpy_bmface_material_index_doc, NULL}, /* connectivity data */ - {(char *)"verts", + {"verts", (getter)bpy_bmelemseq_elem_get, (setter)NULL, - (char *)bpy_bmface_verts_doc, + bpy_bmface_verts_doc, (void *)BM_VERTS_OF_FACE}, - {(char *)"edges", + {"edges", (getter)bpy_bmelemseq_elem_get, (setter)NULL, - (char *)bpy_bmface_edges_doc, + bpy_bmface_edges_doc, (void *)BM_EDGES_OF_FACE}, - {(char *)"loops", + {"loops", (getter)bpy_bmelemseq_elem_get, (setter)NULL, - (char *)bpy_bmface_loops_doc, + 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}, + {"is_valid", (getter)bpy_bm_is_valid_get, (setter)NULL, bpy_bm_is_valid_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; @@ -879,109 +847,101 @@ static PyGetSetDef bpy_bmloop_getseters[] = { /* generic */ /* flags are available but not used for loops. */ #if 0 - {(char *)"select", + {"select", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, - (char *)bpy_bm_elem_select_doc, + bpy_bm_elem_select_doc, (void *)BM_ELEM_SELECT}, - {(char *)"hide", + {"hide", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, - (char *)bpy_bm_elem_hide_doc, + bpy_bm_elem_hide_doc, (void *)BM_ELEM_HIDDEN}, #endif - {(char *)"tag", + {"tag", (getter)bpy_bm_elem_hflag_get, (setter)bpy_bm_elem_hflag_set, - (char *)bpy_bm_elem_tag_doc, + bpy_bm_elem_tag_doc, (void *)BM_ELEM_TAG}, - {(char *)"index", + {"index", (getter)bpy_bm_elem_index_get, (setter)bpy_bm_elem_index_set, - (char *)bpy_bm_elem_index_doc, + 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}, + {"vert", (getter)bpy_bmloop_vert_get, (setter)NULL, bpy_bmloop_vert_doc, NULL}, + {"edge", (getter)bpy_bmloop_edge_get, (setter)NULL, bpy_bmloop_edge_doc, NULL}, + {"face", (getter)bpy_bmloop_face_get, (setter)NULL, bpy_bmloop_face_doc, NULL}, /* connectivity data */ - {(char *)"link_loops", + {"link_loops", (getter)bpy_bmelemseq_elem_get, (setter)NULL, - (char *)bpy_bmloops_link_loops_doc, + bpy_bmloops_link_loops_doc, (void *)BM_LOOPS_OF_LOOP}, - {(char *)"link_loop_next", + {"link_loop_next", (getter)bpy_bmloop_link_loop_next_get, (setter)NULL, - (char *)bpy_bmloop_link_loop_next_doc, + bpy_bmloop_link_loop_next_doc, NULL}, - {(char *)"link_loop_prev", + {"link_loop_prev", (getter)bpy_bmloop_link_loop_prev_get, (setter)NULL, - (char *)bpy_bmloop_link_loop_prev_doc, + bpy_bmloop_link_loop_prev_doc, NULL}, - {(char *)"link_loop_radial_next", + {"link_loop_radial_next", (getter)bpy_bmloop_link_loop_radial_next_get, (setter)NULL, - (char *)bpy_bmloop_link_loop_radial_next_doc, + bpy_bmloop_link_loop_radial_next_doc, NULL}, - {(char *)"link_loop_radial_prev", + {"link_loop_radial_prev", (getter)bpy_bmloop_link_loop_radial_prev_get, (setter)NULL, - (char *)bpy_bmloop_link_loop_radial_prev_doc, + bpy_bmloop_link_loop_radial_prev_doc, NULL}, /* readonly checks */ - {(char *)"is_convex", - (getter)bpy_bmloop_is_convex_get, - (setter)NULL, - (char *)bpy_bmloop_is_convex_doc, - NULL}, - {(char *)"is_valid", - (getter)bpy_bm_is_valid_get, - (setter)NULL, - (char *)bpy_bm_is_valid_doc, - NULL}, + {"is_convex", (getter)bpy_bmloop_is_convex_get, (setter)NULL, bpy_bmloop_is_convex_doc, NULL}, + {"is_valid", (getter)bpy_bm_is_valid_get, (setter)NULL, bpy_bm_is_valid_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; static PyGetSetDef bpy_bmvertseq_getseters[] = { - {(char *)"layers", + {"layers", (getter)bpy_bmelemseq_layers_get, (setter)NULL, - (char *)bpy_bmelemseq_layers_vert_doc, + bpy_bmelemseq_layers_vert_doc, (void *)BM_VERT}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; static PyGetSetDef bpy_bmedgeseq_getseters[] = { - {(char *)"layers", + {"layers", (getter)bpy_bmelemseq_layers_get, (setter)NULL, - (char *)bpy_bmelemseq_layers_edge_doc, + bpy_bmelemseq_layers_edge_doc, (void *)BM_EDGE}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; static PyGetSetDef bpy_bmfaceseq_getseters[] = { - {(char *)"layers", + {"layers", (getter)bpy_bmelemseq_layers_get, (setter)NULL, - (char *)bpy_bmelemseq_layers_face_doc, + bpy_bmelemseq_layers_face_doc, (void *)BM_FACE}, /* face only */ - {(char *)"active", + {"active", (getter)bpy_bmfaceseq_active_get, (setter)bpy_bmfaceseq_active_set, - (char *)bpy_bmfaceseq_active_doc, + bpy_bmfaceseq_active_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; static PyGetSetDef bpy_bmloopseq_getseters[] = { - {(char *)"layers", + {"layers", (getter)bpy_bmelemseq_layers_get, (setter)NULL, - (char *)bpy_bmelemseq_layers_loop_doc, + bpy_bmelemseq_layers_loop_doc, (void *)BM_LOOP}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c index a7f4e30b494..ce700849cf3 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c @@ -174,84 +174,84 @@ static PyObject *bpy_bmlayeritem_name_get(BPy_BMLayerItem *self, void *UNUSED(fl } static PyGetSetDef bpy_bmlayeraccess_vert_getseters[] = { - {(char *)"deform", + {"deform", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__deform_doc, + bpy_bmlayeraccess_collection__deform_doc, (void *)CD_MDEFORMVERT}, - {(char *)"float", + {"float", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__float_doc, + bpy_bmlayeraccess_collection__float_doc, (void *)CD_PROP_FLT}, - {(char *)"int", + {"int", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__int_doc, + bpy_bmlayeraccess_collection__int_doc, (void *)CD_PROP_INT}, - {(char *)"string", + {"string", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__string_doc, + bpy_bmlayeraccess_collection__string_doc, (void *)CD_PROP_STR}, - {(char *)"shape", + {"shape", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__shape_doc, + bpy_bmlayeraccess_collection__shape_doc, (void *)CD_SHAPEKEY}, - {(char *)"bevel_weight", + {"bevel_weight", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__bevel_weight_doc, + bpy_bmlayeraccess_collection__bevel_weight_doc, (void *)CD_BWEIGHT}, - {(char *)"skin", + {"skin", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__skin_doc, + bpy_bmlayeraccess_collection__skin_doc, (void *)CD_MVERT_SKIN}, - {(char *)"paint_mask", + {"paint_mask", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__paint_mask_doc, + bpy_bmlayeraccess_collection__paint_mask_doc, (void *)CD_PAINT_MASK}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; static PyGetSetDef bpy_bmlayeraccess_edge_getseters[] = { - {(char *)"float", + {"float", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__float_doc, + bpy_bmlayeraccess_collection__float_doc, (void *)CD_PROP_FLT}, - {(char *)"int", + {"int", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__int_doc, + bpy_bmlayeraccess_collection__int_doc, (void *)CD_PROP_INT}, - {(char *)"string", + {"string", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__string_doc, + bpy_bmlayeraccess_collection__string_doc, (void *)CD_PROP_STR}, - {(char *)"bevel_weight", + {"bevel_weight", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__bevel_weight_doc, + bpy_bmlayeraccess_collection__bevel_weight_doc, (void *)CD_BWEIGHT}, - {(char *)"crease", + {"crease", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__crease_doc, + bpy_bmlayeraccess_collection__crease_doc, (void *)CD_CREASE}, #ifdef WITH_FREESTYLE - {(char *)"freestyle", + {"freestyle", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__freestyle_edge_doc, + bpy_bmlayeraccess_collection__freestyle_edge_doc, (void *)CD_FREESTYLE_EDGE}, #endif @@ -259,32 +259,32 @@ static PyGetSetDef bpy_bmlayeraccess_edge_getseters[] = { }; static PyGetSetDef bpy_bmlayeraccess_face_getseters[] = { - {(char *)"float", + {"float", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__float_doc, + bpy_bmlayeraccess_collection__float_doc, (void *)CD_PROP_FLT}, - {(char *)"int", + {"int", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__int_doc, + bpy_bmlayeraccess_collection__int_doc, (void *)CD_PROP_INT}, - {(char *)"string", + {"string", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__string_doc, + bpy_bmlayeraccess_collection__string_doc, (void *)CD_PROP_STR}, - {(char *)"face_map", + {"face_map", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__face_map_doc, + bpy_bmlayeraccess_collection__face_map_doc, (void *)CD_FACEMAP}, #ifdef WITH_FREESTYLE - {(char *)"freestyle", + {"freestyle", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__freestyle_face_doc, + bpy_bmlayeraccess_collection__freestyle_face_doc, (void *)CD_FREESTYLE_FACE}, #endif @@ -292,31 +292,31 @@ static PyGetSetDef bpy_bmlayeraccess_face_getseters[] = { }; static PyGetSetDef bpy_bmlayeraccess_loop_getseters[] = { - {(char *)"float", + {"float", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__float_doc, + bpy_bmlayeraccess_collection__float_doc, (void *)CD_PROP_FLT}, - {(char *)"int", + {"int", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__int_doc, + bpy_bmlayeraccess_collection__int_doc, (void *)CD_PROP_INT}, - {(char *)"string", + {"string", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__string_doc, + bpy_bmlayeraccess_collection__string_doc, (void *)CD_PROP_STR}, - {(char *)"uv", + {"uv", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__uv_doc, + bpy_bmlayeraccess_collection__uv_doc, (void *)CD_MLOOPUV}, - {(char *)"color", + {"color", (getter)bpy_bmlayeraccess_collection_get, (setter)NULL, - (char *)bpy_bmlayeraccess_collection__color_doc, + bpy_bmlayeraccess_collection__color_doc, (void *)CD_MLOOPCOL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ @@ -324,15 +324,15 @@ static PyGetSetDef bpy_bmlayeraccess_loop_getseters[] = { static PyGetSetDef bpy_bmlayercollection_getseters[] = { /* BMESH_TODO, make writeable */ - {(char *)"active", + {"active", (getter)bpy_bmlayercollection_active_get, (setter)NULL, - (char *)bpy_bmlayercollection_active_doc, + bpy_bmlayercollection_active_doc, NULL}, - {(char *)"is_singleton", + {"is_singleton", (getter)bpy_bmlayercollection_is_singleton_get, (setter)NULL, - (char *)bpy_bmlayercollection_is_singleton_doc, + bpy_bmlayercollection_is_singleton_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ @@ -340,11 +340,7 @@ static PyGetSetDef bpy_bmlayercollection_getseters[] = { static PyGetSetDef bpy_bmlayeritem_getseters[] = { /* BMESH_TODO, make writeable */ - {(char *)"name", - (getter)bpy_bmlayeritem_name_get, - (setter)NULL, - (char *)bpy_bmlayercollection_name_doc, - NULL}, + {"name", (getter)bpy_bmlayeritem_name_get, (setter)NULL, bpy_bmlayercollection_name_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c index 0fd6d74c324..08d934251af 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c @@ -99,25 +99,21 @@ 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", + {"uv", (getter)bpy_bmloopuv_uv_get, (setter)bpy_bmloopuv_uv_set, bpy_bmloopuv_uv_doc, NULL}, + {"pin_uv", (getter)bpy_bmloopuv_flag_get, (setter)bpy_bmloopuv_flag_set, - (char *)bpy_bmloopuv_flag__pin_uv_doc, + bpy_bmloopuv_flag__pin_uv_doc, (void *)MLOOPUV_PINNED}, - {(char *)"select", + {"select", (getter)bpy_bmloopuv_flag_get, (setter)bpy_bmloopuv_flag_set, - (char *)bpy_bmloopuv_flag__select_doc, + bpy_bmloopuv_flag__select_doc, (void *)MLOOPUV_VERTSEL}, - {(char *)"select_edge", + {"select_edge", (getter)bpy_bmloopuv_flag_get, (setter)bpy_bmloopuv_flag_set, - (char *)bpy_bmloopuv_flag__select_edge_doc, + bpy_bmloopuv_flag__select_edge_doc, (void *)MLOOPUV_EDGESEL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ @@ -219,20 +215,20 @@ static int bpy_bmvertskin_flag_set(BPy_BMVertSkin *self, PyObject *value, void * static PyGetSetDef bpy_bmvertskin_getseters[] = { /* attributes match rna_mesh_gen */ - {(char *)"radius", + {"radius", (getter)bpy_bmvertskin_radius_get, (setter)bpy_bmvertskin_radius_set, - (char *)bpy_bmvertskin_radius_doc, + bpy_bmvertskin_radius_doc, NULL}, - {(char *)"use_root", + {"use_root", (getter)bpy_bmvertskin_flag_get, (setter)bpy_bmvertskin_flag_set, - (char *)bpy_bmvertskin_flag__use_root_doc, + bpy_bmvertskin_flag__use_root_doc, (void *)MVERT_SKIN_ROOT}, - {(char *)"use_loose", + {"use_loose", (getter)bpy_bmvertskin_flag_get, (setter)bpy_bmvertskin_flag_set, - (char *)bpy_bmvertskin_flag__use_loose_doc, + bpy_bmvertskin_flag__use_loose_doc, (void *)MVERT_SKIN_LOOSE}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ diff --git a/source/blender/python/bmesh/bmesh_py_types_select.c b/source/blender/python/bmesh/bmesh_py_types_select.c index 228874a86e3..dc0cf59d38c 100644 --- a/source/blender/python/bmesh/bmesh_py_types_select.c +++ b/source/blender/python/bmesh/bmesh_py_types_select.c @@ -57,10 +57,10 @@ static PyObject *bpy_bmeditselseq_active_get(BPy_BMEditSelSeq *self, void *UNUSE } static PyGetSetDef bpy_bmeditselseq_getseters[] = { - {(char *)"active", + {"active", (getter)bpy_bmeditselseq_active_get, (setter)NULL, - (char *)bpy_bmeditselseq_active_doc, + bpy_bmeditselseq_active_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; -- cgit v1.2.3