diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-10-14 15:24:20 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-10-14 15:24:20 +0400 |
commit | e5e201ccd839f149d113798f944bb6862b80804d (patch) | |
tree | ca2c2db51fffabfdcc88d3797fa7536ae4ecb141 | |
parent | 309721c2e47291841faf1b38acf3fb5024be9f2d (diff) |
Fix for first part of #28911: driver not working properly since 2.594
Missed id type set for driver target when setting target id.
Patch by me and Campbell.
-rw-r--r-- | source/blender/blenkernel/intern/ipo.c | 4 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_anim.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 91f3c7a22ba..609f6cd38f1 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -1034,12 +1034,14 @@ static ChannelDriver *idriver_to_cdriver (IpoDriver *idriver) /* first bone target */ dtar= &dvar->targets[0]; dtar->id= (ID *)idriver->ob; + dtar->idtype= ID_OB; if (idriver->name[0]) BLI_strncpy(dtar->pchan_name, idriver->name, sizeof(dtar->pchan_name)); /* second bone target (name was stored in same var as the first one) */ dtar= &dvar->targets[1]; dtar->id= (ID *)idriver->ob; + dtar->idtype= ID_OB; if (idriver->name[0]) // xxx... for safety BLI_strncpy(dtar->pchan_name, idriver->name+DRIVER_NAME_OFFS, sizeof(dtar->pchan_name)); } @@ -1051,6 +1053,7 @@ static ChannelDriver *idriver_to_cdriver (IpoDriver *idriver) /* only requires a single target */ dtar= &dvar->targets[0]; dtar->id= (ID *)idriver->ob; + dtar->idtype= ID_OB; if (idriver->name[0]) BLI_strncpy(dtar->pchan_name, idriver->name, sizeof(dtar->pchan_name)); dtar->transChan= adrcode_to_dtar_transchan(idriver->adrcode); @@ -1065,6 +1068,7 @@ static ChannelDriver *idriver_to_cdriver (IpoDriver *idriver) /* only requires single target */ dtar= &dvar->targets[0]; dtar->id= (ID *)idriver->ob; + dtar->idtype= ID_OB; dtar->transChan= adrcode_to_dtar_transchan(idriver->adrcode); } } diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index c35996701ee..6c661ba014e 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -179,6 +179,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str) dtar = &dvar->targets[0]; dtar->id = (ID *)CTX_data_scene(C); // XXX: should we check that C is valid first? + dtar->idtype= ID_SCE; dtar->rna_path = BLI_sprintfN("frame_current"); } |