Some doc-strings were skipped because of blank-lines between the doc-string and the symbol and needed to be moved manually. - Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. Ref T92709
130 lines
3.6 KiB
C++
130 lines
3.6 KiB
C++
/*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
*
|
|
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
|
* All rights reserved.
|
|
*/
|
|
|
|
/** \file
|
|
* \ingroup editors
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct Scene;
|
|
struct TimeMarker;
|
|
struct bAnimContext;
|
|
struct bContext;
|
|
struct wmKeyConfig;
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
/** \name Drawing API
|
|
* \{ */
|
|
|
|
/* flags for drawing markers */
|
|
enum {
|
|
DRAW_MARKERS_LINES = (1 << 0),
|
|
DRAW_MARKERS_LOCAL = (1 << 1),
|
|
DRAW_MARKERS_MARGIN = (1 << 2),
|
|
};
|
|
|
|
/* Draw Scene-Markers in time window */
|
|
void ED_markers_draw(const struct bContext *C, int flag);
|
|
|
|
/** \} */
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
/** \name Backend API
|
|
* \{ */
|
|
|
|
/**
|
|
* Public API for getting markers from context.
|
|
*/
|
|
ListBase *ED_context_get_markers(const struct bContext *C);
|
|
/**
|
|
* Public API for getting markers from "animation" context.
|
|
*/
|
|
ListBase *ED_animcontext_get_markers(const struct bAnimContext *ac);
|
|
|
|
/**
|
|
* Apply some transformation to markers after the fact
|
|
*
|
|
* \param markers: List of markers to affect - this may or may not be the scene markers list,
|
|
* so don't assume anything.
|
|
* \param scene: Current scene (for getting current frame)
|
|
* \param mode: (TfmMode) transform mode that this transform is for
|
|
* \param value: From the transform code, this is `t->vec[0]`
|
|
* (which is delta transform for grab/extend, and scale factor for scale)
|
|
* \param side: (B/L/R) for 'extend' functionality, which side of current frame to use
|
|
*/
|
|
int ED_markers_post_apply_transform(
|
|
ListBase *markers, struct Scene *scene, int mode, float value, char side);
|
|
|
|
/**
|
|
* Get the marker that is closest to this point.
|
|
* XXX: for select, the min_dist should be small.
|
|
*/
|
|
struct TimeMarker *ED_markers_find_nearest_marker(ListBase *markers, float x);
|
|
/**
|
|
* Return the time of the marker that occurs on a frame closest to the given time.
|
|
*/
|
|
int ED_markers_find_nearest_marker_time(ListBase *markers, float x);
|
|
|
|
void ED_markers_get_minmax(ListBase *markers, short sel, float *first, float *last);
|
|
|
|
/**
|
|
* This function makes a list of all the markers. The only_sel
|
|
* argument is used to specify whether only the selected markers
|
|
* are added.
|
|
*/
|
|
void ED_markers_make_cfra_list(ListBase *markers, ListBase *lb, short sel);
|
|
|
|
void ED_markers_deselect_all(ListBase *markers, int action);
|
|
|
|
/**
|
|
* Get the first selected marker.
|
|
*/
|
|
struct TimeMarker *ED_markers_get_first_selected(ListBase *markers);
|
|
|
|
/** \} */
|
|
|
|
/* -------------------------------------------------------------------- */
|
|
/** \name Operators
|
|
* \{ */
|
|
|
|
/**
|
|
* Called in screen_ops.c:ED_operatortypes_screen().
|
|
*/
|
|
void ED_operatortypes_marker(void);
|
|
/**
|
|
* Called in screen_ops.c:ED_keymap_screen().
|
|
*/
|
|
void ED_keymap_marker(struct wmKeyConfig *keyconf);
|
|
|
|
/**
|
|
* Debugging only: print debugging prints of list of markers.
|
|
*/
|
|
void debug_markers_print_list(struct ListBase *markers);
|
|
|
|
/** \} */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|