tesselat -> tessellat in UI messages, + style edits.

This commit is contained in:
2012-03-05 16:19:16 +00:00
parent aa0eb72c18
commit 1e41b19ec1

View File

@@ -230,7 +230,8 @@ static void rna_MeshFace_normal_get(PointerRNA *ptr, float *values)
MFace *mface = (MFace*)ptr->data;
if (mface->v4)
normal_quad_v3( values,me->mvert[mface->v1].co, me->mvert[mface->v2].co, me->mvert[mface->v3].co, me->mvert[mface->v4].co);
normal_quad_v3(values, me->mvert[mface->v1].co, me->mvert[mface->v2].co,
me->mvert[mface->v3].co, me->mvert[mface->v4].co);
else
normal_tri_v3(values, me->mvert[mface->v1].co, me->mvert[mface->v2].co, me->mvert[mface->v3].co);
}
@@ -241,7 +242,8 @@ static float rna_MeshFace_area_get(PointerRNA *ptr)
MFace *mface = (MFace*)ptr->data;
if (mface->v4)
return area_quad_v3(me->mvert[mface->v1].co, me->mvert[mface->v2].co, me->mvert[mface->v3].co, me->mvert[mface->v4].co);
return area_quad_v3(me->mvert[mface->v1].co, me->mvert[mface->v2].co, me->mvert[mface->v3].co,
me->mvert[mface->v4].co);
else
return area_tri_v3(me->mvert[mface->v1].co, me->mvert[mface->v2].co, me->mvert[mface->v3].co);
}
@@ -760,7 +762,8 @@ static int rna_float_layer_check(CollectionPropertyIterator *iter, void *data)
static void rna_Mesh_float_layers_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
CustomData *pdata = rna_mesh_pdata(ptr);
rna_iterator_array_begin(iter, (void*)pdata->layers, sizeof(CustomDataLayer), pdata->totlayer, 0, rna_float_layer_check);
rna_iterator_array_begin(iter, (void*)pdata->layers, sizeof(CustomDataLayer), pdata->totlayer, 0,
rna_float_layer_check);
}
static int rna_Mesh_float_layers_length(PointerRNA *ptr)
@@ -790,7 +793,8 @@ static int rna_MeshIntPropertyLayer_data_length(PointerRNA *ptr)
static void rna_Mesh_int_layers_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
CustomData *pdata = rna_mesh_pdata(ptr);
rna_iterator_array_begin(iter, (void*)pdata->layers, sizeof(CustomDataLayer), pdata->totlayer, 0, rna_int_layer_check);
rna_iterator_array_begin(iter, (void*)pdata->layers, sizeof(CustomDataLayer), pdata->totlayer, 0,
rna_int_layer_check);
}
static int rna_Mesh_int_layers_length(PointerRNA *ptr)
@@ -820,7 +824,8 @@ static int rna_MeshStringPropertyLayer_data_length(PointerRNA *ptr)
static void rna_Mesh_string_layers_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
CustomData *pdata = rna_mesh_pdata(ptr);
rna_iterator_array_begin(iter, (void*)pdata->layers, sizeof(CustomDataLayer), pdata->totlayer, 0, rna_string_layer_check);
rna_iterator_array_begin(iter, (void*)pdata->layers, sizeof(CustomDataLayer), pdata->totlayer, 0,
rna_string_layer_check);
}
static int rna_Mesh_string_layers_length(PointerRNA *ptr)
@@ -866,7 +871,7 @@ static int rna_MeshFace_verts_get_length(PointerRNA *ptr, int length[RNA_MAX_ARR
if (face)
length[0] = (face->v4)? 4: 3;
else
length[0]= 4; // XXX rna_raw_access wants the length of a dummy face. this needs fixing. - Campbell
length[0] = 4; /* XXX rna_raw_access wants the length of a dummy face. this needs fixing. - Campbell */
return length[0];
}
@@ -1257,7 +1262,7 @@ static void rna_def_mvert(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop = RNA_def_property(srna, "normal", PROP_FLOAT, PROP_DIRECTION);
// RNA_def_property_float_sdna(prop, NULL, "no");
/* RNA_def_property_float_sdna(prop, NULL, "no"); */
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_float_funcs(prop, "rna_MeshVertex_normal_get", "rna_MeshVertex_normal_set", NULL);
@@ -1279,7 +1284,8 @@ static void rna_def_mvert(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop = RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_MeshVertex_groups_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", NULL, NULL, NULL, NULL);
RNA_def_property_collection_funcs(prop, "rna_MeshVertex_groups_begin", "rna_iterator_array_next",
"rna_iterator_array_end", "rna_iterator_array_get", NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "VertexGroupElement");
RNA_def_property_ui_text(prop, "Groups", "Weights for the vertex groups this vertex is member of");
@@ -1304,7 +1310,7 @@ static void rna_def_medge(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "v1");
RNA_def_property_array(prop, 2);
RNA_def_property_ui_text(prop, "Vertices", "Vertex indices");
// XXX allows creating invalid meshes
/* XXX allows creating invalid meshes */
prop = RNA_def_property(srna, "crease", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_MEdge_crease_get", "rna_MEdge_crease_set", NULL);
@@ -1361,7 +1367,7 @@ static void rna_def_mface(BlenderRNA *brna)
RNA_def_struct_path_func(srna, "rna_MeshFace_path");
RNA_def_struct_ui_icon(srna, ICON_FACESEL);
// XXX allows creating invalid meshes
/* XXX allows creating invalid meshes */
prop = RNA_def_property(srna, "vertices", PROP_INT, PROP_UNSIGNED);
RNA_def_property_array(prop, 4);
RNA_def_property_flag(prop, PROP_DYNAMIC);
@@ -1451,10 +1457,13 @@ static void rna_def_mpolygon(BlenderRNA *brna)
RNA_def_struct_path_func(srna, "rna_MeshPolygon_path");
RNA_def_struct_ui_icon(srna, ICON_FACESEL);
/* faked, actually access to loop vertex values, dont this way because manually setting up vertex/edge per loop is very low level
* instead we setup poly sizes, assign indices, then calc edges automatic when creating meshes from rna/py */
/* Faked, actually access to loop vertex values, dont this way because manually setting up
* vertex/edge per loop is very low level.
* Instead we setup poly sizes, assign indices, then calc edges automatic when creating
* meshes from rna/py. */
prop = RNA_def_property(srna, "vertices", PROP_INT, PROP_UNSIGNED);
RNA_def_property_array(prop, 3); // eek, this is still used in some cases but infact we dont want to use it at all here.
/* Eek, this is still used in some cases but in fact we don't want to use it at all here. */
RNA_def_property_array(prop, 3);
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_MeshPoly_vertices_get_length");
RNA_def_property_int_funcs(prop, "rna_MeshPoly_vertices_get", "rna_MeshPoly_vertices_set", NULL);
@@ -1520,7 +1529,9 @@ static void rna_def_mloopuv(BlenderRNA *brna)
prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshUVLoop");
RNA_def_property_collection_funcs(prop, "rna_MeshUVLoopLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshUVLoopLayer_data_length", NULL, NULL, NULL);
RNA_def_property_collection_funcs(prop, "rna_MeshUVLoopLayer_data_begin", "rna_iterator_array_next",
"rna_iterator_array_end", "rna_iterator_array_get",
"rna_MeshUVLoopLayer_data_length", NULL, NULL, NULL);
srna = RNA_def_struct(brna, "MeshUVLoop", NULL);
RNA_def_struct_sdna(srna, "MLoopUV");
@@ -1675,7 +1686,8 @@ static void rna_def_mtexpoly(BlenderRNA *brna)
prop = RNA_def_property(srna, "active_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "active_rnd", 0);
RNA_def_property_boolean_funcs(prop, "rna_MeshTexturePolyLayer_active_render_get", "rna_MeshTexturePolyLayer_active_render_set");
RNA_def_property_boolean_funcs(prop, "rna_MeshTexturePolyLayer_active_render_get",
"rna_MeshTexturePolyLayer_active_render_set");
RNA_def_property_ui_text(prop, "Active Render", "Set the map as active for rendering");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
@@ -1688,7 +1700,9 @@ static void rna_def_mtexpoly(BlenderRNA *brna)
prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshTexturePoly");
RNA_def_property_ui_text(prop, "Data", "");
RNA_def_property_collection_funcs(prop, "rna_MeshTexturePolyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshTexturePolyLayer_data_length", NULL, NULL, NULL);
RNA_def_property_collection_funcs(prop, "rna_MeshTexturePolyLayer_data_begin", "rna_iterator_array_next",
"rna_iterator_array_end", "rna_iterator_array_get",
"rna_MeshTexturePolyLayer_data_length", NULL, NULL, NULL);
srna = RNA_def_struct(brna, "MeshTexturePoly", NULL);
RNA_def_struct_sdna(srna, "MTexPoly");
@@ -1762,14 +1776,17 @@ static void rna_def_mcol(BlenderRNA *brna)
prop = RNA_def_property(srna, "active_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "active_rnd", 0);
RNA_def_property_boolean_funcs(prop, "rna_MeshColorLayer_active_render_get", "rna_MeshColorLayer_active_render_set");
RNA_def_property_boolean_funcs(prop, "rna_MeshColorLayer_active_render_get",
"rna_MeshColorLayer_active_render_set");
RNA_def_property_ui_text(prop, "Active Render", "Sets the layer as active for rendering");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshColor");
RNA_def_property_ui_text(prop, "Data", "");
RNA_def_property_collection_funcs(prop, "rna_MeshColorLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshColorLayer_data_length", NULL, NULL, NULL);
RNA_def_property_collection_funcs(prop, "rna_MeshColorLayer_data_begin", "rna_iterator_array_next",
"rna_iterator_array_end", "rna_iterator_array_get",
"rna_MeshColorLayer_data_length", NULL, NULL, NULL);
srna = RNA_def_struct(brna, "MeshColor", NULL);
RNA_def_struct_sdna(srna, "MCol");
@@ -1829,14 +1846,17 @@ static void rna_def_mloopcol(BlenderRNA *brna)
prop = RNA_def_property(srna, "active_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "active_rnd", 0);
RNA_def_property_boolean_funcs(prop, "rna_MeshLoopColorLayer_active_render_get", "rna_MeshLoopColorLayer_active_render_set");
RNA_def_property_boolean_funcs(prop, "rna_MeshLoopColorLayer_active_render_get",
"rna_MeshLoopColorLayer_active_render_set");
RNA_def_property_ui_text(prop, "Active Render", "Sets the layer as active for rendering");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshLoopColor");
RNA_def_property_ui_text(prop, "Data", "");
RNA_def_property_collection_funcs(prop, "rna_MeshLoopColorLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshLoopColorLayer_data_length", NULL, NULL, NULL);
RNA_def_property_collection_funcs(prop, "rna_MeshLoopColorLayer_data_begin", "rna_iterator_array_next",
"rna_iterator_array_end", "rna_iterator_array_get",
"rna_MeshLoopColorLayer_data_length", NULL, NULL, NULL);
srna = RNA_def_struct(brna, "MeshLoopColor", NULL);
@@ -1871,11 +1891,14 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshFloatProperty");
RNA_def_property_ui_text(prop, "Data", "");
RNA_def_property_collection_funcs(prop, "rna_MeshFloatPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshFloatPropertyLayer_data_length", NULL, NULL, NULL);
RNA_def_property_collection_funcs(prop, "rna_MeshFloatPropertyLayer_data_begin", "rna_iterator_array_next",
"rna_iterator_array_end", "rna_iterator_array_get",
"rna_MeshFloatPropertyLayer_data_length", NULL, NULL, NULL);
srna = RNA_def_struct(brna, "MeshFloatProperty", NULL);
RNA_def_struct_sdna(srna, "MFloatProperty");
RNA_def_struct_ui_text(srna, "Mesh Float Property", "User defined floating point number value in a float properties layer");
RNA_def_struct_ui_text(srna, "Mesh Float Property",
"User defined floating point number value in a float properties layer");
RNA_def_struct_path_func(srna, "rna_MeshFloatProperty_path");
prop = RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
@@ -1897,11 +1920,14 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshIntProperty");
RNA_def_property_ui_text(prop, "Data", "");
RNA_def_property_collection_funcs(prop, "rna_MeshIntPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshIntPropertyLayer_data_length", NULL, NULL, NULL);
RNA_def_property_collection_funcs(prop, "rna_MeshIntPropertyLayer_data_begin", "rna_iterator_array_next",
"rna_iterator_array_end", "rna_iterator_array_get",
"rna_MeshIntPropertyLayer_data_length", NULL, NULL, NULL);
srna = RNA_def_struct(brna, "MeshIntProperty", NULL);
RNA_def_struct_sdna(srna, "MIntProperty");
RNA_def_struct_ui_text(srna, "Mesh Int Property", "User defined integer number value in an integer properties layer");
RNA_def_struct_ui_text(srna, "Mesh Int Property",
"User defined integer number value in an integer properties layer");
RNA_def_struct_path_func(srna, "rna_MeshIntProperty_path");
prop = RNA_def_property(srna, "value", PROP_INT, PROP_NONE);
@@ -1923,11 +1949,14 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshStringProperty");
RNA_def_property_ui_text(prop, "Data", "");
RNA_def_property_collection_funcs(prop, "rna_MeshStringPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshStringPropertyLayer_data_length", NULL, NULL, NULL);
RNA_def_property_collection_funcs(prop, "rna_MeshStringPropertyLayer_data_begin", "rna_iterator_array_next",
"rna_iterator_array_end", "rna_iterator_array_get",
"rna_MeshStringPropertyLayer_data_length", NULL, NULL, NULL);
srna = RNA_def_struct(brna, "MeshStringProperty", NULL);
RNA_def_struct_sdna(srna, "MStringProperty");
RNA_def_struct_ui_text(srna, "Mesh String Property", "User defined string text value in a string properties layer");
RNA_def_struct_ui_text(srna, "Mesh String Property",
"User defined string text value in a string properties layer");
RNA_def_struct_path_func(srna, "rna_MeshStringProperty_path");
/* low level mesh data access, treat as bytes */
@@ -1944,7 +1973,8 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
/* texture space */
prop = RNA_def_property(srna, "auto_texspace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", ME_AUTOSPACE);
RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjust active object's texture space automatically when transforming object");
RNA_def_property_ui_text(prop, "Auto Texture Space",
"Adjust active object's texture space automatically when transforming object");
prop = RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
@@ -1980,10 +2010,10 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
static void rna_def_mesh_vertices(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
// PropertyRNA *prop;
/* PropertyRNA *prop; */
FunctionRNA *func;
// PropertyRNA *parm;
/* PropertyRNA *parm; */
RNA_def_property_srna(cprop, "MeshVertices");
srna = RNA_def_struct(brna, "MeshVertices", NULL);
@@ -1993,7 +2023,7 @@ static void rna_def_mesh_vertices(BlenderRNA *brna, PropertyRNA *cprop)
func = RNA_def_function(srna, "add", "ED_mesh_vertices_add");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add", 0, INT_MAX);
#if 0 // Remove until BMesh merge
#if 0 /* BMESH_TODO Remove until BMesh merge */
func = RNA_def_function(srna, "remove", "ED_mesh_vertices_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to remove", 0, INT_MAX);
@@ -2004,10 +2034,10 @@ static void rna_def_mesh_vertices(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_mesh_edges(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
// PropertyRNA *prop;
/* PropertyRNA *prop; */
FunctionRNA *func;
// PropertyRNA *parm;
/* PropertyRNA *parm; */
RNA_def_property_srna(cprop, "MeshEdges");
srna = RNA_def_struct(brna, "MeshEdges", NULL);
@@ -2017,7 +2047,7 @@ static void rna_def_mesh_edges(BlenderRNA *brna, PropertyRNA *cprop)
func = RNA_def_function(srna, "add", "ED_mesh_edges_add");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of edges to add", 0, INT_MAX);
#if 0 // Remove until BMesh merge
#if 0 /* BMESH_TODO Remove until BMesh merge */
func = RNA_def_function(srna, "remove", "ED_mesh_edges_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of edges to remove", 0, INT_MAX);
@@ -2031,7 +2061,7 @@ static void rna_def_mesh_faces(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
FunctionRNA *func;
// PropertyRNA *parm;
/* PropertyRNA *parm; */
RNA_def_property_srna(cprop, "MeshFaces");
srna = RNA_def_struct(brna, "MeshFaces", NULL);
@@ -2045,7 +2075,7 @@ static void rna_def_mesh_faces(BlenderRNA *brna, PropertyRNA *cprop)
func = RNA_def_function(srna, "add", "ED_mesh_faces_add");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of faces to add", 0, INT_MAX);
#if 0 // Remove until BMesh merge
#if 0 /* BMESH_TODO Remove until BMesh merge */
func = RNA_def_function(srna, "remove", "ED_mesh_faces_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of faces to remove", 0, INT_MAX);
@@ -2067,7 +2097,7 @@ static void rna_def_mesh_loops(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_sdna(srna, "Mesh");
RNA_def_struct_ui_text(srna, "Mesh Loops", "Collection of mesh loops");
#if 0 // BMESH_TODO
#if 0 /* BMESH_TODO */
prop = RNA_def_property(srna, "active", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "act_face");
RNA_def_property_ui_text(prop, "Active Polygon", "The active polygon for this mesh");
@@ -2086,7 +2116,7 @@ static void rna_def_mesh_polygons(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
FunctionRNA *func;
//PropertyRNA *parm;
/* PropertyRNA *parm; */
RNA_def_property_srna(cprop, "MeshPolygons");
srna = RNA_def_struct(brna, "MeshPolygons", NULL);
@@ -2109,8 +2139,8 @@ static void rna_def_tessface_vertex_colors(BlenderRNA *brna, PropertyRNA *cprop)
StructRNA *srna;
PropertyRNA *prop;
//FunctionRNA *func;
//PropertyRNA *parm;
/* FunctionRNA *func; */
/* PropertyRNA *parm; */
RNA_def_property_srna(cprop, "VertexColors");
srna = RNA_def_struct(brna, "VertexColors", NULL);
@@ -2119,12 +2149,14 @@ static void rna_def_tessface_vertex_colors(BlenderRNA *brna, PropertyRNA *cprop)
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_tessface_vertex_color_active_get", "rna_Mesh_tessface_vertex_color_active_set", NULL, NULL);
RNA_def_property_pointer_funcs(prop, "rna_Mesh_tessface_vertex_color_active_get",
"rna_Mesh_tessface_vertex_color_active_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Active Vertex Color Layer", "Active vertex color layer");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Mesh_tessface_vertex_color_active_index_get", "rna_Mesh_tessface_vertex_color_active_index_set", "rna_Mesh_vertex_color_index_range");
RNA_def_property_int_funcs(prop, "rna_Mesh_tessface_vertex_color_active_index_get",
"rna_Mesh_tessface_vertex_color_active_index_set", "rna_Mesh_vertex_color_index_range");
RNA_def_property_ui_text(prop, "Active Vertex Color Index", "Active vertex color index");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
@@ -2159,13 +2191,15 @@ static void rna_def_loop_colors(BlenderRNA *brna, PropertyRNA *cprop)
*/
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED);
RNA_def_property_struct_type(prop, "MeshLoopColorLayer");
RNA_def_property_pointer_funcs(prop, "rna_Mesh_vertex_color_active_get", "rna_Mesh_vertex_color_active_set", NULL, NULL);
RNA_def_property_pointer_funcs(prop, "rna_Mesh_vertex_color_active_get",
"rna_Mesh_vertex_color_active_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");
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Mesh_vertex_color_active_index_get", "rna_Mesh_vertex_color_active_index_set", "rna_Mesh_vertex_color_index_range");
RNA_def_property_int_funcs(prop, "rna_Mesh_vertex_color_active_index_get",
"rna_Mesh_vertex_color_active_index_set", "rna_Mesh_vertex_color_index_range");
RNA_def_property_ui_text(prop, "Active Vertex Color Index", "Active vertex color index");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
@@ -2175,8 +2209,8 @@ static void rna_def_uv_loop_layers(BlenderRNA *brna, PropertyRNA *cprop)
StructRNA *srna;
PropertyRNA *prop;
//FunctionRNA *func;
//PropertyRNA *parm;
/* FunctionRNA *func; */
/* PropertyRNA *parm; */
RNA_def_property_srna(cprop, "UVLoopLayers");
srna = RNA_def_struct(brna, "UVLoopLayers", NULL);
@@ -2185,13 +2219,15 @@ static void rna_def_uv_loop_layers(BlenderRNA *brna, PropertyRNA *cprop)
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED);
RNA_def_property_struct_type(prop, "MeshUVLoopLayer");
RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_loop_layer_active_get", "rna_Mesh_uv_loop_layer_active_set", NULL, NULL);
RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_loop_layer_active_get",
"rna_Mesh_uv_loop_layer_active_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active UV loop layer", "Active UV loop layer");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Mesh_uv_loop_layer_active_index_get", "rna_Mesh_uv_loop_layer_active_index_set", "rna_Mesh_uv_loop_layer_index_range");
RNA_def_property_int_funcs(prop, "rna_Mesh_uv_loop_layer_active_index_get",
"rna_Mesh_uv_loop_layer_active_index_set", "rna_Mesh_uv_loop_layer_index_range");
RNA_def_property_ui_text(prop, "Active UV loop layer Index", "Active UV loop layer index");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
@@ -2268,22 +2304,24 @@ static void rna_def_tessface_uv_textures(BlenderRNA *brna, PropertyRNA *cprop)
StructRNA *srna;
PropertyRNA *prop;
//FunctionRNA *func;
//PropertyRNA *parm;
/* FunctionRNA *func; */
/* PropertyRNA *parm; */
RNA_def_property_srna(cprop, "TessfaceUVTextures");
srna = RNA_def_struct(brna, "TessfaceUVTextures", NULL);
RNA_def_struct_sdna(srna, "Mesh");
RNA_def_struct_ui_text(srna, "UV Maps", "Collection of UV maps for tesselated faces");
RNA_def_struct_ui_text(srna, "UV Maps", "Collection of UV maps for tessellated faces");
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_tessface_uv_texture_active_get", "rna_Mesh_tessface_uv_texture_active_set", NULL, NULL);
RNA_def_property_pointer_funcs(prop, "rna_Mesh_tessface_uv_texture_active_get",
"rna_Mesh_tessface_uv_texture_active_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Active UV Map", "Active UV Map");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Mesh_tessface_uv_texture_active_index_get", "rna_Mesh_tessface_uv_texture_active_index_set", "rna_Mesh_uv_texture_index_range");
RNA_def_property_int_funcs(prop, "rna_Mesh_tessface_uv_texture_active_index_get",
"rna_Mesh_tessface_uv_texture_active_index_set", "rna_Mesh_uv_texture_index_range");
RNA_def_property_ui_text(prop, "Active UV Map Index", "Active UV Map index");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
@@ -2319,13 +2357,15 @@ static void rna_def_uv_textures(BlenderRNA *brna, PropertyRNA *cprop)
*/
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED);
RNA_def_property_struct_type(prop, "MeshTexturePolyLayer");
RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_texture_active_get", "rna_Mesh_uv_texture_active_set", NULL, NULL);
RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_texture_active_get",
"rna_Mesh_uv_texture_active_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active UV Map", "Active UV Map");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Mesh_uv_texture_active_index_get", "rna_Mesh_uv_texture_active_index_set", "rna_Mesh_uv_texture_index_range");
RNA_def_property_int_funcs(prop, "rna_Mesh_uv_texture_active_index_get",
"rna_Mesh_uv_texture_active_index_set", "rna_Mesh_uv_texture_index_range");
RNA_def_property_ui_text(prop, "Active UV Map Index", "Active UV Map index");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
}
@@ -2378,7 +2418,8 @@ static void rna_def_mesh(BlenderRNA *brna)
prop = RNA_def_property(srna, "texture_mesh", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "texcomesh");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_ui_text(prop, "Texture Mesh", "Use another mesh for texture indices (vertex indices must be aligned)");
RNA_def_property_ui_text(prop, "Texture Mesh",
"Use another mesh for texture indices (vertex indices must be aligned)");
/* UV loop layers */
prop = RNA_def_property(srna, "uv_loop_layers", PROP_COLLECTION, PROP_NONE);
@@ -2391,31 +2432,36 @@ static void rna_def_mesh(BlenderRNA *brna)
prop = RNA_def_property(srna, "uv_loop_layer_clone", PROP_POINTER, PROP_UNSIGNED);
RNA_def_property_struct_type(prop, "MeshUVLoopLayer");
RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_loop_layer_clone_get", "rna_Mesh_uv_loop_layer_clone_set", NULL, NULL);
RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_loop_layer_clone_get",
"rna_Mesh_uv_loop_layer_clone_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Clone UV loop layer", "UV loop layer to be used as cloning source");
prop = RNA_def_property(srna, "uv_loop_layer_clone_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Mesh_uv_loop_layer_clone_index_get", "rna_Mesh_uv_loop_layer_clone_index_set", "rna_Mesh_uv_loop_layer_index_range");
RNA_def_property_int_funcs(prop, "rna_Mesh_uv_loop_layer_clone_index_get",
"rna_Mesh_uv_loop_layer_clone_index_set", "rna_Mesh_uv_loop_layer_index_range");
RNA_def_property_ui_text(prop, "Clone UV loop layer Index", "Clone UV loop layer index");
prop = RNA_def_property(srna, "uv_loop_layer_stencil", PROP_POINTER, PROP_UNSIGNED);
RNA_def_property_struct_type(prop, "MeshUVLoopLayer");
RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_loop_layer_stencil_get", "rna_Mesh_uv_loop_layer_stencil_set", NULL, NULL);
RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_loop_layer_stencil_get",
"rna_Mesh_uv_loop_layer_stencil_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Mask UV loop layer", "UV loop layer to mask the painted area");
prop = RNA_def_property(srna, "uv_loop_layer_stencil_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Mesh_uv_loop_layer_stencil_index_get", "rna_Mesh_uv_loop_layer_stencil_index_set", "rna_Mesh_uv_loop_layer_index_range");
RNA_def_property_int_funcs(prop, "rna_Mesh_uv_loop_layer_stencil_index_get",
"rna_Mesh_uv_loop_layer_stencil_index_set", "rna_Mesh_uv_loop_layer_index_range");
RNA_def_property_ui_text(prop, "Mask UV loop layer Index", "Mask UV loop layer index");
/* Tesselated face UV maps - used by renderers */
/* Tessellated face UV maps - used by renderers */
prop = RNA_def_property(srna, "tessface_uv_textures", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "fdata.layers", "fdata.totlayer");
RNA_def_property_collection_funcs(prop, "rna_Mesh_tessface_uv_textures_begin", NULL, NULL, NULL,
"rna_Mesh_tessface_uv_textures_length", NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "MeshTextureFaceLayer");
RNA_def_property_ui_text(prop, "Tesselated Face UV Maps", "All UV maps for tesselated faces (read-only, for use by renderers)");
RNA_def_property_ui_text(prop, "Tessellated Face UV Maps",
"All UV maps for tessellated faces (read-only, for use by renderers)");
rna_def_tessface_uv_textures(brna, prop);
/* UV maps */
@@ -2429,32 +2475,37 @@ 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, "MeshTexturePolyLayer");
RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_texture_clone_get", "rna_Mesh_uv_texture_clone_set", NULL, 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 Map", "UV map to be used as cloning source");
prop = RNA_def_property(srna, "uv_texture_clone_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Mesh_uv_texture_clone_index_get", "rna_Mesh_uv_texture_clone_index_set", "rna_Mesh_uv_texture_index_range");
RNA_def_property_int_funcs(prop, "rna_Mesh_uv_texture_clone_index_get",
"rna_Mesh_uv_texture_clone_index_set", "rna_Mesh_uv_texture_index_range");
RNA_def_property_ui_text(prop, "Clone UV Map Index", "Clone UV map index");
prop = RNA_def_property(srna, "uv_texture_stencil", PROP_POINTER, PROP_UNSIGNED);
RNA_def_property_struct_type(prop, "MeshTexturePolyLayer");
RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_texture_stencil_get", "rna_Mesh_uv_texture_stencil_set", NULL, 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 Map", "UV map to mask the painted area");
prop = RNA_def_property(srna, "uv_texture_stencil_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Mesh_uv_texture_stencil_index_get", "rna_Mesh_uv_texture_stencil_index_set", "rna_Mesh_uv_texture_index_range");
RNA_def_property_int_funcs(prop, "rna_Mesh_uv_texture_stencil_index_get",
"rna_Mesh_uv_texture_stencil_index_set", "rna_Mesh_uv_texture_index_range");
RNA_def_property_ui_text(prop, "Mask UV Map Index", "Mask UV map index");
/* Tesselated face colors - used by renderers */
/* Tessellated face colors - used by renderers */
prop = RNA_def_property(srna, "tessface_vertex_colors", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "fdata.layers", "fdata.totlayer");
RNA_def_property_collection_funcs(prop, "rna_Mesh_tessface_vertex_colors_begin", NULL, NULL, NULL,
"rna_Mesh_tessface_vertex_colors_length", NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "MeshColorLayer");
RNA_def_property_ui_text(prop, "Tesselated Face Colors", "All tesselated face colors (read-only, for use by renderers)");
RNA_def_property_ui_text(prop, "Tessellated Face Colors",
"All tessellated face colors (read-only, for use by renderers)");
rna_def_tessface_vertex_colors(brna, prop);
/* Vertex colors */
@@ -2493,7 +2544,9 @@ static void rna_def_mesh(BlenderRNA *brna)
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", "Treat all set-smoothed faces with angles less than the specified angle as 'smooth' during render");
RNA_def_property_ui_text(prop, "Auto Smooth",
"Treat all set-smoothed faces with angles less than the specified angle "
"as 'smooth' during render");
#if 1 /* expose as radians */
prop = RNA_def_property(srna, "auto_smooth_angle", PROP_FLOAT, PROP_ANGLE);
@@ -2504,7 +2557,8 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "smoothresh");
RNA_def_property_range(prop, 1, 80);
#endif
RNA_def_property_ui_text(prop, "Auto Smooth Angle", "Maximum angle between face normals that 'Auto Smooth' will operate on");
RNA_def_property_ui_text(prop, "Auto Smooth Angle",
"Maximum angle between face normals that 'Auto Smooth' will operate on");
prop = RNA_def_property(srna, "show_double_sided", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_TWOSIDED);
@@ -2523,7 +2577,8 @@ static void rna_def_mesh(BlenderRNA *brna)
/* texture space */
prop = RNA_def_property(srna, "use_auto_texspace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", ME_AUTOSPACE);
RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjust active object's texture space automatically when transforming object");
RNA_def_property_ui_text(prop, "Auto Texture Space",
"Adjust 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);
@@ -2590,17 +2645,22 @@ static void rna_def_mesh(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_extra_edge_length", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWEXTRA_EDGELEN);
RNA_def_property_ui_text(prop, "Edge Length", "Display selected edge lengths, using global values when set in the transform panel");
RNA_def_property_ui_text(prop, "Edge Length",
"Display 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, "show_extra_face_angle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWEXTRA_FACEANG);
RNA_def_property_ui_text(prop, "Face Angles", "Display the angles in the selected edges in degrees, using global values when set in the transform panel");
RNA_def_property_ui_text(prop, "Face Angles",
"Display 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, "show_extra_face_area", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWEXTRA_FACEAREA);
RNA_def_property_ui_text(prop, "Face Area", "Display the area of selected faces, using global values when set in the transform panel");
RNA_def_property_ui_text(prop, "Face Area",
"Display 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, "show_extra_indices", PROP_BOOLEAN, PROP_NONE);
@@ -2625,7 +2685,9 @@ static void rna_def_mesh(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_mirror_topology", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_MIRROR_TOPO);
RNA_def_property_ui_text(prop, "Topology Mirror", "Use topology based mirroring (for when both sides of mesh have matching, unique topology)");
RNA_def_property_ui_text(prop, "Topology Mirror",
"Use topology based mirroring "
"(for when both sides of mesh have matching, unique topology)");
prop = RNA_def_property(srna, "use_paint_mask", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_PAINT_MASK);