Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOve Murberg Henriksen <sorayasilvermoon@hotmail.com>2012-05-07 05:04:52 +0400
committerOve Murberg Henriksen <sorayasilvermoon@hotmail.com>2012-05-07 05:04:52 +0400
commitbc86c410f773aabeb4526679dd0d4c6aba66e793 (patch)
tree3cabb83ae23850ef21be311aaa0eb2bd539e7e7d /source/blender/editors/object
parent0fa6acce1969dc6eced98e2940f9582d3f6133e4 (diff)
parentc0331cfc090f218537937294fab0abfecc89e2aa (diff)
svn merge ^/trunk/blender -r46300:46330
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.c68
-rw-r--r--source/blender/editors/object/object_constraint.c54
-rw-r--r--source/blender/editors/object/object_edit.c12
-rw-r--r--source/blender/editors/object/object_group.c1
-rw-r--r--source/blender/editors/object/object_hook.c12
-rw-r--r--source/blender/editors/object/object_lattice.c4
-rw-r--r--source/blender/editors/object/object_modifier.c6
-rw-r--r--source/blender/editors/object/object_ops.c12
-rw-r--r--source/blender/editors/object/object_relations.c58
-rw-r--r--source/blender/editors/object/object_select.c8
-rw-r--r--source/blender/editors/object/object_shapekey.c6
-rw-r--r--source/blender/editors/object/object_transform.c38
-rw-r--r--source/blender/editors/object/object_vgroup.c14
13 files changed, 156 insertions, 137 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 52d14b9d374..b9aff50d243 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -147,7 +147,7 @@ void ED_object_base_init_transform(bContext *C, Base *base, float *loc, float *r
if (rot)
copy_v3_v3(ob->rot, rot);
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
}
/* uses context to figure out transform for primitive */
@@ -325,7 +325,7 @@ Object *ED_object_add_type(bContext *C, int type, float *loc, float *rot,
ED_object_exit_editmode(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); /* freedata, and undo */
/* deselects all, sets scene->basact */
- ob = add_object(scene, type);
+ ob = BKE_object_add(scene, type);
BASACT->lay = ob->lay = layer;
/* editor level activate, notifiers */
ED_base_object_activate(C, BASACT);
@@ -733,7 +733,7 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op)
rename_id(&ob->id, get_lamp_defname(type));
rename_id(&la->id, get_lamp_defname(type));
- if (scene_use_new_shading_nodes(scene)) {
+ if (BKE_scene_use_new_shading_nodes(scene)) {
ED_node_shader_default(scene, &la->id);
la->use_nodes = 1;
}
@@ -891,7 +891,7 @@ void ED_base_object_free_and_unlink(Main *bmain, Scene *scene, Base *base)
{
DAG_id_type_tag(bmain, ID_OB);
BLI_remlink(&scene->base, base);
- free_libblock_us(&bmain->object, base->object);
+ BKE_libblock_free_us(&bmain->object, base->object);
if (scene->basact == base) scene->basact = NULL;
MEM_freeN(base);
}
@@ -923,7 +923,7 @@ static int object_delete_exec(bContext *C, wmOperator *op)
for (scene_iter = bmain->scene.first; scene_iter; scene_iter = scene_iter->id.next) {
if (scene_iter != scene && !(scene_iter->id.lib)) {
- base_other = object_in_scene(base->object, scene_iter);
+ base_other = BKE_scene_base_find(scene_iter, base->object);
if (base_other) {
ED_base_object_free_and_unlink(bmain, scene_iter, base_other);
}
@@ -975,7 +975,7 @@ static void copy_object_set_idnew(bContext *C, int dupflag)
/* XXX check object pointers */
CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
- object_relink(ob);
+ BKE_object_relink(ob);
}
CTX_DATA_END;
@@ -993,7 +993,7 @@ static void copy_object_set_idnew(bContext *C, int dupflag)
id = (ID *)ma->mtex[a]->tex;
if (id) {
ID_NEW_US(ma->mtex[a]->tex)
- else ma->mtex[a]->tex = copy_texture(ma->mtex[a]->tex);
+ else ma->mtex[a]->tex = BKE_texture_copy(ma->mtex[a]->tex);
id->us--;
}
}
@@ -1073,7 +1073,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
for (dob = lb->first; dob; dob = dob->next) {
Base *basen;
- Object *ob = copy_object(dob->ob);
+ Object *ob = BKE_object_copy(dob->ob);
/* font duplis can have a totcol without material, we get them from parent
* should be implemented better...
*/
@@ -1097,7 +1097,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
ob->lay = base->lay;
copy_m4_m4(ob->obmat, dob->mat);
- object_apply_mat4(ob, ob->obmat, FALSE, FALSE);
+ BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE);
if (dupli_gh)
BLI_ghash_insert(dupli_gh, dob, ob);
@@ -1143,7 +1143,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
/* note, this may be the parent of other objects, but it should
* still work out ok */
- object_apply_mat4(ob_dst, dob->mat, FALSE, TRUE);
+ BKE_object_apply_mat4(ob_dst, dob->mat, FALSE, TRUE);
/* to set ob_dst->orig and in case theres any other discrepicies */
DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB);
@@ -1162,7 +1162,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
/* similer to the code above, see comments */
invert_m4_m4(ob_dst->parentinv, dob->mat);
- object_apply_mat4(ob_dst, dob->mat, FALSE, TRUE);
+ BKE_object_apply_mat4(ob_dst, dob->mat, FALSE, TRUE);
DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB);
@@ -1244,7 +1244,7 @@ static void curvetomesh(Scene *scene, Object *ob)
nurbs_to_mesh(ob); /* also does users */
if (ob->type == OB_MESH)
- object_free_modifiers(ob);
+ BKE_object_free_modifiers(ob);
}
static int convert_poll(bContext *C)
@@ -1265,7 +1265,7 @@ static Base *duplibase_for_convert(Scene *scene, Base *base, Object *ob)
ob = base->object;
}
- obn = copy_object(ob);
+ obn = BKE_object_copy(ob);
obn->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
basen = MEM_mallocN(sizeof(Base), "duplibase");
@@ -1325,7 +1325,7 @@ static int convert_exec(bContext *C, wmOperator *op)
/* When 2 objects with linked data are selected, converting both
* would keep modifiers on all but the converted object [#26003] */
if (ob->type == OB_MESH) {
- object_free_modifiers(ob); /* after derivedmesh calls! */
+ BKE_object_free_modifiers(ob); /* after derivedmesh calls! */
}
}
}
@@ -1341,7 +1341,7 @@ static int convert_exec(bContext *C, wmOperator *op)
me->id.us--;
/* make a new copy of the mesh */
- newob->data = copy_mesh(me);
+ newob->data = BKE_mesh_copy(me);
}
else {
newob = ob;
@@ -1350,7 +1350,7 @@ static int convert_exec(bContext *C, wmOperator *op)
mesh_to_curve(scene, newob);
if (newob->type == OB_CURVE)
- object_free_modifiers(newob); /* after derivedmesh calls! */
+ BKE_object_free_modifiers(newob); /* after derivedmesh calls! */
}
else if (ob->type == OB_MESH && ob->modifiers.first) { /* converting a mesh with no modifiers causes a segfault */
ob->flag |= OB_DONE;
@@ -1364,7 +1364,7 @@ static int convert_exec(bContext *C, wmOperator *op)
me->id.us--;
/* make a new copy of the mesh */
- newob->data = copy_mesh(me);
+ newob->data = BKE_mesh_copy(me);
}
else {
newob = ob;
@@ -1383,7 +1383,7 @@ static int convert_exec(bContext *C, wmOperator *op)
/* re-tessellation is called by DM_to_mesh */
dm->release(dm);
- object_free_modifiers(newob); /* after derivedmesh calls! */
+ BKE_object_free_modifiers(newob); /* after derivedmesh calls! */
}
else if (ob->type == OB_FONT) {
ob->flag |= OB_DONE;
@@ -1499,7 +1499,7 @@ static int convert_exec(bContext *C, wmOperator *op)
mb = newob->data;
mb->id.us--;
- newob->data = add_mesh("Mesh");
+ newob->data = BKE_mesh_add("Mesh");
newob->type = OB_MESH;
me = newob->data;
@@ -1631,7 +1631,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
; /* nothing? */
}
else {
- obn = copy_object(ob);
+ obn = BKE_object_copy(ob);
obn->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
basen = MEM_mallocN(sizeof(Base), "duplibase");
@@ -1657,7 +1657,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
id = (ID *)obn->mat[a];
if (id) {
ID_NEW_US(obn->mat[a])
- else obn->mat[a] = copy_material(obn->mat[a]);
+ else obn->mat[a] = BKE_material_copy(obn->mat[a]);
id->us--;
if (dupflag & USER_DUP_ACT) {
@@ -1672,7 +1672,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
id = (ID *) psys->part;
if (id) {
ID_NEW_US(psys->part)
- else psys->part = psys_copy_settings(psys->part);
+ else psys->part = BKE_particlesettings_copy(psys->part);
if (dupflag & USER_DUP_ACT) {
BKE_copy_animdata_id_action(&psys->part->id);
@@ -1691,7 +1691,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
if (dupflag & USER_DUP_MESH) {
ID_NEW_US2(obn->data)
else {
- obn->data = copy_mesh(obn->data);
+ obn->data = BKE_mesh_copy(obn->data);
if (obn->fluidsimSettings) {
obn->fluidsimSettings->orgMesh = (Mesh *)obn->data;
@@ -1746,7 +1746,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
if (dupflag & USER_DUP_LAMP) {
ID_NEW_US2(obn->data)
else {
- obn->data = copy_lamp(obn->data);
+ obn->data = BKE_lamp_copy(obn->data);
didit = 1;
}
id->us--;
@@ -1760,8 +1760,8 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
if (dupflag & USER_DUP_ARM) {
ID_NEW_US2(obn->data)
else {
- obn->data = copy_armature(obn->data);
- armature_rebuild_pose(obn, obn->data);
+ obn->data = BKE_armature_copy(obn->data);
+ BKE_pose_rebuild(obn, obn->data);
didit = 1;
}
id->us--;
@@ -1773,7 +1773,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
if (dupflag != 0) {
ID_NEW_US2(obn->data)
else {
- obn->data = copy_lattice(obn->data);
+ obn->data = BKE_lattice_copy(obn->data);
didit = 1;
}
id->us--;
@@ -1783,7 +1783,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
if (dupflag != 0) {
ID_NEW_US2(obn->data)
else {
- obn->data = copy_camera(obn->data);
+ obn->data = BKE_camera_copy(obn->data);
didit = 1;
}
id->us--;
@@ -1793,7 +1793,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
if (dupflag != 0) {
ID_NEW_US2(obn->data)
else {
- obn->data = copy_speaker(obn->data);
+ obn->data = BKE_speaker_copy(obn->data);
didit = 1;
}
id->us--;
@@ -1832,7 +1832,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
id = (ID *)(*matarar)[a];
if (id) {
ID_NEW_US((*matarar)[a])
- else (*matarar)[a] = copy_material((*matarar)[a]);
+ else (*matarar)[a] = BKE_material_copy((*matarar)[a]);
id->us--;
}
@@ -1863,7 +1863,7 @@ Base *ED_object_add_duplicate(Main *bmain, Scene *scene, Base *base, int dupflag
ob = basen->object;
/* link own references to the newly duplicated data [#26816] */
- object_relink(ob);
+ BKE_object_relink(ob);
set_sca_new_poins_ob(ob);
DAG_scene_sort(bmain, scene);
@@ -1954,7 +1954,7 @@ static int add_named_exec(bContext *C, wmOperator *op)
/* find object, create fake base */
RNA_string_get(op->ptr, "name", name);
- ob = (Object *)find_id("OB", name);
+ ob = (Object *)BKE_libblock_find_name(ID_OB, name);
if (ob == NULL)
return OPERATOR_CANCELLED;
@@ -2033,7 +2033,7 @@ static int join_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_ERROR, "This data does not support joining in editmode");
return OPERATOR_CANCELLED;
}
- else if (object_data_is_libdata(ob)) {
+ else if (BKE_object_obdata_is_libdata(ob)) {
BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata");
return OPERATOR_CANCELLED;
}
@@ -2086,7 +2086,7 @@ static int join_shapes_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_ERROR, "This data does not support joining in editmode");
return OPERATOR_CANCELLED;
}
- else if (object_data_is_libdata(ob)) {
+ else if (BKE_object_obdata_is_libdata(ob)) {
BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index e63e0e34934..ec3360f236b 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -89,7 +89,7 @@ ListBase *get_active_constraints(Object *ob)
if (ob->mode & OB_MODE_POSE) {
bPoseChannel *pchan;
- pchan = get_active_posechannel(ob);
+ pchan = BKE_pose_channel_active(ob);
if (pchan)
return &pchan->constraints;
}
@@ -309,23 +309,23 @@ static void test_constraints(Object *owner, bPoseChannel *pchan)
* the constraint is deemed invalid
*/
/* default IK check ... */
- if (exist_object(data->tar) == 0) {
+ if (BKE_object_exists_check(data->tar) == 0) {
data->tar = NULL;
curcon->flag |= CONSTRAINT_DISABLE;
}
else if (data->tar == owner) {
- if (!get_named_bone(get_armature(owner), data->subtarget)) {
+ if (!BKE_armature_find_bone_name(BKE_armature_from_object(owner), data->subtarget)) {
curcon->flag |= CONSTRAINT_DISABLE;
}
}
if (data->poletar) {
- if (exist_object(data->poletar) == 0) {
+ if (BKE_object_exists_check(data->poletar) == 0) {
data->poletar = NULL;
curcon->flag |= CONSTRAINT_DISABLE;
}
else if (data->poletar == owner) {
- if (!get_named_bone(get_armature(owner), data->polesubtarget)) {
+ if (!BKE_armature_find_bone_name(BKE_armature_from_object(owner), data->polesubtarget)) {
curcon->flag |= CONSTRAINT_DISABLE;
}
}
@@ -339,12 +339,12 @@ static void test_constraints(Object *owner, bPoseChannel *pchan)
bPivotConstraint *data = curcon->data;
/* target doesn't have to exist, but if it is non-null, it must exist! */
- if (data->tar && exist_object(data->tar) == 0) {
+ if (data->tar && BKE_object_exists_check(data->tar) == 0) {
data->tar = NULL;
curcon->flag |= CONSTRAINT_DISABLE;
}
else if (data->tar == owner) {
- if (!get_named_bone(get_armature(owner), data->subtarget)) {
+ if (!BKE_armature_find_bone_name(BKE_armature_from_object(owner), data->subtarget)) {
curcon->flag |= CONSTRAINT_DISABLE;
}
}
@@ -446,14 +446,14 @@ static void test_constraints(Object *owner, bPoseChannel *pchan)
/* disable and clear constraints targets that are incorrect */
for (ct = targets.first; ct; ct = ct->next) {
/* general validity checks (for those constraints that need this) */
- if (exist_object(ct->tar) == 0) {
+ if (BKE_object_exists_check(ct->tar) == 0) {
/* object doesn't exist, but constraint requires target */
ct->tar = NULL;
curcon->flag |= CONSTRAINT_DISABLE;
}
else if (ct->tar == owner) {
if (type == CONSTRAINT_OBTYPE_BONE) {
- if (!get_named_bone(get_armature(owner), ct->subtarget)) {
+ if (!BKE_armature_find_bone_name(BKE_armature_from_object(owner), ct->subtarget)) {
/* bone must exist in armature... */
// TODO: clear subtarget?
curcon->flag |= CONSTRAINT_DISABLE;
@@ -585,7 +585,7 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int
list = &ob->constraints;
}
else if (owner == EDIT_CONSTRAINT_OWNER_BONE) {
- bPoseChannel *pchan = get_active_posechannel(ob);
+ bPoseChannel *pchan = BKE_pose_channel_active(ob);
if (pchan)
list = &pchan->constraints;
else {
@@ -713,7 +713,7 @@ static void child_get_inverse_matrix(Scene *scene, Object *ob, bConstraint *con,
/* try to find a pose channel - assume that this is the constraint owner */
// TODO: get from context instead?
if (ob && ob->pose)
- pchan = get_active_posechannel(ob);
+ pchan = BKE_pose_channel_active(ob);
/* calculate/set inverse matrix:
* We just calculate all transform-stack eval up to but not including this constraint.
@@ -729,7 +729,7 @@ static void child_get_inverse_matrix(Scene *scene, Object *ob, bConstraint *con,
* to use as baseline ("pmat") to derive delta from. This extra calc saves users
* from having pressing "Clear Inverse" first
*/
- where_is_pose(scene, ob);
+ BKE_pose_where_is(scene, ob);
copy_m4_m4(pmat, pchan->pose_mat);
/* 2. knock out constraints starting from this one */
@@ -746,7 +746,7 @@ static void child_get_inverse_matrix(Scene *scene, Object *ob, bConstraint *con,
}
/* 3. solve pose without disabled constraints */
- where_is_pose(scene, ob);
+ BKE_pose_where_is(scene, ob);
/* 4. determine effect of constraint by removing the newly calculated
* pchan->pose_mat from the original pchan->pose_mat, thus determining
@@ -769,13 +769,13 @@ static void child_get_inverse_matrix(Scene *scene, Object *ob, bConstraint *con,
}
/* 6. recalculate pose with new inv-mat applied */
- where_is_pose(scene, ob);
+ BKE_pose_where_is(scene, ob);
}
else if (ob) {
Object workob;
- /* use what_does_parent to find inverse - just like for normal parenting */
- what_does_parent(scene, ob, &workob);
+ /* use BKE_object_workob_calc_parent to find inverse - just like for normal parenting */
+ BKE_object_workob_calc_parent(scene, ob, &workob);
invert_m4_m4(invmat, workob.obmat);
}
}
@@ -977,7 +977,7 @@ void ED_object_constraint_set_active(Object *ob, bConstraint *con)
void ED_object_constraint_update(Object *ob)
{
- if (ob->pose) update_pose_constraint_flags(ob->pose);
+ if (ob->pose) BKE_pose_update_constraint_flags(ob->pose);
object_test_constraints(ob);
@@ -1147,7 +1147,7 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
- Object *ob = object_pose_armature_get(CTX_data_active_object(C));
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
/* free constraints for all selected bones */
CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
@@ -1312,7 +1312,7 @@ void OBJECT_OT_constraints_copy(wmOperatorType *ot)
static short get_new_constraint_target(bContext *C, int con_type, Object **tar_ob, bPoseChannel **tar_pchan, short add)
{
Object *obact = ED_object_active_context(C);
- bPoseChannel *pchanact = get_active_posechannel(obact);
+ bPoseChannel *pchanact = BKE_pose_channel_active(obact);
short only_curve = 0, only_mesh = 0, only_ob = 0;
short found = 0;
@@ -1413,7 +1413,7 @@ static short get_new_constraint_target(bContext *C, int con_type, Object **tar_o
Object *obt;
/* add new target object */
- obt = add_object(scene, OB_EMPTY);
+ obt = BKE_object_add(scene, OB_EMPTY);
/* set layers OK */
newbase = BASACT;
@@ -1434,7 +1434,7 @@ static short get_new_constraint_target(bContext *C, int con_type, Object **tar_o
copy_v3_v3(obt->loc, obact->obmat[3]);
}
- /* restore, add_object sets active */
+ /* restore, BKE_object_add sets active */
BASACT = base;
base->flag |= SELECT;
@@ -1459,7 +1459,7 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
pchan = NULL;
}
else {
- pchan = get_active_posechannel(ob);
+ pchan = BKE_pose_channel_active(ob);
/* ensure not to confuse object/pose adding */
if (pchan == NULL) {
@@ -1541,7 +1541,7 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
object_test_constraints(ob);
if (pchan)
- update_pose_constraint_flags(ob->pose);
+ BKE_pose_update_constraint_flags(ob->pose);
/* force depsgraph to get recalculated since new relationships added */
@@ -1586,7 +1586,7 @@ static int object_constraint_add_exec(bContext *C, wmOperator *op)
/* dummy operator callback */
static int pose_constraint_add_exec(bContext *C, wmOperator *op)
{
- Object *ob = object_pose_armature_get(ED_object_active_context(C));
+ Object *ob = BKE_object_pose_armature_get(ED_object_active_context(C));
int type = RNA_enum_get(op->ptr, "type");
short with_targets = 0;
@@ -1689,8 +1689,8 @@ void POSE_OT_constraint_add_with_targets(wmOperatorType *ot)
/* present menu with options + validation for targets to use */
static int pose_ik_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
{
- Object *ob = object_pose_armature_get(CTX_data_active_object(C));
- bPoseChannel *pchan = get_active_posechannel(ob);
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ bPoseChannel *pchan = BKE_pose_channel_active(ob);
bConstraint *con = NULL;
uiPopupMenu *pup;
@@ -1773,7 +1773,7 @@ void POSE_OT_ik_add(wmOperatorType *ot)
/* remove IK constraints from selected bones */
static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob = object_pose_armature_get(CTX_data_active_object(C));
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
/* only remove IK Constraints */
CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index c669bbfe3b2..d6d7342f900 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -427,7 +427,7 @@ void ED_object_enter_editmode(bContext *C, int flag)
ob = base->object;
- if (object_data_is_libdata(ob)) {
+ if (BKE_object_obdata_is_libdata(ob)) {
error_libdata();
return;
}
@@ -465,11 +465,11 @@ void ED_object_enter_editmode(bContext *C, int flag)
bArmature *arm = base->object->data;
if (!arm) return;
/*
- * The function object_data_is_libdata make a problem here, the
+ * The function BKE_object_obdata_is_libdata make a problem here, the
* check for ob->proxy return 0 and let blender enter to edit mode
* this causes a crash when you try leave the edit mode.
* The problem is that i can't remove the ob->proxy check from
- * object_data_is_libdata that prevent the bugfix #6614, so
+ * BKE_object_obdata_is_libdata that prevent the bugfix #6614, so
* i add this little hack here.
*/
if (arm->id.lib) {
@@ -783,7 +783,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
return;
}
else if (event == 24) {
- /* moved to object_link_modifiers */
+ /* moved to BKE_object_link_modifiers */
/* copymenu_modifiers(bmain, scene, v3d, ob); */
return;
}
@@ -885,7 +885,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
cu1->vfontbi = cu->vfontbi;
id_us_plus((ID *)cu1->vfontbi);
- BKE_text_to_curve(bmain, scene, base->object, 0); /* needed? */
+ BKE_vfont_to_curve(bmain, scene, base->object, 0); /* needed? */
BLI_strncpy(cu1->family, cu->family, sizeof(cu1->family));
@@ -1703,6 +1703,7 @@ void OBJECT_OT_game_property_copy(wmOperatorType *ot)
/* identifiers */
ot->name = "Copy Game Property";
ot->idname = "OBJECT_OT_game_property_copy";
+ ot->description = "Copy/merge/replace a game property from active object to all selected objects";
/* api callbacks */
ot->exec = game_property_copy_exec;
@@ -1733,6 +1734,7 @@ void OBJECT_OT_game_property_clear(wmOperatorType *ot)
/* identifiers */
ot->name = "Clear Game Property";
ot->idname = "OBJECT_OT_game_property_clear";
+ ot->description = "Remove all game properties from all selected objects";
/* api callbacks */
ot->exec = game_property_clear_exec;
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index dd6c08a2247..b47591dddee 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -327,6 +327,7 @@ void OBJECT_OT_group_remove(wmOperatorType *ot)
/* identifiers */
ot->name = "Remove Group";
ot->idname = "OBJECT_OT_group_remove";
+ ot->description = "Remove the active object from this group";
/* api callbacks */
ot->exec = group_remove_exec;
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index 0aec83610b8..71db051a6e1 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -414,13 +414,13 @@ static Object *add_hook_object_new(Scene *scene, Object *obedit)
Base *base, *basedit;
Object *ob;
- ob = add_object(scene, OB_EMPTY);
+ ob = BKE_object_add(scene, OB_EMPTY);
- basedit = object_in_scene(obedit, scene);
- base = object_in_scene(ob, scene);
+ basedit = BKE_scene_base_find(scene, obedit);
+ base = BKE_scene_base_find(scene, ob);
base->lay = ob->lay = obedit->lay;
- /* icky, add_object sets new base as active.
+ /* icky, BKE_object_add sets new base as active.
* so set it back to the original edit object */
scene->basact = basedit;
@@ -466,7 +466,7 @@ static void add_hook_object(Main *bmain, Scene *scene, Object *obedit, Object *o
/* matrix calculus */
/* vert x (obmat x hook->imat) x hook->obmat x ob->imat */
/* (parentinv ) */
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
invert_m4_m4(ob->imat, ob->obmat);
/* apparently this call goes from right to left... */
@@ -645,7 +645,7 @@ static int object_hook_reset_exec(bContext *C, wmOperator *op)
/* reset functionality */
if (hmd->object) {
- bPoseChannel *pchan = get_pose_channel(hmd->object->pose, hmd->subtarget);
+ bPoseChannel *pchan = BKE_pose_channel_find_name(hmd->object->pose, hmd->subtarget);
if (hmd->subtarget[0] && pchan) {
float imat[4][4], mat[4][4];
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c
index 648f530881a..7b37ca8ab95 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/object_lattice.c
@@ -271,12 +271,12 @@ static int make_regular_exec(bContext *C, wmOperator *UNUSED(op))
if (ob) {
lt = ob->data;
- resizelattice(lt->editlatt->latt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
+ BKE_lattice_resize(lt->editlatt->latt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
}
else {
ob = CTX_data_active_object(C);
lt = ob->data;
- resizelattice(lt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
+ BKE_lattice_resize(lt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
}
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 281ca7e59b6..f6bf9ba2f15 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -368,7 +368,7 @@ int ED_object_modifier_convert(ReportList *UNUSED(reports), Main *bmain, Scene *
if (totvert == 0) return 0;
/* add new mesh */
- obn = add_object(scene, OB_MESH);
+ obn = BKE_object_add(scene, OB_MESH);
me = obn->data;
me->totvert = totvert;
@@ -661,7 +661,7 @@ static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *UNUSED(ptr)
if (mti->flags & eModifierTypeFlag_NoUserAdd)
continue;
- if (!object_support_modifier_type(ob, md_item->value))
+ if (!BKE_object_support_modifier_type_check(ob, md_item->value))
continue;
}
else {
@@ -1369,7 +1369,7 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op)
dm->release(dm);
}
else if (ob->type == OB_LATTICE) {
- lattice_calc_modifiers(scene, ob);
+ BKE_lattice_modifiers_calc(scene, ob);
}
else if (ob->type == OB_MBALL) {
makeDispListMBall(scene, ob);
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 72f23177946..311240d189f 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -223,18 +223,18 @@ void ED_operatormacros_object(void)
wmOperatorType *ot;
wmOperatorTypeMacro *otmacro;
- ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate Objects", OPTYPE_UNDO | OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate Objects",
+ "Duplicate selected objects and move them", OPTYPE_UNDO | OPTYPE_REGISTER);
if (ot) {
- ot->description = "Duplicate selected objects and move them";
WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", PROP_EDIT_OFF);
}
/* grr, should be able to pass options on... */
- ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move_linked", "Duplicate Linked", OPTYPE_UNDO | OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("OBJECT_OT_duplicate_move_linked", "Duplicate Linked",
+ "Duplicate selected objects and move them", OPTYPE_UNDO | OPTYPE_REGISTER);
if (ot) {
- ot->description = "Duplicate selected objects and move them";
otmacro = WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
RNA_boolean_set(otmacro->ptr, "linked", TRUE);
otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
@@ -242,9 +242,9 @@ void ED_operatormacros_object(void)
}
/* XXX */
- ot = WM_operatortype_append_macro("OBJECT_OT_add_named_cursor", "Add named object at cursor", OPTYPE_UNDO | OPTYPE_REGISTER);
+ ot = WM_operatortype_append_macro("OBJECT_OT_add_named_cursor", "Add Named At Cursor",
+ "Add named object at cursor", OPTYPE_UNDO | OPTYPE_REGISTER);
if (ot) {
- ot->description = "Add named object at cursor";
RNA_def_string(ot->srna, "name", "Cube", MAX_ID_NAME - 2, "Name", "Object name to add");
WM_operatortype_macro_define(ot, "VIEW3D_OT_cursor3d");
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 35b3b0a0407..d31e0b69473 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -235,7 +235,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
ob->par3 = v3 - 1;
/* inverse parent matrix */
- what_does_parent(scene, ob, &workob);
+ BKE_object_workob_calc_parent(scene, ob, &workob);
invert_m4_m4(ob->parentinv, workob.obmat);
}
else {
@@ -243,7 +243,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
ob->par1 = v1 - 1;
/* inverse parent matrix */
- what_does_parent(scene, ob, &workob);
+ BKE_object_workob_calc_parent(scene, ob, &workob);
invert_m4_m4(ob->parentinv, workob.obmat);
}
}
@@ -335,24 +335,24 @@ static int make_proxy_exec(bContext *C, wmOperator *op)
char name[MAX_ID_NAME + 4];
/* Add new object for the proxy */
- newob = add_object(scene, OB_EMPTY);
+ newob = BKE_object_add(scene, OB_EMPTY);
BLI_snprintf(name, sizeof(name), "%s_proxy", ((ID *)(gob ? gob : ob))->name + 2);
rename_id(&newob->id, name);
/* set layers OK */
- newbase = BASACT; /* add_object sets active... */
+ newbase = BASACT; /* BKE_object_add sets active... */
newbase->lay = oldbase->lay;
newob->lay = newbase->lay;
- /* remove base, leave user count of object, it gets linked in object_make_proxy */
+ /* remove base, leave user count of object, it gets linked in BKE_object_make_proxy */
if (gob == NULL) {
BLI_remlink(&scene->base, oldbase);
MEM_freeN(oldbase);
}
- object_make_proxy(newob, ob, gob);
+ BKE_object_make_proxy(newob, ob, gob);
/* depsgraph flushes are needed for the new data */
DAG_scene_sort(bmain, scene);
@@ -439,7 +439,7 @@ void ED_object_parent_clear(bContext *C, int type)
}
else if (type == 1) {
ob->parent = NULL;
- object_apply_mat4(ob, ob->obmat, TRUE, FALSE);
+ BKE_object_apply_mat4(ob, ob->obmat, TRUE, FALSE);
}
else if (type == 2)
unit_m4(ob->parentinv);
@@ -554,7 +554,7 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
}
}
else if (partype == PAR_BONE) {
- pchan = get_active_posechannel(par);
+ pchan = BKE_pose_channel_active(par);
if (pchan == NULL) {
BKE_report(reports, RPT_ERROR, "No active Bone");
@@ -571,7 +571,7 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
Object workob;
/* apply transformation of previous parenting */
- /* object_apply_mat4(ob, ob->obmat); */ /* removed because of bug [#23577] */
+ /* BKE_object_apply_mat4(ob, ob->obmat); */ /* removed because of bug [#23577] */
/* set the parent (except for follow-path constraint option) */
if (partype != PAR_PATH_CONST) {
@@ -650,13 +650,13 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object
}
/* get corrected inverse */
ob->partype = PAROBJECT;
- what_does_parent(scene, ob, &workob);
+ BKE_object_workob_calc_parent(scene, ob, &workob);
invert_m4_m4(ob->parentinv, workob.obmat);
}
else {
/* calculate inverse parent matrix */
- what_does_parent(scene, ob, &workob);
+ BKE_object_workob_calc_parent(scene, ob, &workob);
invert_m4_m4(ob->parentinv, workob.obmat);
}
@@ -814,7 +814,7 @@ static int object_slow_parent_clear_exec(bContext *C, wmOperator *UNUSED(op))
if (ob->parent) {
if (ob->partype & PARSLOW) {
ob->partype -= PARSLOW;
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
ob->partype |= PARSLOW;
ob->recalc |= OB_RECALC_OB;
}
@@ -920,7 +920,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op)
}
if (type == 1)
- object_apply_mat4(ob, ob->obmat, TRUE, TRUE);
+ BKE_object_apply_mat4(ob, ob->obmat, TRUE, TRUE);
}
CTX_DATA_END;
@@ -1217,7 +1217,7 @@ static int make_links_scene_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN (C, Base *, base, selected_bases)
{
- if (!object_in_scene(base->object, scene_to)) {
+ if (!BKE_scene_base_find(scene_to, base->object)) {
Base *nbase = MEM_mallocN(sizeof(Base), "newbase");
*nbase = *base;
BLI_addhead(&(scene_to->base), nbase);
@@ -1313,7 +1313,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
}
break;
case MAKE_LINKS_MODIFIERS:
- object_link_modifiers(obt, ob);
+ BKE_object_link_modifiers(obt, ob);
obt->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME;
break;
}
@@ -1401,7 +1401,7 @@ static void single_object_users(Scene *scene, View3D *v3d, int flag)
if ( (base->flag & flag) == flag) {
if (ob->id.lib == NULL && ob->id.us > 1) {
/* base gets copy of object */
- obn = copy_object(ob);
+ obn = BKE_object_copy(ob);
base->object = obn;
ob->id.us--;
}
@@ -1413,7 +1413,7 @@ static void single_object_users(Scene *scene, View3D *v3d, int flag)
/* object pointers */
for (base = FIRSTBASE; base; base = base->next) {
- object_relink(base->object);
+ BKE_object_relink(base->object);
}
set_sca_new_poins();
@@ -1447,7 +1447,7 @@ static void new_id_matar(Material **matar, int totcol)
id->us--;
}
else if (id->us > 1) {
- matar[a] = copy_material(matar[a]);
+ matar[a] = BKE_material_copy(matar[a]);
id->us--;
id->newid = (ID *)matar[a];
}
@@ -1478,7 +1478,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag)
switch (ob->type) {
case OB_LAMP:
- ob->data = la = copy_lamp(ob->data);
+ ob->data = la = BKE_lamp_copy(ob->data);
for (a = 0; a < MAX_MTEX; a++) {
if (la->mtex[a]) {
ID_NEW(la->mtex[a]->object);
@@ -1486,10 +1486,10 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag)
}
break;
case OB_CAMERA:
- ob->data = copy_camera(ob->data);
+ ob->data = BKE_camera_copy(ob->data);
break;
case OB_MESH:
- ob->data = copy_mesh(ob->data);
+ ob->data = BKE_mesh_copy(ob->data);
//me= ob->data;
//if (me && me->key)
// ipo_idnew(me->key->ipo); /* drivers */
@@ -1505,15 +1505,15 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag)
ID_NEW(cu->taperobj);
break;
case OB_LATTICE:
- ob->data = copy_lattice(ob->data);
+ ob->data = BKE_lattice_copy(ob->data);
break;
case OB_ARMATURE:
ob->recalc |= OB_RECALC_DATA;
- ob->data = copy_armature(ob->data);
- armature_rebuild_pose(ob, ob->data);
+ ob->data = BKE_armature_copy(ob->data);
+ BKE_pose_rebuild(ob, ob->data);
break;
case OB_SPEAKER:
- ob->data = copy_speaker(ob->data);
+ ob->data = BKE_speaker_copy(ob->data);
break;
default:
if (G.debug & G_DEBUG)
@@ -1568,7 +1568,7 @@ static void single_mat_users(Scene *scene, int flag, int do_textures)
/* do not test for LIB_NEW: this functions guaranteed delivers single_users! */
if (ma->id.us > 1) {
- man = copy_material(ma);
+ man = BKE_material_copy(ma);
BKE_copy_animdata_id_action(&man->id);
man->id.us = 0;
@@ -1579,7 +1579,7 @@ static void single_mat_users(Scene *scene, int flag, int do_textures)
if (ma->mtex[b] && (tex = ma->mtex[b]->tex)) {
if (tex->id.us > 1) {
tex->id.us--;
- tex = copy_texture(tex);
+ tex = BKE_texture_copy(tex);
BKE_copy_animdata_id_action(&tex->id);
man->mtex[b]->tex = tex;
}
@@ -1606,7 +1606,7 @@ static void do_single_tex_user(Tex **from)
tex->id.us--;
}
else if (tex->id.us > 1) {
- texn = copy_texture(tex);
+ texn = BKE_texture_copy(tex);
BKE_copy_animdata_id_action(&texn->id);
tex->id.newid = (ID *)texn;
tex->id.us--;
@@ -1911,7 +1911,7 @@ static int drop_named_material_invoke(bContext *C, wmOperator *op, wmEvent *even
char name[MAX_ID_NAME - 2];
RNA_string_get(op->ptr, "name", name);
- ma = (Material *)find_id("MA", name);
+ ma = (Material *)BKE_libblock_find_name(ID_MA, name);
if (base == NULL || ma == NULL)
return OPERATOR_CANCELLED;
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index ed53e4a9b91..86823be09a4 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -416,7 +416,7 @@ static short select_grouped_parent(bContext *C) /* Makes parent active and de-se
if (!basact || !(basact->object->parent)) return 0; /* we know OBACT is valid */
- baspar = object_in_scene(basact->object->parent, scene);
+ baspar = BKE_scene_base_find(scene, basact->object->parent);
/* can be NULL if parent in other scene */
if (baspar && BASE_SELECTABLE(v3d, baspar)) {
@@ -487,7 +487,7 @@ static short select_grouped_object_hooks(bContext *C, Object *ob)
if (md->type == eModifierType_Hook) {
hmd = (HookModifierData *) md;
if (hmd->object && !(hmd->object->flag & SELECT)) {
- base = object_in_scene(hmd->object, scene);
+ base = BKE_scene_base_find(scene, hmd->object);
if (base && (BASE_SELECTABLE(v3d, base))) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
@@ -884,9 +884,9 @@ static int object_select_mirror_exec(bContext *C, wmOperator *op)
flip_side_name(tmpname, primbase->object->id.name + 2, TRUE);
if (strcmp(tmpname, primbase->object->id.name + 2) != 0) { /* names differ */
- Object *ob = (Object *)find_id("OB", tmpname);
+ Object *ob = (Object *)BKE_libblock_find_name(ID_OB, tmpname);
if (ob) {
- Base *secbase = object_in_scene(ob, scene);
+ Base *secbase = BKE_scene_base_find(scene, ob);
if (secbase) {
ED_base_object_select(secbase, BA_SELECT);
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index 5d31bfff99a..19864ed58cf 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -77,7 +77,7 @@
static void ED_object_shape_key_add(bContext *C, Scene *scene, Object *ob, int from_mix)
{
KeyBlock *kb;
- if ((kb = object_insert_shape_key(scene, ob, NULL, from_mix))) {
+ if ((kb = BKE_object_insert_shape_key(scene, ob, NULL, from_mix))) {
Key *key = ob_get_key(ob);
/* for absolute shape keys, new keys may not be added last */
ob->shapenr = BLI_findindex(&key->block, kb) + 1;
@@ -141,7 +141,7 @@ static int ED_object_shape_key_remove(bContext *C, Object *ob)
else if (GS(key->from->name) == ID_CU) ((Curve *)key->from)->key = NULL;
else if (GS(key->from->name) == ID_LT) ((Lattice *)key->from)->key = NULL;
- free_libblock_us(&(bmain->key), key);
+ BKE_libblock_free_us(&(bmain->key), key);
}
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
@@ -403,6 +403,7 @@ void OBJECT_OT_shape_key_mirror(wmOperatorType *ot)
/* identifiers */
ot->name = "Mirror Shape Key";
ot->idname = "OBJECT_OT_shape_key_mirror";
+ ot->description = "Mirror the current shape key along the local X axis";
/* api callbacks */
ot->poll = shape_key_mode_poll;
@@ -474,6 +475,7 @@ void OBJECT_OT_shape_key_move(wmOperatorType *ot)
/* identifiers */
ot->name = "Move Shape Key";
ot->idname = "OBJECT_OT_shape_key_move";
+ ot->description = "Move the active shape key up/down in the list";
/* api callbacks */
ot->poll = shape_key_mode_poll;
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index b8a7ce999f1..785b9c0a9b7 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -370,8 +370,8 @@ static void ignore_parent_tx(Main *bmain, Scene *scene, Object *ob)
/* a change was made, adjust the children to compensate */
for (ob_child = bmain->object.first; ob_child; ob_child = ob_child->id.next) {
if (ob_child->parent == ob) {
- object_apply_mat4(ob_child, ob_child->obmat, TRUE, FALSE);
- what_does_parent(scene, ob_child, &workob);
+ BKE_object_apply_mat4(ob_child, ob_child->obmat, TRUE, FALSE);
+ BKE_object_workob_calc_parent(scene, ob_child, &workob);
invert_m4_m4(ob_child->parentinv, workob.obmat);
}
}
@@ -434,17 +434,17 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
/* calculate rotation/scale matrix */
if (apply_scale && apply_rot)
- object_to_mat3(ob, rsmat);
+ BKE_object_to_mat3(ob, rsmat);
else if (apply_scale)
- object_scale_to_mat3(ob, rsmat);
+ BKE_object_scale_to_mat3(ob, rsmat);
else if (apply_rot) {
float tmat[3][3], timat[3][3];
/* simple rotation matrix */
- object_rot_to_mat3(ob, rsmat);
+ BKE_object_rot_to_mat3(ob, rsmat);
/* correct for scale, note mul_m3_m3m3 has swapped args! */
- object_scale_to_mat3(ob, tmat);
+ BKE_object_scale_to_mat3(ob, tmat);
invert_m3_m3(timat, tmat);
mul_m3_m3m3(rsmat, timat, rsmat);
mul_m3_m3m3(rsmat, rsmat, tmat);
@@ -460,7 +460,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
if (!(apply_scale && apply_rot)) {
/* correct for scale and rotation that is still applied */
- object_to_mat3(ob, obmat);
+ BKE_object_to_mat3(ob, obmat);
invert_m3_m3(iobmat, obmat);
mul_m3_m3m3(tmat, rsmat, iobmat);
mul_m3_v3(tmat, mat[3]);
@@ -546,9 +546,9 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
unit_axis_angle(ob->rotAxis, &ob->rotAngle);
}
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
if (ob->type == OB_ARMATURE) {
- where_is_pose(scene, ob); /* needed for bone parents */
+ BKE_pose_where_is(scene, ob); /* needed for bone parents */
}
ignore_parent_tx(bmain, scene, ob);
@@ -573,9 +573,9 @@ static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
{
- where_is_object(scene, ob);
- object_apply_mat4(ob, ob->obmat, TRUE, TRUE);
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
+ BKE_object_apply_mat4(ob, ob->obmat, TRUE, TRUE);
+ BKE_object_where_is_calc(scene, ob);
/* update for any children that may get moved */
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
@@ -750,7 +750,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
else {
/* only bounds support */
INIT_MINMAX(min, max);
- minmax_object_duplis(scene, ob, min, max);
+ BKE_object_minmax_dupli(scene, ob, min, max);
mid_v3_v3v3(cent, min, max);
invert_m4_m4(ob->imat, ob->obmat);
mul_m4_v3(ob->imat, cent);
@@ -854,8 +854,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
arm->id.flag |= LIB_DOIT;
/* do_inverse_offset= TRUE; */ /* docenter_armature() handles this */
- where_is_object(scene, ob);
- where_is_pose(scene, ob); /* needed for bone parents */
+ BKE_object_where_is_calc(scene, ob);
+ BKE_pose_where_is(scene, ob); /* needed for bone parents */
ignore_parent_tx(bmain, scene, ob);
@@ -893,9 +893,9 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
mul_mat3_m4_v3(ob->obmat, centn); /* ommit translation part */
add_v3_v3(ob->loc, centn);
- where_is_object(scene, ob);
+ BKE_object_where_is_calc(scene, ob);
if (ob->type == OB_ARMATURE) {
- where_is_pose(scene, ob); /* needed for bone parents */
+ BKE_pose_where_is(scene, ob); /* needed for bone parents */
}
ignore_parent_tx(bmain, scene, ob);
@@ -915,9 +915,9 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
mul_mat3_m4_v3(ob_other->obmat, centn); /* ommit translation part */
add_v3_v3(ob_other->loc, centn);
- where_is_object(scene, ob_other);
+ BKE_object_where_is_calc(scene, ob_other);
if (ob_other->type == OB_ARMATURE) {
- where_is_pose(scene, ob_other); /* needed for bone parents */
+ BKE_pose_where_is(scene, ob_other); /* needed for bone parents */
}
ignore_parent_tx(bmain, scene, ob_other);
}
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index cc01e83d568..652b7c04b2e 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -2324,6 +2324,7 @@ void OBJECT_OT_vertex_group_add(wmOperatorType *ot)
/* identifiers */
ot->name = "Add Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_add";
+ ot->description = "Add a new vertex group to the active object";
/* api callbacks */
ot->poll = vertex_group_poll;
@@ -2354,6 +2355,7 @@ void OBJECT_OT_vertex_group_remove(wmOperatorType *ot)
/* identifiers */
ot->name = "Remove Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_remove";
+ ot->description = "Delete the active vertex group";
/* api callbacks */
ot->poll = vertex_group_poll;
@@ -2389,6 +2391,7 @@ void OBJECT_OT_vertex_group_assign(wmOperatorType *ot)
/* identifiers */
ot->name = "Assign Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_assign";
+ ot->description = "Assign the selected vertices to the current (or a new) vertex group";
/* api callbacks */
ot->poll = vertex_group_poll_edit_or_wpaint_vert_select;
@@ -2431,6 +2434,7 @@ void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot)
/* identifiers */
ot->name = "Remove from Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_remove_from";
+ ot->description = "Remove the selected vertices from the active vertex group";
/* api callbacks */
ot->poll = vertex_group_poll_edit_or_wpaint_vert_select;
@@ -2464,6 +2468,7 @@ void OBJECT_OT_vertex_group_select(wmOperatorType *ot)
/* identifiers */
ot->name = "Select Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_select";
+ ot->description = "Select all the vertices assigned to the active vertex group";
/* api callbacks */
ot->poll = vertex_group_poll_edit_or_wpaint_vert_select;
@@ -2488,6 +2493,7 @@ void OBJECT_OT_vertex_group_deselect(wmOperatorType *ot)
/* identifiers */
ot->name = "Deselect Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_deselect";
+ ot->description = "Deselect all selected vertices assigned to the active vertex group";
/* api callbacks */
ot->poll = vertex_group_poll_edit_or_wpaint_vert_select;
@@ -2515,6 +2521,7 @@ void OBJECT_OT_vertex_group_copy(wmOperatorType *ot)
/* identifiers */
ot->name = "Copy Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_copy";
+ ot->description = "Make a copy of the active vertex group";
/* api callbacks */
ot->poll = vertex_group_poll;
@@ -2545,6 +2552,7 @@ void OBJECT_OT_vertex_group_levels(wmOperatorType *ot)
/* identifiers */
ot->name = "Vertex Group Levels";
ot->idname = "OBJECT_OT_vertex_group_levels";
+ ot->description = "Add some offset and multiply with some gain the weights of the active vertex group";
/* api callbacks */
ot->poll = vertex_group_poll;
@@ -2575,6 +2583,7 @@ void OBJECT_OT_vertex_group_normalize(wmOperatorType *ot)
/* identifiers */
ot->name = "Normalize Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_normalize";
+ ot->description = "Normalize weights of the active vertex group, so that the highest ones are now 1.0";
/* api callbacks */
ot->poll = vertex_group_poll;
@@ -2603,6 +2612,8 @@ void OBJECT_OT_vertex_group_normalize_all(wmOperatorType *ot)
/* identifiers */
ot->name = "Normalize All Vertex Groups";
ot->idname = "OBJECT_OT_vertex_group_normalize_all";
+ ot->description = "Normalize all weights of all vertex groups, "
+ "so that for each vertex, the sum of all weights is 1.0";
/* api callbacks */
ot->poll = vertex_group_poll;
@@ -2683,6 +2694,7 @@ void OBJECT_OT_vertex_group_lock(wmOperatorType *ot)
/* identifiers */
ot->name = "Change the Lock On Vertex Groups";
ot->idname = "OBJECT_OT_vertex_group_lock";
+ ot->description = "Change the lock state of all vertex groups of active object";
/* api callbacks */
ot->poll = vertex_group_poll;
@@ -2713,6 +2725,7 @@ void OBJECT_OT_vertex_group_invert(wmOperatorType *ot)
/* identifiers */
ot->name = "Invert Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_invert";
+ ot->description = "Invert active vertex group's weights";
/* api callbacks */
ot->poll = vertex_group_poll;
@@ -3252,6 +3265,7 @@ void OBJECT_OT_vertex_group_move(wmOperatorType *ot)
/* identifiers */
ot->name = "Move Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_move";
+ ot->description = "Move the active vertex group up/down in the list";
/* api callbacks */
ot->poll = vertex_group_poll;