diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_mesh.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh.c | 184 |
1 files changed, 102 insertions, 82 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 01ffaacc086..3758f0ad101 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -59,22 +59,29 @@ static void rna_Mesh_update_data(Main *bmain, Scene *scene, PointerRNA *ptr) { ID *id= ptr->id.data; - DAG_id_flush_update(id, OB_RECALC_DATA); - WM_main_add_notifier(NC_GEOM|ND_DATA, id); + /* cheating way for importers to avoid slow updates */ + if(id->us > 0) { + DAG_id_flush_update(id, OB_RECALC_DATA); + WM_main_add_notifier(NC_GEOM|ND_DATA, id); + } } static void rna_Mesh_update_select(Main *bmain, Scene *scene, PointerRNA *ptr) { ID *id= ptr->id.data; - - WM_main_add_notifier(NC_GEOM|ND_SELECT, id); + /* cheating way for importers to avoid slow updates */ + if(id->us > 0) { + WM_main_add_notifier(NC_GEOM|ND_SELECT, id); + } } void rna_Mesh_update_draw(Main *bmain, Scene *scene, PointerRNA *ptr) { ID *id= ptr->id.data; - - WM_main_add_notifier(NC_GEOM|ND_DATA, id); + /* cheating way for importers to avoid slow updates */ + if(id->us > 0) { + WM_main_add_notifier(NC_GEOM|ND_DATA, id); + } } static void rna_MeshVertex_normal_get(PointerRNA *ptr, float *value) @@ -505,8 +512,7 @@ static int rna_CustomDataData_numverts(PointerRNA *ptr, int type) Mesh *me= (Mesh*)ptr->id.data; CustomData *fdata= rna_mesh_fdata(me); CustomDataLayer *cdl; - int a; - size_t b; + int a, b; for(cdl=fdata->layers, a=0; a<fdata->totlayer; cdl++, a++) { if(cdl->type == type) { @@ -908,8 +914,7 @@ static char *rna_CustomDataData_path(PointerRNA *ptr, char *collection, int type Mesh *me= (Mesh*)ptr->id.data; CustomData *fdata= rna_mesh_pdata(me); CustomDataLayer *cdl; - int a; - size_t b; + int a, b; for(cdl=fdata->layers, a=0; a<fdata->totlayer; cdl++, a++) { if(cdl->type == type) { @@ -949,7 +954,7 @@ static char *rna_MeshIntPropertyLayer_path(PointerRNA *ptr) static char *rna_MeshIntProperty_path(PointerRNA *ptr) { - return rna_CustomDataData_path(ptr, "int_layers", CD_MCOL); + return rna_CustomDataData_path(ptr, "layers_int", CD_MCOL); } static char *rna_MeshFloatPropertyLayer_path(PointerRNA *ptr) @@ -959,7 +964,7 @@ static char *rna_MeshFloatPropertyLayer_path(PointerRNA *ptr) static char *rna_MeshFloatProperty_path(PointerRNA *ptr) { - return rna_CustomDataData_path(ptr, "float_layers", CD_MCOL); + return rna_CustomDataData_path(ptr, "layers_float", CD_MCOL); } static char *rna_MeshStringPropertyLayer_path(PointerRNA *ptr) @@ -969,7 +974,7 @@ static char *rna_MeshStringPropertyLayer_path(PointerRNA *ptr) static char *rna_MeshStringProperty_path(PointerRNA *ptr) { - return rna_CustomDataData_path(ptr, "string_layers", CD_MCOL); + return rna_CustomDataData_path(ptr, "layers_string", CD_MCOL); } static int rna_Mesh_tot_vert_get(PointerRNA *ptr) @@ -1035,14 +1040,14 @@ static void rna_def_mvert(BlenderRNA *brna) RNA_def_property_float_funcs(prop, "rna_MeshVertex_normal_get", "rna_MeshVertex_normal_set", NULL); RNA_def_property_ui_text(prop, "Normal", "Vertex Normal"); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT); - RNA_def_property_ui_text(prop, "Selected", ""); + RNA_def_property_ui_text(prop, "Select", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_select"); - prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE); - RNA_def_property_ui_text(prop, "Hidden", ""); + RNA_def_property_ui_text(prop, "Hide", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_select"); prop= RNA_def_property(srna, "bevel_weight", PROP_FLOAT, PROP_NONE); @@ -1072,7 +1077,7 @@ static void rna_def_medge(BlenderRNA *brna) RNA_def_struct_path_func(srna, "rna_MeshEdge_path"); RNA_def_struct_ui_icon(srna, ICON_EDGESEL); - prop= RNA_def_property(srna, "verts", PROP_INT, PROP_UNSIGNED); + prop= RNA_def_property(srna, "vertices", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "v1"); RNA_def_property_array(prop, 2); RNA_def_property_ui_text(prop, "Vertices", "Vertex indices"); @@ -1088,34 +1093,32 @@ static void rna_def_medge(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Bevel Weight", "Weight used by the Bevel modifier"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT); - RNA_def_property_ui_text(prop, "Selected", ""); + RNA_def_property_ui_text(prop, "Select", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_select"); - prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE); - RNA_def_property_ui_text(prop, "Hidden", ""); + RNA_def_property_ui_text(prop, "Hide", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_select"); - prop= RNA_def_property(srna, "seam", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_seam", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_SEAM); RNA_def_property_ui_text(prop, "Seam", "Seam edge for UV unwrapping"); RNA_def_property_update(prop, 0, "rna_Mesh_update_select"); - prop= RNA_def_property(srna, "sharp", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_edge_sharp", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_SHARP); RNA_def_property_ui_text(prop, "Sharp", "Sharp edge for the EdgeSplit modifier"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "loose", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "is_loose", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_LOOSEEDGE); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Loose", "Loose edge"); - prop= RNA_def_property(srna, "fgon", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "is_fgon", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_FGON); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Fgon", "Fgon edge"); prop= RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED); @@ -1136,7 +1139,7 @@ static void rna_def_mface(BlenderRNA *brna) RNA_def_struct_ui_icon(srna, ICON_FACESEL); // XXX allows creating invalid meshes - prop= RNA_def_property(srna, "verts", PROP_INT, PROP_UNSIGNED); + prop= RNA_def_property(srna, "vertices", PROP_INT, PROP_UNSIGNED); RNA_def_property_array(prop, 4); RNA_def_property_flag(prop, PROP_DYNAMIC); RNA_def_property_dynamic_array_funcs(prop, "rna_MeshFace_verts_get_length"); @@ -1144,7 +1147,7 @@ static void rna_def_mface(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Vertices", "Vertex indices"); /* leaving this fixed size array for foreach_set used in import scripts */ - prop= RNA_def_property(srna, "verts_raw", PROP_INT, PROP_UNSIGNED); + prop= RNA_def_property(srna, "vertices_raw", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "v1"); RNA_def_property_array(prop, 4); RNA_def_property_ui_text(prop, "Vertices", "Fixed size vertex indices array"); @@ -1155,17 +1158,17 @@ static void rna_def_mface(BlenderRNA *brna) RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MeshFace_material_index_range"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_FACE_SEL); - RNA_def_property_ui_text(prop, "Selected", ""); + RNA_def_property_ui_text(prop, "Select", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_select"); - prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_HIDE); - RNA_def_property_ui_text(prop, "Hidden", ""); + RNA_def_property_ui_text(prop, "Hide", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_select"); - prop= RNA_def_property(srna, "smooth", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_smooth", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_SMOOTH); RNA_def_property_ui_text(prop, "Smooth", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); @@ -1242,84 +1245,85 @@ static void rna_def_mtexpoly(BlenderRNA *brna) prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "tpage"); - RNA_def_property_pointer_funcs(prop, NULL, "rna_TextureFace_image_set", NULL); + RNA_def_property_pointer_funcs(prop, NULL, "rna_TextureFace_image_set", NULL, NULL); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Image", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "tex", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_image", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_TEX); RNA_def_property_ui_text(prop, "Tex", "Render face with texture"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "light", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_light", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_LIGHT); RNA_def_property_ui_text(prop, "Light", "Use light for face"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "invisible", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_INVISIBLE); RNA_def_property_ui_text(prop, "Invisible", "Make face invisible"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "collision", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_collision", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_DYNAMIC); RNA_def_property_ui_text(prop, "Collision", "Use face for collision and ray-sensor detection"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "shared", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_blend_shared", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_SHAREDCOL); RNA_def_property_ui_text(prop, "Shared", "Blend vertex colors across face when vertices are shared"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "twoside", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_twoside", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_TWOSIDE); RNA_def_property_ui_text(prop, "Twoside", "Render face twosided"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "object_color", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_object_color", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_OBCOL); RNA_def_property_ui_text(prop, "Object Color", "Use ObColor instead of vertex colors"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_halo", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_BILLBOARD); RNA_def_property_ui_text(prop, "Halo", "Screen aligned billboard"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "billboard", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_billboard", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_BILLBOARD2); RNA_def_property_ui_text(prop, "Billboard", "Billboard with Z-axis constraint"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "shadow", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_shadow_cast", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_SHADOW); RNA_def_property_ui_text(prop, "Shadow", "Face is used for shadow"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "text", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_bitmap_text", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_BMFONT); RNA_def_property_ui_text(prop, "Text", "Enable bitmap text on face"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "alpha_sort", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_alpha_sort", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_ALPHASORT); RNA_def_property_ui_text(prop, "Alpha Sort", "Enable sorting of faces for correct alpha drawing (slow, use Clip Alpha instead when possible)"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "transp", PROP_ENUM, PROP_NONE); + prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "transp"); RNA_def_property_enum_items(prop, transp_items); RNA_def_property_ui_text(prop, "Transparency", "Transparency blending mode"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "uv_selected", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "select_uv", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TF_SEL1); RNA_def_property_array(prop, 4); RNA_def_property_ui_text(prop, "UV Selected", ""); RNA_def_property_update(prop, 0, "rna_Mesh_update_select"); #if 0 - prop= RNA_def_property(srna, "uv_pinned", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "pin_uv", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "unwrap", TF_PIN1); RNA_def_property_array(prop, 4); RNA_def_property_ui_text(prop, "UV Pinned", ""); @@ -1546,7 +1550,7 @@ static void rna_def_mesh(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Mesh", "Mesh datablock defining geometric surfaces"); RNA_def_struct_ui_icon(srna, ICON_MESH_DATA); - prop= RNA_def_property(srna, "verts", PROP_COLLECTION, PROP_NONE); + prop= RNA_def_property(srna, "vertices", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "mvert", "totvert"); RNA_def_property_struct_type(prop, "MeshVertex"); RNA_def_property_ui_text(prop, "Vertices", "Vertices of the mesh"); @@ -1582,7 +1586,7 @@ static void rna_def_mesh(BlenderRNA *brna) 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); + 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"); @@ -1594,7 +1598,7 @@ static void rna_def_mesh(BlenderRNA *brna) prop= RNA_def_property(srna, "uv_texture_clone", PROP_POINTER, PROP_UNSIGNED); RNA_def_property_struct_type(prop, "MeshTextureFaceLayer"); - RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_texture_clone_get", "rna_Mesh_uv_texture_clone_set", NULL); + RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_texture_clone_get", "rna_Mesh_uv_texture_clone_set", NULL, NULL); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Clone UV Texture", "UV texture to be used as cloning source"); @@ -1604,7 +1608,7 @@ static void rna_def_mesh(BlenderRNA *brna) prop= RNA_def_property(srna, "uv_texture_stencil", PROP_POINTER, PROP_UNSIGNED); RNA_def_property_struct_type(prop, "MeshTextureFaceLayer"); - RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_texture_stencil_get", "rna_Mesh_uv_texture_stencil_set", NULL); + RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_texture_stencil_get", "rna_Mesh_uv_texture_stencil_set", NULL, NULL); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Mask UV Texture", "UV texture to mask the painted area"); @@ -1622,7 +1626,7 @@ static void rna_def_mesh(BlenderRNA *brna) 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); + 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"); @@ -1632,38 +1636,34 @@ static void rna_def_mesh(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Active Vertex Color Index", "Active vertex color index"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); - prop= RNA_def_property(srna, "float_layers", PROP_COLLECTION, PROP_NONE); + prop= RNA_def_property(srna, "layers_float", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "pdata.layers", "pdata.totlayer"); RNA_def_property_collection_funcs(prop, "rna_Mesh_float_layers_begin", 0, 0, 0, "rna_Mesh_float_layers_length", 0, 0); RNA_def_property_struct_type(prop, "MeshFloatPropertyLayer"); RNA_def_property_ui_text(prop, "Float Property Layers", ""); - prop= RNA_def_property(srna, "int_layers", PROP_COLLECTION, PROP_NONE); + prop= RNA_def_property(srna, "layers_int", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "pdata.layers", "pdata.totlayer"); RNA_def_property_collection_funcs(prop, "rna_Mesh_int_layers_begin", 0, 0, 0, "rna_Mesh_int_layers_length", 0, 0); RNA_def_property_struct_type(prop, "MeshIntPropertyLayer"); RNA_def_property_ui_text(prop, "Int Property Layers", ""); - prop= RNA_def_property(srna, "string_layers", PROP_COLLECTION, PROP_NONE); + prop= RNA_def_property(srna, "layers_string", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "pdata.layers", "pdata.totlayer"); RNA_def_property_collection_funcs(prop, "rna_Mesh_string_layers_begin", 0, 0, 0, "rna_Mesh_string_layers_length", 0, 0); RNA_def_property_struct_type(prop, "MeshStringPropertyLayer"); RNA_def_property_ui_text(prop, "String Property Layers", ""); - prop= RNA_def_property(srna, "autosmooth", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_auto_smooth", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_AUTOSMOOTH); RNA_def_property_ui_text(prop, "Auto Smooth", "Treats all set-smoothed faces with angles less than the specified angle as 'smooth' during render"); - prop= RNA_def_property(srna, "autosmooth_angle", PROP_INT, PROP_NONE); + prop= RNA_def_property(srna, "auto_smooth_angle", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "smoothresh"); RNA_def_property_range(prop, 1, 80); RNA_def_property_ui_text(prop, "Auto Smooth Angle", "Defines maximum angle between face normals that 'Auto Smooth' will operate on"); - prop= RNA_def_property(srna, "vertex_normal_flip", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ME_NOPUNOFLIP); - RNA_def_property_ui_text(prop, "Vertex Normal Flip", "Flip vertex normals towards the camera during render"); - - prop= RNA_def_property(srna, "double_sided", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_double_sided", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_TWOSIDED); RNA_def_property_ui_text(prop, "Double Sided", "Render/display the mesh with double or single sided lighting"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); @@ -1676,66 +1676,86 @@ static void rna_def_mesh(BlenderRNA *brna) prop= RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "key"); RNA_def_property_ui_text(prop, "Shape Keys", ""); - + + /* texture space */ + prop= RNA_def_property(srna, "use_auto_texspace", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "texflag", AUTOSPACE); + RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjusts active object's texture space automatically when transforming object"); + + /*prop= RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Texture Space Location", "Texture space location"); + RNA_def_property_editable_func(prop, "rna_Mesh_texspace_editable"); + RNA_def_property_float_funcs(prop, "rna_Mesh_texspace_loc_get", "rna_Mesh_texspace_loc_set", NULL); + RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); + */ + + /* not supported yet + prop= RNA_def_property(srna, "texspace_rot", PROP_FLOAT, PROP_EULER); + RNA_def_property_float(prop, NULL, "rot"); + RNA_def_property_ui_text(prop, "Texture Space Rotation", "Texture space rotation"); + RNA_def_property_editable_func(prop, texspace_editable); + RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");*/ + /* Mesh Draw Options for Edit Mode*/ - prop= RNA_def_property(srna, "draw_edges", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_edges", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWEDGES); RNA_def_property_ui_text(prop, "Draw Edges", "Displays selected edges using hilights in the 3D view and UV editor"); RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); - prop= RNA_def_property(srna, "all_edges", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_all_edges", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_ALLEDGES); RNA_def_property_ui_text(prop, "All Edges", "Displays all edges for wireframe in all view modes in the 3D view"); - prop= RNA_def_property(srna, "draw_faces", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_faces", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWFACES); RNA_def_property_ui_text(prop, "Draw Faces", "Displays all faces as shades in the 3D view and UV editor"); RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); - prop= RNA_def_property(srna, "draw_normals", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_normal_face", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWNORMALS); RNA_def_property_ui_text(prop, "Draw Normals", "Displays face normals as lines"); RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); - prop= RNA_def_property(srna, "draw_vertex_normals", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_normal_vertex", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_VNORMALS); RNA_def_property_ui_text(prop, "Draw Vertex Normals", "Displays vertex normals as lines"); RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); - prop= RNA_def_property(srna, "draw_creases", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_edge_crease", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWCREASES); RNA_def_property_ui_text(prop, "Draw Creases", "Displays creases created for subsurf weighting"); RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); - prop= RNA_def_property(srna, "draw_bevel_weights", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_edge_bevel_weight", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWBWEIGHTS); RNA_def_property_ui_text(prop, "Draw Bevel Weights", "Displays weights created for the Bevel modifier"); RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); - prop= RNA_def_property(srna, "draw_seams", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_edge_seams", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWSEAMS); RNA_def_property_ui_text(prop, "Draw Seams", "Displays UV unwrapping seams"); RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); - prop= RNA_def_property(srna, "draw_sharp", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_edge_sharp", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWSHARP); RNA_def_property_ui_text(prop, "Draw Sharp", "Displays sharp edges, used with the EdgeSplit modifier"); RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); - prop= RNA_def_property(srna, "draw_edge_lenght", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_extra_edge_length", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_EDGELEN); - RNA_def_property_ui_text(prop, "Edge Length", "Displays selected edge lengths"); + RNA_def_property_ui_text(prop, "Edge Length", "Displays selected edge lengths, Using global values when set in the transform panel"); RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); - prop= RNA_def_property(srna, "draw_edge_angle", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_extra_edge_angle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_EDGEANG); - RNA_def_property_ui_text(prop, "Edge Angles", "Displays the angles in the selected edges in degrees"); + RNA_def_property_ui_text(prop, "Edge Angles", "Displays the angles in the selected edges in degrees, Using global values when set in the transform panel"); RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); - prop= RNA_def_property(srna, "draw_face_area", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_extra_face_area", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_FACEAREA); - RNA_def_property_ui_text(prop, "Face Area", "Displays the area of selected faces"); + RNA_def_property_ui_text(prop, "Face Area", "Displays the area of selected faces, Using global values when set in the transform panel"); RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); prop= RNA_def_property(srna, "draw_pins", PROP_BOOLEAN, PROP_NONE); |