diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-08 01:29:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-08 01:50:00 +0300 |
commit | 8f817de0cbef41dac81e6c7665ada509c3fe2988 (patch) | |
tree | 0802c3287116ce0bf600adc4bed8cba31cfc97b1 /source/blender/editors/armature | |
parent | e68ac2827dd4f8ad346011a8a408b342e2718707 (diff) |
Cleanup: use plural names for Main lists
Convention was not to but after discussion on 918941483f7e we agree its
best to change the convention.
Names now mostly follow RNA.
Some exceptions:
- Use 'nodetrees' instead of 'nodegroups'
since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
since 'gpencil' is a common abbreviation in the C code.
Other exceptions:
- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
Diffstat (limited to 'source/blender/editors/armature')
4 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c index c14973d793b..6d4babe9674 100644 --- a/source/blender/editors/armature/armature_naming.c +++ b/source/blender/editors/armature/armature_naming.c @@ -177,7 +177,7 @@ void ED_armature_bone_rename(Main *bmain, bArmature *arm, const char *oldnamep, DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE); /* do entire dbase - objects */ - for (ob = bmain->object.first; ob; ob = ob->id.next) { + for (ob = bmain->objects.first; ob; ob = ob->id.next) { ModifierData *md; /* we have the object using the armature */ @@ -207,7 +207,7 @@ void ED_armature_bone_rename(Main *bmain, bArmature *arm, const char *oldnamep, } /* Update any object constraints to use the new bone name */ - for (cob = bmain->object.first; cob; cob = cob->id.next) { + for (cob = bmain->objects.first; cob; cob = cob->id.next) { if (cob->constraints.first) constraint_bone_name_fix(ob, &cob->constraints, oldname, newname); if (cob->pose) { @@ -320,7 +320,7 @@ void ED_armature_bone_rename(Main *bmain, bArmature *arm, const char *oldnamep, /* correct view locking */ { bScreen *screen; - for (screen = bmain->screen.first; screen; screen = screen->id.next) { + for (screen = bmain->screens.first; screen; screen = screen->id.next) { ScrArea *sa; /* add regions */ for (sa = screen->areabase.first; sa; sa = sa->next) { diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c index a6e4632ef9d..5928e1cd12c 100644 --- a/source/blender/editors/armature/armature_relations.c +++ b/source/blender/editors/armature/armature_relations.c @@ -205,7 +205,7 @@ static void joined_armature_fix_links(Main *bmain, Object *tarArm, Object *srcAr bPoseChannel *pchant; /* let's go through all objects in database */ - for (ob = bmain->object.first; ob; ob = ob->id.next) { + for (ob = bmain->objects.first; ob; ob = ob->id.next) { /* do some object-type specific things */ if (ob->type == OB_ARMATURE) { pose = ob->pose; @@ -417,7 +417,7 @@ static void separated_armature_fix_links(Main *bmain, Object *origArm, Object *n npchans = &newArm->pose->chanbase; /* let's go through all objects in database */ - for (ob = bmain->object.first; ob; ob = ob->id.next) { + for (ob = bmain->objects.first; ob; ob = ob->id.next) { /* do some object-type specific things */ if (ob->type == OB_ARMATURE) { for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index f310092942b..6b09912064e 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -730,7 +730,7 @@ void ED_armature_from_edit(Main *bmain, bArmature *arm) armature_finalize_restpose(&arm->bonebase, arm->edbo); /* so all users of this armature should get rebuilt */ - for (obt = bmain->object.first; obt; obt = obt->id.next) { + for (obt = bmain->objects.first; obt; obt = obt->id.next) { if (obt->data == arm) { BKE_pose_rebuild(bmain, obt, arm, true); } diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index 0a78669d743..3c21919a7ac 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -74,7 +74,7 @@ static void applyarmature_fix_boneparents(const bContext *C, Scene *scene, Objec Object workob, *ob; /* go through all objects in database */ - for (ob = bmain->object.first; ob; ob = ob->id.next) { + for (ob = bmain->objects.first; ob; ob = ob->id.next) { /* if parent is bone in this armature, apply corrections */ if ((ob->parent == armob) && (ob->partype == PARBONE)) { /* apply current transform from parent (not yet destroyed), @@ -471,8 +471,8 @@ static int pose_copy_exec(bContext *C, wmOperator *op) Object ob_copy = *ob; bArmature arm_copy = *((bArmature *)ob->data); ob_copy.data = &arm_copy; - BLI_addtail(&temp_bmain->object, &ob_copy); - BLI_addtail(&temp_bmain->armature, &arm_copy); + BLI_addtail(&temp_bmain->objects, &ob_copy); + BLI_addtail(&temp_bmain->armatures, &arm_copy); /* begin copy buffer on a temp bmain. */ BKE_copybuffer_begin(temp_bmain); /* Store the whole object to the copy buffer because pose can't be @@ -485,8 +485,8 @@ static int pose_copy_exec(bContext *C, wmOperator *op) * This is required because objects in temp bmain shares same pointers * as the real ones. */ - BLI_listbase_clear(&temp_bmain->object); - BLI_listbase_clear(&temp_bmain->armature); + BLI_listbase_clear(&temp_bmain->objects); + BLI_listbase_clear(&temp_bmain->armatures); BKE_main_free(temp_bmain); /* We are all done! */ BKE_report(op->reports, RPT_INFO, "Copied pose to buffer"); @@ -536,13 +536,13 @@ static int pose_paste_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } /* Make sure data from this file is usable for pose paste. */ - if (BLI_listbase_count_at_most(&tmp_bmain->object, 2) != 1) { + if (BLI_listbase_count_at_most(&tmp_bmain->objects, 2) != 1) { BKE_report(op->reports, RPT_ERROR, "Copy buffer is not from pose mode"); BKE_main_free(tmp_bmain); return OPERATOR_CANCELLED; } - Object *object_from = tmp_bmain->object.first; + Object *object_from = tmp_bmain->objects.first; bPose *pose_from = object_from->pose; if (pose_from == NULL) { BKE_report(op->reports, RPT_ERROR, "Copy buffer has no pose"); |