Blender V2.61 - r43446
Defines | Enumerations | Functions | Variables

object_relations.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
#include "DNA_constraint_types.h"
#include "DNA_group_types.h"
#include "DNA_lamp_types.h"
#include "DNA_lattice_types.h"
#include "DNA_material_types.h"
#include "DNA_meta_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "DNA_speaker_types.h"
#include "DNA_world_types.h"
#include "DNA_object_types.h"
#include "BLI_math.h"
#include "BLI_editVert.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_action.h"
#include "BKE_animsys.h"
#include "BKE_armature.h"
#include "BKE_camera.h"
#include "BKE_context.h"
#include "BKE_constraint.h"
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_DerivedMesh.h"
#include "BKE_displist.h"
#include "BKE_global.h"
#include "BKE_fcurve.h"
#include "BKE_lamp.h"
#include "BKE_lattice.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_mball.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_sca.h"
#include "BKE_scene.h"
#include "BKE_speaker.h"
#include "BKE_texture.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "ED_armature.h"
#include "ED_curve.h"
#include "ED_keyframing.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "ED_mesh.h"
#include "object_intern.h"

Go to the source code of this file.

Defines

#define PAR_OBJECT   0
#define PAR_ARMATURE   1
#define PAR_ARMATURE_NAME   2
#define PAR_ARMATURE_ENVELOPE   3
#define PAR_ARMATURE_AUTO   4
#define PAR_BONE   5
#define PAR_CURVE   6
#define PAR_FOLLOW   7
#define PAR_PATH_CONST   8
#define PAR_LATTICE   9
#define PAR_VERTEX   10
#define PAR_TRIA   11

Enumerations

enum  {
  MAKE_LINKS_OBDATA = 1, MAKE_LINKS_MATERIALS, MAKE_LINKS_ANIMDATA, MAKE_LINKS_DUPLIGROUP,
  MAKE_LINKS_MODIFIERS
}

Functions

static int vertex_parent_set_poll (bContext *C)
static int vertex_parent_set_exec (bContext *C, wmOperator *op)
void OBJECT_OT_vertex_parent_set (wmOperatorType *ot)
static int make_proxy_invoke (bContext *C, wmOperator *op, wmEvent *evt)
static int make_proxy_exec (bContext *C, wmOperator *op)
static EnumPropertyItemproxy_group_object_itemf (bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
void OBJECT_OT_proxy_make (wmOperatorType *ot)
static int parent_clear_exec (bContext *C, wmOperator *op)
void OBJECT_OT_parent_clear (wmOperatorType *ot)
void ED_object_parent (Object *ob, Object *par, int type, const char *substr)
static int parent_set_exec (bContext *C, wmOperator *op)
static int parent_set_invoke (bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
void OBJECT_OT_parent_set (wmOperatorType *ot)
static int parent_noinv_set_exec (bContext *C, wmOperator *op)
void OBJECT_OT_parent_no_inverse_set (wmOperatorType *ot)
static int object_slow_parent_clear_exec (bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_slow_parent_clear (wmOperatorType *ot)
static int object_slow_parent_set_exec (bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_slow_parent_set (wmOperatorType *ot)
static int object_track_clear_exec (bContext *C, wmOperator *op)
void OBJECT_OT_track_clear (wmOperatorType *ot)
static int track_set_exec (bContext *C, wmOperator *op)
void OBJECT_OT_track_set (wmOperatorType *ot)
static unsigned int move_to_layer_init (bContext *C, wmOperator *op)
static int move_to_layer_invoke (bContext *C, wmOperator *op, wmEvent *event)
static int move_to_layer_exec (bContext *C, wmOperator *op)
void OBJECT_OT_move_to_layer (wmOperatorType *ot)
static int make_links_scene_exec (bContext *C, wmOperator *op)
static int allow_make_links_data (int ev, Object *ob, Object *obt)
static int make_links_data_exec (bContext *C, wmOperator *op)
void OBJECT_OT_make_links_scene (wmOperatorType *ot)
void OBJECT_OT_make_links_data (wmOperatorType *ot)
static void single_object_users (Scene *scene, View3D *v3d, int flag)
void ED_object_single_user (Scene *scene, Object *ob)
static void new_id_matar (Material **matar, int totcol)
static void single_obdata_users (Main *bmain, Scene *scene, int flag)
static void single_object_action_users (Scene *scene, int flag)
static void single_mat_users (Scene *scene, int flag, int do_textures)
static void do_single_tex_user (Tex **from)
static void single_tex_users_expand (Main *bmain)
static void single_mat_users_expand (Main *bmain)
void ED_object_single_users (Main *bmain, Scene *scene, int full)
static void make_local_makelocalmaterial (Material *ma)
static int make_local_exec (bContext *C, wmOperator *op)
void OBJECT_OT_make_local (wmOperatorType *ot)
static int make_single_user_exec (bContext *C, wmOperator *op)
void OBJECT_OT_make_single_user (wmOperatorType *ot)
static int drop_named_material_invoke (bContext *C, wmOperator *op, wmEvent *event)
void OBJECT_OT_drop_named_material (wmOperatorType *ot)

Variables

static EnumPropertyItem prop_clear_parent_types []
static EnumPropertyItem prop_make_parent_types []
static EnumPropertyItem prop_clear_track_types []
static EnumPropertyItem prop_make_track_types []

Detailed Description

Definition in file object_relations.c.


Define Documentation

#define PAR_ARMATURE   1

Definition at line 487 of file object_relations.c.

Referenced by parent_set_exec(), and parent_set_invoke().

#define PAR_ARMATURE_AUTO   4

Definition at line 490 of file object_relations.c.

Referenced by parent_set_exec(), and parent_set_invoke().

#define PAR_ARMATURE_ENVELOPE   3

Definition at line 489 of file object_relations.c.

Referenced by parent_set_exec(), and parent_set_invoke().

#define PAR_ARMATURE_NAME   2

Definition at line 488 of file object_relations.c.

Referenced by parent_set_exec(), and parent_set_invoke().

#define PAR_BONE   5

Definition at line 491 of file object_relations.c.

Referenced by parent_set_exec(), and parent_set_invoke().

#define PAR_CURVE   6

Definition at line 492 of file object_relations.c.

Referenced by parent_set_exec(), and parent_set_invoke().

#define PAR_FOLLOW   7

Definition at line 493 of file object_relations.c.

Referenced by parent_set_exec(), and parent_set_invoke().

#define PAR_LATTICE   9

Definition at line 495 of file object_relations.c.

Referenced by parent_set_exec(), and parent_set_invoke().

#define PAR_OBJECT   0

Definition at line 486 of file object_relations.c.

Referenced by parent_set_exec(), and parent_set_invoke().

#define PAR_PATH_CONST   8

Definition at line 494 of file object_relations.c.

Referenced by parent_set_exec(), and parent_set_invoke().

#define PAR_TRIA   11

Definition at line 497 of file object_relations.c.

#define PAR_VERTEX   10

Definition at line 496 of file object_relations.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
MAKE_LINKS_OBDATA 
MAKE_LINKS_MATERIALS 
MAKE_LINKS_ANIMDATA 
MAKE_LINKS_DUPLIGROUP 
MAKE_LINKS_MODIFIERS 

Definition at line 1222 of file object_relations.c.


Function Documentation

static int allow_make_links_data ( int  ev,
Object ob,
Object obt 
) [static]
static void do_single_tex_user ( Tex **  from) [static]
static int drop_named_material_invoke ( bContext C,
wmOperator op,
wmEvent event 
) [static]
void ED_object_parent ( Object ob,
Object par,
int  type,
const char *  substr 
)
void ED_object_single_user ( Scene scene,
Object ob 
)

Definition at line 1410 of file object_relations.c.

References FIRSTBASE, Base::flag, Base::next, NULL, OB_DONE, Base::object, and single_object_users().

Referenced by template_id_cb().

void ED_object_single_users ( Main bmain,
Scene scene,
int  full 
)
static int make_links_data_exec ( bContext C,
wmOperator op 
) [static]
static int make_links_scene_exec ( bContext C,
wmOperator op 
) [static]
static int make_local_exec ( bContext C,
wmOperator op 
) [static]
static void make_local_makelocalmaterial ( Material ma) [static]
static int make_proxy_exec ( bContext C,
wmOperator op 
) [static]
static int make_proxy_invoke ( bContext C,
wmOperator op,
wmEvent evt 
) [static]
static int make_single_user_exec ( bContext C,
wmOperator op 
) [static]
static int move_to_layer_exec ( bContext C,
wmOperator op 
) [static]
static unsigned int move_to_layer_init ( bContext C,
wmOperator op 
) [static]
static int move_to_layer_invoke ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static void new_id_matar ( Material **  matar,
int  totcol 
) [static]

Definition at line 1422 of file object_relations.c.

References copy_material(), id_us_plus(), ID::lib, ID::newid, NULL, and ID::us.

Referenced by single_mat_users_expand().

void OBJECT_OT_drop_named_material ( wmOperatorType ot)
void OBJECT_OT_make_links_data ( wmOperatorType ot)
void OBJECT_OT_make_links_scene ( wmOperatorType ot)
void OBJECT_OT_make_local ( wmOperatorType ot)
void OBJECT_OT_make_single_user ( wmOperatorType ot)
void OBJECT_OT_move_to_layer ( wmOperatorType ot)
void OBJECT_OT_parent_clear ( wmOperatorType ot)
void OBJECT_OT_parent_no_inverse_set ( wmOperatorType ot)
void OBJECT_OT_parent_set ( wmOperatorType ot)
void OBJECT_OT_proxy_make ( wmOperatorType ot)
void OBJECT_OT_slow_parent_clear ( wmOperatorType ot)
void OBJECT_OT_slow_parent_set ( wmOperatorType ot)
void OBJECT_OT_track_clear ( wmOperatorType ot)
void OBJECT_OT_track_set ( wmOperatorType ot)
void OBJECT_OT_vertex_parent_set ( wmOperatorType ot)
static int object_slow_parent_clear_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int object_slow_parent_set_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int object_track_clear_exec ( bContext C,
wmOperator op 
) [static]
static int parent_clear_exec ( bContext C,
wmOperator op 
) [static]
static int parent_noinv_set_exec ( bContext C,
wmOperator op 
) [static]
static int parent_set_exec ( bContext C,
wmOperator op 
) [static]

Definition at line 532 of file object_relations.c.

References add_fmodifier(), add_ob_constraint(), ARM_GROUPS_AUTO, ARM_GROUPS_ENVELOPE, ARM_GROUPS_NAME, FCurve::bezt, BKE_object_parent_loop_check(), BKE_report(), BLI_strncpy(), RenderData::cfra, CONSTRAINT_OBTYPE_OBJECT, CONSTRAINT_TYPE_FOLLOWPATH, create_vgroups_from_armature(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), CU_FOLLOW, CU_PATH, DAG_ids_flush_update(), DAG_scene_sort(), bConstraint::data, data, Object::data, ED_object_active_context(), ED_object_modifier_add(), ELEM, ELEM4, ELEM5, eModifierType_Armature, eModifierType_Curve, eModifierType_Lattice, ListBase::first, Curve::flag, FMODIFIER_TYPE_GENERATOR, FCurve::fpt, get_active_posechannel(), get_constraint_target_matrix(), Curve::id, invert_m4_m4(), makeDispListCurveTypes(), FCurve::modifiers, bPoseChannel::name, NC_OBJECT, ND_PARENT, ND_TRANSFORM, NULL, OB_ARMATURE, OB_CURVE, OB_FONT, OB_LATTICE, OB_MESH, OB_RECALC_DATA, OB_RECALC_OB, OB_SURF, Object::obmat, OPERATOR_CANCELLED, OPERATOR_FINISHED, PAR_ARMATURE, PAR_ARMATURE_AUTO, PAR_ARMATURE_ENVELOPE, PAR_ARMATURE_NAME, PAR_BONE, PAR_CURVE, PAR_FOLLOW, PAR_LATTICE, PAR_OBJECT, PAR_PATH_CONST, PARBONE, Object::parent, PAROBJECT, Object::partype, wmOperator::ptr, Scene::r, Object::recalc, wmOperator::reports, RNA_enum_get(), RPT_ERROR, sub_v3_v3v3(), bFollowPathConstraint::tar, Object::type, verify_adt_action(), verify_fcurve(), what_does_parent(), WM_cursor_wait(), and WM_event_add_notifier().

Referenced by OBJECT_OT_parent_set().

static int parent_set_invoke ( bContext C,
wmOperator UNUSEDop,
wmEvent UNUSEDevent 
) [static]
static EnumPropertyItem* proxy_group_object_itemf ( bContext C,
PointerRNA UNUSEDptr,
PropertyRNA UNUSEDprop,
int *  free 
) [static]
static void single_mat_users ( Scene scene,
int  flag,
int  do_textures 
) [static]
static void single_mat_users_expand ( Main bmain) [static]
static void single_obdata_users ( Main bmain,
Scene scene,
int  flag 
) [static]
static void single_object_action_users ( Scene scene,
int  flag 
) [static]
static void single_object_users ( Scene scene,
View3D v3d,
int  flag 
) [static]
static void single_tex_users_expand ( Main bmain) [static]
static int track_set_exec ( bContext C,
wmOperator op 
) [static]
static int vertex_parent_set_exec ( bContext C,
wmOperator op 
) [static]
static int vertex_parent_set_poll ( bContext C) [static]

Variable Documentation

Initial value:
 {
    {0, "CLEAR", 0, "Clear Parent", ""},
    {1, "CLEAR_KEEP_TRANSFORM", 0, "Clear and Keep Transformation", ""},
    {2, "CLEAR_INVERSE", 0, "Clear Parent Inverse", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 424 of file object_relations.c.

Initial value:
 {
    {0, "CLEAR", 0, "Clear Track", ""},
    {1, "CLEAR_KEEP_TRANSFORM", 0, "Clear and Keep Transformation (Clear Track)", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 884 of file object_relations.c.

Initial value:
 {
    {PAR_OBJECT, "OBJECT", 0, "Object", ""},
    {PAR_ARMATURE, "ARMATURE", 0, "Armature Deform", ""},
    {PAR_ARMATURE_NAME, "ARMATURE_NAME", 0, "   With Empty Groups", ""},
    {PAR_ARMATURE_AUTO, "ARMATURE_AUTO", 0, "   With Automatic Weights", ""},
    {PAR_ARMATURE_ENVELOPE, "ARMATURE_ENVELOPE", 0, "   With Envelope Weights", ""},
    {PAR_BONE, "BONE", 0, "Bone", ""},
    {PAR_CURVE, "CURVE", 0, "Curve Deform", ""},
    {PAR_FOLLOW, "FOLLOW", 0, "Follow Path", ""},
    {PAR_PATH_CONST, "PATH_CONST", 0, "Path Constraint", ""},
    {PAR_LATTICE, "LATTICE", 0, "Lattice Deform", ""},
    {PAR_VERTEX, "VERTEX", 0, "Vertex", ""},
    {PAR_TRIA, "TRIA", 0, "Triangle", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 499 of file object_relations.c.

Initial value:
 {
    {1, "DAMPTRACK", 0, "Damped Track Constraint", ""},
    {2, "TRACKTO", 0, "Track To Constraint", ""},
    {3, "LOCKTRACK", 0, "Lock Track Constraint", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 948 of file object_relations.c.