Remove G.main usage

This commit is contained in:
Joshua Leung 2018-05-15 18:31:39 +02:00
parent 9439df1ab8
commit 53c6d3399a
1 changed files with 2 additions and 1 deletions

View File

@ -75,10 +75,11 @@
static void applyarmature_fix_boneparents(const bContext *C, Scene *scene, Object *armob)
{
Depsgraph *depsgraph = CTX_data_depsgraph(C);
Main *bmain = CTX_data_main(C);
Object workob, *ob;
/* go through all objects in database */
for (ob = G.main->object.first; ob; ob = ob->id.next) {
for (ob = bmain->object.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),