Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_mesh.c
| Show First 20 Lines • Show All 2,223 Lines • ▼ Show 20 Lines | #endif | ||||
| prop = RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED); | prop = RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_int_funcs(prop, "rna_MeshPolygon_index_get", NULL, NULL); | RNA_def_property_int_funcs(prop, "rna_MeshPolygon_index_get", NULL, NULL); | ||||
| RNA_def_property_ui_text(prop, "Index", "Index of this polygon"); | RNA_def_property_ui_text(prop, "Index", "Index of this polygon"); | ||||
| func = RNA_def_function(srna, "flip", "rna_MeshPolygon_flip"); | func = RNA_def_function(srna, "flip", "rna_MeshPolygon_flip"); | ||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID); | RNA_def_function_flag(func, FUNC_USE_SELF_ID); | ||||
| RNA_def_function_ui_description(func, "Invert winding of this polygon (flip its normal)"); | RNA_def_function_ui_description(func, "Invert winding of this polygon (flip its normal)"); | ||||
| } | } | ||||
| /* mesh.loop_uvs */ | /* mesh.loop_uvs */ | ||||
| static void rna_def_mloopuv(BlenderRNA *brna) | static void rna_def_mloopuv(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| ▲ Show 20 Lines • Show All 632 Lines • ▼ Show 20 Lines | static void rna_def_tessface_vertex_colors(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| RNA_def_struct_ui_text(srna, "Vertex Colors", "Collection of vertex colors"); | RNA_def_struct_ui_text(srna, "Vertex Colors", "Collection of vertex colors"); | ||||
| /* eventually deprecate this */ | /* eventually deprecate this */ | ||||
| func = RNA_def_function(srna, "new", "rna_Mesh_tessface_vertex_color_new"); | func = RNA_def_function(srna, "new", "rna_Mesh_tessface_vertex_color_new"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Add a vertex color layer to Mesh"); | RNA_def_function_ui_description(func, "Add a vertex color layer to Mesh"); | ||||
| RNA_def_string(func, "name", "Col", 0, "", "Vertex color name"); | RNA_def_string(func, "name", "Col", 0, "", "Vertex color name"); | ||||
| parm = RNA_def_pointer(func, "layer", "MeshColorLayer", "", "The newly created layer"); | parm = RNA_def_pointer(func, "layer", "MeshColorLayer", "", "The newly created layer"); | ||||
| RNA_def_property_flag(parm, PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_RNAPTR); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_struct_type(prop, "MeshColorLayer"); | RNA_def_property_struct_type(prop, "MeshColorLayer"); | ||||
| RNA_def_property_pointer_funcs(prop, "rna_Mesh_tessface_vertex_color_active_get", | RNA_def_property_pointer_funcs(prop, "rna_Mesh_tessface_vertex_color_active_get", | ||||
| "rna_Mesh_tessface_vertex_color_active_set", NULL, NULL); | "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_ui_text(prop, "Active Vertex Color Layer", "Active vertex color layer"); | ||||
| RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); | RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); | ||||
| Show All 17 Lines | static void rna_def_loop_colors(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| srna = RNA_def_struct(brna, "LoopColors", NULL); | srna = RNA_def_struct(brna, "LoopColors", NULL); | ||||
| RNA_def_struct_sdna(srna, "Mesh"); | RNA_def_struct_sdna(srna, "Mesh"); | ||||
| RNA_def_struct_ui_text(srna, "Loop Colors", "Collection of vertex colors"); | RNA_def_struct_ui_text(srna, "Loop Colors", "Collection of vertex colors"); | ||||
| func = RNA_def_function(srna, "new", "rna_Mesh_vertex_color_new"); | func = RNA_def_function(srna, "new", "rna_Mesh_vertex_color_new"); | ||||
| RNA_def_function_ui_description(func, "Add a vertex color layer to Mesh"); | RNA_def_function_ui_description(func, "Add a vertex color layer to Mesh"); | ||||
| RNA_def_string(func, "name", "Col", 0, "", "Vertex color name"); | RNA_def_string(func, "name", "Col", 0, "", "Vertex color name"); | ||||
| parm = RNA_def_pointer(func, "layer", "MeshLoopColorLayer", "", "The newly created layer"); | parm = RNA_def_pointer(func, "layer", "MeshLoopColorLayer", "", "The newly created layer"); | ||||
| RNA_def_property_flag(parm, PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_RNAPTR); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Mesh_vertex_color_remove"); | 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_ui_description(func, "Remove a vertex color layer"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "layer", "MeshLoopColorLayer", "", "The layer to remove"); | parm = RNA_def_pointer(func, "layer", "MeshLoopColorLayer", "", "The layer to remove"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | ||||
| RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); | RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); | ||||
| prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_struct_type(prop, "MeshLoopColorLayer"); | RNA_def_property_struct_type(prop, "MeshLoopColorLayer"); | ||||
| RNA_def_property_pointer_funcs(prop, "rna_Mesh_vertex_color_active_get", | RNA_def_property_pointer_funcs(prop, "rna_Mesh_vertex_color_active_get", | ||||
| "rna_Mesh_vertex_color_active_set", NULL, NULL); | "rna_Mesh_vertex_color_active_set", NULL, NULL); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); | RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); | ||||
| RNA_def_property_ui_text(prop, "Active Vertex Color Layer", "Active vertex color layer"); | RNA_def_property_ui_text(prop, "Active Vertex Color Layer", "Active vertex color layer"); | ||||
| ▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | static void rna_def_vertex_float_layers(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| srna = RNA_def_struct(brna, "VertexFloatProperties", NULL); | srna = RNA_def_struct(brna, "VertexFloatProperties", NULL); | ||||
| RNA_def_struct_sdna(srna, "Mesh"); | RNA_def_struct_sdna(srna, "Mesh"); | ||||
| RNA_def_struct_ui_text(srna, "Vertex Float Properties", "Collection of float properties"); | RNA_def_struct_ui_text(srna, "Vertex Float Properties", "Collection of float properties"); | ||||
| func = RNA_def_function(srna, "new", "rna_Mesh_vertex_float_property_new"); | func = RNA_def_function(srna, "new", "rna_Mesh_vertex_float_property_new"); | ||||
| RNA_def_function_ui_description(func, "Add a float property layer to Mesh"); | RNA_def_function_ui_description(func, "Add a float property layer to Mesh"); | ||||
| RNA_def_string(func, "name", "Float Prop", 0, "", "Float property name"); | RNA_def_string(func, "name", "Float Prop", 0, "", "Float property name"); | ||||
| parm = RNA_def_pointer(func, "layer", "MeshVertexFloatPropertyLayer", "", "The newly created layer"); | parm = RNA_def_pointer(func, "layer", "MeshVertexFloatPropertyLayer", "", "The newly created layer"); | ||||
| RNA_def_property_flag(parm, PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_RNAPTR); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| } | } | ||||
| /* mesh int layers */ | /* mesh int layers */ | ||||
| static void rna_def_vertex_int_layers(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_vertex_int_layers(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| RNA_def_property_srna(cprop, "VertexIntProperties"); | RNA_def_property_srna(cprop, "VertexIntProperties"); | ||||
| srna = RNA_def_struct(brna, "VertexIntProperties", NULL); | srna = RNA_def_struct(brna, "VertexIntProperties", NULL); | ||||
| RNA_def_struct_sdna(srna, "Mesh"); | RNA_def_struct_sdna(srna, "Mesh"); | ||||
| RNA_def_struct_ui_text(srna, "Vertex Int Properties", "Collection of int properties"); | RNA_def_struct_ui_text(srna, "Vertex Int Properties", "Collection of int properties"); | ||||
| func = RNA_def_function(srna, "new", "rna_Mesh_vertex_int_property_new"); | func = RNA_def_function(srna, "new", "rna_Mesh_vertex_int_property_new"); | ||||
| RNA_def_function_ui_description(func, "Add a integer property layer to Mesh"); | RNA_def_function_ui_description(func, "Add a integer property layer to Mesh"); | ||||
| RNA_def_string(func, "name", "Int Prop", 0, "", "Int property name"); | RNA_def_string(func, "name", "Int Prop", 0, "", "Int property name"); | ||||
| parm = RNA_def_pointer(func, "layer", "MeshVertexIntPropertyLayer", "", "The newly created layer"); | parm = RNA_def_pointer(func, "layer", "MeshVertexIntPropertyLayer", "", "The newly created layer"); | ||||
| RNA_def_property_flag(parm, PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_RNAPTR); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| } | } | ||||
| /* mesh string layers */ | /* mesh string layers */ | ||||
| static void rna_def_vertex_string_layers(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_vertex_string_layers(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| RNA_def_property_srna(cprop, "VertexStringProperties"); | RNA_def_property_srna(cprop, "VertexStringProperties"); | ||||
| srna = RNA_def_struct(brna, "VertexStringProperties", NULL); | srna = RNA_def_struct(brna, "VertexStringProperties", NULL); | ||||
| RNA_def_struct_sdna(srna, "Mesh"); | RNA_def_struct_sdna(srna, "Mesh"); | ||||
| RNA_def_struct_ui_text(srna, "Vertex String Properties", "Collection of string properties"); | RNA_def_struct_ui_text(srna, "Vertex String Properties", "Collection of string properties"); | ||||
| func = RNA_def_function(srna, "new", "rna_Mesh_vertex_string_property_new"); | func = RNA_def_function(srna, "new", "rna_Mesh_vertex_string_property_new"); | ||||
| RNA_def_function_ui_description(func, "Add a string property layer to Mesh"); | RNA_def_function_ui_description(func, "Add a string property layer to Mesh"); | ||||
| RNA_def_string(func, "name", "String Prop", 0, "", "String property name"); | RNA_def_string(func, "name", "String Prop", 0, "", "String property name"); | ||||
| parm = RNA_def_pointer(func, "layer", "MeshVertexStringPropertyLayer", "", "The newly created layer"); | parm = RNA_def_pointer(func, "layer", "MeshVertexStringPropertyLayer", "", "The newly created layer"); | ||||
| RNA_def_property_flag(parm, PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_RNAPTR); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| } | } | ||||
| /* mesh float layers */ | /* mesh float layers */ | ||||
| static void rna_def_polygon_float_layers(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_polygon_float_layers(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| RNA_def_property_srna(cprop, "PolygonFloatProperties"); | RNA_def_property_srna(cprop, "PolygonFloatProperties"); | ||||
| srna = RNA_def_struct(brna, "PolygonFloatProperties", NULL); | srna = RNA_def_struct(brna, "PolygonFloatProperties", NULL); | ||||
| RNA_def_struct_sdna(srna, "Mesh"); | RNA_def_struct_sdna(srna, "Mesh"); | ||||
| RNA_def_struct_ui_text(srna, "Polygon Float Properties", "Collection of float properties"); | RNA_def_struct_ui_text(srna, "Polygon Float Properties", "Collection of float properties"); | ||||
| func = RNA_def_function(srna, "new", "rna_Mesh_polygon_float_property_new"); | func = RNA_def_function(srna, "new", "rna_Mesh_polygon_float_property_new"); | ||||
| RNA_def_function_ui_description(func, "Add a float property layer to Mesh"); | RNA_def_function_ui_description(func, "Add a float property layer to Mesh"); | ||||
| RNA_def_string(func, "name", "Float Prop", 0, "", "Float property name"); | RNA_def_string(func, "name", "Float Prop", 0, "", "Float property name"); | ||||
| parm = RNA_def_pointer(func, "layer", "MeshPolygonFloatPropertyLayer", "", "The newly created layer"); | parm = RNA_def_pointer(func, "layer", "MeshPolygonFloatPropertyLayer", "", "The newly created layer"); | ||||
| RNA_def_property_flag(parm, PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_RNAPTR); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| } | } | ||||
| /* mesh int layers */ | /* mesh int layers */ | ||||
| static void rna_def_polygon_int_layers(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_polygon_int_layers(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| RNA_def_property_srna(cprop, "PolygonIntProperties"); | RNA_def_property_srna(cprop, "PolygonIntProperties"); | ||||
| srna = RNA_def_struct(brna, "PolygonIntProperties", NULL); | srna = RNA_def_struct(brna, "PolygonIntProperties", NULL); | ||||
| RNA_def_struct_sdna(srna, "Mesh"); | RNA_def_struct_sdna(srna, "Mesh"); | ||||
| RNA_def_struct_ui_text(srna, "Polygon Int Properties", "Collection of int properties"); | RNA_def_struct_ui_text(srna, "Polygon Int Properties", "Collection of int properties"); | ||||
| func = RNA_def_function(srna, "new", "rna_Mesh_polygon_int_property_new"); | func = RNA_def_function(srna, "new", "rna_Mesh_polygon_int_property_new"); | ||||
| RNA_def_function_ui_description(func, "Add a integer property layer to Mesh"); | RNA_def_function_ui_description(func, "Add a integer property layer to Mesh"); | ||||
| RNA_def_string(func, "name", "Int Prop", 0, "", "Int property name"); | RNA_def_string(func, "name", "Int Prop", 0, "", "Int property name"); | ||||
| parm = RNA_def_pointer(func, "layer", "MeshPolygonIntPropertyLayer", "", "The newly created layer"); | parm = RNA_def_pointer(func, "layer", "MeshPolygonIntPropertyLayer", "", "The newly created layer"); | ||||
| RNA_def_property_flag(parm, PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_RNAPTR); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| } | } | ||||
| /* mesh string layers */ | /* mesh string layers */ | ||||
| static void rna_def_polygon_string_layers(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_polygon_string_layers(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| RNA_def_property_srna(cprop, "PolygonStringProperties"); | RNA_def_property_srna(cprop, "PolygonStringProperties"); | ||||
| srna = RNA_def_struct(brna, "PolygonStringProperties", NULL); | srna = RNA_def_struct(brna, "PolygonStringProperties", NULL); | ||||
| RNA_def_struct_sdna(srna, "Mesh"); | RNA_def_struct_sdna(srna, "Mesh"); | ||||
| RNA_def_struct_ui_text(srna, "Polygon String Properties", "Collection of string properties"); | RNA_def_struct_ui_text(srna, "Polygon String Properties", "Collection of string properties"); | ||||
| func = RNA_def_function(srna, "new", "rna_Mesh_polygon_string_property_new"); | func = RNA_def_function(srna, "new", "rna_Mesh_polygon_string_property_new"); | ||||
| RNA_def_function_ui_description(func, "Add a string property layer to Mesh"); | RNA_def_function_ui_description(func, "Add a string property layer to Mesh"); | ||||
| RNA_def_string(func, "name", "String Prop", 0, "", "String property name"); | RNA_def_string(func, "name", "String Prop", 0, "", "String property name"); | ||||
| parm = RNA_def_pointer(func, "layer", "MeshPolygonStringPropertyLayer", "", "The newly created layer"); | parm = RNA_def_pointer(func, "layer", "MeshPolygonStringPropertyLayer", "", "The newly created layer"); | ||||
| RNA_def_property_flag(parm, PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_RNAPTR); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| } | } | ||||
| /* mesh.tessface_uv_layers */ | /* mesh.tessface_uv_layers */ | ||||
| static void rna_def_tessface_uv_textures(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_tessface_uv_textures(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| RNA_def_property_srna(cprop, "TessfaceUVTextures"); | RNA_def_property_srna(cprop, "TessfaceUVTextures"); | ||||
| srna = RNA_def_struct(brna, "TessfaceUVTextures", NULL); | srna = RNA_def_struct(brna, "TessfaceUVTextures", NULL); | ||||
| RNA_def_struct_sdna(srna, "Mesh"); | RNA_def_struct_sdna(srna, "Mesh"); | ||||
| RNA_def_struct_ui_text(srna, "UV Maps", "Collection of UV maps for tessellated faces"); | RNA_def_struct_ui_text(srna, "UV Maps", "Collection of UV maps for tessellated faces"); | ||||
| /* eventually deprecate this */ | /* eventually deprecate this */ | ||||
| func = RNA_def_function(srna, "new", "rna_Mesh_tessface_uv_texture_new"); | func = RNA_def_function(srna, "new", "rna_Mesh_tessface_uv_texture_new"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Add a UV tessface-texture layer to Mesh (only for meshes with no polygons)"); | RNA_def_function_ui_description(func, "Add a UV tessface-texture layer to Mesh (only for meshes with no polygons)"); | ||||
| RNA_def_string(func, "name", "UVMap", 0, "", "UV map name"); | RNA_def_string(func, "name", "UVMap", 0, "", "UV map name"); | ||||
| parm = RNA_def_pointer(func, "layer", "MeshTextureFaceLayer", "", "The newly created layer"); | parm = RNA_def_pointer(func, "layer", "MeshTextureFaceLayer", "", "The newly created layer"); | ||||
| RNA_def_property_flag(parm, PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_RNAPTR); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_struct_type(prop, "MeshTextureFaceLayer"); | RNA_def_property_struct_type(prop, "MeshTextureFaceLayer"); | ||||
| RNA_def_property_pointer_funcs(prop, "rna_Mesh_tessface_uv_texture_active_get", | RNA_def_property_pointer_funcs(prop, "rna_Mesh_tessface_uv_texture_active_get", | ||||
| "rna_Mesh_tessface_uv_texture_active_set", NULL, NULL); | "rna_Mesh_tessface_uv_texture_active_set", NULL, NULL); | ||||
| RNA_def_property_ui_text(prop, "Active UV Map", "Active UV Map"); | RNA_def_property_ui_text(prop, "Active UV Map", "Active UV Map"); | ||||
| Show All 19 Lines | static void rna_def_uv_textures(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| srna = RNA_def_struct(brna, "UVTextures", NULL); | srna = RNA_def_struct(brna, "UVTextures", NULL); | ||||
| RNA_def_struct_sdna(srna, "Mesh"); | RNA_def_struct_sdna(srna, "Mesh"); | ||||
| RNA_def_struct_ui_text(srna, "UV Maps", "Collection of UV maps"); | RNA_def_struct_ui_text(srna, "UV Maps", "Collection of UV maps"); | ||||
| func = RNA_def_function(srna, "new", "rna_Mesh_uv_texture_new"); | func = RNA_def_function(srna, "new", "rna_Mesh_uv_texture_new"); | ||||
| RNA_def_function_ui_description(func, "Add a UV map layer to Mesh"); | RNA_def_function_ui_description(func, "Add a UV map layer to Mesh"); | ||||
| RNA_def_string(func, "name", "UVMap", 0, "", "UV map name"); | RNA_def_string(func, "name", "UVMap", 0, "", "UV map name"); | ||||
| parm = RNA_def_pointer(func, "layer", "MeshTexturePolyLayer", "", "The newly created layer"); | parm = RNA_def_pointer(func, "layer", "MeshTexturePolyLayer", "", "The newly created layer"); | ||||
| RNA_def_property_flag(parm, PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_RNAPTR); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Mesh_uv_texture_layers_remove"); | func = RNA_def_function(srna, "remove", "rna_Mesh_uv_texture_layers_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a vertex color layer"); | RNA_def_function_ui_description(func, "Remove a vertex color layer"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "layer", "MeshTexturePolyLayer", "", "The layer to remove"); | parm = RNA_def_pointer(func, "layer", "MeshTexturePolyLayer", "", "The layer to remove"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | ||||
| prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_struct_type(prop, "MeshTexturePolyLayer"); | RNA_def_property_struct_type(prop, "MeshTexturePolyLayer"); | ||||
| RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_texture_active_get", | RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_texture_active_get", | ||||
| "rna_Mesh_uv_texture_active_set", NULL, NULL); | "rna_Mesh_uv_texture_active_set", NULL, NULL); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); | RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); | ||||
| RNA_def_property_ui_text(prop, "Active UV Map", "Active UV Map"); | RNA_def_property_ui_text(prop, "Active UV Map", "Active UV Map"); | ||||
| RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); | RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); | ||||
| ▲ Show 20 Lines • Show All 557 Lines • Show Last 20 Lines | |||||