diff options
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_main_api.c | 52 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 14 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 16 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 |
4 files changed, 42 insertions, 42 deletions
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index f00126986a5..bba85cadbc3 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -99,7 +99,7 @@ Camera *rna_Main_cameras_new(Main *UNUSED(bmain), const char *name) void rna_Main_cameras_remove(Main *bmain, ReportList *reports, struct Camera *camera) { if (ID_REAL_USERS(camera) <= 0) - free_libblock(&bmain->camera, camera); + BKE_libblock_free(&bmain->camera, camera); else BKE_reportf(reports, RPT_ERROR, "Camera \"%s\" must have zero users to be removed, found %d", camera->id.name+2, ID_REAL_USERS(camera)); @@ -113,7 +113,7 @@ Scene *rna_Main_scenes_new(Main *UNUSED(bmain), const char *name) } void rna_Main_scenes_remove(Main *bmain, bContext *C, ReportList *reports, struct Scene *scene) { - /* don't call free_libblock(...) directly */ + /* don't call BKE_libblock_free(...) directly */ Scene *newscene; if (scene->id.prev) @@ -175,7 +175,7 @@ Object *rna_Main_objects_new(Main *UNUSED(bmain), ReportList *reports, const cha id_us_plus(data); } - ob = add_only_object(type, name); + ob = BKE_object_add_only_object(type, name); id_us_min(&ob->id); ob->data = data; @@ -187,8 +187,8 @@ Object *rna_Main_objects_new(Main *UNUSED(bmain), ReportList *reports, const cha void rna_Main_objects_remove(Main *bmain, ReportList *reports, struct Object *object) { if (ID_REAL_USERS(object) <= 0) { - unlink_object(object); /* needed or ID pointers to this are not cleared */ - free_libblock(&bmain->object, object); + BKE_object_unlink(object); /* needed or ID pointers to this are not cleared */ + BKE_libblock_free(&bmain->object, object); } else { BKE_reportf(reports, RPT_ERROR, "Object \"%s\" must have zero users to be removed, found %d", @@ -205,7 +205,7 @@ struct Material *rna_Main_materials_new(Main *UNUSED(bmain), const char *name) void rna_Main_materials_remove(Main *bmain, ReportList *reports, struct Material *material) { if (ID_REAL_USERS(material) <= 0) - free_libblock(&bmain->mat, material); + BKE_libblock_free(&bmain->mat, material); else BKE_reportf(reports, RPT_ERROR, "Material \"%s\" must have zero users to be removed, found %d", material->id.name+2, ID_REAL_USERS(material)); @@ -223,7 +223,7 @@ struct bNodeTree *rna_Main_nodetree_new(Main *UNUSED(bmain), const char *name, i void rna_Main_nodetree_remove(Main *bmain, ReportList *reports, struct bNodeTree *tree) { if (ID_REAL_USERS(tree) <= 0) - free_libblock(&bmain->nodetree, tree); + BKE_libblock_free(&bmain->nodetree, tree); else BKE_reportf(reports, RPT_ERROR, "Node Tree \"%s\" must have zero users to be removed, found %d", tree->id.name+2, ID_REAL_USERS(tree)); @@ -240,7 +240,7 @@ Mesh *rna_Main_meshes_new(Main *UNUSED(bmain), const char *name) void rna_Main_meshes_remove(Main *bmain, ReportList *reports, Mesh *mesh) { if (ID_REAL_USERS(mesh) <= 0) - free_libblock(&bmain->mesh, mesh); + BKE_libblock_free(&bmain->mesh, mesh); else BKE_reportf(reports, RPT_ERROR, "Mesh \"%s\" must have zero users to be removed, found %d", mesh->id.name+2, ID_REAL_USERS(mesh)); @@ -258,7 +258,7 @@ Lamp *rna_Main_lamps_new(Main *UNUSED(bmain), const char *name, int type) void rna_Main_lamps_remove(Main *bmain, ReportList *reports, Lamp *lamp) { if (ID_REAL_USERS(lamp) <= 0) - free_libblock(&bmain->lamp, lamp); + BKE_libblock_free(&bmain->lamp, lamp); else BKE_reportf(reports, RPT_ERROR, "Lamp \"%s\" must have zero users to be removed, found %d", lamp->id.name+2, ID_REAL_USERS(lamp)); @@ -289,7 +289,7 @@ Image *rna_Main_images_load(Main *UNUSED(bmain), ReportList *reports, const char void rna_Main_images_remove(Main *bmain, ReportList *reports, Image *image) { if (ID_REAL_USERS(image) <= 0) - free_libblock(&bmain->image, image); + BKE_libblock_free(&bmain->image, image); else BKE_reportf(reports, RPT_ERROR, "Image \"%s\" must have zero users to be removed, found %d", image->id.name+2, ID_REAL_USERS(image)); @@ -306,7 +306,7 @@ Lattice *rna_Main_lattices_new(Main *UNUSED(bmain), const char *name) void rna_Main_lattices_remove(Main *bmain, ReportList *reports, struct Lattice *lt) { if (ID_REAL_USERS(lt) <= 0) - free_libblock(&bmain->latt, lt); + BKE_libblock_free(&bmain->latt, lt); else BKE_reportf(reports, RPT_ERROR, "Lattice \"%s\" must have zero users to be removed, found %d", lt->id.name+2, ID_REAL_USERS(lt)); @@ -321,7 +321,7 @@ Curve *rna_Main_curves_new(Main *UNUSED(bmain), const char *name, int type) void rna_Main_curves_remove(Main *bmain, ReportList *reports, struct Curve *cu) { if (ID_REAL_USERS(cu) <= 0) - free_libblock(&bmain->curve, cu); + BKE_libblock_free(&bmain->curve, cu); else BKE_reportf(reports, RPT_ERROR, "Curve \"%s\" must have zero users to be removed, found %d", cu->id.name+2, ID_REAL_USERS(cu)); @@ -336,7 +336,7 @@ MetaBall *rna_Main_metaballs_new(Main *UNUSED(bmain), const char *name) void rna_Main_metaballs_remove(Main *bmain, ReportList *reports, struct MetaBall *mb) { if (ID_REAL_USERS(mb) <= 0) - free_libblock(&bmain->mball, mb); + BKE_libblock_free(&bmain->mball, mb); else BKE_reportf(reports, RPT_ERROR, "Metaball \"%s\" must have zero users to be removed, found %d", mb->id.name+2, ID_REAL_USERS(mb)); @@ -359,7 +359,7 @@ VFont *rna_Main_fonts_load(Main *bmain, ReportList *reports, const char *filepat void rna_Main_fonts_remove(Main *bmain, ReportList *reports, VFont *vfont) { if (ID_REAL_USERS(vfont) <= 0) - free_libblock(&bmain->vfont, vfont); + BKE_libblock_free(&bmain->vfont, vfont); else BKE_reportf(reports, RPT_ERROR, "Font \"%s\" must have zero users to be removed, found %d", vfont->id.name+2, ID_REAL_USERS(vfont)); @@ -377,7 +377,7 @@ Tex *rna_Main_textures_new(Main *UNUSED(bmain), const char *name, int type) void rna_Main_textures_remove(Main *bmain, ReportList *reports, struct Tex *tex) { if (ID_REAL_USERS(tex) <= 0) - free_libblock(&bmain->tex, tex); + BKE_libblock_free(&bmain->tex, tex); else BKE_reportf(reports, RPT_ERROR, "Texture \"%s\" must have zero users to be removed, found %d", tex->id.name+2, ID_REAL_USERS(tex)); @@ -392,7 +392,7 @@ Brush *rna_Main_brushes_new(Main *UNUSED(bmain), const char *name) void rna_Main_brushes_remove(Main *bmain, ReportList *reports, struct Brush *brush) { if (ID_REAL_USERS(brush) <= 0) - free_libblock(&bmain->brush, brush); + BKE_libblock_free(&bmain->brush, brush); else BKE_reportf(reports, RPT_ERROR, "Brush \"%s\" must have zero users to be removed, found %d", brush->id.name+2, ID_REAL_USERS(brush)); @@ -407,7 +407,7 @@ World *rna_Main_worlds_new(Main *UNUSED(bmain), const char *name) void rna_Main_worlds_remove(Main *bmain, ReportList *reports, struct World *world) { if (ID_REAL_USERS(world) <= 0) - free_libblock(&bmain->world, world); + BKE_libblock_free(&bmain->world, world); else BKE_reportf(reports, RPT_ERROR, "World \"%s\" must have zero users to be removed, found %d", world->id.name+2, ID_REAL_USERS(world)); @@ -419,8 +419,8 @@ Group *rna_Main_groups_new(Main *UNUSED(bmain), const char *name) } void rna_Main_groups_remove(Main *bmain, Group *group) { - unlink_group(group); - free_libblock(&bmain->group, group); + BKE_group_unlink(group); + BKE_libblock_free(&bmain->group, group); /* XXX python now has invalid pointer? */ } @@ -433,7 +433,7 @@ Speaker *rna_Main_speakers_new(Main *UNUSED(bmain), const char *name) void rna_Main_speakers_remove(Main *bmain, ReportList *reports, Speaker *speaker) { if (ID_REAL_USERS(speaker) <= 0) - free_libblock(&bmain->speaker, speaker); + BKE_libblock_free(&bmain->speaker, speaker); else BKE_reportf(reports, RPT_ERROR, "Speaker \"%s\" must have zero users to be removed, found %d", speaker->id.name+2, ID_REAL_USERS(speaker)); @@ -447,8 +447,8 @@ Text *rna_Main_texts_new(Main *UNUSED(bmain), const char *name) } void rna_Main_texts_remove(Main *bmain, Text *text) { - unlink_text(bmain, text); - free_libblock(&bmain->text, text); + BKE_text_unlink(bmain, text); + BKE_libblock_free(&bmain->text, text); /* XXX python now has invalid pointer? */ } @@ -475,7 +475,7 @@ bArmature *rna_Main_armatures_new(Main *UNUSED(bmain), const char *name) void rna_Main_armatures_remove(Main *bmain, ReportList *reports, bArmature *arm) { if (ID_REAL_USERS(arm) <= 0) - free_libblock(&bmain->armature, arm); + BKE_libblock_free(&bmain->armature, arm); else BKE_reportf(reports, RPT_ERROR, "Armature \"%s\" must have zero users to be removed, found %d", arm->id.name+2, ID_REAL_USERS(arm)); @@ -493,7 +493,7 @@ bAction *rna_Main_actions_new(Main *UNUSED(bmain), const char *name) void rna_Main_actions_remove(Main *bmain, ReportList *reports, bAction *act) { if (ID_REAL_USERS(act) <= 0) - free_libblock(&bmain->action, act); + BKE_libblock_free(&bmain->action, act); else BKE_reportf(reports, RPT_ERROR, "Action \"%s\" must have zero users to be removed, found %d", act->id.name+2, ID_REAL_USERS(act)); @@ -510,7 +510,7 @@ ParticleSettings *rna_Main_particles_new(Main *bmain, const char *name) void rna_Main_particles_remove(Main *bmain, ReportList *reports, ParticleSettings *part) { if (ID_REAL_USERS(part) <= 0) - free_libblock(&bmain->particle, part); + BKE_libblock_free(&bmain->particle, part); else BKE_reportf(reports, RPT_ERROR, "Particle Settings \"%s\" must have zero users to be removed, found %d", part->id.name+2, ID_REAL_USERS(part)); @@ -535,7 +535,7 @@ MovieClip *rna_Main_movieclip_load(Main *UNUSED(bmain), ReportList *reports, con void rna_Main_movieclips_remove(Main *bmain, MovieClip *clip) { BKE_movieclip_unlink(bmain, clip); - free_libblock(&bmain->movieclip, clip); + BKE_libblock_free(&bmain->movieclip, clip); /* XXX python now has invalid pointer? */ } diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 6a4809e54e5..4effa9f7f38 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -164,7 +164,7 @@ static void rna_Object_internal_update(Main *UNUSED(bmain), Scene *UNUSED(scene) static void rna_Object_matrix_world_update(Main *bmain, Scene *scene, PointerRNA *ptr) { /* don't use compat so we get predictable rotation */ - object_apply_mat4(ptr->id.data, ((Object *)ptr->id.data)->obmat, FALSE, TRUE); + BKE_object_apply_mat4(ptr->id.data, ((Object *)ptr->id.data)->obmat, FALSE, TRUE); rna_Object_internal_update(bmain, scene, ptr); } @@ -199,19 +199,19 @@ static void rna_Object_matrix_local_set(PointerRNA *ptr, const float values[16]) } /* don't use compat so we get predictable rotation */ - object_apply_mat4(ob, ob->obmat, FALSE, FALSE); + BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE); } static void rna_Object_matrix_basis_get(PointerRNA *ptr, float values[16]) { Object *ob = ptr->id.data; - object_to_mat4(ob, (float(*)[4])values); + BKE_object_to_mat4(ob, (float(*)[4])values); } static void rna_Object_matrix_basis_set(PointerRNA *ptr, const float values[16]) { Object *ob = ptr->id.data; - object_apply_mat4(ob, (float(*)[4])values, FALSE, FALSE); + BKE_object_apply_mat4(ob, (float(*)[4])values, FALSE, FALSE); } void rna_Object_internal_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) @@ -708,13 +708,13 @@ static void rna_Object_rotation_mode_set(PointerRNA *ptr, int value) static void rna_Object_dimensions_get(PointerRNA *ptr, float *value) { Object *ob = ptr->data; - object_get_dimensions(ob, value); + BKE_object_dimensions_get(ob, value); } static void rna_Object_dimensions_set(PointerRNA *ptr, const float *value) { Object *ob = ptr->data; - object_set_dimensions(ob, value); + BKE_object_dimensions_set(ob, value); } static int rna_Object_location_editable(PointerRNA *ptr, int index) @@ -1202,7 +1202,7 @@ static void rna_Object_modifier_clear(Object *object, bContext *C) static void rna_Object_boundbox_get(PointerRNA *ptr, float *values) { Object *ob = (Object*)ptr->id.data; - BoundBox *bb = object_get_boundbox(ob); + BoundBox *bb = BKE_object_boundbox_get(ob); if (bb) { memcpy(values, bb->vec, sizeof(bb->vec)); } diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index cb0f1d307aa..77110f85655 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -87,13 +87,13 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_ case OB_SURF: /* copies object and modifiers (but not the data) */ - tmpobj = copy_object(ob); + tmpobj = BKE_object_copy(ob); tmpcu = (Curve *)tmpobj->data; tmpcu->id.us--; /* if getting the original caged mesh, delete object modifiers */ if ( cage ) - object_free_modifiers(tmpobj); + BKE_object_free_modifiers(tmpobj); /* copies the data */ copycu = tmpobj->data = BKE_curve_copy((Curve *) ob->data ); @@ -114,12 +114,12 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_ /* nurbs_to_mesh changes the type to a mesh, check it worked */ if (tmpobj->type != OB_MESH) { - free_libblock_us(&(G.main->object), tmpobj); + BKE_libblock_free_us(&(G.main->object), tmpobj); BKE_report(reports, RPT_ERROR, "cant convert curve to mesh. Does the curve have any segments?"); return NULL; } tmpmesh = tmpobj->data; - free_libblock_us(&G.main->object, tmpobj); + BKE_libblock_free_us(&G.main->object, tmpobj); break; case OB_MBALL: { @@ -148,7 +148,7 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_ /* copies object and modifiers (but not the data) */ if (cage) { /* copies the data */ - tmpmesh = copy_mesh( ob->data ); + tmpmesh = BKE_mesh_copy( ob->data ); /* if not getting the original caged mesh, get final derived mesh */ } else { @@ -328,7 +328,7 @@ static PointerRNA rna_Object_shape_key_add(Object *ob, bContext *C, ReportList * Scene *scene = CTX_data_scene(C); KeyBlock *kb = NULL; - if ((kb = object_insert_shape_key(scene, ob, name, from_mix))) { + if ((kb = BKE_object_insert_shape_key(scene, ob, name, from_mix))) { PointerRNA keyptr; RNA_pointer_create((ID *)ob->data, &RNA_ShapeKey, kb, &keyptr); @@ -473,12 +473,12 @@ void rna_ObjectBase_layers_from_view(Base *base, View3D *v3d) int rna_Object_is_modified(Object *ob, Scene *scene, int settings) { - return object_is_modified(scene, ob) & settings; + return BKE_object_is_modified(scene, ob) & settings; } int rna_Object_is_deform_modified(Object *ob, Scene *scene, int settings) { - return object_is_deform_modified(scene, ob) & settings; + return BKE_object_is_deform_modified(scene, ob) & settings; } #ifndef NDEBUG diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index d9f5ca1f9ed..9da230d90e8 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -338,7 +338,7 @@ static Base *rna_Scene_object_link(Scene *scene, bContext *C, ReportList *report base = scene_add_base(scene, ob); id_us_plus(&ob->id); - /* this is similar to what object_add_type and add_object do */ + /* this is similar to what object_add_type and BKE_object_add do */ base->lay = scene->lay; /* when linking to an inactive scene don't touch the layer */ |