135 {
LA_LOCAL,
"POINT", ICON_LIGHT_POINT,
"Point",
"Omnidirectional point light source"},
136 {
LA_SUN,
"SUN", ICON_LIGHT_SUN,
"Sun",
"Constant direction parallel ray light source"},
137 {
LA_SPOT,
"SPOT", ICON_LIGHT_SPOT,
"Spot",
"Directional cone light source"},
138 {
LA_AREA,
"AREA", ICON_LIGHT_AREA,
"Area",
"Directional area light source"},
145 {
PFIELD_WIND,
"WIND", ICON_FORCE_WIND,
"Wind",
""},
147 {
PFIELD_MAGNET,
"MAGNET", ICON_FORCE_MAGNETIC,
"Magnetic",
""},
150 {
PFIELD_LENNARDJ,
"LENNARDJ", ICON_FORCE_LENNARDJONES,
"Lennard-Jones",
""},
152 {
PFIELD_GUIDE,
"GUIDE", ICON_FORCE_CURVE,
"Curve Guide",
""},
153 {
PFIELD_BOID,
"BOID", ICON_FORCE_BOID,
"Boid",
""},
155 {
PFIELD_DRAG,
"DRAG", ICON_FORCE_DRAG,
"Drag",
""},
163 ICON_LIGHTPROBE_CUBEMAP,
164 "Reflection Cubemap",
165 "Reflection probe with spherical or cubic attenuation"},
168 ICON_LIGHTPROBE_PLANAR,
170 "Planar reflection probe"},
173 ICON_LIGHTPROBE_GRID,
175 "Irradiance probe to capture diffuse indirect lighting"},
186 {
ALIGN_WORLD,
"WORLD", 0,
"World",
"Align the new object to the world"},
187 {
ALIGN_VIEW,
"VIEW", 0,
"View",
"Align the new object to the view"},
188 {
ALIGN_CURSOR,
"CURSOR", 0,
"3D Cursor",
"Use the 3D cursor orientation for the new object"},
212 "X-coordinate (screen space) to place the new object under",
222 "Y-coordinate (screen space) to place the new object under",
280 BLI_assert(align_axis >=
'X' && align_axis <=
'Z');
282 switch (align_axis) {
285 const float axis_y[4] = {0.0f, 1.0f, 0.0f};
286 float quat_y[4], quat[4];
307 BLI_assert(align_axis >=
'X' && align_axis <=
'Z');
311 viewquat[0] *= -1.0f;
335 bContext *
C,
Object *obedit,
const float loc[3],
const float rot[3],
float r_primmat[4][4])
339 float mat[3][3], rmat[3][3], cmat[3][3], imat[3][3];
406 "Enter edit mode when adding this object");
421 "Location for the newly added object",
432 "Rotation for the newly added object",
444 "Scale for the newly added object",
457 const char view_align_axis,
461 bool *enter_editmode,
463 bool *is_view_aligned)
469 bool _enter_editmode;
470 if (!enter_editmode) {
471 enter_editmode = &_enter_editmode;
483 if (local_view_bits) {
506 bool _is_view_aligned;
508 if (!is_view_aligned) {
509 is_view_aligned = &_is_view_aligned;
519 *is_view_aligned =
false;
534 if (*is_view_aligned) {
601 const bool enter_editmode,
602 const ushort local_view_bits,
611 if (obedit !=
NULL) {
618 if (obdata !=
NULL) {
622 if (materials_len_p && *materials_len_p > 0) {
629 BASACT(view_layer)->local_view_bits = local_view_bits;
645 if (enter_editmode) {
664 const bool enter_editmode,
665 const ushort local_view_bits)
668 C,
type, name, loc,
rot, enter_editmode, local_view_bits,
NULL);
676 float loc[3],
rot[3], radius;
679 C, op,
'Z', loc,
rot,
NULL, &enter_editmode, &local_view_bits,
NULL)) {
745 float loc[3],
rot[3];
748 C, op,
'Z', loc,
rot,
NULL, &enter_editmode, &local_view_bits,
NULL)) {
770 ot->
name =
"Add Light Probe";
772 ot->
idname =
"OBJECT_OT_lightprobe_add";
839 float loc[3],
rot[3];
842 C, op,
'Z', loc,
rot,
NULL, &enter_editmode, &local_view_bits,
NULL)) {
865 if (!enter_editmode) {
888 ot->
name =
"Add Effector";
889 ot->
description =
"Add an empty object with a physics effector to the scene";
890 ot->
idname =
"OBJECT_OT_effector_add";
922 float loc[3],
rot[3];
924 C, op,
'Z', loc,
rot,
NULL, &enter_editmode, &local_view_bits,
NULL)) {
951 ot->
idname =
"OBJECT_OT_camera_add";
981 float loc[3],
rot[3];
984 C, op,
'Z', loc,
rot,
NULL, &enter_editmode, &local_view_bits,
NULL)) {
1008 if (newob && !enter_editmode) {
1020 ot->
name =
"Add Metaball";
1022 ot->
idname =
"OBJECT_OT_metaball_add";
1047 bool enter_editmode;
1049 float loc[3],
rot[3];
1053 C, op,
'Z', loc,
rot,
NULL, &enter_editmode, &local_view_bits,
NULL)) {
1102 bool enter_editmode;
1104 float loc[3],
rot[3], dia;
1109 C, op,
'Z', loc,
rot,
NULL, &enter_editmode, &local_view_bits,
NULL)) {
1121 if (obedit ==
NULL) {
1130 if (newob && !enter_editmode) {
1142 ot->
name =
"Add Armature";
1144 ot->
idname =
"OBJECT_OT_armature_add";
1169 float loc[3],
rot[3];
1188 ot->
idname =
"OBJECT_OT_empty_add";
1258 ot->
name =
"Add Empty Image/Drop Image to Empty";
1259 ot->
description =
"Add an empty image type to scene with data";
1260 ot->
idname =
"OBJECT_OT_drop_named_image";
1276 "Select the file relative to the blend file");
1314 const int stroke_depth_order =
RNA_enum_get(op->
ptr,
"stroke_depth_order");
1317 float loc[3],
rot[3];
1329 const char *ob_name =
NULL;
1332 ob_name =
"Suzanne";
1342 ob_name =
"Line Art";
1484 "Display strokes using grease pencil layers to define order"},
1485 {
GP_DRAWMODE_3D,
"3D", 0,
"3D Location",
"Display strokes using real 3D position in 3D space"},
1492 ot->
name =
"Add Grease Pencil";
1493 ot->
description =
"Add a Grease Pencil object to the scene";
1494 ot->
idname =
"OBJECT_OT_gpencil_add";
1516 "Show line art grease pencil in front of everything");
1519 "stroke_depth_order",
1522 "Stroke Depth Order",
1523 "Defines how the strokes are ordered in 3D space for objects not displayed 'In Front'");
1554 float loc[3],
rot[3];
1592 ot->
idname =
"OBJECT_OT_light_add";
1621 float loc[3],
rot[3];
1642 if (collection ==
NULL) {
1694 ot->
name =
"Add Collection Instance";
1696 ot->
idname =
"OBJECT_OT_collection_instance_add";
1708 ot->
srna,
"name",
"Collection",
MAX_ID_NAME - 2,
"Name",
"Collection name to add");
1731 float loc[3],
rot[3];
1749 if (object_type == -1) {
1767 C, object_type,
id->
name + 2, loc,
rot,
false, local_view_bits,
id);
1781 ot->
name =
"Add Object Data Instance";
1783 ot->
idname =
"OBJECT_OT_data_instance_add";
1814 float loc[3],
rot[3];
1847 ot->
name =
"Add Speaker";
1849 ot->
idname =
"OBJECT_OT_speaker_add";
1869 if (!
U.experimental.use_new_hair_type) {
1878 float loc[3],
rot[3];
1914 if (!
U.experimental.use_new_point_cloud_type) {
1923 float loc[3],
rot[3];
1937 ot->
name =
"Add Point Cloud";
1939 ot->
idname =
"OBJECT_OT_pointcloud_add";
1964 "WARNING, undeletable object '%s', should have been caught before reaching this "
1992 uint changed_count = 0;
1993 uint tagged_count = 0;
2006 "Cannot delete indirectly linked object '%s'",
2015 "Cannot delete object '%s' from scene '%s', indirectly used objects need at "
2042 if (gpl->parent !=
NULL) {
2043 if (gpl->parent == ob) {
2053 if ((changed_count + tagged_count) == 0) {
2057 if (tagged_count > 0) {
2099 ot->
srna,
"use_global", 0,
"Delete Globally",
"Remove object from all scenes");
2201 if (
a->ob != b->
ob) {
2205 if (
a->type != b->
type) {
2214 if (
a->persistent_id[i] == INT_MAX) {
2239 if (
a->persistent_id[i] == INT_MAX) {
2259 const bool use_base_parent,
2260 const bool use_hierarchy)
2280 if (use_hierarchy) {
2283 if (use_base_parent) {
2342 if (is_dupli_instancer && instancer_gh) {
2352 Object *ob_src = dob->ob;
2360 if (use_hierarchy) {
2370 dob_key.
ob = ob_src_par;
2371 dob_key.
type = dob->type;
2374 &dob->persistent_id[1],
2393 ob_dst->
parent = ob_dst_par;
2396 if (use_base_parent && ob_dst->
parent ==
NULL) {
2399 if (instancer_gh !=
NULL) {
2407 &dob->persistent_id[1],
2412 if (ob_dst_par ==
NULL) {
2415 ob_dst_par = base->
object;
2418 ob_dst->
parent = ob_dst_par;
2434 if (ob->proxy_group == base->
object) {
2436 ob->proxy_from =
NULL;
2492 ot->
name =
"Make Instances Real";
2493 ot->
description =
"Make instanced objects attached to this object real";
2494 ot->
idname =
"OBJECT_OT_duplicates_make_real";
2508 "Parent newly created objects to the original instancer");
2510 ot->
srna,
"use_hierarchy", 0,
"Keep Hierarchy",
"Maintain parent child relationships");
2520 {
OB_CURVE,
"CURVE", ICON_OUTLINER_OB_CURVE,
"Curve",
"Curve from Mesh or Text objects"},
2523 ICON_OUTLINER_OB_MESH,
2525 #ifdef WITH_POINT_CLOUD
2526 "Mesh from Curve, Surface, Metaball, Text, or Point Cloud objects"},
2528 "Mesh from Curve, Surface, Metaball, or Text objects"},
2532 ICON_OUTLINER_OB_GREASEPENCIL,
2534 "Grease Pencil from Curve or Mesh objects"},
2535 #ifdef WITH_POINT_CLOUD
2538 ICON_OUTLINER_OB_POINTCLOUD,
2540 "Point Cloud from Mesh objects"},
2587 if (other_object->data ==
curve) {
2591 other_object->data = ob->
data;
2635 void *obdata = obn->
data;
2681 int a, mballConverted = 0;
2682 bool gpencilConverted =
false;
2717 Base *base = link->ptr.data;
2727 keep_original =
true;
2731 "Converting some linked object/object data, enforcing 'Keep Original' option to True");
2745 Base *base = link->ptr.data;
2749 if (ob->
type != target) {
2770 if (keep_original) {
2799 float loc[3],
size[3],
rot[3][3], eul[3];
2827 int actcol = ob_gpencil->
actcol;
2828 for (
int slot = 1; slot <= ob_gpencil->
totcol; slot++) {
2829 while (slot <= ob_gpencil->totcol &&
2831 ob_gpencil->
actcol = slot;
2834 if (actcol >= slot) {
2839 ob_gpencil->
actcol = actcol;
2844 if (keep_original) {
2869 if (keep_original) {
2901 if (keep_original) {
2940 if (!keep_original) {
2972 if (keep_original) {
3006 gpencilConverted =
true;
3056 if (keep_original) {
3111 if (!keep_original) {
3112 if (mballConverted) {
3127 if (ob_mball->flag &
OB_DONE) {
3137 if (gpencilConverted) {
3140 if (ob_delete->flag &
OB_DONE) {
3155 BASACT(view_layer) = basact;
3198 ot->
description =
"Convert selected objects to another type";
3217 "Keep original objects instead of replacing them");
3226 "Threshold to determine ends of the strokes",
3240 "Offset strokes from fill",
3326 if (basen ==
NULL) {
3374 if (basen ==
NULL) {
3379 if (
BASACT(view_layer) == base) {
3408 ot->
name =
"Duplicate Objects";
3410 ot->
idname =
"OBJECT_OT_duplicate";
3424 "Duplicate object but not object data, linking to the original data");
3473 if (basen ==
NULL) {
3509 ot->
name =
"Add Named Object";
3511 ot->
idname =
"OBJECT_OT_add_named";
3525 "Duplicate object but not object data, linking to the original data");
3602 float imat_test[4][4];
3606 "Active object final transform has one or more zero scaled axes");
3617 ot->
description =
"Join selected objects into active object";
3673 ot->
name =
"Join as Shapes";
3674 ot->
description =
"Copy the current resulting shape of another selected object to this one";
3675 ot->
idname =
"OBJECT_OT_join_shapes";
typedef float(TangentPoint)[2]
Blender kernel action and pose functionality.
void BKE_animdata_free(struct ID *id, const bool do_id_user)
struct AnimData * BKE_animdata_add_id(struct ID *id)
Camera data-block and utility functions.
bool BKE_collection_cycle_find(struct Collection *new_ancestor, struct Collection *collection)
#define FOREACH_SCENE_OBJECT_END
void BKE_collection_object_add_from(struct Main *bmain, struct Scene *scene, struct Object *ob_src, struct Object *ob_dst)
bool BKE_collection_object_add(struct Main *bmain, struct Collection *collection, struct Object *ob)
bool BKE_collection_has_object(struct Collection *collection, const struct Object *ob)
bool BKE_scene_collections_object_remove(struct Main *bmain, struct Scene *scene, struct Object *object, const bool free_us)
#define FOREACH_SCENE_OBJECT_BEGIN(scene, _instance)
void BKE_constraints_free(struct ListBase *list)
struct Scene * CTX_data_scene(const bContext *C)
struct Object * CTX_data_edit_object(const bContext *C)
int CTX_data_selected_editable_bases(const bContext *C, ListBase *list)
struct Base * CTX_data_active_base(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
#define CTX_DATA_BEGIN(C, Type, instance, member)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct Collection * CTX_data_collection(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct RegionView3D * CTX_wm_region_view3d(const bContext *C)
void BKE_curve_dimension_update(struct Curve *cu)
void CustomData_MeshMasks_update(CustomData_MeshMasks *mask_dst, const CustomData_MeshMasks *mask_src)
const CustomData_MeshMasks CD_MASK_MESH
display list (or rather multi purpose list) stuff.
void BKE_displist_make_curveTypes(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, const bool for_render, const bool for_orco)
void BKE_displist_make_mball(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
struct ListBase * object_duplilist(struct Depsgraph *depsgraph, struct Scene *sce, struct Object *ob)
void free_object_duplilist(struct ListBase *lb)
struct PartDeflect * BKE_partdeflect_new(int type)
bool BKE_vfont_to_curve_ex(struct Object *ob, struct Curve *cu, int mode, struct ListBase *r_nubase, const char32_t **r_text, int *r_text_len, bool *r_text_free, struct CharTrans **r_chartransdata)
bool BKE_geometry_set_has_instances(const struct GeometrySet *geometry_set)
void BKE_gpencil_convert_curve(struct Main *bmain, struct Scene *scene, struct Object *ob_gp, struct Object *ob_cu, const bool use_collections, const float scale_thickness, const float sample)
bool BKE_gpencil_convert_mesh(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob_gp, struct Object *ob_mesh, const float angle, const int thickness, const float offset, const float matrix[4][4], const int frame_offset, const bool use_seams, const bool use_faces)
bool BKE_gpencil_modifier_unique_name(struct ListBase *modifiers, struct GpencilModifierData *gmd)
struct GpencilModifierData * BKE_gpencil_modifier_new(int type)
General operations for hairs.
struct LayerCollection * BKE_layer_collection_get_active(struct ViewLayer *view_layer)
struct LayerCollection * BKE_layer_collection_activate_parent(struct ViewLayer *view_layer, struct LayerCollection *lc)
struct Base * BKE_view_layer_base_find(struct ViewLayer *view_layer, struct Object *ob)
struct ID * BKE_id_copy(struct Main *bmain, const struct ID *id)
void id_us_min(struct ID *id)
void BKE_main_id_tag_all(struct Main *mainvar, const int tag, const bool value)
void BKE_main_id_clear_newpoins(struct Main *bmain)
void id_us_plus(struct ID *id)
void BKE_main_id_tag_listbase(struct ListBase *lb, const int tag, const bool value)
struct ID * BKE_libblock_find_name(struct Main *bmain, const short type, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
size_t BKE_id_multi_tagged_delete(struct Main *bmain) ATTR_NONNULL()
@ LIB_ID_DUPLICATE_IS_ROOT_ID
@ LIB_ID_DUPLICATE_IS_SUBPROCESS
bool BKE_library_ID_is_indirectly_used(struct Main *bmain, void *idv)
void void BKE_libblock_relink_to_newid(struct ID *id) ATTR_NONNULL()
General operations, lookup, etc. for blender lights.
General operations for probes.
void BKE_lightprobe_type_set(struct LightProbe *probe, const short lightprobe_type)
#define FOREACH_MAIN_ID_END
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id)
General operations, lookup, etc. for materials.
bool BKE_object_material_slot_remove(struct Main *bmain, struct Object *ob)
bool BKE_object_material_slot_used(struct ID *id, short actcol)
struct Material * BKE_gpencil_material(struct Object *ob, short act)
void BKE_object_materials_test(struct Main *bmain, struct Object *ob, struct ID *id)
short * BKE_id_material_len_p(struct ID *id)
struct Object * BKE_mball_basis_find(struct Scene *scene, struct Object *ob)
This function finds the basis MetaBall.
bool BKE_mball_is_basis(struct Object *ob)
Test, if ob is a basis meta-ball.
struct Mesh * BKE_mesh_new_from_object_to_bmain(struct Main *bmain, struct Depsgraph *depsgraph, struct Object *object, bool preserve_all_data_layers)
void BKE_mesh_edges_set_draw_render(struct Mesh *me)
void BKE_mesh_nomain_to_mesh(struct Mesh *mesh_src, struct Mesh *mesh_dst, struct Object *ob, const struct CustomData_MeshMasks *mask, bool take_ownership)
void BKE_pointcloud_to_mesh(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
void BKE_mesh_from_metaball(struct ListBase *lb, struct Mesh *me)
struct Mesh * BKE_mesh_add(struct Main *bmain, const char *name)
void BKE_mesh_to_pointcloud(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
struct Mesh * BKE_mesh_copy_for_eval(struct Mesh *source, bool reference)
void BKE_mesh_to_curve(struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
struct Mesh * mesh_get_eval_final(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
void BKE_nlastrip_validate_name(struct AnimData *adt, struct NlaStrip *strip)
struct NlaStrip * BKE_nla_add_soundstrip(struct Main *bmain, struct Scene *scene, struct Speaker *speaker)
struct NlaTrack * BKE_nlatrack_add(struct AnimData *adt, struct NlaTrack *prev, bool is_liboverride)
bool BKE_nlatrack_add_strip(struct NlaTrack *nlt, struct NlaStrip *strip, const bool is_liboverride)
General operations, lookup, etc. for blender objects.
bool BKE_object_obdata_is_libdata(const struct Object *ob)
void BKE_object_free_modifiers(struct Object *ob, const int flag)
void BKE_object_obdata_size_init(struct Object *ob, const float size)
void BKE_object_empty_draw_type_set(struct Object *ob, const int value)
struct Object * BKE_object_add(struct Main *bmain, struct ViewLayer *view_layer, int type, const char *name) ATTR_NONNULL(1
void BKE_object_free_shaderfx(struct Object *ob, const int flag)
void BKE_object_to_mat4(struct Object *ob, float r_mat[4][4])
void BKE_object_free_curve_cache(struct Object *ob)
struct Object * BKE_object_duplicate(struct Main *bmain, struct Object *ob, uint dupflag, const uint duplicate_options)
int BKE_object_obdata_to_type(const struct ID *id) ATTR_NONNULL(1)
struct Object * BKE_object_add_for_data(struct Main *bmain, struct ViewLayer *view_layer, int type, const char *name, struct ID *data, bool do_id_user) ATTR_RETURNS_NONNULL
void BKE_object_apply_mat4(struct Object *ob, const float mat[4][4], const bool use_compat, const bool use_parent)
bool BKE_object_is_in_editmode(const struct Object *ob)
General operations for point-clouds.
void BKE_report(ReportList *reports, ReportType type, const char *message)
void BKE_reportf(ReportList *reports, ReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_scene_graph_update_tagged(struct Depsgraph *depsgraph, struct Main *bmain)
void BKE_scene_cursor_rot_to_mat3(const struct View3DCursor *cursor, float mat[3][3])
void BKE_scene_object_base_flag_sync_from_base(struct Base *base)
General operations for speakers.
unsigned int BLI_ghashutil_ptrhash(const void *key)
GHash * BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void BLI_ghash_insert(GHash *gh, void *key, void *val)
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
GHash * BLI_ghash_ptr_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_ghash_ensure_p(GHash *gh, void *key, void ***r_val) ATTR_WARN_UNUSED_RESULT
#define BLI_ghashutil_inthash(key)
void * BLI_ghash_lookup(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void mul_m3_v3(const float M[3][3], float r[3])
void mul_mat3_m4_fl(float R[4][4], float f)
void copy_m3_m4(float m1[3][3], const float m2[4][4])
void unit_m4(float m[4][4])
void copy_m4_m3(float m1[4][4], const float m2[3][3])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void mat4_to_loc_rot_size(float loc[3], float rot[3][3], float size[3], const float wmat[4][4])
bool invert_m3_m3(float R[3][3], const float A[3][3])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
bool invert_m3(float R[3][3])
void mul_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
void eul_to_mat3(float mat[3][3], const float eul[3])
void axis_angle_to_quat(float r[4], const float axis[3], const float angle)
void quat_to_eul(float eul[3], const float quat[4])
void mat3_normalized_to_eul(float eul[3], const float mat[3][3])
void mul_qt_qtqt(float q[4], const float a[4], const float b[4])
void mat3_to_eul(float eul[3], const float mat[3][3])
void copy_qt_qt(float q[4], const float a[4])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void zero_v3(float r[3])
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
#define BLT_I18NCONTEXT_ID_ID
#define BLT_I18NCONTEXT_ID_LIGHT
#define BLT_I18NCONTEXT_ID_OBJECT
#define CTX_DATA_(context, msgid)
struct Depsgraph Depsgraph
void DEG_id_type_tag(struct Main *bmain, short id_type)
void DEG_id_tag_update_ex(struct Main *bmain, struct ID *id, int flag)
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_graph_tag_relations_update(struct Depsgraph *graph)
void DEG_relations_tag_update(struct Main *bmain)
struct Object * DEG_get_original_object(struct Object *object)
struct ID * DEG_get_evaluated_id(const struct Depsgraph *depsgraph, struct ID *id)
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
#define ID_EXTRA_USERS(id)
@ ID_RECALC_COPY_ON_WRITE
#define ID_IS_LINKED(_id)
#define ID_REAL_USERS(id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
#define ID_NEW_SET(_id, _idn)
Object groups, one object can be in many groups at once.
@ eGpencilModifierType_Lineart
#define GPENCIL_ANY_MODE(gpd)
Object is a sort of wrapper for general info.
#define OBEDIT_FROM_VIEW_LAYER(view_layer)
#define BASACT(_view_layer)
struct MetaElem * ED_mball_add_primitive(struct bContext *C, struct Object *obedit, bool obedit_is_new, float mat[4][4], float dia, int type)
int ED_mesh_shapes_join_objects_exec(struct bContext *C, struct wmOperator *op)
int ED_mesh_join_objects_exec(struct bContext *C, struct wmOperator *op)
void ED_object_base_select(struct Base *base, eObjectSelect_Mode mode)
bool ED_object_editmode_exit_ex(struct Main *bmain, struct Scene *scene, struct Object *obedit, int flag)
#define OBJECT_ADD_SIZE_MAXF
bool ED_object_editmode_enter_ex(struct Main *bmain, struct Scene *scene, struct Object *ob, int flag)
void ED_object_base_activate(struct bContext *C, struct Base *base)
bool ED_object_base_deselect_all(struct ViewLayer *view_layer, struct View3D *v3d, int action)
void ED_outliner_select_sync_from_object_tag(struct bContext *C)
void ED_rigidbody_object_remove(struct Main *bmain, struct Scene *scene, struct Object *ob)
bool ED_operator_screenactive(struct bContext *C)
bool ED_operator_objectmode(struct bContext *C)
bool ED_operator_scene_editable(struct bContext *C)
float ED_scene_grid_scale(const struct Scene *scene, const char **r_grid_unit)
float ED_view3d_grid_scale(const struct Scene *scene, struct View3D *v3d, const char **r_grid_unit)
void ED_view3d_cursor3d_position(struct bContext *C, const int mval[2], const bool use_depth, float r_cursor_co[3])
struct Object * ED_view3d_give_object_under_cursor(struct bContext *C, const int mval[2])
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
const EnumPropertyItem * RNA_collection_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
void uiLayoutSetActive(uiLayout *layout, bool active)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
EditBone * ED_armature_ebone_add_primitive(Object *obedit_arm, float length, bool view_aligned)
int ED_armature_join_objects_exec(bContext *C, wmOperator *op)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
const Depsgraph * depsgraph
int ED_curve_join_objects_exec(bContext *C, wmOperator *op)
Nurb * ED_curve_add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4], int type, int newob)
void ED_gpencil_create_lineart(bContext *C, Object *ob)
void ED_gpencil_create_monkey(bContext *C, Object *ob, float mat[4][4])
void ED_gpencil_create_stroke(bContext *C, Object *ob, float mat[4][4])
int ED_gpencil_join_objects_exec(bContext *C, wmOperator *op)
Object * ED_gpencil_add_object(bContext *C, const float loc[3], ushort local_view_bits)
void ED_gpencil_add_defaults(bContext *C, Object *ob)
void *(* MEM_dupallocN)(const void *vmemh)
int main(int argc, char **argv)
static void object_add_ui(bContext *UNUSED(C), wmOperator *op)
static void view_align_update(struct Main *UNUSED(main), struct Scene *UNUSED(scene), struct PointerRNA *ptr)
static bool object_gpencil_add_poll(bContext *C)
void ED_object_add_unit_props_size(wmOperatorType *ot)
static uint dupliobject_hash(const void *ptr)
static const EnumPropertyItem convert_target_items[]
static int object_delete_exec(bContext *C, wmOperator *op)
static bool object_convert_poll(bContext *C)
void OBJECT_OT_drop_named_image(wmOperatorType *ot)
static const EnumPropertyItem align_options[]
void OBJECT_OT_convert(wmOperatorType *ot)
void OBJECT_OT_speaker_add(wmOperatorType *ot)
static bool object_hair_add_poll(bContext *C)
static int collection_instance_add_exec(bContext *C, wmOperator *op)
static int empty_drop_named_image_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int object_add_drop_xy_generic_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int object_instance_add_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool dupliobject_instancer_cmp(const void *a_, const void *b_)
void ED_object_rotation_from_view(bContext *C, float rot[3], const char align_axis)
void OBJECT_OT_metaball_add(wmOperatorType *ot)
void OBJECT_OT_add_named(wmOperatorType *ot)
void OBJECT_OT_duplicate(wmOperatorType *ot)
void OBJECT_OT_effector_add(wmOperatorType *ot)
bool ED_object_add_generic_get_opts(bContext *C, wmOperator *op, const char view_align_axis, float loc[3], float rot[3], float scale[3], bool *enter_editmode, ushort *local_view_bits, bool *is_view_aligned)
static int join_shapes_exec(bContext *C, wmOperator *op)
void OBJECT_OT_light_add(wmOperatorType *ot)
Object * ED_object_add_type(bContext *C, const int type, const char *name, const float loc[3], const float rot[3], const bool enter_editmode, const ushort local_view_bits)
static bool dupliobject_cmp(const void *a_, const void *b_)
void ED_object_base_init_transform_on_add(Object *object, const float loc[3], const float rot[3])
void OBJECT_OT_delete(wmOperatorType *ot)
static void object_data_convert_ensure_curve_cache(Depsgraph *depsgraph, Scene *scene, Object *ob)
void ED_object_add_unit_props_radius_ex(wmOperatorType *ot, float default_value)
static const char * get_effector_defname(ePFieldType type)
void OBJECT_OT_empty_add(wmOperatorType *ot)
void OBJECT_OT_lightprobe_add(wmOperatorType *ot)
static int object_add_named_exec(bContext *C, wmOperator *op)
Object * ED_object_add_type_with_obdata(bContext *C, const int type, const char *name, const float loc[3], const float rot[3], const bool enter_editmode, const ushort local_view_bits, ID *obdata)
void ED_object_base_free_and_unlink(Main *bmain, Scene *scene, Object *ob)
static int object_pointcloud_add_exec(bContext *C, wmOperator *op)
static void object_add_drop_xy_props(wmOperatorType *ot)
static const char * get_lightprobe_defname(int type)
static bool object_add_drop_xy_get(bContext *C, wmOperator *op, int(*r_mval)[2])
void OBJECT_OT_duplicates_make_real(wmOperatorType *ot)
static int object_add_text_exec(bContext *C, wmOperator *op)
void OBJECT_OT_text_add(wmOperatorType *ot)
void ED_object_location_from_view(bContext *C, float loc[3])
static void object_convert_ui(bContext *C, wmOperator *op)
void OBJECT_OT_add(wmOperatorType *ot)
static int object_add_exec(bContext *C, wmOperator *op)
float ED_object_new_primitive_matrix(bContext *C, Object *obedit, const float loc[3], const float rot[3], float r_primmat[4][4])
static int lightprobe_add_exec(bContext *C, wmOperator *op)
static uint dupliobject_instancer_hash(const void *ptr)
static int object_light_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_pointcloud_add(wmOperatorType *ot)
static int object_empty_add_exec(bContext *C, wmOperator *op)
static int object_speaker_add_exec(bContext *C, wmOperator *op)
static int object_join_exec(bContext *C, wmOperator *op)
static bool object_has_geometry_set_instances(const Object *object_eval)
static Base * object_add_duplicate_internal(Main *bmain, Scene *scene, ViewLayer *view_layer, Object *ob, const eDupli_ID_Flags dupflag, const eLibIDDuplicateFlags duplicate_options)
static bool object_add_drop_xy_is_set(const wmOperator *op)
const EnumPropertyItem rna_enum_light_type_items[]
static int object_duplicates_make_real_exec(bContext *C, wmOperator *op)
static EnumPropertyItem lightprobe_type_items[]
static void make_object_duplilist_real(bContext *C, Depsgraph *depsgraph, Scene *scene, Base *base, const bool use_base_parent, const bool use_hierarchy)
void ED_object_base_free_and_unlink_no_indirect_check(Main *bmain, Scene *scene, Object *ob)
static bool join_shapes_poll(bContext *C)
static int object_data_instance_add_exec(bContext *C, wmOperator *op)
void ED_object_rotation_from_quat(float rot[3], const float viewquat[4], const char align_axis)
static int duplicate_exec(bContext *C, wmOperator *op)
static const EnumPropertyItem field_type_items[]
static int object_armature_add_exec(bContext *C, wmOperator *op)
static int object_metaball_add_exec(bContext *C, wmOperator *op)
static int object_camera_add_exec(bContext *C, wmOperator *op)
static int object_convert_exec(bContext *C, wmOperator *op)
Base * ED_object_add_duplicate(Main *bmain, Scene *scene, ViewLayer *view_layer, Base *base, const eDupli_ID_Flags dupflag)
void OBJECT_OT_hair_add(wmOperatorType *ot)
void OBJECT_OT_join(wmOperatorType *ot)
static int effector_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_collection_instance_add(wmOperatorType *ot)
void OBJECT_OT_armature_add(wmOperatorType *ot)
static void copy_object_set_idnew(bContext *C)
void OBJECT_OT_camera_add(wmOperatorType *ot)
static void object_data_convert_curve_to_mesh(Main *bmain, Depsgraph *depsgraph, Object *ob)
void ED_object_add_mesh_props(wmOperatorType *ot)
static EnumPropertyItem rna_enum_gpencil_add_stroke_depth_order_items[]
static Base * duplibase_for_convert(Main *bmain, Depsgraph *depsgraph, Scene *scene, ViewLayer *view_layer, Base *base, Object *ob)
static bool object_pointcloud_add_poll(bContext *C)
void OBJECT_OT_join_shapes(wmOperatorType *ot)
static int object_gpencil_add_exec(bContext *C, wmOperator *op)
static int object_hair_add_exec(bContext *C, wmOperator *op)
void ED_object_add_generic_props(wmOperatorType *ot, bool do_editmode)
static bool object_join_poll(bContext *C)
void OBJECT_OT_gpencil_add(wmOperatorType *ot)
void ED_object_add_unit_props_radius(wmOperatorType *ot)
static const char * get_light_defname(int type)
void OBJECT_OT_data_instance_add(wmOperatorType *ot)
const EnumPropertyItem rna_enum_id_type_items[]
void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
int RNA_int_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_struct_type_find_property(StructRNA *srna, const char *identifier)
void RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop, char *value)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value)
float RNA_float_get(PointerRNA *ptr, const char *name)
void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const float *values)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool RNA_struct_idprops_unset(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_float_default(PropertyRNA *prop, float value)
PropertyRNA * RNA_def_float_distance(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
PropertyRNA * RNA_def_float_vector_xyz(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_update_runtime(PropertyRNA *prop, const void *func)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
PropertyRNA * RNA_def_float_rotation(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
const EnumPropertyItem rna_enum_object_empty_drawtype_items[]
const EnumPropertyItem rna_enum_metaelem_type_items[]
const EnumPropertyItem rna_enum_object_gpencil_type_items[]
const EnumPropertyItem rna_enum_object_type_items[]
const EnumPropertyItem DummyRNA_NULL_items[]
unsigned short local_view_bits
struct Collection * collection
struct Collection * source_collection
struct Material * target_material
struct Object * source_object
struct CurveCache * curve_cache
struct GeometrySet * geometry_set_eval
struct Object * proxy_group
struct Collection * instance_collection
struct Object * proxy_from
struct RigidBodyOb * rigidbody_object
ListBase greasepencil_modifiers
struct RigidBodyCon * rigidbody_constraint
struct CustomData_MeshMasks customdata_mask
unsigned short local_view_uuid
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* ui)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
struct wmOperatorType * type
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_operator_properties_confirm_or_exec(wmOperatorType *ot)
int WM_operator_confirm_or_exec(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
ID * WM_operator_drop_load_path(struct bContext *C, wmOperator *op, const short idcode)
int WM_enum_search_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
void WM_operator_view3d_unit_defaults(struct bContext *C, struct wmOperator *op)
Scene * WM_window_get_active_scene(const wmWindow *win)