[Bf-blender-cvs] [63f0dcf6b76] xr-controller-support: Merge branch 'master' into temp-xr-actions-D9124
Peter Kim
noreply at git.blender.org
Tue May 18 15:07:10 CEST 2021
Commit: 63f0dcf6b7611c04fda12d7bd661bddcd1b9c33b
Author: Peter Kim
Date: Thu Apr 29 15:36:47 2021 +0900
Branches: xr-controller-support
https://developer.blender.org/rB63f0dcf6b7611c04fda12d7bd661bddcd1b9c33b
Merge branch 'master' into temp-xr-actions-D9124
===================================================================
===================================================================
diff --cc source/blender/editors/include/ED_transform_snap_object_context.h
index 3ee48ccb5d5,42e73bbf744..8938e1114d9
--- a/source/blender/editors/include/ED_transform_snap_object_context.h
+++ b/source/blender/editors/include/ED_transform_snap_object_context.h
@@@ -43,10 -43,15 +43,17 @@@ typedef enum
SNAP_ALL = 0,
SNAP_NOT_SELECTED = 1,
SNAP_NOT_ACTIVE = 2,
- SNAP_SELECTED = 3,
- SNAP_SELECTABLE = 4,
+ SNAP_ONLY_ACTIVE = 3,
++ SNAP_SELECTED = 4,
++ SNAP_SELECTABLE = 5,
} eSnapSelect;
+ typedef enum {
+ SNAP_GEOM_FINAL = 0,
+ SNAP_GEOM_CAGE = 1,
+ SNAP_GEOM_EDIT = 2, /* Bmesh for mesh-type. */
+ } eSnapEditType;
+
/** used for storing multiple hits */
struct SnapObjectHitDepth {
struct SnapObjectHitDepth *next, *prev;
diff --cc source/blender/editors/transform/transform_snap_object.c
index 75faa90f7bc,512f912a532..58cb3808821
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@@ -413,22 -499,14 +499,24 @@@ static void iter_snap_objects(SnapObjec
continue;
}
}
+ else if (snap_select == SNAP_SELECTED) {
+ if (!(base->flag & BASE_SELECTED) && !(base->flag_legacy & BA_WAS_SEL)) {
+ continue;
+ }
+ }
+ else if (snap_select == SNAP_SELECTABLE) {
+ if (!(base->flag & BASE_SELECTABLE)) {
+ continue;
+ }
+ }
Object *obj_eval = DEG_get_evaluated_object(depsgraph, base->object);
- if (obj_eval->transflag & OB_DUPLI) {
- DupliObject *dupli_ob;
+ if (obj_eval->transflag & OB_DUPLI ||
+ (obj_eval->runtime.geometry_set_eval != NULL &&
+ BKE_geometry_set_has_instances(obj_eval->runtime.geometry_set_eval))) {
ListBase *lb = object_duplilist(depsgraph, sctx->scene, obj_eval);
- for (dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next) {
+ for (DupliObject *dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next) {
+ BLI_assert(DEG_is_evaluated_object(dupli_ob->ob));
sob_callback(sctx,
dupli_ob->ob,
dupli_ob->mat,
More information about the Bf-blender-cvs
mailing list