- 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)
This commit is contained in:
2010-08-23 22:16:45 +00:00
parent 1be4eda552
commit f6c323aa42
35 changed files with 317 additions and 164 deletions

View File

@@ -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.");