~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to source/blender/blenkernel/BKE_object.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
struct RenderData;
50
50
struct rctf;
51
51
struct MovieClip;
52
 
 
53
 
void clear_workob(struct Object *workob);
54
 
void what_does_parent(struct Scene *scene, struct Object *ob, struct Object *workob);
55
 
 
56
 
void copy_baseflags(struct Scene *scene);
57
 
void copy_objectflags(struct Scene *scene);
58
 
struct SoftBody *copy_softbody(struct SoftBody *sb);
 
52
struct Main;
 
53
struct RigidBodyWorld;
 
54
 
 
55
void BKE_object_workob_clear(struct Object *workob);
 
56
void BKE_object_workob_calc_parent(struct Scene *scene, struct Object *ob, struct Object *workob);
 
57
 
 
58
void BKE_object_transform_copy(struct Object *ob_tar, const struct Object *ob_src);
 
59
struct SoftBody *copy_softbody(struct SoftBody *sb, int copy_caches);
59
60
struct BulletSoftBody *copy_bulletsoftbody(struct BulletSoftBody *sb);
60
 
void copy_object_particlesystems(struct Object *obn, struct Object *ob);
61
 
void copy_object_softbody(struct Object *obn, struct Object *ob);
62
 
void object_free_particlesystems(struct Object *ob);
63
 
void object_free_softbody(struct Object *ob);
64
 
void object_free_bulletsoftbody(struct Object *ob);
65
 
void update_base_layer(struct Scene *scene, struct Object *ob);
66
 
 
67
 
void free_object(struct Object *ob);
68
 
void object_free_display(struct Object *ob);
69
 
 
70
 
int object_support_modifier_type(struct Object *ob, int modifier_type);
71
 
 
72
 
void object_link_modifiers(struct Object *ob, struct Object *from);
73
 
void object_free_modifiers(struct Object *ob);
74
 
 
75
 
void object_make_proxy(struct Object *ob, struct Object *target, struct Object *gob);
76
 
void object_copy_proxy_drivers(struct Object *ob, struct Object *target);
77
 
 
78
 
void unlink_object(struct Object *ob);
79
 
int exist_object(struct Object *obtest);
80
 
        
81
 
struct Object *add_only_object(int type, const char *name);
82
 
struct Object *add_object(struct Scene *scene, int type);
83
 
void *add_obdata_from_type(int type);
84
 
 
85
 
struct Object *copy_object(struct Object *ob);
86
 
void make_local_object(struct Object *ob);
87
 
int object_is_libdata(struct Object *ob);
88
 
int object_data_is_libdata(struct Object *ob);
89
 
 
90
 
void object_scale_to_mat3(struct Object *ob, float mat[][3]);
91
 
void object_rot_to_mat3(struct Object *ob, float mat[][3]);
92
 
void object_mat3_to_rot(struct Object *ob, float mat[][3], short use_compat);
93
 
void object_to_mat3(struct Object *ob, float mat[][3]);
94
 
void object_to_mat4(struct Object *ob, float mat[][4]);
95
 
void object_apply_mat4(struct Object *ob, float mat[][4], const short use_compat, const short use_parent);
96
 
 
97
 
struct Object *object_pose_armature_get(struct Object *ob);
98
 
 
99
 
void where_is_object_time(struct Scene *scene, struct Object *ob, float ctime);
100
 
void where_is_object(struct Scene *scene, struct Object *ob);
101
 
void where_is_object_simul(struct Scene *scene, struct Object *ob);
102
 
void where_is_object_mat(struct Scene *scene, struct Object *ob, float obmat[4][4]);
103
 
 
104
 
struct BoundBox *unit_boundbox(void);
105
 
void boundbox_set_from_min_max(struct BoundBox *bb, float min[3], float max[3]);
106
 
struct BoundBox *object_get_boundbox(struct Object *ob);
107
 
void object_get_dimensions(struct Object *ob, float vec[3]);
108
 
void object_set_dimensions(struct Object *ob, const float *value);
109
 
void object_boundbox_flag(struct Object *ob, int flag, int set);
110
 
void minmax_object(struct Object *ob, float min[3], float max[3]);
111
 
int minmax_object_duplis(struct Scene *scene, struct Object *ob, float min[3], float max[3]);
 
61
void BKE_object_copy_particlesystems(struct Object *obn, struct Object *ob);
 
62
void BKE_object_copy_softbody(struct Object *obn, struct Object *ob);
 
63
void BKE_object_free_particlesystems(struct Object *ob);
 
64
void BKE_object_free_softbody(struct Object *ob);
 
65
void BKE_object_free_bulletsoftbody(struct Object *ob);
 
66
void BKE_object_update_base_layer(struct Scene *scene, struct Object *ob);
 
67
 
 
68
void BKE_object_free(struct Object *ob);
 
69
void BKE_object_free_display(struct Object *ob);
 
70
 
 
71
int  BKE_object_support_modifier_type_check(struct Object *ob, int modifier_type);
 
72
 
 
73
void BKE_object_link_modifiers(struct Object *ob, struct Object *from);
 
74
void BKE_object_free_modifiers(struct Object *ob);
 
75
 
 
76
void BKE_object_make_proxy(struct Object *ob, struct Object *target, struct Object *gob);
 
77
void BKE_object_copy_proxy_drivers(struct Object *ob, struct Object *target);
 
78
 
 
79
void BKE_object_unlink(struct Object *ob);
 
80
int  BKE_object_exists_check(struct Object *obtest);
 
81
int BKE_object_is_in_editmode(struct Object *ob);
 
82
 
 
83
struct Object *BKE_object_add_only_object(struct Main *bmain, int type, const char *name);
 
84
struct Object *BKE_object_add(struct Scene *scene, int type);
 
85
void *BKE_object_obdata_add_from_type(int type);
 
86
 
 
87
struct Object *BKE_object_copy_ex(struct Main *bmain, struct Object *ob, int copy_caches);
 
88
struct Object *BKE_object_copy(struct Object *ob);
 
89
void BKE_object_make_local(struct Object *ob);
 
90
int  BKE_object_is_libdata(struct Object *ob);
 
91
int  BKE_object_obdata_is_libdata(struct Object *ob);
 
92
 
 
93
void BKE_object_scale_to_mat3(struct Object *ob, float mat[3][3]);
 
94
void BKE_object_rot_to_mat3(struct Object *ob, float mat[3][3], short use_drot);
 
95
void BKE_object_mat3_to_rot(struct Object *ob, float mat[3][3], short use_compat);
 
96
void BKE_object_to_mat3(struct Object *ob, float mat[3][3]);
 
97
void BKE_object_to_mat4(struct Object *ob, float mat[4][4]);
 
98
void BKE_object_apply_mat4(struct Object *ob, float mat[4][4], const short use_compat, const short use_parent);
 
99
 
 
100
int BKE_object_pose_context_check(struct Object *ob);
 
101
struct Object *BKE_object_pose_armature_get(struct Object *ob);
 
102
 
 
103
void BKE_object_where_is_calc(struct Scene *scene, struct Object *ob);
 
104
void BKE_object_where_is_calc_ex(struct Scene *scene, struct RigidBodyWorld *rbw, struct Object *ob);
 
105
void BKE_object_where_is_calc_time(struct Scene *scene, struct Object *ob, float ctime);
 
106
void BKE_object_where_is_calc_time_ex(struct Scene *scene, struct Object *ob, float ctime,
 
107
                                      struct RigidBodyWorld *rbw);
 
108
void BKE_object_where_is_calc_simul(struct Scene *scene, struct Object *ob);
 
109
void BKE_object_where_is_calc_mat4(struct Scene *scene, struct Object *ob, float obmat[4][4]);
 
110
 
 
111
/* possibly belong in own moduke? */
 
112
struct BoundBox *BKE_boundbox_alloc_unit(void);
 
113
void BKE_boundbox_init_from_minmax(struct BoundBox *bb, float min[3], float max[3]);
 
114
int BKE_boundbox_ray_hit_check(struct BoundBox *bb, float ray_start[3], float ray_normal[3]);
 
115
 
 
116
struct BoundBox *BKE_object_boundbox_get(struct Object *ob);
 
117
void BKE_object_dimensions_get(struct Object *ob, float vec[3]);
 
118
void BKE_object_dimensions_set(struct Object *ob, const float *value);
 
119
void BKE_object_boundbox_flag(struct Object *ob, int flag, int set);
 
120
void BKE_object_minmax(struct Object *ob, float r_min[3], float r_max[3], const short use_hidden);
 
121
int BKE_object_minmax_dupli(struct Scene *scene, struct Object *ob, float r_min[3], float r_max[3], const short use_hidden);
112
122
 
113
123
/* sometimes min-max isn't enough, we need to loop over each point */
114
 
void BKE_object_foreach_display_point(
115
 
        struct Object *ob, float obmat[4][4],
116
 
        void (*func_cb)(const float[3], void *), void *user_data);
117
 
void BKE_scene_foreach_display_point(
118
 
        struct Scene *scene,
119
 
        struct View3D *v3d,
120
 
        const short flag,
121
 
        void (*func_cb)(const float[3], void *), void *user_data);
 
124
void BKE_object_foreach_display_point(struct Object *ob, float obmat[4][4],
 
125
                                      void (*func_cb)(const float[3], void *), void *user_data);
 
126
void BKE_scene_foreach_display_point(struct Scene *scene,
 
127
                                     struct View3D *v3d,
 
128
                                     const short flag,
 
129
                                     void (*func_cb)(const float[3], void *), void *user_data);
122
130
 
123
131
int BKE_object_parent_loop_check(const struct Object *parent, const struct Object *ob);
124
132
 
125
 
int ray_hit_boundbox(struct BoundBox *bb, float ray_start[3], float ray_normal[3]);
126
 
 
127
 
void *object_tfm_backup(struct Object *ob);
128
 
void object_tfm_restore(struct Object *ob, void *obtfm_pt);
 
133
void *BKE_object_tfm_backup(struct Object *ob);
 
134
void  BKE_object_tfm_restore(struct Object *ob, void *obtfm_pt);
129
135
 
130
136
typedef struct ObjectTfmProtectedChannels {
131
137
        float loc[3],     dloc[3];
136
142
        float rotAngle,   drotAngle;
137
143
} ObjectTfmProtectedChannels;
138
144
 
139
 
void object_tfm_protected_backup(const struct Object *ob,
140
 
                                 ObjectTfmProtectedChannels *obtfm);
141
 
 
142
 
void object_tfm_protected_restore(struct Object *ob,
143
 
                                  const ObjectTfmProtectedChannels *obtfm,
144
 
                                  const short protectflag);
145
 
 
146
 
void object_handle_update(struct Scene *scene, struct Object *ob);
147
 
void object_sculpt_modifiers_changed(struct Object *ob);
148
 
 
149
 
int give_obdata_texspace(struct Object *ob, short **texflag, float **loc, float **size, float **rot);
150
 
 
151
 
int object_insert_ptcache(struct Object *ob);
 
145
void BKE_object_tfm_protected_backup(const struct Object *ob,
 
146
                                     ObjectTfmProtectedChannels *obtfm);
 
147
 
 
148
void BKE_object_tfm_protected_restore(struct Object *ob,
 
149
                                      const ObjectTfmProtectedChannels *obtfm,
 
150
                                      const short protectflag);
 
151
 
 
152
void BKE_object_handle_update(struct Scene *scene, struct Object *ob);
 
153
void BKE_object_handle_update_ex(struct Scene *scene, struct Object *ob,
 
154
                                 struct RigidBodyWorld *rbw);
 
155
void BKE_object_sculpt_modifiers_changed(struct Object *ob);
 
156
 
 
157
int BKE_object_obdata_texspace_get(struct Object *ob, short **r_texflag, float **r_loc, float **r_size, float **r_rot);
 
158
 
 
159
int BKE_object_insert_ptcache(struct Object *ob);
152
160
// void object_delete_ptcache(struct Object *ob, int index);
153
 
struct KeyBlock *object_insert_shape_key(struct Scene *scene, struct Object *ob, const char *name, int from_mix);
154
 
 
155
 
int object_is_modified(struct Scene *scene, struct Object *ob);
156
 
 
157
 
void object_relink(struct Object *ob);
158
 
 
159
 
struct MovieClip *object_get_movieclip(struct Scene *scene, struct Object *ob, int use_default);
 
161
struct KeyBlock *BKE_object_insert_shape_key(struct Scene *scene, struct Object *ob, const char *name, int from_mix);
 
162
 
 
163
int BKE_object_is_modified(struct Scene *scene, struct Object *ob);
 
164
int BKE_object_is_deform_modified(struct Scene *scene, struct Object *ob);
 
165
int BKE_object_is_animated(struct Scene *scene, struct Object *ob);
 
166
 
 
167
void BKE_object_relink(struct Object *ob);
 
168
 
 
169
struct MovieClip *BKE_object_movieclip_get(struct Scene *scene, struct Object *ob, int use_default);
 
170
 
 
171
/* this function returns a superset of the scenes selection based on relationships */
 
172
 
 
173
typedef enum eObRelationTypes {
 
174
        OB_REL_NONE               = 0,        /* just the selection as is */
 
175
        OB_REL_PARENT             = (1 << 0), /* immediate parent */
 
176
        OB_REL_PARENT_RECURSIVE   = (1 << 1), /* parents up to root of selection tree*/
 
177
        OB_REL_CHILDREN           = (1 << 2), /* immediate children */
 
178
        OB_REL_CHILDREN_RECURSIVE = (1 << 3), /* All children */
 
179
        OB_REL_MOD_ARMATURE       = (1 << 4), /* Armatures related to the selected objects */
 
180
        OB_REL_SCENE_CAMERA       = (1 << 5), /* you might want the scene camera too even if unselected? */
 
181
} eObRelationTypes;
 
182
 
 
183
typedef enum eObjectSet {
 
184
        OB_SET_SELECTED, /* Selected Objects */
 
185
        OB_SET_VISIBLE,  /* Visible Objects  */
 
186
        OB_SET_ALL       /* All Objects      */
 
187
} eObjectSet;
 
188
 
 
189
struct LinkNode *BKE_object_relational_superset(struct Scene *scene, eObjectSet objectSet, eObRelationTypes includeFilter);
 
190
struct LinkNode *BKE_object_groups(struct Object *ob);
 
191
void             BKE_object_groups_clear(struct Scene *scene, struct Base *base, struct Object *object);
160
192
 
161
193
#ifdef __cplusplus
162
194
}