Blender V4.3
blender::ed::view3d::geometry_nodes_gizmos Namespace Reference

Classes

class  DialGizmo
 
struct  GeometryNodesGizmoGroup
 
struct  GeoNodesObjectGizmoID
 
struct  GizmosUpdateParams
 
class  LinearGizmo
 
class  NodeGizmos
 
class  TransformGizmos
 
struct  UpdateReport
 

Typedefs

using ApplyChangeFn
 

Functions

static bool gizmo_is_interacting (const wmGizmo &gizmo)
 
static ThemeColorID get_gizmo_theme_color_id (const GeometryNodeGizmoColor color_id)
 
static ThemeColorID get_axis_theme_color_id (const int axis)
 
static void get_axis_gizmo_colors (const int axis, float *r_color, float *r_color_hi)
 
static void make_matrix_orthonormal_but_keep_z_axis (float4x4 &m)
 
static float4x4 matrix_from_position_and_up_direction (const float3 &position, const float3 &direction, const math::AxisSigned direction_axis)
 
static std::unique_ptr< NodeGizmoscreate_gizmo_node_gizmos (const bNode &gizmo_node)
 
static const float4x4find_direct_gizmo_transform (const bke::GeometrySet &geometry, const bke::NodeGizmoID &gizmo_id)
 
static bool has_nested_gizmo_transform (const bke::GeometrySet &geometry, const bke::NodeGizmoID &gizmo_id)
 
static std::optional< float4x4find_gizmo_geometry_transform_recursive (const bke::GeometrySet &geometry, const bke::NodeGizmoID &gizmo_id, const float4x4 &transform)
 
static bke::GeometrySet find_geometry_for_gizmo (const Object &object_eval, const NodesModifierData &nmd_orig, const View3D &v3d)
 
static std::optional< float4x4find_gizmo_geometry_transform (const bke::GeometrySet &geometry, const bke::NodeGizmoID &gizmo_id)
 
static bool WIDGETGROUP_geometry_nodes_poll (const bContext *C, wmGizmoGroupType *)
 
static void WIDGETGROUP_geometry_nodes_setup (const bContext *, wmGizmoGroup *gzgroup)
 
static void WIDGETGROUP_geometry_nodes_refresh (const bContext *C, wmGizmoGroup *gzgroup)
 
static void WIDGETGROUP_geometry_nodes_draw_prepare (const bContext *, wmGizmoGroup *)
 

Typedef Documentation

◆ ApplyChangeFn

Initial value:
std::function<void(
StringRef socket_identifier, FunctionRef<void(bke::SocketValueVariant &value)> modify_value)>

Definition at line 120 of file view3d_gizmo_geometry_nodes.cc.

Function Documentation

◆ create_gizmo_node_gizmos()

static std::unique_ptr< NodeGizmos > blender::ed::view3d::geometry_nodes_gizmos::create_gizmo_node_gizmos ( const bNode & gizmo_node)
static

◆ find_direct_gizmo_transform()

static const float4x4 * blender::ed::view3d::geometry_nodes_gizmos::find_direct_gizmo_transform ( const bke::GeometrySet & geometry,
const bke::NodeGizmoID & gizmo_id )
static

Finds the gizmo transform stored directly in the geometry, ignoring the instances.

Definition at line 807 of file view3d_gizmo_geometry_nodes.cc.

Referenced by find_gizmo_geometry_transform_recursive(), and has_nested_gizmo_transform().

◆ find_geometry_for_gizmo()

static bke::GeometrySet blender::ed::view3d::geometry_nodes_gizmos::find_geometry_for_gizmo ( const Object & object_eval,
const NodesModifierData & nmd_orig,
const View3D & v3d )
static

Find the geometry that the gizmo should be drawn for. This is generally either the final evaluated geometry or the viewer geometry.

Definition at line 885 of file view3d_gizmo_geometry_nodes.cc.

References View3D::flag2, blender::bke::object_get_evaluated_geometry_set(), NodesModifierData::runtime, V3D_SHOW_VIEWER, and View3D::viewer_path.

Referenced by WIDGETGROUP_geometry_nodes_refresh().

◆ find_gizmo_geometry_transform()

static std::optional< float4x4 > blender::ed::view3d::geometry_nodes_gizmos::find_gizmo_geometry_transform ( const bke::GeometrySet & geometry,
const bke::NodeGizmoID & gizmo_id )
static

Tries to find a transformation of the gizmo in the given geometry.

Definition at line 903 of file view3d_gizmo_geometry_nodes.cc.

References find_gizmo_geometry_transform_recursive(), and blender::MatBase< float, 4, 4 >::identity().

Referenced by WIDGETGROUP_geometry_nodes_refresh().

◆ find_gizmo_geometry_transform_recursive()

static std::optional< float4x4 > blender::ed::view3d::geometry_nodes_gizmos::find_gizmo_geometry_transform_recursive ( const bke::GeometrySet & geometry,
const bke::NodeGizmoID & gizmo_id,
const float4x4 & transform )
static

◆ get_axis_gizmo_colors()

◆ get_axis_theme_color_id()

static ThemeColorID blender::ed::view3d::geometry_nodes_gizmos::get_axis_theme_color_id ( const int axis)
static

Definition at line 79 of file view3d_gizmo_geometry_nodes.cc.

References TH_AXIS_X, TH_AXIS_Y, and TH_AXIS_Z.

Referenced by get_axis_gizmo_colors().

◆ get_gizmo_theme_color_id()

◆ gizmo_is_interacting()

◆ has_nested_gizmo_transform()

static bool blender::ed::view3d::geometry_nodes_gizmos::has_nested_gizmo_transform ( const bke::GeometrySet & geometry,
const bke::NodeGizmoID & gizmo_id )
static

True, if the geometry contains a transform for the given gizmo. Also checks if all instances.

Definition at line 825 of file view3d_gizmo_geometry_nodes.cc.

References find_direct_gizmo_transform(), blender::bke::InstanceReference::GeometrySet, and has_nested_gizmo_transform().

Referenced by find_gizmo_geometry_transform_recursive(), and has_nested_gizmo_transform().

◆ make_matrix_orthonormal_but_keep_z_axis()

◆ matrix_from_position_and_up_direction()

◆ WIDGETGROUP_geometry_nodes_draw_prepare()

static void blender::ed::view3d::geometry_nodes_gizmos::WIDGETGROUP_geometry_nodes_draw_prepare ( const bContext * ,
wmGizmoGroup *  )
static

Definition at line 1107 of file view3d_gizmo_geometry_nodes.cc.

◆ WIDGETGROUP_geometry_nodes_poll()

static bool blender::ed::view3d::geometry_nodes_gizmos::WIDGETGROUP_geometry_nodes_poll ( const bContext * C,
wmGizmoGroupType *  )
static

◆ WIDGETGROUP_geometry_nodes_refresh()

static void blender::ed::view3d::geometry_nodes_gizmos::WIDGETGROUP_geometry_nodes_refresh ( const bContext * C,
wmGizmoGroup * gzgroup )
static

Definition at line 930 of file view3d_gizmo_geometry_nodes.cc.

References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::ed::view3d::geometry_nodes_gizmos::NodeGizmos::apply_change, blender::nodes::gizmos::apply_gizmo_change(), C, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), create_gizmo_node_gizmos(), CTX_data_depsgraph_pointer(), CTX_data_main(), CTX_wm_manager(), CTX_wm_view3d(), wmGizmoGroup::customdata, DEG_get_evaluated_object(), DEG_id_tag_update_for_side_effect_request(), depsgraph, ED_node_tree_propagate_change(), blender::nodes::geo_eval_log::GeoTreeLog::ensure_evaluated_gizmo_nodes(), blender::nodes::geo_eval_log::GeoTreeLog::ensure_socket_values(), blender::nodes::geo_eval_log::GeoTreeLog::evaluated_gizmo_nodes, find_geometry_for_gizmo(), find_gizmo_geometry_transform(), blender::nodes::gizmos::foreach_active_gizmo(), blender::nodes::gizmos::get_editable_gizmo_elem(), blender::ed::view3d::geometry_nodes_gizmos::GeoNodesObjectGizmoID::gizmo_id, gizmo_is_interacting(), wmGizmoGroup::gizmos, blender::ComputeContext::hash(), blender::ed::view3d::geometry_nodes_gizmos::NodeGizmos::hide_all(), Object::id, ID_RECALC_GEOMETRY, bNode::identifier, blender::MatBase< float, 4, 4 >::identity(), blender::ed::view3d::geometry_nodes_gizmos::UpdateReport::invalid_transform, blender::ed::view3d::geometry_nodes_gizmos::NodeGizmos::is_any_interacting(), main(), blender::ed::view3d::geometry_nodes_gizmos::UpdateReport::missing_socket_logs, NC_GEOM, ND_DATA, NodesModifierData::node_group, wmGizmoGroup::parent_gzmap, NodesModifierData::runtime, blender::ed::view3d::geometry_nodes_gizmos::NodeGizmos::show_all(), blender::ed::view3d::geometry_nodes_gizmos::NodeGizmos::update(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::values(), WM_GIZMO_HIDDEN, WM_GIZMO_NEEDS_UNDO, WM_gizmo_set_flag(), WM_gizmo_unlink(), and WM_main_add_notifier().

◆ WIDGETGROUP_geometry_nodes_setup()

static void blender::ed::view3d::geometry_nodes_gizmos::WIDGETGROUP_geometry_nodes_setup ( const bContext * ,
wmGizmoGroup * gzgroup )
static