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:
Diffstat (limited to 'source/blender/editors/object/object_shapekey.c')
-rw-r--r--source/blender/editors/object/object_shapekey.c50
1 files changed, 46 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index 52e06f46149..1bb0246deb5 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -53,7 +53,7 @@
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
-#include "BLI_sys_types.h" // for intptr_t support
+#include "BLI_sys_types.h" /* for intptr_t support */
#include "ED_mesh.h"
#include "ED_object.h"
@@ -66,7 +66,9 @@
#include "object_intern.h"
-/*********************** add shape key ***********************/
+/* -------------------------------------------------------------------- */
+/** \name Add Shape Key Function
+ * \{ */
static void ED_object_shape_key_add(bContext *C, Object *ob, const bool from_mix)
{
@@ -81,7 +83,11 @@ static void ED_object_shape_key_add(bContext *C, Object *ob, const bool from_mix
}
}
-/*********************** remove shape key ***********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Remove Shape Key Function
+ * \{ */
static bool object_shapekey_remove(Main *bmain, Object *ob)
{
@@ -214,7 +220,11 @@ static bool object_shape_key_mirror(
return 1;
}
-/********************** shape key operators *********************/
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Shared Poll Functions
+ * \{ */
static bool shape_key_poll(bContext *C)
{
@@ -250,6 +260,12 @@ static bool shape_key_move_poll(bContext *C)
return (shape_key_mode_poll(C) && key != NULL && key->totkey > 1);
}
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Shape Key Add Operator
+ * \{ */
+
static int shape_key_add_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_object_context(C);
@@ -285,6 +301,12 @@ void OBJECT_OT_shape_key_add(wmOperatorType *ot)
"Create the new shape key from the existing mix of keys");
}
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Shape Key Remove Operator
+ * \{ */
+
static int shape_key_remove_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
@@ -326,6 +348,12 @@ void OBJECT_OT_shape_key_remove(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "all", 0, "All", "Remove all shape keys");
}
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Shape Key Clear Operator
+ * \{ */
+
static int shape_key_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = ED_object_context(C);
@@ -399,6 +427,12 @@ void OBJECT_OT_shape_key_retime(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Shape Key Mirror Operator
+ * \{ */
+
static int shape_key_mirror_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_object_context(C);
@@ -437,6 +471,12 @@ void OBJECT_OT_shape_key_mirror(wmOperatorType *ot)
"Use topology based mirroring (for when both sides of mesh have matching, unique topology)");
}
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Shape Key Move (Re-Order) Operator
+ * \{ */
+
enum {
KB_MOVE_TOP = -2,
KB_MOVE_UP = -1,
@@ -502,3 +542,5 @@ void OBJECT_OT_shape_key_move(wmOperatorType *ot)
RNA_def_enum(ot->srna, "type", slot_move, 0, "Type", "");
}
+
+/** \} */