diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-06 17:25:28 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-06 17:25:28 +0300 |
commit | bb7202495a289370fe39a9aaeebf8d21fa7d357c (patch) | |
tree | a7fd7b43a423ee3bc5fd106bba9a98a52de76262 /source/blender/editors/object/object_constraint.c | |
parent | 19d651ca9a694f556c76a09c2822b81ae1dc18a5 (diff) | |
parent | 48e871ab1d57ef2e95047b2be5718cee5d3cefe6 (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/collada/ArmatureExporter.cpp
source/blender/collada/ArmatureExporter.h
source/blender/collada/DocumentExporter.cpp
source/blender/collada/DocumentExporter.h
source/blender/collada/SceneExporter.cpp
source/blender/collada/SceneExporter.h
source/blender/collada/collada.cpp
source/blender/collada/collada.h
source/blender/editors/armature/armature_edit.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/armature/pose_transform.c
source/blender/editors/include/ED_armature.h
source/blender/editors/include/ED_object.h
source/blender/editors/include/ED_screen.h
source/blender/editors/io/io_collada.c
source/blender/editors/object/object_transform.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/windowmanager/intern/wm.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_window.c
source/blenderplayer/bad_level_call_stubs/stubs.c
Diffstat (limited to 'source/blender/editors/object/object_constraint.c')
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 121a30c754a..3f43f3c0407 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -152,7 +152,7 @@ bConstraint *get_active_constraint(Object *ob) /* ------------- PyConstraints ------------------ */ /* this callback sets the text-file to be used for selected menu item */ -static void validate_pyconstraint_cb(void *arg1, void *arg2) +static void validate_pyconstraint_cb(Main *bmain, void *arg1, void *arg2) { bPythonConstraint *data = arg1; Text *text = NULL; @@ -162,13 +162,13 @@ static void validate_pyconstraint_cb(void *arg1, void *arg2) /* exception for no script */ if (index) { /* innovative use of a for...loop to search */ - for (text = G.main->text.first, i = 1; text && index != i; i++, text = text->id.next) ; + for (text = bmain->text.first, i = 1; text && index != i; i++, text = text->id.next) ; } data->text = text; } /* this returns a string for the list of usable pyconstraint script names */ -static char *buildmenu_pyconstraints(Text *con_text, int *pyconindex) +static char *buildmenu_pyconstraints(Main *bmain, Text *con_text, int *pyconindex) { DynStr *pupds = BLI_dynstr_new(); Text *text; @@ -185,7 +185,7 @@ static char *buildmenu_pyconstraints(Text *con_text, int *pyconindex) *pyconindex = 0; /* loop through markers, adding them */ - for (text = G.main->text.first, i = 1; text; i++, text = text->id.next) { + for (text = bmain->text.first, i = 1; text; i++, text = text->id.next) { /* this is important to ensure that right script is shown as active */ if (text == con_text) *pyconindex = i; @@ -1798,14 +1798,14 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase char *menustr; int scriptint = 0; /* popup a list of usable scripts */ - menustr = buildmenu_pyconstraints(NULL, &scriptint); + menustr = buildmenu_pyconstraints(bmain, NULL, &scriptint); /* XXX scriptint = pupmenu(menustr); */ MEM_freeN(menustr); /* only add constraint if a script was chosen */ if (scriptint) { /* add constraint */ - validate_pyconstraint_cb(con->data, &scriptint); + validate_pyconstraint_cb(bmain, con->data, &scriptint); /* make sure target allowance is set correctly */ BPY_pyconstraint_update(ob, con); |