From f6c323aa42e94c4750f52940b47a0d57b503c1b9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 23 Aug 2010 22:16:45 +0000 Subject: - move more active properties into their collections: scene.active_keying_set --> scene.keying_sets.active ...same for active_uv_texture. active_vertex_color, active_keyconfig, - move mesh.add_uv_layer() and mesh.add_vertex_color() into their collections also have them return the newly created layer and dont set the layer active. uvtex = mesh.uv_layers.new(name) vcol = mesh.vertex_colors.new(name) --- source/blender/makesrna/intern/rna_animation.c | 17 ++-- source/blender/makesrna/intern/rna_mesh.c | 115 ++++++++++++++++++++++--- source/blender/makesrna/intern/rna_mesh_api.c | 17 ---- source/blender/makesrna/intern/rna_pose.c | 30 +++++-- source/blender/makesrna/intern/rna_scene.c | 46 ++++++++-- source/blender/makesrna/intern/rna_wm.c | 51 ++++++++--- 6 files changed, 213 insertions(+), 63 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 87a002db828..cec7b1cd33c 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -536,6 +536,8 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop) FunctionRNA *func; PropertyRNA *parm; + + PropertyRNA *prop; RNA_def_property_srna(cprop, "KeyingSetPaths"); srna= RNA_def_struct(brna, "KeyingSetPaths", NULL); @@ -576,6 +578,13 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop) func= RNA_def_function(srna, "clear", "rna_KeyingSet_paths_clear"); RNA_def_function_ui_description(func, "Remove all the paths from the Keying Set."); RNA_def_function_flag(func, FUNC_USE_REPORTS); + + prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); + RNA_def_property_struct_type(prop, "KeyingSetPath"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_editable_func(prop, "rna_KeyingSet_active_ksPath_editable"); + RNA_def_property_pointer_funcs(prop, "rna_KeyingSet_active_ksPath_get", "rna_KeyingSet_active_ksPath_set", NULL, NULL); + RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes"); } static void rna_def_keyingset(BlenderRNA *brna) @@ -605,13 +614,7 @@ static void rna_def_keyingset(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Paths", "Keying Set Paths to define settings that get keyframed together"); rna_def_keyingset_paths(brna, prop); - prop= RNA_def_property(srna, "active_path", PROP_POINTER, PROP_NONE); - RNA_def_property_struct_type(prop, "KeyingSetPath"); - RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_editable_func(prop, "rna_KeyingSet_active_ksPath_editable"); - RNA_def_property_pointer_funcs(prop, "rna_KeyingSet_active_ksPath_get", "rna_KeyingSet_active_ksPath_set", NULL, NULL); - RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes"); - + /* TODO, move to collection */ prop= RNA_def_property(srna, "active_path_index", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "active_path"); RNA_def_property_int_funcs(prop, "rna_KeyingSet_active_ksPath_index_get", "rna_KeyingSet_active_ksPath_index_set", "rna_KeyingSet_active_ksPath_index_range"); diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 3dc7b8922e7..a6d79a18670 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -1064,6 +1064,32 @@ static int rna_Mesh_tot_face_get(PointerRNA *ptr) return me->edit_mesh ? me->edit_mesh->totfacesel : 0; } +static CustomDataLayer *rna_Mesh_vertex_color_new(struct Mesh *me, struct bContext *C, char *name) +{ + CustomData *fdata; + CustomDataLayer *cdl; + int index; + ED_mesh_color_add(C, NULL, NULL, me, name, FALSE); + + fdata= rna_mesh_fdata(me); + index= CustomData_number_of_layers(fdata, CD_MCOL) - 1; + cdl= (index == -1)? NULL: &fdata->layers[index]; + return cdl; +} + +static CustomDataLayer *rna_Mesh_uv_texture_new(struct Mesh *me, struct bContext *C, char *name) +{ + CustomData *fdata; + CustomDataLayer *cdl; + int index; + ED_mesh_uv_texture_add(C, NULL, NULL, me, name, FALSE); + + fdata= rna_mesh_fdata(me); + index= CustomData_number_of_layers(fdata, CD_MTFACE) - 1; + cdl= (index == -1)? NULL: &fdata->layers[index]; + return cdl; +} + #else static void rna_def_mvert_group(BlenderRNA *brna) @@ -1630,6 +1656,78 @@ static void rna_def_mesh_faces(BlenderRNA *brna, PropertyRNA *cprop) } +/* mesh.vertex_colors */ +static void rna_def_vertex_colors(BlenderRNA *brna, PropertyRNA *cprop) +{ + StructRNA *srna; + PropertyRNA *prop; + + FunctionRNA *func; + PropertyRNA *parm; + + RNA_def_property_srna(cprop, "VertexColors"); + srna= RNA_def_struct(brna, "VertexColors", NULL); + RNA_def_struct_sdna(srna, "Mesh"); + RNA_def_struct_ui_text(srna, "Vertex Colors", "Collection of vertex colors"); + + func= RNA_def_function(srna, "new", "rna_Mesh_vertex_color_new"); + RNA_def_function_flag(func, FUNC_USE_CONTEXT); + RNA_def_function_ui_description(func, "Add a vertex color layer to Mesh."); + parm= RNA_def_string(func, "name", "UVTex", 0, "", "UV Texture name."); + parm= RNA_def_pointer(func, "layer", "MeshColorLayer", "", "The newly created layer."); + RNA_def_function_return(func, parm); + +/* + func= RNA_def_function(srna, "remove", "rna_Mesh_vertex_color_remove"); + RNA_def_function_ui_description(func, "Remove a vertex color layer."); + RNA_def_function_flag(func, FUNC_USE_REPORTS); + parm= RNA_def_pointer(func, "layer", "Layer", "", "The layer to remove."); + RNA_def_property_flag(parm, PROP_REQUIRED); +*/ + prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED); + RNA_def_property_struct_type(prop, "MeshColorLayer"); + RNA_def_property_pointer_funcs(prop, "rna_Mesh_active_vertex_color_get", "rna_Mesh_active_vertex_color_set", NULL, NULL); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Active Vertex Color Layer", "Active vertex color layer"); + RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); +} + +/* mesh.uv_layers */ +static void rna_def_uv_textures(BlenderRNA *brna, PropertyRNA *cprop) +{ + StructRNA *srna; + PropertyRNA *prop; + + FunctionRNA *func; + PropertyRNA *parm; + + RNA_def_property_srna(cprop, "UVTextures"); + srna= RNA_def_struct(brna, "UVTextures", NULL); + RNA_def_struct_sdna(srna, "Mesh"); + RNA_def_struct_ui_text(srna, "UV Textures", "Collection of uv textures"); + + func= RNA_def_function(srna, "new", "rna_Mesh_uv_texture_new"); + RNA_def_function_flag(func, FUNC_USE_CONTEXT); + RNA_def_function_ui_description(func, "Add a UV texture layer to Mesh."); + parm= RNA_def_string(func, "name", "UVTex", 0, "", "UV Texture name."); + parm= RNA_def_pointer(func, "layer", "MeshColorLayer", "", "The newly created layer."); + RNA_def_function_return(func, parm); + +/* + func= RNA_def_function(srna, "remove", "rna_Mesh_uv_layers_remove"); + RNA_def_function_ui_description(func, "Remove a vertex color layer."); + RNA_def_function_flag(func, FUNC_USE_REPORTS); + parm= RNA_def_pointer(func, "layer", "Layer", "", "The layer to remove."); + RNA_def_property_flag(parm, PROP_REQUIRED); +*/ + prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED); + RNA_def_property_struct_type(prop, "MeshTextureFaceLayer"); + RNA_def_property_pointer_funcs(prop, "rna_Mesh_active_uv_texture_get", "rna_Mesh_active_uv_texture_set", NULL, NULL); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Active UV Texture", "Active UV texture"); + RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); +} + static void rna_def_mesh(BlenderRNA *brna) { StructRNA *srna; @@ -1672,13 +1770,7 @@ static void rna_def_mesh(BlenderRNA *brna) RNA_def_property_collection_funcs(prop, "rna_Mesh_uv_textures_begin", 0, 0, 0, "rna_Mesh_uv_textures_length", 0, 0); RNA_def_property_struct_type(prop, "MeshTextureFaceLayer"); RNA_def_property_ui_text(prop, "UV Textures", ""); - - prop= RNA_def_property(srna, "active_uv_texture", PROP_POINTER, PROP_UNSIGNED); - RNA_def_property_struct_type(prop, "MeshTextureFaceLayer"); - RNA_def_property_pointer_funcs(prop, "rna_Mesh_active_uv_texture_get", "rna_Mesh_active_uv_texture_set", NULL, NULL); - RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Active UV Texture", "Active UV texture"); - RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); + rna_def_uv_textures(brna, prop); prop= RNA_def_property(srna, "active_uv_texture_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_funcs(prop, "rna_Mesh_active_uv_texture_index_get", "rna_Mesh_active_uv_texture_index_set", "rna_Mesh_active_uv_texture_index_range"); @@ -1712,14 +1804,9 @@ static void rna_def_mesh(BlenderRNA *brna) RNA_def_property_collection_funcs(prop, "rna_Mesh_vertex_colors_begin", 0, 0, 0, "rna_Mesh_vertex_colors_length", 0, 0); RNA_def_property_struct_type(prop, "MeshColorLayer"); RNA_def_property_ui_text(prop, "Vertex Colors", ""); + rna_def_vertex_colors(brna, prop); - prop= RNA_def_property(srna, "active_vertex_color", PROP_POINTER, PROP_UNSIGNED); - RNA_def_property_struct_type(prop, "MeshColorLayer"); - RNA_def_property_pointer_funcs(prop, "rna_Mesh_active_vertex_color_get", "rna_Mesh_active_vertex_color_set", NULL, NULL); - RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Active Vertex Color Layer", "Active vertex color layer"); - RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - + /* TODO, remove and make a collection property */ prop= RNA_def_property(srna, "active_vertex_color_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_funcs(prop, "rna_Mesh_active_vertex_color_index_get", "rna_Mesh_active_vertex_color_index_set", "rna_Mesh_active_vertex_color_index_range"); RNA_def_property_ui_text(prop, "Active Vertex Color Index", "Active vertex color index"); diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c index 97252ce754e..b0d655e611c 100644 --- a/source/blender/makesrna/intern/rna_mesh_api.c +++ b/source/blender/makesrna/intern/rna_mesh_api.c @@ -37,15 +37,6 @@ #ifdef RNA_RUNTIME -static void rna_Mesh_uv_texture_add(struct Mesh *me, struct bContext *C) -{ - ED_mesh_uv_texture_add(C, NULL, NULL, me); -} - -static void rna_Mesh_vertex_color_add(struct Mesh *me, struct bContext *C) -{ - ED_mesh_color_add(C, NULL, NULL, me); -} #else @@ -68,14 +59,6 @@ void RNA_api_mesh(StructRNA *srna) parm= RNA_def_int(func, "faces", 0, 0, INT_MAX, "Number", "Number of faces to add.", 0, INT_MAX); RNA_def_property_flag(parm, PROP_REQUIRED); - func= RNA_def_function(srna, "add_uv_texture", "rna_Mesh_uv_texture_add"); - RNA_def_function_flag(func, FUNC_USE_CONTEXT); - RNA_def_function_ui_description(func, "Add a UV texture layer to Mesh."); - - func= RNA_def_function(srna, "add_vertex_color", "rna_Mesh_vertex_color_add"); - RNA_def_function_flag(func, FUNC_USE_CONTEXT); - RNA_def_function_ui_description(func, "Add a vertex color layer to Mesh."); - func= RNA_def_function(srna, "calc_normals", "ED_mesh_calc_normals"); RNA_def_function_ui_description(func, "Calculate vertex normals."); diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index ce797f21494..73ed2a3ba50 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -1135,6 +1135,28 @@ static void rna_def_pose_ikparam(BlenderRNA *brna) RNA_def_property_ui_text(prop, "IK Solver", "IK solver for which these parameters are defined, 0 for Legacy, 1 for iTaSC"); } +/* pose.bone_groups */ +static void rna_def_bone_groups(BlenderRNA *brna, PropertyRNA *cprop) +{ + StructRNA *srna; + PropertyRNA *prop; + +// FunctionRNA *func; +// PropertyRNA *parm; + + RNA_def_property_srna(cprop, "BoneGroups"); + srna= RNA_def_struct(brna, "BoneGroups", NULL); + RNA_def_struct_sdna(srna, "bPose"); + RNA_def_struct_ui_text(srna, "Bone Groups", "Collection of bone groups"); + + prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); + RNA_def_property_struct_type(prop, "BoneGroup"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_pointer_funcs(prop, "rna_Pose_active_bone_group_get", "rna_Pose_active_bone_group_set", NULL, NULL); + RNA_def_property_ui_text(prop, "Active Bone Group", "Active bone group for this pose"); + RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update"); +} + static void rna_def_pose(BlenderRNA *brna) { StructRNA *srna; @@ -1156,13 +1178,7 @@ static void rna_def_pose(BlenderRNA *brna) RNA_def_property_collection_sdna(prop, NULL, "agroups", NULL); RNA_def_property_struct_type(prop, "BoneGroup"); RNA_def_property_ui_text(prop, "Bone Groups", "Groups of the bones"); - - prop= RNA_def_property(srna, "active_bone_group", PROP_POINTER, PROP_NONE); - RNA_def_property_struct_type(prop, "BoneGroup"); - RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_pointer_funcs(prop, "rna_Pose_active_bone_group_get", "rna_Pose_active_bone_group_set", NULL, NULL); - RNA_def_property_ui_text(prop, "Active Bone Group", "Active bone group for this pose"); - RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update"); + rna_def_bone_groups(brna, prop); prop= RNA_def_property(srna, "active_bone_group_index", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "active_group"); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index f09dd596f4f..442c4b64f91 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2905,6 +2905,43 @@ static void rna_def_timeline_markers(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); } +/* scene.keying_sets */ +static void rna_def_scene_keying_sets(BlenderRNA *brna, PropertyRNA *cprop) +{ + StructRNA *srna; + PropertyRNA *prop; + +// FunctionRNA *func; +// PropertyRNA *parm; + + RNA_def_property_srna(cprop, "KeyingSets"); + srna= RNA_def_struct(brna, "KeyingSets", NULL); + RNA_def_struct_sdna(srna, "Scene"); + RNA_def_struct_ui_text(srna, "Keying Sets", "Scene keying sets"); + + /* + func= RNA_def_function(srna, "new", "rna_Curve_spline_new"); + RNA_def_function_ui_description(func, "Add a new spline to the curve."); + parm= RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline."); + RNA_def_function_return(func, parm); + + func= RNA_def_function(srna, "remove", "rna_Curve_spline_remove"); + RNA_def_function_ui_description(func, "Remove a spline from a curve."); + RNA_def_function_flag(func, FUNC_USE_REPORTS); + parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove."); + RNA_def_property_flag(parm, PROP_REQUIRED); + */ + + prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); + RNA_def_property_struct_type(prop, "KeyingSet"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL, NULL); + RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes"); + RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); +} + void RNA_def_scene(BlenderRNA *brna) { StructRNA *srna; @@ -3089,6 +3126,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_struct_type(prop, "KeyingSet"); RNA_def_property_ui_text(prop, "Absolute Keying Sets", "Absolute Keying Sets for this Scene"); RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); + rna_def_scene_keying_sets(brna, prop); prop= RNA_def_property(srna, "keying_sets_all", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_funcs(prop, "rna_Scene_all_keyingsets_begin", "rna_Scene_all_keyingsets_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0); @@ -3096,13 +3134,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_ui_text(prop, "All Keying Sets", "All Keying Sets available for use (builtins and Absolute Keying Sets for this Scene)"); RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); - prop= RNA_def_property(srna, "active_keying_set", PROP_POINTER, PROP_NONE); - RNA_def_property_struct_type(prop, "KeyingSet"); - RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL, NULL); - RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes"); - RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); - + /* TODO, move into the collection */ prop= RNA_def_property(srna, "active_keying_set_index", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "active_keyingset"); RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get", "rna_Scene_active_keying_set_index_set", NULL); diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 67b8ca057c8..edd932f4ca7 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -1237,6 +1237,45 @@ static void rna_def_window(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Window_screen_update"); } +/* curve.splines */ +static void rna_def_wm_keyconfigs(BlenderRNA *brna, PropertyRNA *cprop) +{ + StructRNA *srna; + PropertyRNA *prop; + + //FunctionRNA *func; + //PropertyRNA *parm; + + RNA_def_property_srna(cprop, "KeyConfigurations"); + srna= RNA_def_struct(brna, "KeyConfigurations", NULL); + RNA_def_struct_sdna(srna, "wmWindowManager"); + RNA_def_struct_ui_text(srna, "KeyConfigs", "Collection of KeyConfigs"); +/* + func= RNA_def_function(srna, "new", "rna_Curve_spline_new"); + RNA_def_function_ui_description(func, "Add a new spline to the curve."); + parm= RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline."); + RNA_def_function_return(func, parm); + + func= RNA_def_function(srna, "remove", "rna_Curve_spline_remove"); + RNA_def_function_ui_description(func, "Remove a spline from a curve."); + RNA_def_function_flag(func, FUNC_USE_REPORTS); + parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove."); + RNA_def_property_flag(parm, PROP_REQUIRED); +*/ + prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); + RNA_def_property_struct_type(prop, "KeyConfig"); + RNA_def_property_pointer_funcs(prop, "rna_WindowManager_active_keyconfig_get", "rna_WindowManager_active_keyconfig_set", NULL, NULL); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Active KeyConfig", "Active wm KeyConfig"); + + prop= RNA_def_property(srna, "default", PROP_POINTER, PROP_NEVER_NULL); + RNA_def_property_pointer_sdna(prop, NULL, "defaultconf"); + RNA_def_property_struct_type(prop, "KeyConfig"); + RNA_def_property_ui_text(prop, "Default Key Configuration", ""); +} + static void rna_def_windowmanager(BlenderRNA *brna) { StructRNA *srna; @@ -1258,17 +1297,7 @@ static void rna_def_windowmanager(BlenderRNA *brna) prop= RNA_def_property(srna, "keyconfigs", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "KeyConfig"); RNA_def_property_ui_text(prop, "Key Configurations", "Registered key configurations"); - - prop= RNA_def_property(srna, "active_keyconfig", PROP_POINTER, PROP_NEVER_NULL); - RNA_def_property_struct_type(prop, "KeyConfig"); - RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_pointer_funcs(prop, "rna_WindowManager_active_keyconfig_get", "rna_WindowManager_active_keyconfig_set", 0, NULL); - RNA_def_property_ui_text(prop, "Active Key Configuration", ""); - - prop= RNA_def_property(srna, "default_keyconfig", PROP_POINTER, PROP_NEVER_NULL); - RNA_def_property_pointer_sdna(prop, NULL, "defaultconf"); - RNA_def_property_struct_type(prop, "KeyConfig"); - RNA_def_property_ui_text(prop, "Default Key Configuration", ""); + rna_def_wm_keyconfigs(brna, prop); RNA_api_wm(srna); } -- cgit v1.2.3