Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-10-03 07:34:27 +0300
committerHans Goudey <h.goudey@me.com>2022-10-03 07:34:27 +0300
commitc0f754d9b125543e590f0302e92085836d216f64 (patch)
tree4a1e52852bfd9c9111867c6c9302ac7dc7c6925b /source/blender/editors/include
parentacb8ac6870e831b0ebf61cef79ff993e8849fc37 (diff)
parentcbfd2aaeb7806ee83b4b01215997ee310690dcb1 (diff)
Merge branch 'master' into refactor-mesh-position-generic
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_mesh.h2
-rw-r--r--source/blender/editors/include/ED_screen.h2
-rw-r--r--source/blender/editors/include/ED_sculpt.h5
-rw-r--r--source/blender/editors/include/ED_spreadsheet.h22
-rw-r--r--source/blender/editors/include/ED_uvedit.h2
-rw-r--r--source/blender/editors/include/ED_view3d.h9
-rw-r--r--source/blender/editors/include/ED_viewer_path.hh69
7 files changed, 82 insertions, 29 deletions
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index 26743a2bd08..a47ffe0b99a 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -197,7 +197,7 @@ void EDBM_automerge_and_split(struct Object *obedit,
/** Export for ED_undo_sys. */
void ED_mesh_undosys_type(struct UndoType *ut);
-/* editmesh_select.c */
+/* editmesh_select.cc */
void EDBM_select_mirrored(struct BMEditMesh *em,
const struct Mesh *me,
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index 144fa4e0b93..e1fd53ccdee 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -469,6 +469,8 @@ bool ED_workspace_layout_cycle(struct WorkSpace *workspace, short direction, str
void ED_workspace_status_text(struct bContext *C, const char *str);
+void ED_workspace_do_listen(struct bContext *C, const struct wmNotifier *note);
+
/* anim */
/**
* Results in fully updated anim system.
diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h
index 1e220d33ff4..1c1ce41ef7a 100644
--- a/source/blender/editors/include/ED_sculpt.h
+++ b/source/blender/editors/include/ED_sculpt.h
@@ -34,7 +34,10 @@ bool ED_sculpt_mask_box_select(struct bContext *C,
/* sculpt_transform.c */
void ED_sculpt_update_modal_transform(struct bContext *C, struct Object *ob);
-void ED_sculpt_init_transform(struct bContext *C, struct Object *ob, const char *undo_name);
+void ED_sculpt_init_transform(struct bContext *C,
+ struct Object *ob,
+ const int mval[2],
+ const char *undo_name);
void ED_sculpt_end_transform(struct bContext *C, struct Object *ob);
/* sculpt_undo.c */
diff --git a/source/blender/editors/include/ED_spreadsheet.h b/source/blender/editors/include/ED_spreadsheet.h
index da13e6d3636..736da367a44 100644
--- a/source/blender/editors/include/ED_spreadsheet.h
+++ b/source/blender/editors/include/ED_spreadsheet.h
@@ -7,7 +7,6 @@ struct Main;
struct Object;
struct SpaceNode;
struct SpaceSpreadsheet;
-struct SpreadsheetContext;
struct bContext;
struct bNode;
@@ -15,29 +14,8 @@ struct bNode;
extern "C" {
#endif
-struct SpreadsheetContext *ED_spreadsheet_context_new(int type);
-void ED_spreadsheet_context_free(struct SpreadsheetContext *context);
-void ED_spreadsheet_context_path_clear(struct SpaceSpreadsheet *sspreadsheet);
-bool ED_spreadsheet_context_path_update_tag(struct SpaceSpreadsheet *sspreadsheet);
-uint64_t ED_spreadsheet_context_path_hash(const struct SpaceSpreadsheet *sspreadsheet);
-
struct ID *ED_spreadsheet_get_current_id(const struct SpaceSpreadsheet *sspreadsheet);
-void ED_spreadsheet_context_path_set_geometry_node(struct SpaceSpreadsheet *sspreadsheet,
- struct SpaceNode *snode,
- struct bNode *node);
-void ED_spreadsheet_context_paths_set_geometry_node(struct Main *bmain,
- struct SpaceNode *snode,
- struct bNode *node);
-void ED_spreadsheet_context_path_set_evaluated_object(struct SpaceSpreadsheet *sspreadsheet,
- struct Object *object);
-
-void ED_spreadsheet_context_path_guess(const struct bContext *C,
- struct SpaceSpreadsheet *sspreadsheet);
-bool ED_spreadsheet_context_path_is_active(const struct bContext *C,
- struct SpaceSpreadsheet *sspreadsheet);
-bool ED_spreadsheet_context_path_exists(struct Main *bmain, struct SpaceSpreadsheet *sspreadsheet);
-
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h
index 38e542fc0ca..23cbcabbc0e 100644
--- a/source/blender/editors/include/ED_uvedit.h
+++ b/source/blender/editors/include/ED_uvedit.h
@@ -341,8 +341,6 @@ bool ED_uvedit_udim_params_from_image_space(const struct SpaceImage *sima,
struct UVPackIsland_Params {
uint rotate : 1;
- /** -1 not to align to axis, otherwise 0,1 for X,Y. */
- int rotate_align_axis : 2;
uint only_selected_uvs : 1;
uint only_selected_faces : 1;
uint use_seams : 1;
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 0c61977d5cf..78b7274e42b 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -227,6 +227,7 @@ typedef enum {
/** outside range (mainly for short), (can't avoid) */
V3D_PROJ_RET_OVERFLOW = 6,
} eV3DProjStatus;
+ENUM_OPERATORS(eV3DProjStatus, V3D_PROJ_RET_OVERFLOW);
/* some clipping tests are optional */
typedef enum {
@@ -349,7 +350,7 @@ void ED_view3d_cursor_snap_draw_util(struct RegionView3D *rv3d,
const uchar color_point[4],
eSnapMode snap_elem_type);
-/* view3d_iterators.c */
+/* view3d_iterators.cc */
/* foreach iterators */
@@ -456,7 +457,9 @@ void ED_view3d_project_float_v3_m4(const struct ARegion *region,
float r_co[3],
const float mat[4][4]);
-eV3DProjStatus ED_view3d_project_base(const struct ARegion *region, struct Base *base);
+eV3DProjStatus ED_view3d_project_base(const struct ARegion *region,
+ struct Base *base,
+ short r_co[2]);
/* *** short *** */
eV3DProjStatus ED_view3d_project_short_ex(const struct ARegion *region,
@@ -1311,7 +1314,7 @@ void ED_view3d_draw_bgpic_test(const struct Scene *scene,
bool do_foreground,
bool do_camera_frame);
-/* view3d_gizmo_preselect_type.c */
+/* view3d_gizmo_preselect_type.cc */
void ED_view3d_gizmo_mesh_preselect_get_active(struct bContext *C,
struct wmGizmo *gz,
diff --git a/source/blender/editors/include/ED_viewer_path.hh b/source/blender/editors/include/ED_viewer_path.hh
new file mode 100644
index 00000000000..957dfddb8af
--- /dev/null
+++ b/source/blender/editors/include/ED_viewer_path.hh
@@ -0,0 +1,69 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#pragma once
+
+#include <optional>
+
+#include "BLI_string_ref.hh"
+#include "BLI_vector.hh"
+
+#include "BKE_viewer_path.h"
+
+struct Main;
+struct SpaceNode;
+struct bNode;
+struct bContext;
+struct Object;
+
+namespace blender::ed::viewer_path {
+
+/**
+ * Activates the given node in the context provided by the editor. This indirectly updates all
+ * non-pinned viewer paths in other editors (spreadsheet and 3d view).
+ */
+void activate_geometry_node(Main &bmain, SpaceNode &snode, bNode &node);
+
+/**
+ * Returns the object referenced by the viewer path. This only returns something if the viewer path
+ * *only* contains the object and nothing more.
+ */
+Object *parse_object_only(const ViewerPath &viewer_path);
+
+/**
+ * Represents a parsed #ViewerPath for easier consumption.
+ */
+struct ViewerPathForGeometryNodesViewer {
+ Object *object;
+ blender::StringRefNull modifier_name;
+ blender::Vector<blender::StringRefNull> group_node_names;
+ blender::StringRefNull viewer_node_name;
+};
+
+/**
+ * Parses a #ViewerPath into a #ViewerPathForGeometryNodesViewer or returns none if that does not
+ * work.
+ */
+std::optional<ViewerPathForGeometryNodesViewer> parse_geometry_nodes_viewer(
+ const ViewerPath &viewer_path);
+
+/**
+ * Finds the node referenced by the #ViewerPath within the provided editor. If no node is
+ * referenced, null is returned. When two different editors show the same node group but in a
+ * different context, it's possible that the same node is active in one editor but not the other.
+ */
+bNode *find_geometry_nodes_viewer(const ViewerPath &viewer_path, SpaceNode &snode);
+
+/**
+ * Checks if the node referenced by the viewer path and its entire context still exists. The node
+ * does not have to be visible for this to return true.
+ */
+bool exists_geometry_nodes_viewer(const ViewerPathForGeometryNodesViewer &parsed_viewer_path);
+
+/**
+ * Checks if the node referenced by the viewer and its entire context is still active, i.e. some
+ * editor is showing it.
+ */
+bool is_active_geometry_nodes_viewer(const bContext &C,
+ const ViewerPathForGeometryNodesViewer &parsed_viewer_path);
+
+} // namespace blender::ed::viewer_path