diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-12-07 15:41:57 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-12-07 15:44:19 +0300 |
commit | cc61b21dff5e58031a165faf9f7c26a9e6032316 (patch) | |
tree | c33f604f876695e90abb36effc084ea93fb53e2d /source/blender/editors | |
parent | ad47b0236e32dc9a583a0d7209d8030bbb7c358e (diff) |
Partial fix to T58917 - No valid cage
The fix itself simply is to store the cage object as a pointer instead
of a string/name.
That said baking with or without cage is yielding very different results
than in 2.7.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/object/object_bake_api.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index 2f879937f7a..b9cc13cda34 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -1358,7 +1358,9 @@ static void bake_set_props(wmOperator *op, Scene *scene) prop = RNA_struct_find_property(op->ptr, "cage_object"); if (!RNA_property_is_set(op->ptr, prop)) { - RNA_property_string_set(op->ptr, prop, bake->cage); + if (bake->cage_object) { + RNA_property_string_set(op->ptr, prop, bake->cage_object->id.name + 2); + } } prop = RNA_struct_find_property(op->ptr, "normal_space"); |