Blender  V2.59
Defines | Functions | Variables
object_constraint.c File Reference
#include <stdio.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_dynstr.h"
#include "BLI_utildefines.h"
#include "DNA_constraint_types.h"
#include "DNA_curve_types.h"
#include "DNA_scene_types.h"
#include "DNA_text_types.h"
#include "DNA_object_types.h"
#include "BKE_action.h"
#include "BKE_armature.h"
#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "BIK_api.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "ED_object.h"
#include "ED_armature.h"
#include "ED_screen.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "object_intern.h"

Go to the source code of this file.

Defines

#define EDIT_CONSTRAINT_OWNER_OBJECT   0
#define EDIT_CONSTRAINT_OWNER_BONE   1

Functions

ListBaseget_active_constraints (Object *ob)
ListBaseget_constraint_lb (Object *ob, bConstraint *con, bPoseChannel **pchan_r)
bConstraintget_active_constraint (Object *ob)
static void validate_pyconstraint_cb (void *arg1, void *arg2)
static void set_constraint_nth_target (bConstraint *con, Object *target, const char subtarget[], int index)
static void test_constraints (Object *owner, bPoseChannel *pchan)
void object_test_constraints (Object *owner)
static int edit_constraint_poll_generic (bContext *C, StructRNA *rna_type)
static int edit_constraint_poll (bContext *C)
static void edit_constraint_properties (wmOperatorType *ot)
static int edit_constraint_invoke_properties (bContext *C, wmOperator *op)
static bConstraintedit_constraint_property_get (wmOperator *op, Object *ob, int type)
static int stretchto_reset_exec (bContext *C, wmOperator *op)
static int stretchto_reset_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void CONSTRAINT_OT_stretchto_reset (wmOperatorType *ot)
static int limitdistance_reset_exec (bContext *C, wmOperator *op)
static int limitdistance_reset_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void CONSTRAINT_OT_limitdistance_reset (wmOperatorType *ot)
static int childof_set_inverse_exec (bContext *C, wmOperator *op)
static int childof_set_inverse_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void CONSTRAINT_OT_childof_set_inverse (wmOperatorType *ot)
static int childof_clear_inverse_exec (bContext *C, wmOperator *op)
static int childof_clear_inverse_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void CONSTRAINT_OT_childof_clear_inverse (wmOperatorType *ot)
void ED_object_constraint_set_active (Object *ob, bConstraint *con)
void ED_object_constraint_update (Object *ob)
void ED_object_constraint_dependency_update (Main *bmain, Scene *scene, Object *ob)
static int constraint_poll (bContext *C)
static int constraint_delete_exec (bContext *C, wmOperator *UNUSED(op))
void CONSTRAINT_OT_delete (wmOperatorType *ot)
static int constraint_move_down_exec (bContext *C, wmOperator *op)
static int constraint_move_down_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void CONSTRAINT_OT_move_down (wmOperatorType *ot)
static int constraint_move_up_exec (bContext *C, wmOperator *op)
static int constraint_move_up_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void CONSTRAINT_OT_move_up (wmOperatorType *ot)
static int pose_constraints_clear_exec (bContext *C, wmOperator *UNUSED(op))
void POSE_OT_constraints_clear (wmOperatorType *ot)
static int object_constraints_clear_exec (bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_constraints_clear (wmOperatorType *ot)
static int pose_constraint_copy_exec (bContext *C, wmOperator *op)
void POSE_OT_constraints_copy (wmOperatorType *ot)
static int object_constraint_copy_exec (bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_constraints_copy (wmOperatorType *ot)
static short get_new_constraint_target (bContext *C, int con_type, Object **tar_ob, bPoseChannel **tar_pchan, short add)
static int constraint_add_exec (bContext *C, wmOperator *op, Object *ob, ListBase *list, int type, short setTarget)
static int object_constraint_add_exec (bContext *C, wmOperator *op)
static int pose_constraint_add_exec (bContext *C, wmOperator *op)
void OBJECT_OT_constraint_add (wmOperatorType *ot)
void OBJECT_OT_constraint_add_with_targets (wmOperatorType *ot)
void POSE_OT_constraint_add (wmOperatorType *ot)
void POSE_OT_constraint_add_with_targets (wmOperatorType *ot)
static int pose_ik_add_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
static int pose_ik_add_exec (bContext *C, wmOperator *op)
void POSE_OT_ik_add (wmOperatorType *ot)
static int pose_ik_clear_exec (bContext *C, wmOperator *UNUSED(op))
void POSE_OT_ik_clear (wmOperatorType *ot)

Variables

static EnumPropertyItem constraint_owner_items []

Detailed Description

Definition in file object_constraint.c.


Define Documentation

#define EDIT_CONSTRAINT_OWNER_BONE   1
#define EDIT_CONSTRAINT_OWNER_OBJECT   0

Function Documentation

static int childof_clear_inverse_exec ( bContext C,
wmOperator op 
) [static]
static int childof_clear_inverse_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevent 
) [static]
static int childof_set_inverse_exec ( bContext C,
wmOperator op 
) [static]
static int childof_set_inverse_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevent 
) [static]
static int constraint_add_exec ( bContext C,
wmOperator op,
Object ob,
ListBase list,
int  type,
short  setTarget 
) [static]
static int constraint_delete_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int constraint_move_down_exec ( bContext C,
wmOperator op 
) [static]
static int constraint_move_down_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevent 
) [static]
static int constraint_move_up_exec ( bContext C,
wmOperator op 
) [static]
static int constraint_move_up_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevent 
) [static]
void CONSTRAINT_OT_childof_clear_inverse ( wmOperatorType ot)
void CONSTRAINT_OT_childof_set_inverse ( wmOperatorType ot)
void CONSTRAINT_OT_delete ( wmOperatorType ot)
void CONSTRAINT_OT_limitdistance_reset ( wmOperatorType ot)
void CONSTRAINT_OT_move_down ( wmOperatorType ot)
void CONSTRAINT_OT_move_up ( wmOperatorType ot)
void CONSTRAINT_OT_stretchto_reset ( wmOperatorType ot)
static int constraint_poll ( bContext C) [static]
void ED_object_constraint_dependency_update ( Main bmain,
Scene scene,
Object ob 
)
void ED_object_constraint_set_active ( Object ob,
bConstraint con 
)
void ED_object_constraint_update ( Object ob)
static int edit_constraint_invoke_properties ( bContext C,
wmOperator op 
) [static]
static int edit_constraint_poll ( bContext C) [static]
static int edit_constraint_poll_generic ( bContext C,
StructRNA rna_type 
) [static]
static void edit_constraint_properties ( wmOperatorType ot) [static]
static bConstraint* edit_constraint_property_get ( wmOperator op,
Object ob,
int  type 
) [static]
bConstraint* get_active_constraint ( Object ob) [read]

Definition at line 140 of file object_constraint.c.

References constraints_get_active(), and get_active_constraints().

ListBase* get_active_constraints ( Object ob) [read]
ListBase* get_constraint_lb ( Object ob,
bConstraint con,
bPoseChannel **  pchan_r 
) [read]
static short get_new_constraint_target ( bContext C,
int  con_type,
Object **  tar_ob,
bPoseChannel **  tar_pchan,
short  add 
) [static]
static int limitdistance_reset_exec ( bContext C,
wmOperator op 
) [static]
static int limitdistance_reset_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevent 
) [static]
static int object_constraint_add_exec ( bContext C,
wmOperator op 
) [static]
static int object_constraint_copy_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int object_constraints_clear_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
void OBJECT_OT_constraint_add ( wmOperatorType ot)
void OBJECT_OT_constraint_add_with_targets ( wmOperatorType ot)
void OBJECT_OT_constraints_clear ( wmOperatorType ot)
void OBJECT_OT_constraints_copy ( wmOperatorType ot)
void object_test_constraints ( Object owner)
static int pose_constraint_add_exec ( bContext C,
wmOperator op 
) [static]
static int pose_constraint_copy_exec ( bContext C,
wmOperator op 
) [static]
static int pose_constraints_clear_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int pose_ik_add_exec ( bContext C,
wmOperator op 
) [static]
static int pose_ik_add_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevt 
) [static]
static int pose_ik_clear_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
void POSE_OT_constraint_add ( wmOperatorType ot)
void POSE_OT_constraint_add_with_targets ( wmOperatorType ot)
void POSE_OT_constraints_clear ( wmOperatorType ot)
void POSE_OT_constraints_copy ( wmOperatorType ot)
void POSE_OT_ik_add ( wmOperatorType ot)
void POSE_OT_ik_clear ( wmOperatorType ot)
static void set_constraint_nth_target ( bConstraint con,
Object target,
const char  subtarget[],
int  index 
) [static]
static int stretchto_reset_exec ( bContext C,
wmOperator op 
) [static]
static int stretchto_reset_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevent 
) [static]
static void test_constraints ( Object owner,
bPoseChannel pchan 
) [static]
static void validate_pyconstraint_cb ( void *  arg1,
void *  arg2 
) [static]

Variable Documentation

Initial value:
 {
        {EDIT_CONSTRAINT_OWNER_OBJECT, "OBJECT", 0, "Object", "Edit a constraint on the active object"},
        {EDIT_CONSTRAINT_OWNER_BONE, "BONE", 0, "Bone", "Edit a constraint on the active bone"},
        {0, NULL, 0, NULL, NULL}}

Definition at line 486 of file object_constraint.c.