[Bf-blender-cvs] [c5a8372a117] xr-dev: Merge branch 'master' into xr-dev

Peter Kim noreply at git.blender.org
Mon May 9 11:32:38 CEST 2022


Commit: c5a8372a117e8fd389e1bf2183f447f1261c38e5
Author: Peter Kim
Date:   Mon May 9 18:10:04 2022 +0900
Branches: xr-dev
https://developer.blender.org/rBc5a8372a117e8fd389e1bf2183f447f1261c38e5

Merge branch 'master' into xr-dev

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



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

diff --cc source/blender/editors/include/ED_view3d.h
index 0e69dd7117e,414643dd0d6..55df6b8121a
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@@ -952,11 -952,23 +952,27 @@@ float ED_view3d_select_dist_px(void)
  void ED_view3d_viewcontext_init(struct bContext *C,
                                  struct ViewContext *vc,
                                  struct Depsgraph *depsgraph);
+ 
+ /**
+  * Re-initialize `vc` with `obact` as if it's active object (with some differences).
+  *
+  * This is often used when operating on multiple objects in modes (edit, pose mode etc)
+  * where the `vc` is passed in as an argument which then references it's object data.
+  *
+  * \note members #ViewContext.obedit & #ViewContext.em are only initialized if they're already set,
+  * by #ED_view3d_viewcontext_init in most cases.
+  * This is necessary because the active object defines the current object-mode.
+  * When iterating over objects in object-mode it doesn't make sense to perform
+  * an edit-mode action on an object that happens to contain edit-mode data.
+  * In some cases these values are cleared allowing the owner of `vc` to explicitly
+  * disable edit-mode operation (to force object selection in edit-mode for e.g.).
+  * So object-mode specific values should remain cleared when initialized with another object.
+  */
  void ED_view3d_viewcontext_init_object(struct ViewContext *vc, struct Object *obact);
 +/**
 + * Deselect all except b.
 + */
 +bool ED_view3d_object_deselect_all_except(struct ViewLayer *view_layer, struct Base *b);
  /**
   * Use this call when executing an operator,
   * event system doesn't set for each event the OpenGL drawing context.



More information about the Bf-blender-cvs mailing list