Blender V2.61 - r43446
Classes | Typedefs | Enumerations | Functions

poselib.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
#include "BLI_dlrbTree.h"
#include "BLI_utildefines.h"
#include "BLF_translation.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_armature.h"
#include "BKE_depsgraph.h"
#include "BKE_idprop.h"
#include "BKE_library.h"
#include "BKE_object.h"
#include "BKE_context.h"
#include "BKE_report.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "ED_anim_api.h"
#include "ED_armature.h"
#include "ED_keyframes_draw.h"
#include "ED_keyframing.h"
#include "ED_keyframes_edit.h"
#include "ED_screen.h"
#include "ED_object.h"
#include "armature_intern.h"

Go to the source code of this file.

Classes

struct  tPoseLib_PreviewData
struct  tPoseLib_Backup

Typedefs

typedef struct tPoseLib_PreviewData tPoseLib_PreviewData
typedef struct tPoseLib_Backup tPoseLib_Backup

Enumerations

enum  {
  PL_PREVIEW_ERROR = -1, PL_PREVIEW_RUNNING, PL_PREVIEW_CONFIRM, PL_PREVIEW_CANCEL,
  PL_PREVIEW_RUNONCE
}
enum  { PL_PREVIEW_NOREDRAW = 0, PL_PREVIEW_REDRAWALL, PL_PREVIEW_REDRAWHEADER }
enum  { PL_PREVIEW_FIRSTTIME = (1<<0), PL_PREVIEW_SHOWORIGINAL = (1<<1) }

Functions

static void action_set_activemarker (void *UNUSED(a), void *UNUSED(b), void *UNUSED(c))
static int poselib_get_free_index (bAction *act)
static TimeMarkerposelib_get_active_pose (bAction *act)
static Objectget_poselib_object (bContext *C)
static int has_poselib_pose_data_poll (bContext *C)
static bActionposelib_init_new (Object *ob)
static bActionposelib_validate (Object *ob)
static int poselib_new_exec (bContext *C, wmOperator *UNUSED(op))
void POSELIB_OT_new (wmOperatorType *ot)
static int poselib_unlink_exec (bContext *C, wmOperator *UNUSED(op))
void POSELIB_OT_unlink (wmOperatorType *ot)
static int poselib_sanitise_exec (bContext *C, wmOperator *op)
void POSELIB_OT_action_sanitise (wmOperatorType *ot)
static void poselib_add_menu_invoke__replacemenu (bContext *C, uiLayout *layout, void *UNUSED(arg))
static int poselib_add_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
static int poselib_add_exec (bContext *C, wmOperator *op)
void POSELIB_OT_pose_add (wmOperatorType *ot)
static EnumPropertyItemposelib_stored_pose_itemf (bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
static int poselib_remove_exec (bContext *C, wmOperator *op)
void POSELIB_OT_pose_remove (wmOperatorType *ot)
static int poselib_rename_invoke (bContext *C, wmOperator *op, wmEvent *evt)
static int poselib_rename_exec (bContext *C, wmOperator *op)
void POSELIB_OT_pose_rename (wmOperatorType *ot)
static void poselib_backup_posecopy (tPoseLib_PreviewData *pld)
static void poselib_backup_restore (tPoseLib_PreviewData *pld)
static void poselib_backup_free_data (tPoseLib_PreviewData *pld)
static void poselib_apply_pose (tPoseLib_PreviewData *pld)
static void poselib_keytag_pose (bContext *C, Scene *scene, tPoseLib_PreviewData *pld)
static void poselib_preview_apply (bContext *C, wmOperator *op)
static void poselib_preview_get_next (tPoseLib_PreviewData *pld, int step)
static void poselib_preview_handle_search (tPoseLib_PreviewData *pld, unsigned short event, char ascii)
static int poselib_preview_handle_event (bContext *UNUSED(C), wmOperator *op, wmEvent *event)
static void poselib_preview_init_data (bContext *C, wmOperator *op)
static void poselib_preview_cleanup (bContext *C, wmOperator *op)
static int poselib_preview_exit (bContext *C, wmOperator *op)
static int poselib_preview_cancel (bContext *C, wmOperator *op)
static int poselib_preview_modal (bContext *C, wmOperator *op, wmEvent *event)
static int poselib_preview_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
static int poselib_preview_exec (bContext *C, wmOperator *op)
void POSELIB_OT_browse_interactive (wmOperatorType *ot)
void POSELIB_OT_apply_pose (wmOperatorType *ot)

Detailed Description

Definition in file poselib.c.


Typedef Documentation


Enumeration Type Documentation

anonymous enum
Enumerator:
PL_PREVIEW_ERROR 
PL_PREVIEW_RUNNING 
PL_PREVIEW_CONFIRM 
PL_PREVIEW_CANCEL 
PL_PREVIEW_RUNONCE 

Definition at line 733 of file poselib.c.

anonymous enum
Enumerator:
PL_PREVIEW_NOREDRAW 
PL_PREVIEW_REDRAWALL 
PL_PREVIEW_REDRAWHEADER 

Definition at line 742 of file poselib.c.

anonymous enum
Enumerator:
PL_PREVIEW_FIRSTTIME 
PL_PREVIEW_SHOWORIGINAL 

Definition at line 749 of file poselib.c.


Function Documentation

static void action_set_activemarker ( void *  UNUSEDa,
void *  UNUSEDb,
void *  UNUSED
) [static]

Definition at line 86 of file poselib.c.

Referenced by poselib_preview_cleanup().

static Object* get_poselib_object ( bContext C) [static]
static int has_poselib_pose_data_poll ( bContext C) [static]
static int poselib_add_exec ( bContext C,
wmOperator op 
) [static]
static int poselib_add_menu_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevt 
) [static]
static void poselib_add_menu_invoke__replacemenu ( bContext C,
uiLayout layout,
void *  UNUSEDarg 
) [static]
static void poselib_apply_pose ( tPoseLib_PreviewData pld) [static]
static void poselib_backup_free_data ( tPoseLib_PreviewData pld) [static]
static void poselib_backup_posecopy ( tPoseLib_PreviewData pld) [static]
static void poselib_backup_restore ( tPoseLib_PreviewData pld) [static]
static TimeMarker* poselib_get_active_pose ( bAction act) [static]

Definition at line 154 of file poselib.c.

References bAction::active_marker, BLI_findlink(), bAction::markers, and NULL.

Referenced by poselib_preview_init_data().

static int poselib_get_free_index ( bAction act) [static]

Definition at line 111 of file poselib.c.

References ELEM, ListBase::first, TimeMarker::frame, bAction::markers, TimeMarker::next, and NULL.

Referenced by poselib_add_menu_invoke().

static bAction* poselib_init_new ( Object ob) [static]

Definition at line 190 of file poselib.c.

References add_empty_action(), ELEM, bAction::id, id_us_min(), NULL, Object::pose, and Object::poselib.

Referenced by poselib_new_exec(), and poselib_validate().

static void poselib_keytag_pose ( bContext C,
Scene scene,
tPoseLib_PreviewData pld 
) [static]
static int poselib_new_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
void POSELIB_OT_action_sanitise ( wmOperatorType ot)
void POSELIB_OT_apply_pose ( wmOperatorType ot)
void POSELIB_OT_browse_interactive ( wmOperatorType ot)
void POSELIB_OT_new ( wmOperatorType ot)
void POSELIB_OT_pose_add ( wmOperatorType ot)
void POSELIB_OT_pose_remove ( wmOperatorType ot)
void POSELIB_OT_pose_rename ( wmOperatorType ot)
void POSELIB_OT_unlink ( wmOperatorType ot)
static void poselib_preview_apply ( bContext C,
wmOperator op 
) [static]
static int poselib_preview_cancel ( bContext C,
wmOperator op 
) [static]

Definition at line 1529 of file poselib.c.

References OPERATOR_CANCELLED, and poselib_preview_exit().

Referenced by POSELIB_OT_browse_interactive().

static void poselib_preview_cleanup ( bContext C,
wmOperator op 
) [static]
static int poselib_preview_exec ( bContext C,
wmOperator op 
) [static]
static int poselib_preview_exit ( bContext C,
wmOperator op 
) [static]
static void poselib_preview_get_next ( tPoseLib_PreviewData pld,
int  step 
) [static]
static int poselib_preview_handle_event ( bContext UNUSEDC,
wmOperator op,
wmEvent event 
) [static]
static void poselib_preview_handle_search ( tPoseLib_PreviewData pld,
unsigned short  event,
char  ascii 
) [static]
static void poselib_preview_init_data ( bContext C,
wmOperator op 
) [static]
static int poselib_preview_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevent 
) [static]
static int poselib_preview_modal ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static int poselib_remove_exec ( bContext C,
wmOperator op 
) [static]
static int poselib_rename_exec ( bContext C,
wmOperator op 
) [static]
static int poselib_rename_invoke ( bContext C,
wmOperator op,
wmEvent evt 
) [static]
static int poselib_sanitise_exec ( bContext C,
wmOperator op 
) [static]
static EnumPropertyItem* poselib_stored_pose_itemf ( bContext C,
PointerRNA UNUSEDptr,
PropertyRNA UNUSEDprop,
int *  free 
) [static]

Definition at line 505 of file poselib.c.

References get_poselib_object(), NULL, and Object::poselib.

Referenced by POSELIB_OT_pose_remove(), and POSELIB_OT_pose_rename().

static int poselib_unlink_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static bAction* poselib_validate ( Object ob) [static]

Definition at line 205 of file poselib.c.

References ELEM, NULL, Object::pose, Object::poselib, and poselib_init_new().

Referenced by poselib_add_exec().