Merged changes in the trunk up to revision 31630.
This commit is contained in:
@@ -349,9 +349,10 @@ void rna_Main_fonts_remove(Main *bmain, ReportList *reports, VFont *vfont)
|
||||
/* XXX python now has invalid pointer? */
|
||||
}
|
||||
|
||||
Tex *rna_Main_textures_new(Main *bmain, char* name)
|
||||
Tex *rna_Main_textures_new(Main *bmain, char* name, int type)
|
||||
{
|
||||
Tex *tex= add_texture(name);
|
||||
tex_set_type(tex, type);
|
||||
tex->id.us--;
|
||||
return tex;
|
||||
}
|
||||
@@ -534,7 +535,7 @@ void RNA_def_main_cameras(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a camera from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "camera", "Camera", "", "Camera to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
|
||||
void RNA_def_main_scenes(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
@@ -557,10 +558,9 @@ void RNA_def_main_scenes(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
|
||||
func= RNA_def_function(srna, "remove", "rna_Main_scenes_remove");
|
||||
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
|
||||
parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_function_ui_description(func, "Remove a scene from the current blendfile.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
|
||||
void RNA_def_main_objects(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
@@ -586,10 +586,10 @@ void RNA_def_main_objects(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_return(func, parm);
|
||||
|
||||
func= RNA_def_function(srna, "remove", "rna_Main_objects_remove");
|
||||
RNA_def_function_ui_description(func, "Remove a object from the current blendfile.");
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_function_ui_description(func, "Remove a object from the current blendfile.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
|
||||
void RNA_def_main_materials(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
@@ -614,7 +614,7 @@ void RNA_def_main_materials(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a material from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "material", "Material", "", "Material to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
void RNA_def_main_node_groups(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
{
|
||||
@@ -645,7 +645,7 @@ void RNA_def_main_node_groups(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a node tree from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "tree", "NodeTree", "", "Node tree to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
#endif
|
||||
}
|
||||
void RNA_def_main_meshes(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
@@ -670,7 +670,7 @@ void RNA_def_main_meshes(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a mesh from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
void RNA_def_main_lamps(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
{
|
||||
@@ -694,7 +694,7 @@ void RNA_def_main_lamps(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a lamp from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "lamp", "Lamp", "", "Lamp to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
void RNA_def_main_libraries(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
{
|
||||
@@ -743,7 +743,7 @@ void RNA_def_main_images(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove an image from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "image", "Image", "", "Image to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
|
||||
void RNA_def_main_lattices(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
@@ -768,7 +768,7 @@ void RNA_def_main_lattices(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a lattice from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "lattice", "Lattice", "", "Lattice to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
void RNA_def_main_curves(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
{
|
||||
@@ -784,7 +784,7 @@ void RNA_def_main_curves(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_ui_description(func, "Add a new curve to the main database");
|
||||
parm= RNA_def_string(func, "name", "Curve", 0, "", "New name for the datablock.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm= RNA_def_enum(func, "type", object_type_curve_items, 0, "Type", "The type of curve object to add");
|
||||
parm= RNA_def_enum(func, "type", object_type_curve_items, 0, "Type", "The type of curve to add");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
/* return type */
|
||||
parm= RNA_def_pointer(func, "curve", "Curve", "", "New curve datablock.");
|
||||
@@ -794,7 +794,7 @@ void RNA_def_main_curves(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a curve from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "curve", "Curve", "", "Curve to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
void RNA_def_main_metaballs(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
{
|
||||
@@ -818,7 +818,7 @@ void RNA_def_main_metaballs(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a metaball from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "metaball", "MetaBall", "", "MetaBall to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
void RNA_def_main_fonts(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
{
|
||||
@@ -843,7 +843,7 @@ void RNA_def_main_fonts(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a font from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "vfont", "VectorFont", "", "Font to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
void RNA_def_main_textures(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
{
|
||||
@@ -859,6 +859,8 @@ void RNA_def_main_textures(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_ui_description(func, "Add a new texture to the main database");
|
||||
parm= RNA_def_string(func, "name", "Texture", 0, "", "New name for the datablock.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm= RNA_def_enum(func, "type", texture_type_items, 0, "Type", "The type of texture to add");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
/* return type */
|
||||
parm= RNA_def_pointer(func, "texture", "Texture", "", "New texture datablock.");
|
||||
RNA_def_function_return(func, parm);
|
||||
@@ -867,7 +869,7 @@ void RNA_def_main_textures(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a texture from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "texture", "Texture", "", "Texture to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
void RNA_def_main_brushes(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
{
|
||||
@@ -891,7 +893,7 @@ void RNA_def_main_brushes(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a brush from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "brush", "Brush", "", "Brush to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
|
||||
void RNA_def_main_worlds(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
@@ -916,7 +918,7 @@ void RNA_def_main_worlds(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a world from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "world", "World", "", "World to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
|
||||
void RNA_def_main_groups(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
@@ -941,7 +943,7 @@ void RNA_def_main_groups(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a group from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "group", "Group", "", "Group to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
void RNA_def_main_texts(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
{
|
||||
@@ -965,7 +967,7 @@ void RNA_def_main_texts(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a text from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "text", "Text", "", "Text to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
|
||||
/* load func */
|
||||
func= RNA_def_function(srna, "load", "rna_Main_texts_load");
|
||||
@@ -1003,7 +1005,7 @@ void RNA_def_main_armatures(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a armature from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "armature", "Armature", "", "Armature to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
void RNA_def_main_actions(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
{
|
||||
@@ -1027,7 +1029,7 @@ void RNA_def_main_actions(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a action from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "action", "Action", "", "Action to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
void RNA_def_main_particles(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
{
|
||||
@@ -1051,7 +1053,7 @@ void RNA_def_main_particles(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
RNA_def_function_ui_description(func, "Remove a particle settings instance from the current blendfile.");
|
||||
parm= RNA_def_pointer(func, "particle", "ParticleSettings", "", "Particle Settings to remove.");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
||||
}
|
||||
void RNA_def_main_gpencil(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user