Commit: 3749310734b604b81cc1b014e87bc865faf18a40
Author: Antonio Vazquez
Date:   Thu Aug 10 20:23:45 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB3749310734b604b81cc1b014e87bc865faf18a40

Fix error setting origin to 3D cursor

===================================================================

M       source/blender/editors/object/object_transform.c

===================================================================

diff --git a/source/blender/editors/object/object_transform.c 
b/source/blender/editors/object/object_transform.c
index 18784262228..c630ca62e60 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -1067,7 +1067,9 @@ static int object_origin_set_exec(bContext *C, wmOperator 
*op)
                                                
BKE_gpencil_batch_cache_dirty(gpd);
 
                                                tot_change++;
-                                               copy_v3_v3(ob->loc, gpcenter);
+                                               if (centermode == 
ORIGIN_TO_GEOMETRY) {
+                                                       copy_v3_v3(ob->loc, 
gpcenter);
+                                               }
                                                ob->id.tag |= LIB_TAG_DOIT;
                                                do_inverse_offset = true;
                                        }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to