[Bf-blender-cvs] [4ac48b1390d] asset-browser-snap-dragging: Merge branch 'master' into asset-browser-snap-dragging

Julian Eisel noreply at git.blender.org
Sat Jun 5 18:01:36 CEST 2021


Commit: 4ac48b1390dca27a4aee3390c8c516594f4d43ed
Author: Julian Eisel
Date:   Sat Jun 5 18:01:27 2021 +0200
Branches: asset-browser-snap-dragging
https://developer.blender.org/rB4ac48b1390dca27a4aee3390c8c516594f4d43ed

Merge branch 'master' into asset-browser-snap-dragging

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



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

diff --cc source/blender/editors/space_view3d/view3d_placement.c
index d8bb4ef9c77,e602521f6a2..0e91888c2ab
--- a/source/blender/editors/space_view3d/view3d_placement.c
+++ b/source/blender/editors/space_view3d/view3d_placement.c
@@@ -1851,44 -1762,8 +1851,6 @@@ static void WIDGETGROUP_placement_setup
      gizmo->flag |= WM_GIZMO_HIDDEN_KEYMAP;
    }
  
-   {
-     const wmGizmoType *gzt_plane = WM_gizmotype_find("GIZMO_GT_placement_plane_3d", true);
-     gizmo = WM_gizmo_new_ptr(gzt_plane, gzgroup, NULL);
- 
-     WM_gizmo_set_color(gizmo, (float[4]){1.0f, 1.0f, 1.0f, 1.0f});
- 
-     /* Don't handle any events, this is for display only. */
-     gizmo->flag |= WM_GIZMO_HIDDEN_KEYMAP;
-   }
- }
- 
- static void WIDGETGROUP_placement_draw_prepare(const bContext *UNUSED(C), wmGizmoGroup *gzgroup)
- {
-   /* TODO only set for drag & drop. */
-   if (!gzgroup->ptr) {
-     return;
-   }
- 
-   wmGizmo *gizmo_plane = ((wmGizmo *)gzgroup->gizmos.first)->next;
- 
-   PropertyRNA *boundbox_prop = RNA_struct_find_property(gzgroup->ptr, "bound_box");
-   if (boundbox_prop && RNA_property_is_set(gzgroup->ptr, boundbox_prop)) {
-     float array[8][3];
-     RNA_property_float_get_array(gzgroup->ptr, boundbox_prop, (float *)array);
-     RNA_float_set_array(gizmo_plane->ptr, "bound_box", (float *)array);
-   }
- 
-   PropertyRNA *matrix_basis_prop = RNA_struct_find_property(gzgroup->ptr, "matrix_basis");
-   if (matrix_basis_prop && RNA_property_is_set(gzgroup->ptr, matrix_basis_prop)) {
-     float array[4][4];
-     RNA_property_float_get_array(gzgroup->ptr, matrix_basis_prop, (float *)array);
-     RNA_float_set_array(gizmo_plane->ptr, "matrix_basis", (float *)array);
-   }
- }
- 
- static bool WIDGETGROUP_placement_poll(const bContext *C, wmGizmoGroupType *gzgt)
- {
-   return ED_gizmo_poll_from_dropbox(C, gzgt) || ED_gizmo_poll_from_tool(C, gzgt);
 -  /* Sets the gizmos custom-data which has its own free callback. */
 -  preview_plane_cursor_setup(gzgroup);
  }
  
  void VIEW3D_GGT_placement(wmGizmoGroupType *gzgt)



More information about the Bf-blender-cvs mailing list