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/space_graph')
-rw-r--r--source/blender/editors/space_graph/graph_draw.c7
-rw-r--r--source/blender/editors/space_graph/graph_intern.h50
-rw-r--r--source/blender/editors/space_graph/graph_select.c11
-rw-r--r--source/blender/editors/space_graph/graph_utils.c17
-rw-r--r--source/blender/editors/space_graph/graph_view.c2
-rw-r--r--source/blender/editors/space_graph/space_graph.c1
6 files changed, 50 insertions, 38 deletions
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index 3635e9deb29..ed5993c77a7 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -1314,9 +1314,6 @@ static void graph_draw_driver_debug(bAnimContext *ac, ID *id, FCurve *fcu)
/* Public Curve-Drawing API ---------------- */
-/* Draw the 'ghost' F-Curves (i.e. snapshots of the curve)
- * NOTE: unit mapping has already been applied to the values, so do not try and apply again
- */
void graph_draw_ghost_curves(bAnimContext *ac, SpaceGraph *sipo, ARegion *region)
{
FCurve *fcu;
@@ -1364,9 +1361,6 @@ void graph_draw_ghost_curves(bAnimContext *ac, SpaceGraph *sipo, ARegion *region
GPU_blend(GPU_BLEND_NONE);
}
-/* This is called twice from space_graph.c -> graph_main_region_draw()
- * Unselected then selected F-Curves are drawn so that they do not occlude each other.
- */
void graph_draw_curves(bAnimContext *ac, SpaceGraph *sipo, ARegion *region, short sel)
{
ListBase anim_data = {NULL, NULL};
@@ -1408,7 +1402,6 @@ void graph_draw_curves(bAnimContext *ac, SpaceGraph *sipo, ARegion *region, shor
/** \name Channel List
* \{ */
-/* left hand part */
void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *region)
{
ListBase anim_data = {NULL, NULL};
diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h
index 7add2f7cbb8..4db1eb5214e 100644
--- a/source/blender/editors/space_graph/graph_intern.h
+++ b/source/blender/editors/space_graph/graph_intern.h
@@ -34,12 +34,23 @@ struct bContext;
/* ***************************************** */
/* graph_draw.c */
+/**
+ * Left hand part.
+ */
void graph_draw_channel_names(struct bContext *C, struct bAnimContext *ac, struct ARegion *region);
+/**
+ * This is called twice from space_graph.c -> graph_main_region_draw()
+ * Unselected then selected F-Curves are drawn so that they do not occlude each other.
+ */
void graph_draw_curves(struct bAnimContext *ac,
struct SpaceGraph *sipo,
struct ARegion *region,
short sel);
+/**
+ * Draw the 'ghost' F-Curves (i.e. snapshots of the curve)
+ * \note unit mapping has already been applied to the values, so do not try and apply again.
+ */
void graph_draw_ghost_curves(struct bAnimContext *ac,
struct SpaceGraph *sipo,
struct ARegion *region);
@@ -47,6 +58,17 @@ void graph_draw_ghost_curves(struct bAnimContext *ac,
/* ***************************************** */
/* graph_select.c */
+/**
+ * Deselects keyframes in the Graph Editor
+ * - This is called by the deselect all operator, as well as other ones!
+ *
+ * - test: check if select or deselect all
+ * - sel: how to select keyframes
+ * 0 = deselect
+ * 1 = select
+ * 2 = invert
+ * - do_channels: whether to affect selection status of channels
+ */
void deselect_graph_keys(struct bAnimContext *ac, bool test, short sel, bool do_channels);
void GRAPH_OT_select_all(struct wmOperatorType *ot);
@@ -78,6 +100,10 @@ enum eGraphKeys_ColumnSelect_Mode {
/* ***************************************** */
/* graph_edit.c */
+/**
+ * Get the min/max keyframes.
+ * \note it should return total bound-box, filter for selection only can be argument.
+ */
void get_graph_keyframe_extents(struct bAnimContext *ac,
float *xmin,
float *xmax,
@@ -166,12 +192,36 @@ void graph_buttons_register(struct ARegionType *art);
/* ***************************************** */
/* graph_utils.c */
+/**
+ * Find 'active' F-Curve.
+ * It must be editable, since that's the purpose of these buttons (subject to change).
+ * We return the 'wrapper' since it contains valuable context info (about hierarchy),
+ * which will need to be freed when the caller is done with it.
+ *
+ * \note curve-visible flag isn't included,
+ * otherwise selecting a curve via list to edit is too cumbersome.
+ */
struct bAnimListElem *get_active_fcurve_channel(struct bAnimContext *ac);
+/**
+ * Check if there are any visible keyframes (for selection tools).
+ */
bool graphop_visible_keyframes_poll(struct bContext *C);
+/**
+ * Check if there are any visible + editable keyframes (for editing tools).
+ */
bool graphop_editable_keyframes_poll(struct bContext *C);
+/**
+ * Has active F-Curve that's editable.
+ */
bool graphop_active_fcurve_poll(struct bContext *C);
+/**
+ * Has active F-Curve in the context that's editable.
+ */
bool graphop_active_editable_fcurve_ctx_poll(struct bContext *C);
+/**
+ * Has selected F-Curve that's editable.
+ */
bool graphop_selected_fcurve_poll(struct bContext *C);
/* ***************************************** */
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index 03bfd1092c6..29eb5b43e6c 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -346,17 +346,6 @@ static tNearestVertInfo *find_nearest_fcurve_vert(bAnimContext *ac, const int mv
* 3) (de)select all - no testing is done; only for use internal tools as normal function...
* \{ */
-/**
- * Deselects keyframes in the Graph Editor
- * - This is called by the deselect all operator, as well as other ones!
- *
- * - test: check if select or deselect all
- * - sel: how to select keyframes
- * 0 = deselect
- * 1 = select
- * 2 = invert
- * - do_channels: whether to affect selection status of channels
- */
void deselect_graph_keys(bAnimContext *ac, bool test, short sel, bool do_channels)
{
ListBase anim_data = {NULL, NULL};
diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c
index 89e7fefd9ac..d78af4c4bcf 100644
--- a/source/blender/editors/space_graph/graph_utils.c
+++ b/source/blender/editors/space_graph/graph_utils.c
@@ -50,9 +50,6 @@
/** \name Set Up Drivers Editor
* \{ */
-/* Set up UI configuration for Drivers Editor */
-/* NOTE: Currently called from window-manager
- * (new drivers editor window) and RNA (mode switching) */
void ED_drivers_editor_init(bContext *C, ScrArea *area)
{
SpaceGraph *sipo = (SpaceGraph *)area->spacedata.first;
@@ -96,15 +93,6 @@ void ED_drivers_editor_init(bContext *C, ScrArea *area)
/** \name Active F-Curve
* \{ */
-/**
- * Find 'active' F-Curve.
- * It must be editable, since that's the purpose of these buttons (subject to change).
- * We return the 'wrapper' since it contains valuable context info (about hierarchy),
- * which will need to be freed when the caller is done with it.
- *
- * \note curve-visible flag isn't included,
- * otherwise selecting a curve via list to edit is too cumbersome.
- */
bAnimListElem *get_active_fcurve_channel(bAnimContext *ac)
{
ListBase anim_data = {NULL, NULL};
@@ -134,7 +122,6 @@ bAnimListElem *get_active_fcurve_channel(bAnimContext *ac)
/** \name Operator Polling Callbacks
* \{ */
-/* Check if there are any visible keyframes (for selection tools) */
bool graphop_visible_keyframes_poll(bContext *C)
{
bAnimContext ac;
@@ -187,7 +174,6 @@ bool graphop_visible_keyframes_poll(bContext *C)
return found;
}
-/* Check if there are any visible + editable keyframes (for editing tools) */
bool graphop_editable_keyframes_poll(bContext *C)
{
bAnimContext ac;
@@ -242,7 +228,6 @@ bool graphop_editable_keyframes_poll(bContext *C)
return found;
}
-/* has active F-Curve that's editable */
bool graphop_active_fcurve_poll(bContext *C)
{
bAnimContext ac;
@@ -286,7 +271,6 @@ bool graphop_active_fcurve_poll(bContext *C)
return has_fcurve;
}
-/* has active F-Curve in the context that's editable */
bool graphop_active_editable_fcurve_ctx_poll(bContext *C)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "active_editable_fcurve", &RNA_FCurve);
@@ -294,7 +278,6 @@ bool graphop_active_editable_fcurve_ctx_poll(bContext *C)
return ptr.data != NULL;
}
-/* has selected F-Curve that's editable */
bool graphop_selected_fcurve_poll(bContext *C)
{
bAnimContext ac;
diff --git a/source/blender/editors/space_graph/graph_view.c b/source/blender/editors/space_graph/graph_view.c
index a12c6053877..a2f31a01a70 100644
--- a/source/blender/editors/space_graph/graph_view.c
+++ b/source/blender/editors/space_graph/graph_view.c
@@ -56,8 +56,6 @@
/** \name Calculate Range
* \{ */
-/* Get the min/max keyframes. */
-/* NOTE: it should return total boundbox, filter for selection only can be argument... */
void get_graph_keyframe_extents(bAnimContext *ac,
float *xmin,
float *xmax,
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 0e2c9b85bc6..40c95d4f382 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -829,7 +829,6 @@ static void graph_space_subtype_item_extend(bContext *UNUSED(C),
RNA_enum_items_add(item, totitem, rna_enum_space_graph_mode_items);
}
-/* only called once, from space/spacetypes.c */
void ED_spacetype_ipo(void)
{
SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype ipo");