|
Blender V4.5
|
#include <cmath>#include <cstdio>#include <cstring>#include <optional>#include "CLG_log.h"#include "MEM_guardedalloc.h"#include "DNA_anim_types.h"#include "DNA_armature_types.h"#include "DNA_camera_types.h"#include "DNA_collection_types.h"#include "DNA_constraint_types.h"#include "DNA_curve_types.h"#include "DNA_defaults.h"#include "DNA_dynamicpaint_types.h"#include "DNA_effect_types.h"#include "DNA_fluid_types.h"#include "DNA_gpencil_legacy_types.h"#include "DNA_gpencil_modifier_types.h"#include "DNA_grease_pencil_types.h"#include "DNA_key_types.h"#include "DNA_lattice_types.h"#include "DNA_light_types.h"#include "DNA_lightprobe_types.h"#include "DNA_material_types.h"#include "DNA_mesh_types.h"#include "DNA_meta_types.h"#include "DNA_movieclip_types.h"#include "DNA_nla_types.h"#include "DNA_object_fluidsim_types.h"#include "DNA_object_types.h"#include "DNA_pointcloud_types.h"#include "DNA_rigidbody_types.h"#include "DNA_scene_types.h"#include "DNA_shader_fx_types.h"#include "DNA_view3d_types.h"#include "BLI_kdtree.h"#include "BLI_linklist.h"#include "BLI_listbase.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector_types.hh"#include "BLI_string.h"#include "BLI_threads.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_action.hh"#include "BKE_anim_data.hh"#include "BKE_anim_path.h"#include "BKE_anim_visualization.h"#include "BKE_animsys.h"#include "BKE_armature.hh"#include "BKE_asset.hh"#include "BKE_bpath.hh"#include "BKE_camera.h"#include "BKE_collection.hh"#include "BKE_constraint.h"#include "BKE_crazyspace.hh"#include "BKE_curve.hh"#include "BKE_curves.hh"#include "BKE_deform.hh"#include "BKE_displist.h"#include "BKE_duplilist.hh"#include "BKE_editmesh.hh"#include "BKE_editmesh_cache.hh"#include "BKE_effect.h"#include "BKE_fcurve.hh"#include "BKE_geometry_set.hh"#include "BKE_geometry_set_instances.hh"#include "BKE_global.hh"#include "BKE_gpencil_geom_legacy.h"#include "BKE_gpencil_legacy.h"#include "BKE_gpencil_modifier_legacy.h"#include "BKE_grease_pencil.hh"#include "BKE_idprop.hh"#include "BKE_idtype.hh"#include "BKE_image.hh"#include "BKE_key.hh"#include "BKE_lattice.hh"#include "BKE_layer.hh"#include "BKE_lib_id.hh"#include "BKE_lib_query.hh"#include "BKE_lib_remap.hh"#include "BKE_library.hh"#include "BKE_light.h"#include "BKE_lightprobe.h"#include "BKE_linestyle.h"#include "BKE_main.hh"#include "BKE_material.hh"#include "BKE_mball.hh"#include "BKE_mesh.hh"#include "BKE_mesh_wrapper.hh"#include "BKE_modifier.hh"#include "BKE_multires.hh"#include "BKE_node.hh"#include "BKE_object.hh"#include "BKE_object_types.hh"#include "BKE_paint.hh"#include "BKE_particle.h"#include "BKE_pointcache.h"#include "BKE_pointcloud.hh"#include "BKE_pose_backup.h"#include "BKE_preview_image.hh"#include "BKE_rigidbody.h"#include "BKE_scene.hh"#include "BKE_shader_fx.h"#include "BKE_softbody.h"#include "BKE_speaker.h"#include "BKE_subdiv_ccg.hh"#include "BKE_subsurf.hh"#include "BKE_vfont.hh"#include "BKE_volume.hh"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_query.hh"#include "DRW_engine.hh"#include "BLO_read_write.hh"#include "BLO_readfile.hh"#include "SEQ_sequencer.hh"#include "ANIM_action_legacy.hh"#include "RNA_prototypes.hh"Go to the source code of this file.
Classes | |
| struct | ObTfmBack |
| struct | ObjectModifierUpdateContext |
| struct | Bounds< T > |
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
| #define | VPARENT_THREADING_HACK |
| #define | TFMCPY(_v) |
| #define | TFMCPY3D(_v) |
| #define | TFMCPY4D(_v) |
| #define | TFMCPY(_v) |
| #define | TFMCPY3D(_v) |
| #define | TFMCPY4D(_v) |
Typedefs | |
| using | float3 |
| using | float4x4 |
Functions | |
| static void | copy_object_pose (Object *obn, const Object *ob, const int flag) |
| static void | object_init_data (ID *id) |
| static void | object_copy_data (Main *bmain, std::optional< Library * >, ID *id_dst, const ID *id_src, const int flag) |
| static void | object_free_data (ID *id) |
| static void | library_foreach_modifiersForeachIDLink (void *user_data, Object *, ID **id_pointer, const LibraryForeachIDCallbackFlag cb_flag) |
| static void | library_foreach_gpencil_modifiersForeachIDLink (void *user_data, Object *, ID **id_pointer, const LibraryForeachIDCallbackFlag cb_flag) |
| static void | library_foreach_shaderfxForeachIDLink (void *user_data, Object *, ID **id_pointer, const LibraryForeachIDCallbackFlag cb_flag) |
| static void | library_foreach_constraintObjectLooper (bConstraint *, ID **id_pointer, bool is_reference, void *user_data) |
| static void | library_foreach_particlesystemsObjectLooper (ParticleSystem *, ID **id_pointer, void *user_data, const LibraryForeachIDCallbackFlag cb_flag) |
| static void | object_foreach_id (ID *id, LibraryForeachIDData *data) |
| static void | object_foreach_path_pointcache (ListBase *ptcache_list, BPathForeachPathData *bpath_data) |
| static void | object_foreach_path (ID *id, BPathForeachPathData *bpath_data) |
| static void | object_foreach_cache (ID *id, IDTypeForeachCacheFunctionCallback function_callback, void *user_data) |
| static void | object_blend_write (BlendWriter *writer, ID *id, const void *id_address) |
| static void | direct_link_nlastrips (BlendDataReader *reader, ListBase *strips) |
| static void | object_blend_read_data (BlendDataReader *reader, ID *id) |
| static void | object_blend_read_after_liblink (BlendLibReader *reader, ID *id) |
| PartEff * | BKE_object_do_version_give_parteff_245 (Object *ob) |
| static void | object_lib_override_apply_post (ID *id_dst, ID *id_src) |
| static IDProperty * | object_asset_dimensions_property (Object *ob) |
| static void | object_asset_metadata_ensure (void *asset_ptr, AssetMetaData *asset_data) |
| void | BKE_object_workob_clear (Object *workob) |
| void | BKE_object_free_particlesystems (Object *ob) |
| void | BKE_object_free_softbody (Object *ob) |
| void | BKE_object_free_curve_cache (Object *ob) |
| void | BKE_object_free_modifiers (Object *ob, const int flag) |
| void | BKE_object_free_shaderfx (Object *ob, const int flag) |
| void | BKE_object_modifier_hook_reset (Object *ob, HookModifierData *hmd) |
| void | BKE_object_modifier_gpencil_hook_reset (Object *ob, HookGpencilModifierData *hmd) |
| void | BKE_object_modifier_set_active (Object *ob, ModifierData *md) |
| ModifierData * | BKE_object_active_modifier (const Object *ob) |
| bool | BKE_object_supports_modifiers (const Object *ob) |
| bool | BKE_object_support_modifier_type_check (const Object *ob, int modifier_type) |
| static bool | object_modifier_type_copy_check (ModifierType md_type) |
| static ParticleSystem * | object_copy_modifier_particle_system_ensure (Main *bmain, const Scene *scene, Object *ob_dst, ParticleSystem *psys_src) |
| bool | BKE_object_copy_modifier (Main *bmain, const Scene *scene, Object *ob_dst, const Object *ob_src, const ModifierData *md_src) |
| bool | BKE_object_modifier_stack_copy (Object *ob_dst, const Object *ob_src, const bool do_copy_all, const int flag_subdata) |
| void | BKE_object_link_modifiers (Object *ob_dst, const Object *ob_src) |
| static void | copy_ccg_data (Mesh *mesh_destination, Mesh *mesh_source, const eCustomDataType layer_type) |
| static void | object_update_from_subsurf_ccg (Object *object) |
| void | BKE_object_eval_assign_data (Object *object_eval, ID *data_eval, bool is_owned) |
| void | BKE_object_free_derived_caches (Object *ob) |
| void | BKE_object_free_caches (Object *object) |
| bool | BKE_object_is_in_editmode (const Object *ob) |
| bool | BKE_object_is_in_editmode_vgroup (const Object *ob) |
| bool | BKE_object_data_is_in_editmode (const Object *ob, const ID *id) |
| char * | BKE_object_data_editmode_flush_ptr_get (ID *id) |
| bool | BKE_object_is_in_wpaint_select_vert (const Object *ob) |
| bool | BKE_object_has_mode_data (const Object *ob, eObjectMode object_mode) |
| bool | BKE_object_is_mode_compat (const Object *ob, eObjectMode object_mode) |
| int | BKE_object_visibility (const Object *ob, const int dag_eval_mode) |
| bool | BKE_object_exists_check (Main *bmain, const Object *obtest) |
| static const char * | get_obdata_defname (int type) |
| static void | object_init (Object *ob, const short ob_type) |
| void * | BKE_object_obdata_add_from_type (Main *bmain, int type, const char *name) |
| int | BKE_object_obdata_to_type (const ID *id) |
| Object * | BKE_object_add_only_object (Main *bmain, int type, const char *name) |
| static Object * | object_add_common (Main *bmain, const Scene *scene, ViewLayer *view_layer, int type, const char *name) |
| Object * | BKE_object_add (Main *bmain, Scene *scene, ViewLayer *view_layer, int type, const char *name) |
| Object * | BKE_object_add_from (Main *bmain, Scene *scene, ViewLayer *view_layer, int type, const char *name, Object *ob_src) |
| Object * | BKE_object_add_for_data (Main *bmain, const Scene *scene, ViewLayer *view_layer, int type, const char *name, ID *data, bool do_id_user) |
| void | BKE_object_copy_softbody (Object *ob_dst, const Object *ob_src, const int flag) |
| ParticleSystem * | BKE_object_copy_particlesystem (ParticleSystem *psys, const int flag) |
| void | BKE_object_copy_particlesystems (Object *ob_dst, const Object *ob_src, const int flag) |
| bool | BKE_object_pose_context_check (const Object *ob) |
| Object * | BKE_object_pose_armature_get (Object *ob) |
| Object * | BKE_object_pose_armature_get_with_wpaint_check (Object *ob) |
| Object * | BKE_object_pose_armature_get_visible (Object *ob, const Scene *scene, ViewLayer *view_layer, View3D *v3d) |
| Vector< Object * > | BKE_object_pose_array_get_ex (const Scene *scene, ViewLayer *view_layer, View3D *v3d, bool unique) |
| Vector< Object * > | BKE_object_pose_array_get_unique (const Scene *scene, ViewLayer *view_layer, View3D *v3d) |
| Vector< Object * > | BKE_object_pose_array_get (const Scene *scene, ViewLayer *view_layer, View3D *v3d) |
| blender::Vector< Base * > | BKE_object_pose_base_array_get_ex (const Scene *scene, ViewLayer *view_layer, View3D *v3d, bool unique) |
| Vector< Base * > | BKE_object_pose_base_array_get_unique (const Scene *scene, ViewLayer *view_layer, View3D *v3d) |
| Vector< Base * > | BKE_object_pose_base_array_get (const Scene *scene, ViewLayer *view_layer, View3D *v3d) |
| void | BKE_object_transform_copy (Object *ob_tar, const Object *ob_src) |
| Object * | BKE_object_duplicate (Main *bmain, Object *ob, eDupli_ID_Flags dupflag, uint duplicate_options) |
| bool | BKE_object_is_libdata (const Object *ob) |
| bool | BKE_object_obdata_is_libdata (const Object *ob) |
| void | BKE_object_obdata_size_init (Object *ob, const float size) |
Object Matrix Get/Set API | |
| void | BKE_object_scale_to_mat3 (const Object *ob, float mat[3][3]) |
| void | BKE_object_rot_to_mat3 (const Object *ob, float mat[3][3], bool use_drot) |
| void | BKE_object_mat3_to_rot (Object *ob, float mat[3][3], bool use_compat) |
| void | BKE_object_tfm_protected_backup (const Object *ob, ObjectTfmProtectedChannels *obtfm) |
| void | BKE_object_tfm_protected_restore (Object *ob, const ObjectTfmProtectedChannels *obtfm, const short protectflag) |
| void | BKE_object_tfm_copy (Object *object_dst, const Object *object_src) |
| void | BKE_object_to_mat3 (const Object *ob, float r_mat[3][3]) |
| void | BKE_object_to_mat4 (const Object *ob, float r_mat[4][4]) |
| void | BKE_object_matrix_local_get (Object *ob, float r_mat[4][4]) |
| static bool | ob_parcurve (const Object *ob, Object *par, float r_mat[4][4]) |
| static void | ob_parbone (const Object *ob, const Object *par, float r_mat[4][4]) |
| static void | give_parvert (const Object *par, int nr, float vec[3], const bool use_evaluated_indices) |
| static void | ob_parvert3 (const Object *ob, const Object *par, float r_mat[4][4]) |
| void | BKE_object_get_parent_matrix (const Object *ob, Object *par, float r_parentmat[4][4]) |
Object Matrix Evaluation API | |
| static void | solve_parenting (const Object *ob, Object *par, const bool set_origin, float r_obmat[4][4], float r_originmat[3][3]) |
| static void | object_where_is_calc_ex (Depsgraph *depsgraph, Scene *scene, Object *ob, float ctime, RigidBodyWorld *rbw, float r_originmat[3][3]) |
| void | BKE_object_where_is_calc_time (Depsgraph *depsgraph, Scene *scene, Object *ob, float ctime) |
| void | BKE_object_where_is_calc_mat4 (const Object *ob, float r_obmat[4][4]) |
| void | BKE_object_where_is_calc_ex (Depsgraph *depsgraph, Scene *scene, RigidBodyWorld *rbw, Object *ob, float r_originmat[3][3]) |
| void | BKE_object_where_is_calc (Depsgraph *depsgraph, Scene *scene, Object *ob) |
| blender::float4x4 | BKE_object_calc_parent (Depsgraph *depsgraph, Scene *scene, Object *ob) |
| void | BKE_object_apply_mat4_ex (Object *ob, const float mat[4][4], Object *parent, const float parentinv[4][4], const bool use_compat) |
| void | BKE_object_apply_mat4 (Object *ob, const float mat[4][4], const bool use_compat, const bool use_parent) |
| void | BKE_object_apply_parent_inverse (Object *ob) |
Object Bounding Box API | |
| void | BKE_boundbox_init_from_minmax (BoundBox *bb, const float min[3], const float max[3]) |
| void | BKE_boundbox_minmax (const BoundBox &bb, const float4x4 &matrix, float3 &r_min, float3 &r_max) |
| std::optional< blender::Bounds< blender::float3 > > | BKE_object_boundbox_get (const Object *ob) |
| std::optional< Bounds< float3 > > | BKE_object_boundbox_eval_cached_get (const Object *ob) |
| std::optional< Bounds< float3 > > | BKE_object_evaluated_geometry_bounds (const Object *ob) |
Object Dimension Get/Set | |
| |
| static float3 | boundbox_to_dimensions (const Object *ob, const std::optional< Bounds< float3 > > bounds) |
| void | BKE_object_dimensions_get (const Object *ob, float r_vec[3]) |
| void | BKE_object_dimensions_eval_cached_get (const Object *ob, float r_vec[3]) |
| void | BKE_object_dimensions_set_ex (Object *ob, const float value[3], int axis_mask, const float ob_scale_orig[3], const float ob_obmat_orig[4][4]) |
| void | BKE_object_dimensions_set (Object *ob, const float value[3], int axis_mask) |
| void | BKE_object_minmax (Object *ob, float3 &r_min, float3 &r_max) |
| void | BKE_object_empty_draw_type_set (Object *ob, const int value) |
| bool | BKE_object_empty_image_frame_is_visible_in_view3d (const Object *ob, const RegionView3D *rv3d) |
| bool | BKE_object_empty_image_data_is_visible_in_view3d (const Object *ob, const RegionView3D *rv3d) |
| bool | BKE_object_minmax_empty_drawtype (const Object *ob, float r_min[3], float r_max[3]) |
| bool | BKE_object_minmax_dupli (Depsgraph *depsgraph, Scene *scene, Object *ob, float3 &r_min, float3 &r_max, const bool use_hidden) |
| void | BKE_object_foreach_display_point (Object *ob, const float obmat[4][4], void(*func_cb)(const float[3], void *), void *user_data) |
| void | BKE_scene_foreach_display_point (Depsgraph *depsgraph, void(*func_cb)(const float[3], void *), void *user_data) |
Object Transform Channels (Backup/Restore) | |
| void * | BKE_object_tfm_backup (Object *ob) |
| void | BKE_object_tfm_restore (Object *ob, void *obtfm_pt) |
Protected Transform Channel Assignment | |
| void | BKE_object_protected_location_set (Object *ob, const float location[3]) |
| void | BKE_object_protected_scale_set (Object *ob, const float scale[3]) |
| void | BKE_object_protected_rotation_quaternion_set (Object *ob, const float quat[4]) |
| void | BKE_object_protected_rotation_euler_set (Object *ob, const float euler[3]) |
| void | BKE_object_protected_rotation_axisangle_set (Object *ob, const float axis[3], const float angle) |
Object Evaluation/Update API | |
| void | BKE_object_handle_update_ex (Depsgraph *depsgraph, Scene *scene, Object *ob, RigidBodyWorld *rbw) |
| void | BKE_object_handle_update (Depsgraph *depsgraph, Scene *scene, Object *ob) |
| void | BKE_object_sculpt_data_create (Object *ob) |
| bool | BKE_object_obdata_texspace_get (Object *ob, char **r_texspace_flag, float **r_texspace_location, float **r_texspace_size) |
| Mesh * | BKE_object_get_evaluated_mesh_no_subsurf_unchecked (const Object *object) |
| Mesh * | BKE_object_get_evaluated_mesh_no_subsurf (const Object *object) |
| Mesh * | BKE_object_get_evaluated_mesh_unchecked (const Object *object_eval) |
| Mesh * | BKE_object_get_evaluated_mesh (const Object *object_eval) |
| const Mesh * | BKE_object_get_pre_modified_mesh (const Object *object) |
| Mesh * | BKE_object_get_original_mesh (const Object *object) |
| const Mesh * | BKE_object_get_editmesh_eval_final (const Object *object) |
| const Mesh * | BKE_object_get_editmesh_eval_cage (const Object *object) |
| const Mesh * | BKE_object_get_mesh_deform_eval (const Object *object) |
| Lattice * | BKE_object_get_lattice (const Object *object) |
| Lattice * | BKE_object_get_evaluated_lattice (const Object *object) |
Object Point Cache | |
| static int | pc_cmp (const void *a, const void *b) |
| int | BKE_object_insert_ptcache (Object *ob) |
| static int | pc_findindex (ListBase *listbase, int index) |
| void | BKE_object_delete_ptcache (Object *ob, int index) |
Object Data Shape Key Insert | |
| static KeyBlock * | insert_meshkey (Main *bmain, Object *ob, const char *name, const bool from_mix) |
| static KeyBlock * | insert_lattkey (Main *bmain, Object *ob, const char *name, const bool from_mix) |
| static KeyBlock * | insert_curvekey (Main *bmain, Object *ob, const char *name, const bool from_mix) |
Object Shape Key API | |
| KeyBlock * | BKE_object_shapekey_insert (Main *bmain, Object *ob, const char *name, const bool from_mix) |
| bool | BKE_object_shapekey_free (Main *bmain, Object *ob) |
| bool | BKE_object_shapekey_remove (Main *bmain, Object *ob, KeyBlock *kb) |
Object Query API | |
| bool | BKE_object_parent_loop_check (const Object *par, const Object *ob) |
| bool | BKE_object_flag_test_recursive (const Object *ob, short flag) |
| bool | BKE_object_is_child_recursive (const Object *ob_parent, const Object *ob_child) |
| int | BKE_object_is_modified (Scene *scene, Object *ob) |
| bool | BKE_object_moves_in_time (const Object *object, bool recurse_parent) |
| static bool | object_moves_in_time (const Object *object) |
| static bool | object_deforms_in_time (Object *object) |
| static bool | constructive_modifier_is_deform_modified (Object *ob, ModifierData *md) |
| static bool | modifiers_has_animation_check (const Object *ob) |
| int | BKE_object_is_deform_modified (Scene *scene, Object *ob) |
| int | BKE_object_scenes_users_get (Main *bmain, Object *ob) |
| MovieClip * | BKE_object_movieclip_get (Scene *scene, const Object *ob, bool use_default) |
| bool | BKE_object_supports_material_slots (Object *ob) |
Object Runtime | |
| void | BKE_object_runtime_reset (Object *object) |
| void | BKE_object_runtime_reset_on_copy (Object *object, const int) |
| void | BKE_object_runtime_free_data (Object *object) |
Object Relationships | |
| static Object * | obrel_armature_find (Object *ob) |
| static bool | obrel_list_test (Object *ob) |
| static void | obrel_list_add (LinkNode **links, Object *ob) |
| LinkNode * | BKE_object_relational_superset (const Scene *scene, ViewLayer *view_layer, eObjectSet objectSet, eObRelationTypes includeFilter) |
| LinkNode * | BKE_object_groups (Main *bmain, Scene *scene, Object *ob) |
| void | BKE_object_groups_clear (Main *bmain, Scene *scene, Object *ob) |
Object KD-Tree | |
| KDTree_3d * | BKE_object_as_kdtree (Object *ob, int *r_tot) |
Object Modifier Utilities | |
| static void | object_cacheIgnoreClear (Object *ob, int state) |
| static bool | object_modifier_recurse_for_update_subframe (const ObjectModifierUpdateContext &ctx, Object *ob, const bool update_mesh, const int parent_recursion_limit) |
| void | BKE_object_modifier_update_subframe_only_callback (Object *ob, const bool update_mesh, const int parent_recursion_limit, const int modifier_type, blender::FunctionRef< void(Object *object, bool update_mesh)> update_or_tag_fn) |
| void | BKE_object_modifier_update_subframe (Depsgraph *depsgraph, Scene *scene, Object *ob, const bool update_mesh, const int parent_recursion_limit, const float frame, const int modifier_type) |
| void | BKE_object_update_select_id (Main *bmain) |
Object Conversion | |
| Mesh * | BKE_object_to_mesh (Depsgraph *depsgraph, Object *object, bool preserve_all_data_layers) |
| void | BKE_object_to_mesh_clear (Object *object) |
| Curve * | BKE_object_to_curve (Object *object, Depsgraph *depsgraph, bool apply_modifiers) |
| void | BKE_object_to_curve_clear (Object *object) |
| void | BKE_object_check_uids_unique_and_report (const Object *object) |
| SubsurfModifierData * | BKE_object_get_last_subsurf_modifier (const Object *ob) |
| void | BKE_object_replace_data_on_shallow_copy (Object *ob, ID *new_data) |
Variables | |
| static CLG_LogRef | LOG = {"bke.object"} |
| static blender::Mutex | vparent_lock |
| static AssetTypeInfo | AssetType_OB |
| IDTypeInfo | IDType_ID_OB |
| #define DNA_DEPRECATED_ALLOW |
Definition at line 10 of file blenkernel/intern/object.cc.
| #define TFMCPY | ( | _v | ) |
| #define TFMCPY | ( | _v | ) |
Referenced by BKE_object_tfm_copy(), and BKE_object_tfm_protected_backup().
| #define TFMCPY3D | ( | _v | ) |
| #define TFMCPY3D | ( | _v | ) |
Referenced by BKE_object_tfm_copy(), and BKE_object_tfm_protected_backup().
| #define TFMCPY4D | ( | _v | ) |
| #define TFMCPY4D | ( | _v | ) |
Referenced by BKE_object_tfm_copy(), and BKE_object_tfm_protected_backup().
| #define VPARENT_THREADING_HACK |
NOTE(@sergey): Vertex parent modifies original BMesh which is not safe for threading. Ideally such a modification should be handled as a separate DAG update callback for mesh data-block, but for until it is actually supported use simpler solution with a mutex lock.
Definition at line 163 of file blenkernel/intern/object.cc.
| using blender::float3 |
Definition at line 619 of file BLI_math_vector_types.hh.
| using blender::float4x4 |
Definition at line 1012 of file BLI_math_matrix_types.hh.
| void BKE_boundbox_init_from_minmax | ( | BoundBox * | bb, |
| const float | min[3], | ||
| const float | max[3] ) |
Definition at line 3516 of file blenkernel/intern/object.cc.
References max, min, and BoundBox::vec.
Referenced by BKE_object_add_from(), BKE_object_minmax_dupli(), BKE_pchan_minmax(), blender::draw::drw_debug_matrix_as_bbox(), blender::draw::View::frustum_boundbox_calc(), blender::ed::transform::gizmo_3d_foreach_selected(), lineart_geometry_check_visible(), blender::ed::transform::snap_source_closest_fn(), blender::io::alembic::ABCAbstractWriter::update_bounding_box(), blender::eevee::VolumeObjectBounds::VolumeObjectBounds(), and blender::ed::object::voxel_size_edit_invoke().
| void BKE_boundbox_minmax | ( | const BoundBox & | bb, |
| const float4x4 & | matrix, | ||
| float3 & | r_min, | ||
| float3 & | r_max ) |
Definition at line 3528 of file blenkernel/intern/object.cc.
References ARRAY_SIZE, i, blender::math::min_max(), blender::math::transform_point(), and BoundBox::vec.
Referenced by BKE_object_minmax_dupli().
| ModifierData * BKE_object_active_modifier | ( | const Object * | ob | ) |
Definition at line 1240 of file blenkernel/intern/object.cc.
References BLI_assert, ELEM, eModifierFlag_Active, LISTBASE_FOREACH, and Object::modifiers.
Referenced by buttons_context_path_modifier(), blender::ed::object::edit_modifier_poll_generic(), blender::nodes::gizmos::foreach_active_gizmo(), blender::ed::object::geometry_node_tree_copy_assign_exec(), geometry_node_tree_get_from_context(), blender::ed::space_node::get_context_path_node_geometry(), and blender::ed::outliner::tree_element_modifier_state_get().
| Object * BKE_object_add | ( | Main * | bmain, |
| Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| int | type, | ||
| const char * | name ) |
Definition at line 2119 of file blenkernel/intern/object.cc.
References BKE_collection_viewlayer_object_add(), BKE_layer_collection_get_active(), BKE_view_layer_base_find(), BKE_view_layer_base_select_and_set_active(), BKE_view_layer_synced_ensure(), LayerCollection::collection, and object_add_common().
| Object * BKE_object_add_for_data | ( | Main * | bmain, |
| const Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| int | type, | ||
| const char * | name, | ||
| ID * | data, | ||
| bool | do_id_user ) |
Add a new object, but assign the given data-block as the ob->data for the newly created object.
| data | The data-block to assign as ob->data for the new object. This is assumed to be of the correct type. |
| do_id_user | If true, id_us_plus() will be called on data when assigning it to the object. |
Definition at line 2151 of file blenkernel/intern/object.cc.
References BKE_collection_object_add(), BKE_layer_collection_get_active(), BKE_object_add_only_object(), BKE_view_layer_base_deselect_all(), BKE_view_layer_base_find(), BKE_view_layer_base_select_and_set_active(), BKE_view_layer_synced_ensure(), LayerCollection::collection, data, Object::data, DEG_id_tag_update_ex(), Object::id, ID_RECALC_ANIMATION, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, and id_us_plus().
Referenced by blender::ed::object::add_type_with_obdata(), and BKE_object_add_from().
| Object * BKE_object_add_from | ( | Main * | bmain, |
| Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| int | type, | ||
| const char * | name, | ||
| Object * | ob_src ) |
Definition at line 2138 of file blenkernel/intern/object.cc.
References BKE_collection_object_add_from(), BKE_view_layer_base_find(), BKE_view_layer_base_select_and_set_active(), BKE_view_layer_synced_ensure(), and object_add_common().
More general add: creates minimum required data, but without vertices etc.
| bmain | The main to add the object to. May be null for LIB_ID_CREATE_NO_MAIN behavior. |
Definition at line 2089 of file blenkernel/intern/object.cc.
References BKE_libblock_alloc(), get_obdata_defname(), Object::id, ID_OB, id_us_min(), LIB_ID_CREATE_NO_MAIN, and object_init().
Referenced by bc_add_object(), BKE_object_add_for_data(), blender::io::fbx::ArmatureImportContext::create_armature_for_node(), blender::io::obj::CurveFromGeometry::create_curve_object(), blender::io::obj::MeshFromGeometry::create_mesh_object(), blender::io::usd::USDCameraReader::create_object(), blender::io::usd::USDCurvesReader::create_object(), blender::io::usd::USDInstanceReader::create_object(), blender::io::usd::USDLightReader::create_object(), blender::io::usd::USDMeshReader::create_object(), blender::io::usd::USDNurbsReader::create_object(), blender::io::usd::USDPointInstancerReader::create_object(), blender::io::usd::USDPointsReader::create_object(), blender::io::usd::USDShapeReader::create_object(), blender::io::usd::USDSkeletonReader::create_object(), blender::io::usd::USDVolumeReader::create_object(), blender::io::usd::USDXformReader::create_object(), duplicate_ids(), blender::io::fbx::FbxImportContext::import_cameras(), blender::io::fbx::FbxImportContext::import_empties(), blender::io::fbx::FbxImportContext::import_lights(), blender::io::ply::importer_main(), blender::io::stl::importer_main(), loose_data_instantiate_collection_process(), loose_data_instantiate_obdata_process(), blender::bke::tests::MeshObjectTestData::MeshObjectTestData(), Freestyle::BlenderStrokeRenderer::NewMesh(), object_add_common(), blender::io::alembic::AbcCameraReader::readObjectData(), blender::io::alembic::AbcCurveReader::readObjectData(), blender::io::alembic::AbcEmptyReader::readObjectData(), blender::io::alembic::AbcMeshReader::readObjectData(), blender::io::alembic::AbcNurbsReader::readObjectData(), blender::io::alembic::AbcPointsReader::readObjectData(), blender::io::alembic::AbcSubDReader::readObjectData(), blender::animrig::nla::tests::NLASlottedActionTest::SetUp(), blender::animrig::tests::ActionFilterTest::SetUp(), blender::animrig::tests::ActionLayersTest::SetUp(), blender::animrig::tests::AnimationEvaluationTest::SetUp(), blender::animrig::tests::KeyframingTest::SetUp(), blender::animrig::tests::PoseTest::SetUp(), blender::editor::animation::tests::KeylistSummaryTest::SetUp(), blender::interface::tests::CopyDriversToSelected::SetUp(), blender::bke::tests::TEST(), blender::animrig::tests::TEST_F(), blender::ed::animation::tests::TEST_F(), and blender::bke::tests::WholeIDTestData::WholeIDTestData().
| void BKE_object_apply_mat4 | ( | Object * | ob, |
| const float | mat[4][4], | ||
| bool | use_compat, | ||
| bool | use_parent ) |
Definition at line 3453 of file blenkernel/intern/object.cc.
References BKE_object_apply_mat4_ex(), Object::parent, and Object::parentinv.
Referenced by blender::ed::object::apply_objects_internal(), applyarmature_fix_boneparents(), bc_match_scale(), BKE_constraint_apply_for_object(), BKE_object_add_from(), BKE_object_apply_parent_inverse(), DocumentImporter::create_instance_node(), blender::ed::curves::convert_from_particle_system::curves_convert_from_particle_system_exec(), ED_view3d_camera_lock_sync(), blender::ed::object::ignore_parent_tx(), blender::io::ply::importer_main(), blender::io::stl::importer_main(), SkinInfo::link_armature(), blender::ed::object::make_object_duplilist_real(), blender::ed::object::object_add_named_exec(), blender::ed::object::object_apply_location(), object_apply_mat4_with_protect(), blender::ed::object::object_apply_rotation(), blender::ed::object::object_curves_empty_hair_add_exec(), blender::ed::object::object_track_clear_exec(), blender::ed::object::object_xform_array_m4(), blender::ed::object::parent_clear(), blender::ed::object::parent_set_with_depsgraph(), AnimationImporter::read_node_transform(), blender::io::usd::USDXformReader::read_object_data(), set_axis(), set_plane_exec(), blender::io::alembic::AbcObjectReader::setupObjectTransform(), blender::io::obj::transform_object(), blender::io::fbx::ufbx_matrix_to_obj(), view3d_camera_to_view_selected_impl(), and blender::ed::object::visual_transform_apply_exec().
| void BKE_object_apply_mat4_ex | ( | Object * | ob, |
| const float | mat[4][4], | ||
| Object * | parent, | ||
| const float | parentinv[4][4], | ||
| bool | use_compat ) |
Applies the global transformation mat to the ob using a relative parent space if supplied.
| mat | the global transformation mat that the object should be set object to. |
| parent | the parent space in which this object will be set relative to (should probably always be parent_eval). |
| use_compat | true to ensure that rotations are set using the min difference between the old and new orientation. |
Definition at line 3410 of file blenkernel/intern/object.cc.
References BKE_object_get_parent_matrix(), BKE_object_mat3_to_rot(), Object::dloc, Object::dscale, invert_m4_m4(), Object::loc, mat4_to_loc_rot_size(), mul_m4_m4m4(), rot, Object::scale, and sub_v3_v3().
Referenced by BKE_object_add_from(), BKE_object_apply_mat4(), ED_mesh_join_objects_exec(), and ED_view3d_to_object().
| void BKE_object_apply_parent_inverse | ( | Object * | ob | ) |
Use parent's world location and rotation as the child's origin. The parent inverse will become identity when the parent has no shearing. Otherwise, it is non-identity and contains the object's local matrix data that cannot be decomposed into location, rotation and scale.
Assumes the object's world matrix has no shear. Assumes parent exists.
Definition at line 3461 of file blenkernel/intern/object.cc.
References BKE_object_apply_mat4(), BKE_object_get_parent_matrix(), copy_m4_m4(), invert_m4(), invert_m4_m4(), mul_m4_m4_post(), mul_m4_m4m4(), orthogonalize_m4_stable(), Object::parent, and Object::parentinv.
Referenced by BKE_object_add_from(), blender::ed::object::object_parent_inverse_apply_exec(), and blender::ed::object::parent_noinv_set_exec().
| KDTree_3d * BKE_object_as_kdtree | ( | Object * | ob, |
| int * | r_tot ) |
Return a KDTree_3d from the deformed object (in world-space).
| ob | |
| r_tot |
Definition at line 5086 of file blenkernel/intern/object.cc.
References Nurb::bezt, BKE_nurbList_verts_count_without_handles(), BKE_object_get_evaluated_mesh(), BKE_object_get_mesh_deform_eval(), Nurb::bp, CD_ORIGINDEX, CustomData_get_layer(), Object::data, Lattice::def, ListBase::first, i, mul_v3_m4v3(), Nurb::next, Curve::nurb, OB_CURVES_LEGACY, OB_LATTICE, OB_MESH, OB_SURF, ORIGINDEX_NONE, Lattice::pntsu, Nurb::pntsu, Lattice::pntsv, Nurb::pntsv, Lattice::pntsw, blender::Span< T >::size(), tree, Object::type, BezTriple::vec, BPoint::vec, and Mesh::vert_data.
Referenced by blender::ed::object::parent_set_vertex_parent().
Retrieve the bounds of the evaluated object's geometry, stored on the original object as part of the latest evaluation of the active dependency graph. If no such cache exists, fall back to the current bounds of the object's data. For evaluated objects this indirection is unnecessary, and BKE_object_boundbox_get or BKE_object_evaluated_geometry_bounds should be used instead.
Definition at line 3563 of file blenkernel/intern/object.cc.
References BKE_object_boundbox_get(), and Object::runtime.
Referenced by BKE_boundbox_minmax(), BKE_object_dimensions_eval_cached_get(), BKE_object_dimensions_set_ex(), and blender::ed::transform::snap_source_closest_fn().
| std::optional< blender::Bounds< blender::float3 > > BKE_object_boundbox_get | ( | const Object * | ob | ) |
Retrieve the bounds of the object's data, in the object's local space (i.e. not accounting for the object's transform). This does not include the bounds of all evaluated geometry, only Object::data.
Definition at line 3536 of file blenkernel/intern/object.cc.
References BKE_armature_min_max(), BKE_curve_minmax(), BKE_lattice_minmax(), BKE_object_evaluated_geometry_bounds(), BKE_volume_min_max(), Object::data, OB_ARMATURE, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GREASE_PENCIL, OB_LATTICE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by BKE_boundbox_minmax(), BKE_object_boundbox_eval_cached_get(), BKE_object_dimensions_get(), BKE_object_minmax(), BKE_object_minmax_dupli(), BKE_pchan_minmax(), blender::ed::sculpt_paint::trim::calc_expand_factor(), clampto_evaluate(), blender::ed::sculpt_paint::do_tiled(), blender::draw::overlay::GreasePencil::draw_grease_pencil(), blender::io::obj::geometry_to_blender_objects(), blender::ed::transform::gizmo_3d_foreach_selected(), blender::draw::overlay::Bounds::object_sync(), RE_point_density_minmax(), blender::io::alembic::ABCAbstractWriter::update_bounding_box(), view3d_ob_drop_matrix_from_snap(), view3d_orbit_calc_center(), and blender::eevee::VolumeObjectBounds::VolumeObjectBounds().
| blender::float4x4 BKE_object_calc_parent | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob ) |
For calculation of the inverse parent transform, only used for editor.
It assumes the object parent is already in the depsgraph. Otherwise, after changing ob->parent you need to call:
Definition at line 3374 of file blenkernel/intern/object.cc.
References BKE_object_where_is_calc(), BKE_object_workob_clear(), Object::constinv, DEG_get_evaluated(), depsgraph, Object::par1, Object::par2, Object::par3, Object::parent, Object::parentinv, Object::parsubstr, Object::partype, Object::runtime, STRNCPY(), Object::trackflag, unit_m4(), and Object::upflag.
Referenced by blender::ed::object::apply_objects_internal(), applyarmature_fix_boneparents(), blender::ed::object::ignore_parent_tx(), SkinInfo::link_armature(), blender::ed::object::parent_set_with_depsgraph(), and blender::ed::object::vertex_parent_set_exec().
| void BKE_object_check_uids_unique_and_report | ( | const Object * | object | ) |
Definition at line 5438 of file blenkernel/intern/object.cc.
References BKE_pose_check_uids_unique_and_report().
| bool BKE_object_copy_modifier | ( | Main * | bmain, |
| const Scene * | scene, | ||
| Object * | ob_dst, | ||
| const Object * | ob_src, | ||
| const ModifierData * | md ) |
Copy a single modifier.
Definition at line 1350 of file blenkernel/intern/object.cc.
References BKE_mesh_ensure_skin_customdata(), BKE_modifier_copydata(), BKE_modifier_get_info(), BKE_modifier_new(), BKE_modifier_unique_name(), BKE_modifiers_findby_type(), BKE_modifiers_persistent_uid_init(), BKE_object_copy_softbody(), BKE_object_modifier_set_active(), BKE_object_support_modifier_type_check(), BLI_assert, BLI_insertlinkbefore(), DynamicPaintModifierData::brush, Object::data, eModifierFlag_PinLast, eModifierType_DynamicPaint, eModifierType_Fluid, eModifierType_Multires, eModifierType_ParticleSystem, eModifierType_Skin, eModifierType_Softbody, eModifierTypeFlag_Single, ModifierTypeInfo::flags, FluidModifierData::flow, LISTBASE_FOREACH_BACKWARD, MOD_FLUID_TYPE_FLOW, Object::modifiers, multiresModifier_sync_levels_ex(), ModifierData::name, object_copy_modifier_particle_system_ensure(), object_copy_particle_system(), object_modifier_type_copy_check(), DynamicPaintBrushSettings::psys, FluidFlowSettings::psys, STRNCPY(), FluidModifierData::type, and ModifierData::type.
Referenced by blender::ed::object::modifier_copy_to_object().
| ParticleSystem * BKE_object_copy_particlesystem | ( | ParticleSystem * | psys, |
| const int | flag ) |
Definition at line 2237 of file blenkernel/intern/object.cc.
References ParticleSystem::batch_cache, BKE_modifier_copydata_ex(), BKE_modifier_new(), BKE_ptcache_copy_list(), BLI_assert, BLI_duplicatelist(), BLI_listbase_clear(), ParticleSystem::bvhtree, ParticleSystem::childcache, ParticleSystem::childcachebufs, ParticleSystem::clmd, ParticleSystem::edit, ParticleSystem::effectors, eModifierType_Cloth, flag, ParticleSystem::flag, ParticleSystem::hair_in_mesh, ParticleSystem::hair_out_mesh, id_us_plus(), LIB_ID_COPY_SET_COPIED_ON_WRITE, LIB_ID_CREATE_NO_USER_REFCOUNT, MEM_dupallocN(), ParticleSystem::part, ParticleSystem::pathcache, ParticleSystem::pathcachebufs, ParticleSystem::pdd, ClothModifierData::point_cache, ParticleSystem::pointcache, psys_copy_particles(), PSYS_SHARED_CACHES, ParticleSystem::ptcaches, ParticleSystem::targets, and ParticleSystem::tree.
Referenced by BKE_object_copy_particlesystems(), and copy_particle_systems_to_object().
Definition at line 2287 of file blenkernel/intern/object.cc.
References BKE_object_copy_particlesystem(), BLI_addtail(), BLI_listbase_clear(), DynamicPaintModifierData::brush, eModifierType_DynamicPaint, eModifierType_Fluid, eModifierType_ParticleSystem, flag, FluidModifierData::flow, LISTBASE_FOREACH, MOD_FLUID_TYPE_FLOW, Object::modifiers, OB_MESH, Object::particlesystem, DynamicPaintBrushSettings::psys, FluidFlowSettings::psys, ParticleSystemModifierData::psys, FluidModifierData::type, and Object::type.
Referenced by BKE_object_modifier_stack_copy().
Definition at line 2180 of file blenkernel/intern/object.cc.
References BKE_ptcache_copy_list(), SoftBody::bpoint, SoftBody::bspring, SoftBody::effector_weights, flag, i, SoftBody::keys, LIB_ID_COPY_CACHES, LIB_ID_COPY_SET_COPIED_ON_WRITE, MEM_dupallocN(), SoftBody_Shared::pointcache, SoftBody_Shared::ptcaches, SoftBody::scratch, SoftBody::shared, Object::soft, Object::softflag, BodyPoint::springs, SoftBody::totkey, SoftBody::totpoint, SoftBody::totpointkey, and SoftBody::totspring.
Referenced by BKE_object_copy_modifier(), and BKE_object_modifier_stack_copy().
| char * BKE_object_data_editmode_flush_ptr_get | ( | ID * | id | ) |
Definition at line 1790 of file blenkernel/intern/object.cc.
References BLI_assert_unreachable, GS, ID_AR, ID_CU_LEGACY, ID_CV, ID_GP, ID_LT, ID_MB, ID_ME, ID_PT, bArmature::needs_flush_to_id, EditFont::needs_flush_to_id, EditLatt::needs_flush_to_id, EditNurb::needs_flush_to_id, MetaBall::needs_flush_to_id, and OB_FONT.
Referenced by ED_editors_flush_edits_for_object_ex(), and blender::ed::object::editmode_load_free_ex().
Definition at line 1761 of file blenkernel/intern/object.cc.
References BKE_object_is_in_editmode(), BLI_assert, BLI_assert_unreachable, GS, ID_AR, ID_CU_LEGACY, ID_CV, ID_GP, ID_LT, ID_MB, ID_ME, ID_PT, and OB_DATA_SUPPORT_EDITMODE.
Referenced by blender::deg::deg_update_eval_copy_datablock(), and blender::ed::outliner::is_object_data_in_editmode().
| void BKE_object_delete_ptcache | ( | Object * | ob, |
| int | index ) |
Definition at line 4382 of file blenkernel/intern/object.cc.
References BLI_findlink(), BLI_freelinkN(), pc_findindex(), and Object::pc_ids.
Referenced by BKE_ptcache_toggle_disk_cache().
| void BKE_object_dimensions_eval_cached_get | ( | const Object * | ob, |
| float | r_vec[3] ) |
Similar to BKE_object_dimensions_get but uses the cached evaluated bounds instead.
Definition at line 3610 of file blenkernel/intern/object.cc.
References BKE_object_boundbox_eval_cached_get(), boundbox_to_dimensions(), and copy_v3_v3().
Referenced by BKE_boundbox_minmax(), v3d_object_dimension_buts(), and view3d_ob_drop_on_enter().
| void BKE_object_dimensions_get | ( | const Object * | ob, |
| float | r_vec[3] ) |
The dimensions based on BKE_object_boundbox_get, scaled by the object's scale.
Definition at line 3605 of file blenkernel/intern/object.cc.
References BKE_object_boundbox_get(), boundbox_to_dimensions(), and copy_v3_v3().
Referenced by BKE_boundbox_minmax(), blender::draw::overlay::FlatObjectRef::flat_axis_index_get(), object_asset_dimensions_property(), and blender::workbench::VolumePass::object_sync_modifier().
| void BKE_object_dimensions_set | ( | Object * | ob, |
| const float | value[3], | ||
| int | axis_mask ) |
Definition at line 3643 of file blenkernel/intern/object.cc.
References BKE_object_dimensions_set_ex().
Referenced by BKE_boundbox_minmax().
| void BKE_object_dimensions_set_ex | ( | Object * | ob, |
| const float | value[3], | ||
| int | axis_mask, | ||
| const float | ob_scale_orig[3], | ||
| const float | ob_obmat_orig[4][4] ) |
The original scale and object matrix can be passed in so any difference of the objects matrix and the final matrix can be accounted for, typically this caused by parenting, constraints or delta-scale.
Re-using these values from the object causes a feedback loop when multiple values are modified at once in some situations. see: #69536.
Definition at line 3615 of file blenkernel/intern/object.cc.
References BKE_object_boundbox_eval_cached_get(), bounds(), copysignf, i, len, len_v3(), and Object::scale.
Referenced by BKE_boundbox_minmax(), BKE_object_dimensions_set(), and v3d_object_dimension_buts().
Definition at line 976 of file blenkernel/intern/object.cc.
References EFF_PARTICLE, PartEff::next, and PartEff::type.
Referenced by blo_do_versions_pre250(), and object_foreach_id().
| Object * BKE_object_duplicate | ( | Main * | bmain, |
| Object * | ob, | ||
| eDupli_ID_Flags | dupflag, | ||
| uint | duplicate_options ) |
Perform deep-copy of object and its 'children' data-blocks (obdata, materials, actions, etc.).
| dupflag | Controls which sub-data are also duplicated (see eDupli_ID_Flags in DNA_userdef_types.h). |
| duplicate_options | Additional context information about current duplicate call (e.g. if it's part of a higher-level duplication or not, etc.). (see eLibIDDuplicateFlags in BKE_lib_id.hh). |
Definition at line 2517 of file blenkernel/intern/object.cc.
References BKE_id_copy_for_duplicate(), BKE_libblock_relink_to_newid(), BKE_main_id_newptr_and_tag_clear(), BKE_object_material_array_p(), BKE_pose_tag_recalc(), BLI_assert, Object::data, DEG_id_tag_update(), DEG_id_tag_update_ex(), ELEM, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, i, Object::id, ID_IS_LINKED, ID_RECALC_EDITORS, ID_RECALC_GEOMETRY, ID_REMAP_FORCE_OBDATA_IN_EDITMODE, ID_TAG_NEW, LIB_ID_COPY_DEFAULT, LIB_ID_COPY_RIGID_BODY_NO_COLLECTION_HANDLING, LIB_ID_DUPLICATE_IS_ROOT_ID, LIB_ID_DUPLICATE_IS_SUBPROCESS, LISTBASE_FOREACH, Object::mat, ID::newid, OB_ARMATURE, OB_CAMERA, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GREASE_PENCIL, OB_LAMP, OB_LATTICE, OB_LIGHTPROBE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SPEAKER, OB_SURF, OB_VOLUME, Object::particlesystem, Object::pose, ID::tag, Object::totcol, Object::type, USER_DUP_ARM, USER_DUP_CAMERA, USER_DUP_CURVE, USER_DUP_CURVES, USER_DUP_FONT, USER_DUP_GPENCIL, USER_DUP_LAMP, USER_DUP_LATTICE, USER_DUP_LIGHTPROBE, USER_DUP_LINKED_ID, USER_DUP_MAT, USER_DUP_MBALL, USER_DUP_MESH, USER_DUP_POINTCLOUD, USER_DUP_PSYS, USER_DUP_SPEAKER, USER_DUP_SURF, and USER_DUP_VOLUME.
Referenced by BKE_object_add_from(), collection_duplicate_recursive(), and blender::ed::object::object_add_duplicate_internal().
| void BKE_object_empty_draw_type_set | ( | Object * | ob, |
| const int | value ) |
Definition at line 3667 of file blenkernel/intern/object.cc.
References Object::empty_drawtype, ImageUser::flag, ImageUser::frames, IMA_ANIM_ALWAYS, Object::iuser, MEM_callocN(), MEM_SAFE_FREE, OB_EMPTY, OB_EMPTY_IMAGE, ImageUser::sfra, and Object::type.
Referenced by BKE_boundbox_minmax(), object_blend_read_data(), blender::ed::object::object_empty_add_exec(), blender::ed::object::object_image_add_exec(), and blender::ed::object::object_image_add_invoke().
| bool BKE_object_empty_image_data_is_visible_in_view3d | ( | const Object * | ob, |
| const RegionView3D * | rv3d ) |
Definition at line 3694 of file blenkernel/intern/object.cc.
References BKE_object_empty_image_frame_is_visible_in_view3d(), BLI_assert, dot(), dot_v3v3(), Object::empty_image_visibility_flag, eps, RegionView3D::is_persp, len_squared_v3(), normalize_v3_v3(), OB_EMPTY_IMAGE_HIDE_BACK, OB_EMPTY_IMAGE_HIDE_FRONT, OB_EMPTY_IMAGE_HIDE_NON_AXIS_ALIGNED, project_plane_v3_v3v3(), sub_v3_v3v3(), and RegionView3D::viewinv.
| bool BKE_object_empty_image_frame_is_visible_in_view3d | ( | const Object * | ob, |
| const RegionView3D * | rv3d ) |
Definition at line 3684 of file blenkernel/intern/object.cc.
References Object::empty_image_visibility_flag, RegionView3D::is_persp, OB_EMPTY_IMAGE_HIDE_ORTHOGRAPHIC, and OB_EMPTY_IMAGE_HIDE_PERSPECTIVE.
Referenced by BKE_object_empty_image_data_is_visible_in_view3d(), view3d_object_skip_minmax(), and WIDGETGROUP_empty_image_poll().
Assign Object.data after modifier stack evaluation.
Definition at line 1599 of file blenkernel/intern/object.cc.
References BLI_assert, data, Object::data, GS, Object::id, ID_TAG_COPIED_ON_EVAL, ID_TAG_COPIED_ON_EVAL_FINAL_RESULT, ID_TAG_NO_MAIN, ID::name, Object::runtime, and ID::tag.
Referenced by BKE_curves_data_update(), BKE_displist_make_curveTypes(), BKE_lattice_modifiers_calc(), BKE_object_eval_grease_pencil(), BKE_pointcloud_data_update(), BKE_volume_data_update(), blender::bke::editbmesh_build_data(), and blender::bke::mesh_build_data().
Retrieve the bounds of the object's evaluated geometry. This is important because it includes all geometry component types created during evaluation rather than just Object::data. This should only be called on evaluated objects, since otherwise the evaluated geometry set won't be available.
Definition at line 3571 of file blenkernel/intern/object.cc.
References BKE_displist_minmax(), max, min, OB_CURVES_LEGACY, Object::runtime, and Object::type.
Referenced by BKE_boundbox_minmax(), BKE_object_boundbox_get(), BKE_object_handle_data_update(), and blender::draw::overlay::Bounds::object_sync().
Definition at line 1925 of file blenkernel/intern/object.cc.
References LISTBASE_FOREACH, and Main::objects.
Referenced by blender::ed::object::test_constraint().
| bool BKE_object_flag_test_recursive | ( | const Object * | ob, |
| short | flag ) |
Definition at line 4649 of file blenkernel/intern/object.cc.
References BKE_object_flag_test_recursive(), flag, Object::flag, and Object::parent.
Referenced by BKE_object_flag_test_recursive(), and snap_selected_to_location_rotation().
| void BKE_object_foreach_display_point | ( | Object * | ob, |
| const float | obmat[4][4], | ||
| void(* | func_cb )(const float[3], void *), | ||
| void * | user_data ) |
Sometimes min-max isn't enough, we need to loop over each point.
Definition at line 3845 of file blenkernel/intern/object.cc.
References BKE_mesh_wrapper_vert_coords(), BKE_object_get_evaluated_mesh(), Object::data, i, blender::Span< T >::index_range(), mul_v3_m4v3(), OB_GREASE_PENCIL, blender::threading::parallel_for(), GreasePencil::runtime, and Object::type.
Referenced by BKE_object_minmax_dupli(), and BKE_scene_foreach_display_point().
| void BKE_object_free_caches | ( | Object * | object | ) |
Definition at line 1680 of file blenkernel/intern/object.cc.
References BASE_FROM_DUPLI, BKE_id_free(), BKE_object_free_derived_caches(), DEG_id_tag_update(), eModifierType_ParticleSystem, eParticleSystemFlag_file_loaded, ParticleSystemModifierData::flag, ID_RECALC_GEOMETRY, ID_RECALC_PSYS_REDO, LISTBASE_FOREACH, ParticleSystemModifierData::mesh_final, ParticleSystemModifierData::mesh_original, and psys_free_path_cache().
| void BKE_object_free_curve_cache | ( | Object * | ob | ) |
Definition at line 1136 of file blenkernel/intern/object.cc.
References BKE_curve_bevelList_free(), BKE_displist_free(), BKE_nurbList_free(), MEM_freeN(), and Object::runtime.
Referenced by BKE_object_free_derived_caches().
| void BKE_object_free_derived_caches | ( | Object * | ob | ) |
Free data derived from mesh, called when mesh changes or is freed.
Definition at line 1628 of file blenkernel/intern/object.cc.
References BKE_crazyspace_api_eval_clear(), BKE_id_free(), BKE_libblock_free_data(), BKE_libblock_free_datablock(), BKE_object_free_curve_cache(), BKE_object_to_curve_clear(), BKE_object_to_mesh_clear(), BKE_pose_backup_clear(), Object::data, GS, ID_ME, MEM_freeN(), ID::name, object_update_from_subsurf_ccg(), and Object::runtime.
Referenced by BKE_curves_data_update(), BKE_displist_make_curveTypes(), BKE_lattice_modifiers_calc(), BKE_mball_data_update(), BKE_mesh_to_curve(), BKE_mesh_to_pointcloud(), BKE_object_eval_grease_pencil(), BKE_object_eval_reset(), BKE_object_free_caches(), BKE_object_free_modifiers(), BKE_object_runtime_free_data(), BKE_pointcloud_data_update(), BKE_pointcloud_to_mesh(), BKE_sculptsession_bm_to_me_for_render(), BKE_volume_data_update(), clean_viewport_memory_base(), blender::ed::object::convert_curves_component_to_curves(), blender::ed::object::convert_curves_legacy_to_mesh(), blender::ed::object::convert_curves_to_grease_pencil(), blender::ed::object::convert_curves_to_mesh(), blender::ed::object::convert_font_to_mesh(), blender::ed::object::convert_grease_pencil_component_to_curves(), blender::ed::object::convert_grease_pencil_to_mesh(), blender::ed::object::convert_mesh_to_grease_pencil(), ED_mesh_join_objects_exec(), blender::bke::greasepencil::convert::legacy_gpencil_object(), blender::bke::mesh_data_update(), blender::ed::sculpt_paint::vwpaint::mode_enter_generic(), blender::ed::sculpt_paint::vwpaint::mode_exit_generic(), blender::ed::object::modifier_apply(), blender::ed::object::object_modifier_remove(), blender::ed::sculpt_paint::object_sculpt_mode_exit(), blender::ed::object::object_shaderfx_remove(), and blender::deg::ObjectRuntimeBackup::restore_to_object().
| void BKE_object_free_modifiers | ( | Object * | ob, |
| const int | flag ) |
Definition at line 1150 of file blenkernel/intern/object.cc.
References BKE_gpencil_modifier_free_ex(), BKE_modifier_free_ex(), BKE_object_free_derived_caches(), BKE_object_free_particlesystems(), BKE_object_free_softbody(), BLI_pophead(), flag, Object::greasepencil_modifiers, and Object::modifiers.
Referenced by BKE_object_link_modifiers(), blender::ed::object::convert_curves_component_to_curves(), blender::ed::object::convert_curves_to_grease_pencil(), blender::ed::object::convert_curves_to_mesh(), blender::ed::object::convert_grease_pencil_component_to_curves(), blender::ed::object::convert_grease_pencil_to_mesh(), blender::ed::object::convert_mesh_to_curves_legacy(), blender::ed::object::convert_mesh_to_grease_pencil(), blender::ed::object::convert_mesh_to_mesh(), blender::ed::object::convert_mesh_to_pointcloud(), blender::ed::object::convert_pointcloud_to_mesh(), blender::ed::object::object_convert_exec(), blender::ed::object::object_data_convert_curve_to_mesh(), object_for_curve_to_mesh_create(), and object_free_data().
| void BKE_object_free_particlesystems | ( | Object * | ob | ) |
Definition at line 1124 of file blenkernel/intern/object.cc.
References BLI_pophead(), Object::particlesystem, and psys_free().
Referenced by BKE_object_free_modifiers(), and remove_particle_systems_from_object().
| void BKE_object_free_shaderfx | ( | Object * | ob, |
| const int | flag ) |
Definition at line 1171 of file blenkernel/intern/object.cc.
References BKE_shaderfx_free_ex(), BLI_pophead(), flag, and Object::shader_fx.
Referenced by object_free_data().
| void BKE_object_free_softbody | ( | Object * | ob | ) |
Definition at line 1131 of file blenkernel/intern/object.cc.
References sbFree().
Referenced by BKE_object_free_modifiers().
Definition at line 4272 of file blenkernel/intern/object.cc.
References BLI_assert, DEG_is_original(), and OB_MESH.
Referenced by BKE_editmesh_vert_coords_when_deformed(), blender::ed::transform::data_for_snap(), DRW_object_get_editmesh_cage_for_drawing(), DRW_text_edit_mesh_measure_stats(), ED_transverts_create_from_obedit(), EDBM_unified_findnearest_from_raycast(), blender::ed::transform::get_mesh_ref(), gizmo_preselect_elem_test_select(), mesh_data_from_duplicator_object(), and blender::draw::overlay::Meshes::mesh_has_edit_cage().
Definition at line 4257 of file blenkernel/intern/object.cc.
References BLI_assert, DEG_is_original(), and OB_MESH.
Referenced by BKE_editmesh_vert_coords_when_deformed(), BKE_modifier_get_evaluated_mesh_from_evaluated_object(), blender::ed::transform::data_for_snap(), blender::draw::draw_subdiv_create_requested_buffers(), blender::draw::DRW_mesh_batch_cache_create_requested(), blender::draw::editmesh_final_or_this(), get_evaluated_object_data_with_materials(), blender::ed::transform::get_mesh_ref(), give_parvert(), blender::draw::overlay::Meshes::mesh_has_edit_cage(), and mesh_new_from_mesh_object().
Definition at line 4302 of file blenkernel/intern/object.cc.
References Lattice::editlatt, GS, ID_LT, EditLatt::latt, ID::name, and ID::runtime.
Referenced by BKE_lattice_modifiers_calc().
Get evaluated mesh for given object.
Definition at line 4215 of file blenkernel/intern/object.cc.
References BKE_object_get_evaluated_mesh_unchecked(), and DEG_object_geometry_is_evaluated().
Referenced by add_verts_to_dgroups(), bc_get_mesh_copy(), BKE_effectors_create(), BKE_mesh_to_pointcloud(), BKE_modifier_get_evaluated_mesh_from_evaluated_object(), BKE_object_as_kdtree(), BKE_object_data_transfer_ex(), BKE_object_data_transfer_layout(), BKE_object_foreach_display_point(), bpy_bmesh_from_object(), bvh_get_mesh(), contarget_get_mesh_mat(), blender::ed::object::convert_mesh_to_grease_pencil(), blender::ed::object::convert_mesh_to_mesh(), blender::ed::transform::data_for_snap(), blender::io::alembic::ABCHairWriter::do_write(), ED_mesh_pick_face_vert(), ED_mesh_pick_vert(), ED_mesh_shapes_join_objects_exec(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::io::stl::export_frame(), followtrack_project_to_depth_object_if_needed(), get_effector_data(), get_effector_tot(), blender::io::alembic::ABCCurveMeshWriter::get_export_mesh(), blender::io::alembic::ABCMeshWriter::get_export_mesh(), blender::io::alembic::ABCMetaballWriter::get_export_mesh(), blender::io::usd::USDMeshWriter::get_export_mesh(), blender::io::usd::USDMetaballWriter::get_export_mesh(), blender::io::usd::USDTextWriter::get_export_mesh(), give_parvert(), knifeproject_poly_from_object(), lineart_object_load_single_instance(), blender::io::ply::load_plydata(), mesh_data_from_duplicator_object(), mesh_new_from_evaluated_curve_type_object(), mesh_new_from_mball_object(), meshobject_foreachScreenVert(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), MOD_lineart_gpencil_generate_v3(), multiresModifier_reshapeFromObject(), blender::io::obj::OBJMesh::OBJMesh(), paint_init_pivot_mesh(), paint_sample_color(), paint_weight_gradient_exec(), paintvert_flush_flags(), particle_intersect_mesh(), PE_create_shape_tree(), proj_paint_state_mesh_eval_init(), blender::ed::sculpt_paint::sample_curves_3d_brush(), shrinkwrap_get_tarmat(), blender::ed::sculpt_paint::use_add_density_mode(), vpaint_proj_dm_map_cosnos_init(), and vpaint_proj_dm_map_cosnos_update().
Definition at line 4198 of file blenkernel/intern/object.cc.
References BKE_object_get_evaluated_mesh_no_subsurf_unchecked(), and DEG_object_geometry_is_evaluated().
Referenced by blender::bke::add_final_mesh_as_geometry_component(), BKE_mesh_to_curve(), BKE_object_batch_cache_dirty_tag(), blender::ed::sculpt_paint::cursor_draw_tiling_preview(), blender::ed::object::dt_layers_select_src_itemf(), blender::bke::pbvh::face_normals_cache_eval(), stats_object(), blender::bke::pbvh::vert_normals_cache_eval(), blender::bke::pbvh::vert_positions_eval(), and blender::bke::pbvh::vert_positions_eval_for_write().
Same as BKE_object_get_evaluated_mesh, but does not check if the object's geometry is fully evaluated already. This should barely ever be used.
Definition at line 4171 of file blenkernel/intern/object.cc.
References blender::bke::GeometrySet::get_mesh(), GS, ID_ME, ID::name, and ID::runtime.
Referenced by BKE_object_get_evaluated_mesh_no_subsurf(), BKE_object_get_evaluated_mesh_unchecked(), blender::draw::drw_batch_cache_generate_requested_evaluated_mesh_or_curve(), drw_shgroup_bone_custom_solid(), drw_shgroup_bone_custom_wire(), and object_update_from_subsurf_ccg().
Definition at line 4206 of file blenkernel/intern/object.cc.
References BKE_mesh_wrapper_ensure_subdivision(), and BKE_object_get_evaluated_mesh_no_subsurf_unchecked().
Referenced by BKE_object_get_evaluated_mesh(), and sculpt_update_object().
| SubsurfModifierData * BKE_object_get_last_subsurf_modifier | ( | const Object * | ob | ) |
Return the last subsurf modifier of an object, this does not check whether modifiers on top of it are disabled. Return NULL if no such modifier is found.
This does not check if the modifier is enabled as it is assumed that the caller verified that it is enabled for its evaluation mode.
Definition at line 5443 of file blenkernel/intern/object.cc.
References eModifierType_Subsurf, ListBase::last, Object::modifiers, ModifierData::prev, and ModifierData::type.
Definition at line 4287 of file blenkernel/intern/object.cc.
References data, Lattice::editlatt, GS, ID_LT, and EditLatt::latt.
Referenced by BKE_lattice_deform_data_create(), BKE_lattice_deform_verts_get(), and BKE_lattice_modifiers_calc().
Definition at line 4280 of file blenkernel/intern/object.cc.
References BLI_assert, DEG_is_original(), and OB_MESH.
Referenced by BKE_object_as_kdtree(), blender::bke::pbvh::face_normals_cache_eval(), blender::bke::object::pbvh_ensure(), sculpt_update_object(), blender::bke::pbvh::vert_normals_cache_eval(), blender::bke::pbvh::vert_positions_eval(), and blender::bke::pbvh::vert_positions_eval_for_write().
Get a mesh which corresponds to the very original mesh from Main.
Definition at line 4241 of file blenkernel/intern/object.cc.
References BLI_assert, ID_TAG_COPIED_ON_EVAL, ID_TAG_COPIED_ON_EVAL_FINAL_RESULT, and result.
Referenced by BKE_sculpt_color_layer_create_if_needed(), blender::bke::build_pbvh_from_regular_mesh(), blender::ed::sculpt_paint::face_set::change_visibility_exec(), edbm_reverse_colors_exec(), edbm_rotate_colors_exec(), blender::ed::sculpt_paint::undo::restore_mask_mesh(), blender::ed::sculpt_paint::undo::save_active_attribute(), blender::draw::sculpt_batches_get(), sculpt_update_object(), and blender::ed::sculpt_paint::undo::set_active_layer().
Definition at line 3212 of file blenkernel/intern/object.cc.
References copy_m4_m4(), CU_PATH, Object::data, give_parvert(), mul_m4_m4m4(), mul_v3_m4v3(), OB_CURVES_LEGACY, ob_parbone(), ob_parcurve(), OB_PARENT_USE_FINAL_INDICES, ob_parvert3(), Object::par1, PARBONE, PAROBJECT, PARSKEL, PARTYPE, Object::partype, PARVERT1, PARVERT3, Object::transflag, Object::type, and unit_m4().
Referenced by ABC_get_transform(), BKE_object_add_from(), BKE_object_apply_mat4_ex(), BKE_object_apply_parent_inverse(), BKE_object_eval_parent(), BKE_object_matrix_local_get(), snap_selected_to_location_rotation(), solve_parenting(), and blender::io::usd::USD_get_transform().
Get mesh which is not affected by modifiers:
Definition at line 4223 of file blenkernel/intern/object.cc.
References BLI_assert, GS, ID_ME, ID_TAG_COPIED_ON_EVAL, ID_TAG_COPIED_ON_EVAL_FINAL_RESULT, and OB_MESH.
Referenced by blender::draw::DRW_mesh_batch_cache_create_requested(), DRW_text_edit_mesh_measure_stats(), blender::io::stl::export_frame(), blender::io::usd::USDMeshWriter::get_export_mesh(), blender::io::usd::get_shape_key_basis_mesh(), blender::io::ply::load_plydata(), blender::draw::mesh_render_data_create(), blender::draw::edit_select::Instance::object_sync(), and blender::io::obj::OBJMesh::OBJMesh().
Definition at line 5060 of file blenkernel/intern/object.cc.
References BKE_collection_object_find(), and BLI_linklist_prepend().
Referenced by blender::ed::object::make_links_data_exec().
Definition at line 5071 of file blenkernel/intern/object.cc.
References BKE_collection_object_find(), BKE_collection_object_remove(), DEG_id_tag_update(), Collection::id, and ID_RECALC_SYNC_TO_EVAL.
Referenced by blender::ed::object::collection_objects_remove_all_exec(), and blender::ed::object::make_links_data_exec().
Definition at line 4111 of file blenkernel/intern/object.cc.
References BKE_object_handle_update_ex(), and depsgraph.
Referenced by BKE_object_modifier_update_subframe().
| void BKE_object_handle_update_ex | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob, | ||
| RigidBodyWorld * | rbw ) |
The main object update call, for object matrix, constraints, keys and modifiers. Requires flags to be set!
Ideally we shouldn't have to pass the rigid body world, but need bigger restructuring to avoid id.
Definition at line 4064 of file blenkernel/intern/object.cc.
References BKE_object_handle_data_update(), BKE_object_where_is_calc_ex(), BKE_pose_channels_hash_ensure(), BKE_pose_rebuild(), BKE_pose_update_constraint_flags(), Object::data, depsgraph, bPose::flag, G, G_DEBUG_DEPSGRAPH_EVAL, Object::id, ID_RECALC_ALL, ID::name, OB_ARMATURE, Object::pose, POSE_CONSTRAINTS_NEED_UPDATE_FLAGS, POSE_RECALC, printf, ID::recalc, and Object::type.
Referenced by BKE_object_handle_update().
| bool BKE_object_has_mode_data | ( | const Object * | ob, |
| eObjectMode | object_mode ) |
Definition at line 1852 of file blenkernel/intern/object.cc.
References BKE_object_is_in_editmode(), SculptSession::mode_type, OB_MODE_EDIT, OB_MODE_POSE, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, Object::pose, and Object::sculpt.
Referenced by ED_editors_init().
| int BKE_object_insert_ptcache | ( | Object * | ob | ) |
Definition at line 4334 of file blenkernel/intern/object.cc.
References BLI_addtail(), BLI_listbase_sort(), LinkData::data, ListBase::first, i, MEM_callocN(), LinkData::next, pc_cmp(), Object::pc_ids, POINTER_AS_INT, and POINTER_FROM_INT.
Referenced by ptcache_filepath_ext_append().
Definition at line 4661 of file blenkernel/intern/object.cc.
References Object::parent.
Referenced by BKE_object_relational_superset(), blender::ed::outliner::do_outliner_object_select_recursive(), SkinInfo::link_armature(), blender::ed::outliner::outliner_object_set_flag_recursive_fn(), and blender::ed::outliner::parent_drop_allowed().
Test if object is affected by deforming modifiers (for motion blur). again most important is to avoid false positives, this is to skip computations and we can still if there was actual deformation afterwards.
Definition at line 4802 of file blenkernel/intern/object.cc.
References BKE_key_from_object(), BKE_modifier_get_info(), BKE_modifier_is_enabled(), BKE_modifiers_get_virtual_modifierlist(), constructive_modifier_is_deform_modified(), Object::data, DEG_get_original(), eModifierMode_Realtime, eModifierMode_Render, flag, modifiers_has_animation_check(), ModifierData::next, OB_CURVES_LEGACY, object_deforms_in_time(), OnlyDeform, Curve::taperobj, ModifierData::type, ModifierTypeInfo::type, and Object::type.
| bool BKE_object_is_in_editmode | ( | const Object * | ob | ) |
Actual check for internal data, not context or flags.
Definition at line 1727 of file blenkernel/intern/object.cc.
References Object::data, Object::mode, OB_ARMATURE, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GREASE_PENCIL, OB_LATTICE, OB_MBALL, OB_MESH, OB_MODE_EDIT, OB_POINTCLOUD, OB_SURF, and Object::type.
Referenced by blender::ed::object::add_duplicate(), armature_undosys_step_decode(), BKE_object_data_is_in_editmode(), BKE_object_has_mode_data(), BKE_object_is_in_editmode_vgroup(), blender::ed::transform::createTransObject(), curve_undosys_step_decode(), curves_evaluate_modifiers(), blender::ed::transform::data_for_snap(), blender::ed::outliner::do_outliner_item_editmode_toggle(), DRW_object_is_in_edit_mode(), ED_armature_edit_select_pick_bone(), ED_armature_origin_set(), blender::ed::object::ed_object_mode_generic_exit_ex(), ED_view3d_viewcontext_init_object(), ED_wpaint_ensure_data(), blender::ed::object::editmode_enter_ex(), foreach_libblock_remap_callback(), grease_pencil_evaluate_modifiers(), knifeproject_exec(), lattice_undosys_step_decode(), material_slot_remove_all_exec(), material_slot_remove_exec(), material_slot_remove_unused_exec(), mball_undosys_step_decode(), mesh_undosys_step_decode(), blender::ed::object::modifier_apply(), blender::ed::transform::nearest_world_object_fn(), object_array_for_shading_edit_mode_disabled_filter(), object_array_for_shading_edit_mode_enabled_filter(), blender::ed::object::object_convert_poll(), blender::ed::object::object_remesh_poll(), blender::ed::outliner::outliner_draw_mode_column_toggle(), blender::ed::outliner::outliner_object_delete_fn(), blender::ed::transform::raycast_obj_fn(), blender::ed::transform::setSnappingCallback(), blender::ed::transform::snap_obj_fn(), blender::ed::transform::snapCurve(), blender::ed::curves::undo::step_decode(), blender::ed::greasepencil::undo::step_decode(), and blender::ed::pointcloud::undo::step_decode().
| bool BKE_object_is_in_editmode_vgroup | ( | const Object * | ob | ) |
Definition at line 1756 of file blenkernel/intern/object.cc.
References BKE_object_is_in_editmode(), OB_TYPE_SUPPORT_VGROUP, and Object::type.
Referenced by BKE_object_defgroup_remove(), BKE_object_defgroup_remove_all_ex(), blender::ed::object::vertex_group_poll_edit(), blender::ed::object::vertex_group_vert_poll_ex(), blender::ed::object::vertex_group_vert_select_mesh_poll(), blender::ed::object::vertex_group_vert_select_unlocked_poll(), and view3d_panel_vgroup_poll().
| bool BKE_object_is_in_wpaint_select_vert | ( | const Object * | ob | ) |
Definition at line 1841 of file blenkernel/intern/object.cc.
References Object::data, ME_EDIT_PAINT_SEL_MODE, Object::mode, OB_MESH, OB_MODE_WEIGHT_PAINT, SCE_SELECT_VERTEX, and Object::type.
Referenced by blender::ed::object::vertex_group_vert_poll_ex(), blender::ed::object::vertex_group_vert_select_mesh_poll(), blender::ed::object::vertex_group_vert_select_unlocked_poll(), and view3d_panel_vgroup_poll().
| bool BKE_object_is_libdata | ( | const Object * | ob | ) |
Returns true if the Object is from an external blend file (libdata).
Definition at line 2695 of file blenkernel/intern/object.cc.
References ID_IS_LINKED.
Referenced by BKE_object_add_from(), BKE_view_layer_selected_editable_objects_iterator_begin(), and BKE_view_layer_selected_editable_objects_iterator_next().
| bool BKE_object_is_mode_compat | ( | const Object * | ob, |
| eObjectMode | object_mode ) |
Definition at line 1882 of file blenkernel/intern/object.cc.
References Object::mode.
Referenced by drw_select_filter_object_mode_lock(), ed_object_select_pick(), blender::ed::greasepencil::select_set_mode_exec(), and blender::ed::outliner::tree_element_object_activate().
Most important if this is modified it should always return true, in certain cases false positives are hard to avoid (shape keys for example).
Definition at line 4671 of file blenkernel/intern/object.cc.
References BKE_key_from_object(), BKE_modifier_is_enabled(), BKE_modifiers_get_virtual_modifierlist(), DEG_get_original(), eModifierMode_Realtime, eModifierMode_Render, flag, and ModifierData::next.
Definition at line 1497 of file blenkernel/intern/object.cc.
References BKE_object_free_modifiers(), and BKE_object_modifier_stack_copy().
Referenced by blender::ed::object::make_links_data_exec(), and blender::ed::object::modifier_link().
| void BKE_object_mat3_to_rot | ( | Object * | ob, |
| float | mat[3][3], | ||
| bool | use_compat ) |
Definition at line 2799 of file blenkernel/intern/object.cc.
References axis_angle_to_quat(), BLI_ASSERT_UNIT_M3, Object::dquat, Object::drot, Object::drotAngle, Object::drotAxis, eulO_to_quat(), invert_qt_normalized(), mat3_normalized_to_quat(), mul_qt_qtqt(), normalize_qt_qt(), Object::quat, quat_to_axis_angle(), quat_to_compatible_eulO(), quat_to_eulO(), Object::rot, ROT_MODE_AXISANGLE, ROT_MODE_QUAT, Object::rotAngle, Object::rotAxis, and Object::rotmode.
Referenced by BKE_object_add_from(), BKE_object_apply_mat4_ex(), and blender::ed::transform::ObjectToTransData().
| void BKE_object_matrix_local_get | ( | Object * | ob, |
| float | r_mat[4][4] ) |
Definition at line 2958 of file blenkernel/intern/object.cc.
References BKE_object_get_parent_matrix(), copy_m4_m4(), invert_m4(), mul_m4_m4m4(), and Object::parent.
Referenced by TransformWriter::add_node_transform_ob(), BKE_object_add_from(), and BCMatrix::set_transform().
Definition at line 3648 of file blenkernel/intern/object.cc.
References BKE_object_boundbox_get(), bounds(), Object::empty_drawsize, blender::MatBase< T, NumCol, NumRow, Alignment >::location(), blender::math::min_max(), OB_EMPTY, Object::scale, size(), blender::math::transform_point(), and Object::type.
| bool BKE_object_minmax_dupli | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob, | ||
| float3 & | r_min, | ||
| float3 & | r_max, | ||
| const bool | use_hidden ) |
Definition at line 3806 of file blenkernel/intern/object.cc.
References BKE_boundbox_init_from_minmax(), BKE_boundbox_minmax(), BKE_object_boundbox_get(), BKE_object_replace_data_on_shallow_copy(), bounds(), depsgraph, free_object_duplilist(), LISTBASE_FOREACH, OB_DUPLI, object_duplilist(), Object::runtime, and Object::transflag.
| bool BKE_object_minmax_empty_drawtype | ( | const Object * | ob, |
| float | r_min[3], | ||
| float | r_max[3] ) |
Calculate visual bounds from an empty objects draw-type.
Definition at line 3741 of file blenkernel/intern/object.cc.
References BLI_assert, CLAMP_MAX, CLAMP_MIN, copy_v3_v3(), Object::empty_drawsize, Object::empty_drawtype, i, Object::ima_ofs, max, min, OB_ARROWS, OB_CIRCLE, OB_CUBE, OB_EMPTY, OB_EMPTY_CONE, OB_EMPTY_IMAGE, OB_EMPTY_SPHERE, OB_PLAINAXES, OB_SINGLE_ARROW, and Object::type.
Referenced by BKE_object_minmax_dupli(), and BKE_pchan_minmax().
| void BKE_object_modifier_gpencil_hook_reset | ( | Object * | ob, |
| HookGpencilModifierData * | hmd ) |
Definition at line 1203 of file blenkernel/intern/object.cc.
References BKE_pose_channel_find_name(), invert_m4_m4(), mul_m4_m4m4(), HookGpencilModifierData::object, HookGpencilModifierData::parentinv, Object::pose, bPoseChannel::pose_mat, Object::runtime, and HookGpencilModifierData::subtarget.
| void BKE_object_modifier_hook_reset | ( | Object * | ob, |
| HookModifierData * | hmd ) |
Definition at line 1178 of file blenkernel/intern/object.cc.
References BKE_pose_channel_find_name(), invert_m4_m4(), mul_m4_m4m4(), HookModifierData::object, HookModifierData::parentinv, Object::pose, bPoseChannel::pose_mat, Object::runtime, and HookModifierData::subtarget.
Referenced by blender::ed::object::object_hook_reset_exec().
| void BKE_object_modifier_set_active | ( | Object * | ob, |
| ModifierData * | md ) |
Set the object's active modifier.
| md | If nullptr, only clear the active modifier, otherwise it must be in the Object.modifiers list. |
Definition at line 1228 of file blenkernel/intern/object.cc.
References BLI_assert, BLI_findindex(), eModifierFlag_Active, ModifierData::flag, LISTBASE_FOREACH, and Object::modifiers.
Referenced by BKE_modifier_remove_from_list(), BKE_object_copy_modifier(), blender::ed::object::modifier_add(), blender::ed::object::modifier_copy(), blender::ed::object::modifier_set_active_exec(), object_add_or_copy_particle_system(), blender::io::usd::USDPointInstancerReader::read_object_data(), and blender::ed::outliner::tree_element_modifier_activate().
| bool BKE_object_modifier_stack_copy | ( | Object * | ob_dst, |
| const Object * | ob_src, | ||
| bool | do_copy_all, | ||
| int | flag_subdata ) |
Copy the whole stack of modifiers from one object into another.
| do_copy_all | If true, even modifiers that should not support copying (like Hook one) will be duplicated. |
Definition at line 1460 of file blenkernel/intern/object.cc.
References BKE_modifier_copy_ex(), BKE_object_copy_particlesystems(), BKE_object_copy_softbody(), BKE_object_support_modifier_type_check(), BLI_addtail(), BLI_assert_msg, BLI_listbase_is_empty(), Object::greasepencil_modifiers, LISTBASE_FOREACH, Object::modifiers, object_modifier_type_copy_check(), and Object::type.
Referenced by BKE_object_link_modifiers(), and object_copy_data().
| void BKE_object_modifier_update_subframe | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob, | ||
| bool | update_mesh, | ||
| int | parent_recursion_limit, | ||
| float | frame, | ||
| int | modifier_type ) |
Definition at line 5334 of file blenkernel/intern/object.cc.
References bArmature::adt, Curve::adt, Object::adt, ADT_RECALC_ANIM, BKE_animsys_eval_context_construct(), BKE_animsys_evaluate_animdata(), BKE_object_handle_update(), BKE_object_modifier_update_subframe_only_callback(), BKE_object_where_is_calc_time(), BKE_pose_where_is(), Object::data, DEG_is_active(), depsgraph, bArmature::id, Curve::id, Object::id, ID_RECALC_ALL, OB_ARMATURE, OB_CURVES_LEGACY, object_cacheIgnoreClear(), ID::recalc, and Object::type.
Referenced by dynamicPaint_brushMeshCalculateVelocity(), dynamicPaint_brushObjectCalculateVelocity(), and dynamicPaint_doStep().
| void BKE_object_modifier_update_subframe_only_callback | ( | Object * | ob, |
| bool | update_mesh, | ||
| int | parent_recursion_limit, | ||
| int | modifier_type, | ||
| blender::FunctionRef< void(Object *object, bool update_mesh)> | update_or_tag_fn ) |
Call update_or_tag_fn on all objects which BKE_object_modifier_update_subframe would update. Used by the depsgraph to setup relations.
Definition at line 5320 of file blenkernel/intern/object.cc.
References object_modifier_recurse_for_update_subframe().
Referenced by BKE_object_modifier_update_subframe(), and DEG_add_collision_relations().
| bool BKE_object_moves_in_time | ( | const Object * | object, |
| bool | recurse_parent ) |
Check of objects moves in time.
This makes it possible to give some degree of false-positives here, but it's currently an acceptable tradeoff between complexity and check speed. In combination with checks of modifier stack and real life usage percentage of false-positives shouldn't be that high.
Definition at line 4707 of file blenkernel/intern/object.cc.
References BKE_animdata_id_is_animated(), BKE_object_moves_in_time(), and BLI_listbase_is_empty().
Referenced by BKE_object_moves_in_time(), blender::io::alembic::ABCTransformWriter::check_is_animated(), blender::io::usd::USDTransformWriter::check_is_animated(), and object_moves_in_time().
Definition at line 4865 of file blenkernel/intern/object.cc.
References CAMERASOLVER_ACTIVECLIP, bCameraSolverConstraint::clip, Scene::clip, CONSTRAINT_OFF, CONSTRAINT_TYPE_CAMERASOLVER, Object::constraints, ListBase::first, bCameraSolverConstraint::flag, bConstraint::next, and bConstraint::type.
Referenced by blender::ed::object::apply_objects_internal(), bundle_midpoint(), ed_object_select_pick(), get_camera_with_movieclip(), and blender::ed::transform::snapCamera().
| void * BKE_object_obdata_add_from_type | ( | Main * | bmain, |
| int | type, | ||
| const char * | name ) |
Definition at line 2009 of file blenkernel/intern/object.cc.
References BKE_armature_add(), BKE_camera_add(), BKE_curve_add(), BKE_curves_add(), BKE_grease_pencil_add(), BKE_lattice_add(), BKE_light_add(), BKE_lightprobe_add(), BKE_mball_add(), BKE_mesh_add(), BKE_pointcloud_add(), BKE_speaker_add(), BKE_volume_add(), CLOG_ERROR, get_obdata_defname(), LOG, OB_ARMATURE, OB_CAMERA, OB_CURVES, OB_CURVES_LEGACY, OB_EMPTY, OB_FONT, OB_GREASE_PENCIL, OB_LAMP, OB_LATTICE, OB_LIGHTPROBE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SPEAKER, OB_SURF, and OB_VOLUME.
Referenced by bc_add_object(), BKE_object_add_from(), blender::io::obj::MeshFromGeometry::create_mesh_object(), and object_add_common().
| bool BKE_object_obdata_is_libdata | ( | const Object * | ob | ) |
Returns true if the Object data is from an external blend file (libdata).
Definition at line 2700 of file blenkernel/intern/object.cc.
References BLI_assert, Object::data, and ID_IS_LINKED.
Referenced by blender::ed::object::active_shape_key_editable_poll(), apply_armature_pose2bones_exec(), BKE_object_add_from(), blender::ed::transform::createTransTexspace(), blender::ed::object::editmode_enter_ex(), and blender::ed::object::object_join_exec().
| void BKE_object_obdata_size_init | ( | Object * | ob, |
| float | size ) |
Use with newly created objects to set their size (used to apply scene-scale).
Definition at line 2707 of file blenkernel/intern/object.cc.
References Light::area_size, Light::area_sizey, Light::area_sizez, BKE_lattice_transform(), Object::data, Camera::drawsize, Object::empty_drawsize, Curve::fsize, OB_CAMERA, OB_EMPTY, OB_FONT, OB_LAMP, OB_LATTICE, Light::radius, scale_m4_fl(), size(), Object::type, and unit_m4().
Referenced by BKE_object_add_from(), blender::ed::object::effector_add_exec(), blender::ed::object::object_add_exec(), blender::ed::object::object_add_text_exec(), blender::ed::object::object_empty_add_exec(), and blender::ed::object::object_light_add_exec().
| bool BKE_object_obdata_texspace_get | ( | Object * | ob, |
| char ** | r_texspace_flag, | ||
| float ** | r_texspace_location, | ||
| float ** | r_texspace_size ) |
Definition at line 4123 of file blenkernel/intern/object.cc.
References BKE_curve_texspace_ensure(), BKE_mesh_texspace_get_reference(), Object::data, GS, ID_CU_LEGACY, ID_MB, ID_ME, Curve::texspace_flag, MetaBall::texspace_flag, Curve::texspace_location, MetaBall::texspace_location, Curve::texspace_size, and MetaBall::texspace_size.
Referenced by blender::ed::transform::createTransTexspace().
| int BKE_object_obdata_to_type | ( | const ID * | id | ) |
Return -1 on failure.
Definition at line 2054 of file blenkernel/intern/object.cc.
References GS, ID_AR, ID_CA, ID_CU_LEGACY, ID_CV, ID_GP, ID_LA, ID_LP, ID_LT, ID_MB, ID_ME, ID_PT, ID_SPK, ID_VO, OB_ARMATURE, OB_CAMERA, OB_CURVES, OB_GREASE_PENCIL, OB_LAMP, OB_LATTICE, OB_LIGHTPROBE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SPEAKER, and OB_VOLUME.
Referenced by blender::ed::object::add_type_with_obdata(), BKE_object_add_from(), BKE_object_replace_data_on_shallow_copy(), loose_data_instantiate_obdata_process(), and blender::ed::object::object_data_instance_add_exec().
Definition at line 4637 of file blenkernel/intern/object.cc.
References BKE_object_parent_loop_check(), and Object::parent.
Referenced by BKE_object_minmax_dupli(), BKE_object_parent_loop_check(), blender::ed::object::parent_noinv_set_exec(), blender::ed::object::parent_set(), blender::ed::object::parent_set_with_depsgraph(), and blender::ed::object::vertex_parent_set_exec().
Definition at line 2369 of file blenkernel/intern/object.cc.
References BKE_modifiers_is_deformed_by_armature(), and BKE_object_pose_context_check().
Referenced by apply_armature_pose2bones_exec(), BKE_object_add_from(), BKE_object_defgroup_selected_get(), BKE_object_pose_armature_get_visible(), BKE_object_pose_armature_get_with_wpaint_check(), BKE_object_pose_array_get_ex(), BKE_object_pose_base_array_get_ex(), draw_selected_name(), blender::ed::object::dt_layers_select_src_itemf(), ED_operator_posemode(), ed_operator_posemode_exclusive_ex(), ED_operator_posemode_local(), ED_pose_object_from_context(), ED_view3d_select_filter_from_mode(), blender::ed::transform::gizmo_3d_transform_space_object_get(), blender::draw::overlay::Armatures::is_pose_mode(), blender::ed::outliner::outliner_show_active_get_element(), blender::ed::outliner::outliner_viewcontext_init(), pose_calculate_paths_exec(), pose_calculate_paths_invoke(), pose_clear_paths_exec(), blender::ed::object::pose_constraint_add_exec(), pose_copy_exec(), blender::ed::object::pose_ik_add_invoke(), pose_paste_exec(), pose_select_grouped_exec(), pose_select_hierarchy_exec(), pose_select_parent_exec(), pose_select_same_keyingset(), pose_update_paths_exec(), pose_update_paths_range_exec(), poseAnim_object_get(), screen_ctx_active_pose_bone(), screen_ctx_pose_object(), screen_ctx_selected_pose_bones(), screen_ctx_selected_pose_bones_from_active_object(), screen_ctx_visible_pose_bones(), toggle_xray_exec(), blender::ed::outliner::tree_element_posechannel_activate(), uiTemplatePaintModeSelection(), blender::ed::object::vgroup_selection_itemf_helper(), blender::ed::object::vgroup_sync_from_pose(), view3d_orbit_calc_center(), view3d_select_exec(), WIDGETGROUP_armature_spline_poll(), WIDGETGROUP_armature_spline_refresh(), and WIDGETGROUP_armature_spline_setup().
| Object * BKE_object_pose_armature_get_visible | ( | Object * | ob, |
| const Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| View3D * | v3d ) |
Definition at line 2411 of file blenkernel/intern/object.cc.
References BASE_VISIBLE, BKE_object_pose_armature_get(), BKE_view_layer_base_find(), and BKE_view_layer_synced_ensure().
Referenced by BKE_object_add_from().
A version of BKE_object_pose_armature_get with an additional check. When ob isn't an armature: only return the referenced pose object when the active object is in weight paint mode.
Definition at line 2389 of file blenkernel/intern/object.cc.
References BKE_object_pose_armature_get(), Object::mode, OB_GREASE_PENCIL, OB_MESH, OB_MODE_WEIGHT_GREASE_PENCIL, OB_MODE_WEIGHT_PAINT, and Object::type.
Referenced by BKE_object_add_from(), do_pose_tag_select_op_prepare(), ed_object_select_pick(), view3d_box_select_exec(), view3d_circle_select_exec(), view3d_lasso_select(), and view3d_selectable_data().
| Vector< Object * > BKE_object_pose_array_get | ( | const Scene * | scene, |
| ViewLayer * | view_layer, | ||
| View3D * | v3d ) |
Definition at line 2456 of file blenkernel/intern/object.cc.
References BKE_object_pose_array_get_ex().
Referenced by BKE_object_add_from(), blender::ed::transform::gizmo_3d_foreach_selected(), snap_sel_to_grid_exec(), and snap_selected_to_location_rotation().
| Vector< Object * > BKE_object_pose_array_get_ex | ( | const Scene * | scene, |
| ViewLayer * | view_layer, | ||
| View3D * | v3d, | ||
| bool | unique ) |
Access pose array with special check to get pose object when in weight paint mode.
Definition at line 2429 of file blenkernel/intern/object.cc.
References BKE_object_pose_armature_get(), BKE_view_layer_active_object_get(), BKE_view_layer_array_from_objects_in_mode_params(), BKE_view_layer_synced_ensure(), ObjectsInModeParams::no_dup_data, OB_MODE_POSE, and ObjectsInModeParams::object_mode.
Referenced by BKE_object_add_from(), BKE_object_pose_array_get(), and BKE_object_pose_array_get_unique().
| Vector< Object * > BKE_object_pose_array_get_unique | ( | const Scene * | scene, |
| ViewLayer * | view_layer, | ||
| View3D * | v3d ) |
Definition at line 2450 of file blenkernel/intern/object.cc.
References BKE_object_pose_array_get_ex().
Referenced by BKE_object_add_from(), pose_hide_exec(), pose_reveal_exec(), pose_select_children(), pose_select_mirror_exec(), pose_select_parents(), pose_select_same_keyingset(), pose_select_siblings(), and blender::ed::outliner::tree_element_posechannel_activate().
| Vector< Base * > BKE_object_pose_base_array_get | ( | const Scene * | scene, |
| ViewLayer * | view_layer, | ||
| View3D * | v3d ) |
Definition at line 2499 of file blenkernel/intern/object.cc.
References BKE_object_pose_base_array_get_ex().
Referenced by BKE_object_add_from(), and ed_armature_pick_bone_impl().
| blender::Vector< Base * > BKE_object_pose_base_array_get_ex | ( | const Scene * | scene, |
| ViewLayer * | view_layer, | ||
| View3D * | v3d, | ||
| bool | unique ) |
Definition at line 2461 of file blenkernel/intern/object.cc.
References BKE_object_pose_armature_get(), BKE_view_layer_active_base_get(), BKE_view_layer_array_from_bases_in_mode_params(), BKE_view_layer_base_find(), BKE_view_layer_synced_ensure(), ObjectsInModeParams::no_dup_data, OB_MODE_POSE, Base::object, and ObjectsInModeParams::object_mode.
Referenced by BKE_object_add_from(), BKE_object_pose_base_array_get(), and BKE_object_pose_base_array_get_unique().
| Vector< Base * > BKE_object_pose_base_array_get_unique | ( | const Scene * | scene, |
| ViewLayer * | view_layer, | ||
| View3D * | v3d ) |
Definition at line 2493 of file blenkernel/intern/object.cc.
References BKE_object_pose_base_array_get_ex().
Referenced by BKE_object_add_from(), and ED_pose_deselect_all_multi().
| bool BKE_object_pose_context_check | ( | const Object * | ob | ) |
Definition at line 2360 of file blenkernel/intern/object.cc.
References Object::mode, OB_ARMATURE, OB_MODE_POSE, Object::pose, and Object::type.
Referenced by BKE_object_add_from(), BKE_object_pose_armature_get(), and ED_operator_posemode_context().
| void BKE_object_protected_location_set | ( | Object * | ob, |
| const float | location[3] ) |
Sets the location of the object, respecting Object::protectflag.
Definition at line 3985 of file blenkernel/intern/object.cc.
References Object::loc, OB_LOCK_LOCX, OB_LOCK_LOCY, OB_LOCK_LOCZ, and Object::protectflag.
Referenced by snap_sel_to_grid_exec(), and snap_selected_to_location_rotation().
| void BKE_object_protected_rotation_axisangle_set | ( | Object * | ob, |
| const float | axis[3], | ||
| float | angle ) |
Sets the quaternion rotation of the object, respecting Object::protectflag.
Definition at line 4040 of file blenkernel/intern/object.cc.
References angle(), OB_LOCK_ROTW, OB_LOCK_ROTX, OB_LOCK_ROTY, OB_LOCK_ROTZ, Object::protectflag, Object::rotAngle, and Object::rotAxis.
Referenced by snap_selected_to_location_rotation().
| void BKE_object_protected_rotation_euler_set | ( | Object * | ob, |
| const float | euler[3] ) |
Sets the euler rotation of the object, respecting Object::protectflag.
Definition at line 4027 of file blenkernel/intern/object.cc.
References OB_LOCK_ROTX, OB_LOCK_ROTY, OB_LOCK_ROTZ, Object::protectflag, and Object::rot.
Referenced by snap_selected_to_location_rotation().
| void BKE_object_protected_rotation_quaternion_set | ( | Object * | ob, |
| const float | quat[4] ) |
Sets the quaternion rotation of the object, respecting Object::protectflag.
Definition at line 4011 of file blenkernel/intern/object.cc.
References OB_LOCK_ROTW, OB_LOCK_ROTX, OB_LOCK_ROTY, OB_LOCK_ROTZ, Object::protectflag, and Object::quat.
Referenced by snap_selected_to_location_rotation().
| void BKE_object_protected_scale_set | ( | Object * | ob, |
| const float | scale[3] ) |
Sets the scale of the object, respecting Object::protectflag.
Definition at line 3998 of file blenkernel/intern/object.cc.
References OB_LOCK_SCALEX, OB_LOCK_SCALEY, OB_LOCK_SCALEZ, Object::protectflag, and Object::scale.
| LinkNode * BKE_object_relational_superset | ( | const Scene * | scene, |
| ViewLayer * | view_layer, | ||
| eObjectSet | objectSet, | ||
| eObRelationTypes | includeFilter ) |
Iterates over all objects of the given scene layer. Depending on the eObjectSet flag: collect either OB_SET_ALL, OB_SET_VISIBLE or OB_SET_SELECTED objects. If OB_SET_VISIBLE or#OB_SET_SELECTED are collected, then also add related objects according to the given includeFilter.
Definition at line 4979 of file blenkernel/intern/object.cc.
References BASE_EDITABLE, BASE_SELECTED_EDITABLE, BKE_object_is_child_recursive(), BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), ID_TAG_DOIT, LISTBASE_FOREACH, OB_REL_CHILDREN, OB_REL_CHILDREN_RECURSIVE, OB_REL_MOD_ARMATURE, OB_REL_PARENT, OB_REL_PARENT_RECURSIVE, OB_SET_ALL, OB_SET_SELECTED, OB_SET_VISIBLE, obrel_armature_find(), obrel_list_add(), obrel_list_test(), and Object::parent.
Referenced by collada_export().
Definition at line 5458 of file blenkernel/intern/object.cc.
References BKE_object_obdata_to_type(), Object::data, Object::id, ID::py_instance, Object::runtime, and Object::type.
Referenced by BKE_object_minmax_dupli(), and DupliCacheManager::extract_all().
| void BKE_object_rot_to_mat3 | ( | const Object * | ob, |
| float | mat[3][3], | ||
| bool | use_drot ) |
Definition at line 2759 of file blenkernel/intern/object.cc.
References axis_angle_to_mat3(), copy_m3_m3(), Object::dquat, Object::drot, Object::drotAngle, Object::drotAxis, eulO_to_mat3(), mul_m3_m3m3(), normalize_qt_qt(), Object::quat, quat_to_mat3(), Object::rot, ROT_MODE_AXISANGLE, Object::rotAngle, Object::rotAxis, and Object::rotmode.
Referenced by blender::ed::object::apply_objects_internal(), BKE_object_add_from(), BKE_object_to_mat3(), mball_select_similar_type(), mball_select_similar_type_get(), blender::ed::object::object_transform_axis_target_invoke(), and set_axis().
| void BKE_object_runtime_free_data | ( | Object * | object | ) |
The function frees memory used by the runtime data, but not the runtime field itself.
All runtime data is cleared to ensure it's not used again, in keeping with other _free_data(..) functions.
Definition at line 4933 of file blenkernel/intern/object.cc.
References BKE_object_free_derived_caches(), and BKE_object_runtime_reset().
Referenced by curve_to_mesh_eval_ensure().
| void BKE_object_runtime_reset | ( | Object * | object | ) |
Definition at line 4913 of file blenkernel/intern/object.cc.
Referenced by BKE_object_runtime_free_data(), curve_to_mesh_eval_ensure(), and blender::deg::ObjectRuntimeBackup::init_from_object().
| void BKE_object_runtime_reset_on_copy | ( | Object * | object, |
| int | flag ) |
Reset all pointers which we don't want to be shared when copying the object.
Definition at line 4918 of file blenkernel/intern/object.cc.
References blender::bke::ObjectRuntime::crazyspace_deform_cos, blender::bke::ObjectRuntime::crazyspace_deform_imats, blender::bke::ObjectRuntime::curve_cache, blender::bke::ObjectRuntime::data_eval, blender::bke::ObjectRuntime::geometry_set_eval, blender::bke::ObjectRuntime::mesh_deform_eval, blender::bke::ObjectRuntime::object_as_temp_curve, blender::bke::ObjectRuntime::object_as_temp_mesh, and blender::bke::ObjectRuntime::pose_backup.
Referenced by object_copy_data().
| void BKE_object_scale_to_mat3 | ( | const Object * | ob, |
| float | mat[3][3] ) |
Definition at line 2752 of file blenkernel/intern/object.cc.
References Object::dscale, mul_v3_v3v3(), Object::scale, and size_to_mat3().
Referenced by blender::ed::object::apply_objects_internal(), BKE_object_add_from(), BKE_object_to_mat3(), mball_select_similar_type(), mball_select_similar_type_get(), multiresModifier_prepare_join(), and multiresModifier_scale_disp().
Return the number of scenes using (instantiating) that object in their collections.
Definition at line 4854 of file blenkernel/intern/object.cc.
References BKE_collection_has_object_recursive(), LISTBASE_FOREACH, and Main::scenes.
Referenced by blender::ed::object::single_object_users_collection().
| void BKE_object_sculpt_data_create | ( | Object * | ob | ) |
Definition at line 4116 of file blenkernel/intern/object.cc.
References BLI_assert, Object::mode, SculptSession::mode_type, OB_MODE_ALL_SCULPT, and Object::sculpt.
Referenced by ED_editors_init(), and object_blend_read_data().
Definition at line 4544 of file blenkernel/intern/object.cc.
References BKE_id_free_us(), BKE_key_from_object_p(), and ELEM.
Referenced by BKE_object_shapekey_remove(), and blender::ed::object::shape_key_remove_exec().
| KeyBlock * BKE_object_shapekey_insert | ( | Main * | bmain, |
| Object * | ob, | ||
| const char * | name, | ||
| const bool | from_mix ) |
Definition at line 4512 of file blenkernel/intern/object.cc.
References insert_curvekey(), insert_lattkey(), insert_meshkey(), OB_CURVES_LEGACY, OB_LATTICE, OB_MESH, OB_SURF, Object::shapenr, and Object::type.
Referenced by blender::ed::object::object_shape_key_add().
Definition at line 4561 of file blenkernel/intern/object.cc.
References BKE_animdata_drivers_remove_for_rna_struct(), BKE_curve_nurbs_get(), BKE_key_from_object(), BKE_keyblock_convert_to_curve(), BKE_keyblock_convert_to_lattice(), BKE_keyblock_convert_to_mesh(), BKE_object_shapekey_free(), BLI_assert, BLI_findindex(), BLI_listbase_is_empty(), BLI_remlink(), Key::block, KeyBlock::data, Object::data, ListBase::first, Key::id, LISTBASE_FOREACH, MEM_freeN(), OB_CURVES_LEGACY, OB_LATTICE, OB_MESH, OB_SURF, Key::refkey, Object::shapenr, Key::totkey, and Object::type.
Referenced by blender::ed::object::object_shapekey_remove().
| bool BKE_object_support_modifier_type_check | ( | const Object * | ob, |
| int | modifier_type ) |
Definition at line 1276 of file blenkernel/intern/object.cc.
References BKE_modifier_get_info(), ELEM, eModifierType_MeshSequenceCache, eModifierType_Nodes, eModifierTypeFlag_AcceptsCVs, eModifierTypeFlag_AcceptsGreasePencil, eModifierTypeFlag_AcceptsMesh, eModifierTypeFlag_AcceptsVertexCosOnly, ModifierTypeInfo::flags, ModifierTypeInfo::modify_geometry_set, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GREASE_PENCIL, OB_LATTICE, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by BKE_object_copy_modifier(), BKE_object_modifier_stack_copy(), blender::ed::object::modifier_add(), blender::ed::object::modifier_add_itemf(), blender::ed::object::modifier_copy_to_object(), and blender::ed::object::modifier_copy_to_selected_poll().
| bool BKE_object_supports_material_slots | ( | Object * | ob | ) |
Definition at line 4893 of file blenkernel/intern/object.cc.
References ELEM, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GREASE_PENCIL, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by BKE_object_material_slot_used().
| bool BKE_object_supports_modifiers | ( | const Object * | ob | ) |
Definition at line 1262 of file blenkernel/intern/object.cc.
References ELEM, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GREASE_PENCIL, OB_LATTICE, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by blender::ed::object::modifier_copy_to_selected_poll(), blender::ed::object::modifiers_clear_poll(), and blender::ed::object::modifiers_copy_to_selected_poll().
| void * BKE_object_tfm_backup | ( | Object * | ob | ) |
Definition at line 3935 of file blenkernel/intern/object.cc.
References Object::constinv, ObTfmBack::constinv, copy_m4_m4(), copy_qt_qt(), copy_v3_v3(), Object::dloc, ObTfmBack::dloc, Object::dquat, ObTfmBack::dquat, Object::drot, ObTfmBack::drot, Object::drotAngle, ObTfmBack::drotAngle, Object::drotAxis, ObTfmBack::drotAxis, Object::dscale, ObTfmBack::dscale, ObTfmBack::imat, Object::loc, ObTfmBack::loc, MEM_mallocN(), ObTfmBack::obmat, Object::parentinv, ObTfmBack::parentinv, Object::quat, ObTfmBack::quat, Object::rot, ObTfmBack::rot, Object::rotAngle, ObTfmBack::rotAngle, Object::rotAxis, ObTfmBack::rotAxis, Object::scale, and ObTfmBack::scale.
Referenced by BKE_object_minmax_dupli(), ED_view3d_cameracontrol_acquire(), and blender::ed::object::object_transform_axis_target_invoke().
Definition at line 2910 of file blenkernel/intern/object.cc.
References rot, TFMCPY, TFMCPY3D, and TFMCPY4D.
Referenced by blender::ed::transform::ObjectToTransData().
| void BKE_object_tfm_protected_backup | ( | const Object * | ob, |
| ObjectTfmProtectedChannels * | obtfm ) |
Definition at line 2847 of file blenkernel/intern/object.cc.
References rot, TFMCPY, TFMCPY3D, and TFMCPY4D.
Referenced by ED_view3d_camera_lock_sync(), object_apply_mat4_with_protect(), view3d_camera_to_view_exec(), and view3d_camera_to_view_selected_impl().
| void BKE_object_tfm_protected_restore | ( | Object * | ob, |
| const ObjectTfmProtectedChannels * | obtfm, | ||
| const short | protectflag ) |
Definition at line 2872 of file blenkernel/intern/object.cc.
References Object::dloc, ObjectTfmProtectedChannels::dloc, Object::dquat, ObjectTfmProtectedChannels::dquat, Object::drot, ObjectTfmProtectedChannels::drot, Object::drotAngle, ObjectTfmProtectedChannels::drotAngle, Object::drotAxis, ObjectTfmProtectedChannels::drotAxis, Object::dscale, ObjectTfmProtectedChannels::dscale, i, Object::loc, ObjectTfmProtectedChannels::loc, OB_LOCK_LOCX, OB_LOCK_ROT4D, OB_LOCK_ROTW, OB_LOCK_ROTX, OB_LOCK_SCALEX, Object::quat, ObjectTfmProtectedChannels::quat, Object::rot, ObjectTfmProtectedChannels::rot, Object::rotAngle, ObjectTfmProtectedChannels::rotAngle, Object::rotAxis, ObjectTfmProtectedChannels::rotAxis, Object::scale, and ObjectTfmProtectedChannels::scale.
Referenced by ED_view3d_camera_lock_sync(), object_apply_mat4_with_protect(), view3d_camera_to_view_exec(), and view3d_camera_to_view_selected_impl().
| void BKE_object_tfm_restore | ( | Object * | ob, |
| void * | obtfm_pt ) |
Definition at line 3958 of file blenkernel/intern/object.cc.
References Object::constinv, ObTfmBack::constinv, copy_m4_m4(), copy_qt_qt(), copy_v3_v3(), Object::dloc, ObTfmBack::dloc, Object::dquat, ObTfmBack::dquat, Object::drot, ObTfmBack::drot, Object::drotAngle, ObTfmBack::drotAngle, Object::drotAxis, ObTfmBack::drotAxis, Object::dscale, ObTfmBack::dscale, ObTfmBack::imat, Object::loc, ObTfmBack::loc, ObTfmBack::obmat, Object::parentinv, ObTfmBack::parentinv, Object::quat, ObTfmBack::quat, Object::rot, ObTfmBack::rot, Object::rotAngle, ObTfmBack::rotAngle, Object::rotAxis, ObTfmBack::rotAxis, Object::runtime, Object::scale, and ObTfmBack::scale.
Referenced by BKE_object_minmax_dupli(), ED_view3d_cameracontrol_release(), and blender::ed::object::object_transform_axis_target_cancel().
This is an utility function for Python's object.to_curve(). The result is owned by the object.
The curve will be freed when object is re-evaluated or is destroyed. It is possible to force clear memory used by this curve by calling BKE_object_to_curve_clear().
If apply_modifiers is true and the object is a curve one, then spline deform modifiers are applied on the curve control points.
Definition at line 5420 of file blenkernel/intern/object.cc.
References BKE_curve_new_from_object(), BKE_object_to_curve_clear(), and depsgraph.
| void BKE_object_to_curve_clear | ( | Object * | object | ) |
Definition at line 5429 of file blenkernel/intern/object.cc.
References BKE_id_free().
Referenced by BKE_object_free_derived_caches(), and BKE_object_to_curve().
| void BKE_object_to_mat3 | ( | const Object * | ob, |
| float | r_mat[3][3] ) |
Definition at line 2934 of file blenkernel/intern/object.cc.
References BKE_object_rot_to_mat3(), BKE_object_scale_to_mat3(), and mul_m3_m3m3().
Referenced by blender::ed::object::apply_objects_internal(), BKE_object_add_from(), BKE_object_to_mat4(), blender::ed::object::object_transform_axis_target_invoke(), and blender::ed::transform::ObjectToTransData().
| void BKE_object_to_mat4 | ( | const Object * | ob, |
| float | r_mat[4][4] ) |
Definition at line 2947 of file blenkernel/intern/object.cc.
References add_v3_v3v3(), BKE_object_to_mat3(), copy_m4_m3(), Object::dloc, and Object::loc.
Referenced by actcon_get_tarmat(), BKE_constraint_mat_convertspace(), BKE_object_add_from(), BKE_object_eval_local_transform(), BKE_object_where_is_calc_mat4(), dvar_eval_transChan(), blender::ed::object::init_transform_on_add(), object_apply_mat4_with_protect(), blender::ed::object::object_origin_set_exec(), object_where_is_calc_ex(), blender::ed::object::object_xform_array_m4(), set_axis(), set_plane_exec(), blender::io::alembic::AbcObjectReader::setupObjectTransform(), solve_parenting(), blender::io::fbx::ufbx_matrix_to_obj(), and blender::ed::object::visual_geometry_to_objects_exec().
This is an utility function for Python's object.to_mesh() (the naming is not very clear though). The result is owned by the object.
The mesh will be freed when object is re-evaluated or is destroyed. It is possible to force to clear memory used by this mesh by calling BKE_object_to_mesh_clear().
If preserve_all_data_layers is true then the modifier stack is re-evaluated to ensure it preserves all possible custom data layers.
NOTE: Dependency graph argument is required when preserve_all_data_layers is truth, and is ignored otherwise.
Definition at line 5402 of file blenkernel/intern/object.cc.
References BKE_mesh_new_from_object(), BKE_object_to_mesh_clear(), and depsgraph.
Referenced by blender::io::hydra::MeshData::init(), and Freestyle::BlenderFileLoader::Load().
| void BKE_object_to_mesh_clear | ( | Object * | object | ) |
Definition at line 5411 of file blenkernel/intern/object.cc.
References BKE_id_free().
Referenced by BKE_object_free_derived_caches(), BKE_object_to_mesh(), blender::io::hydra::MeshData::init(), and Freestyle::BlenderFileLoader::Load().
Definition at line 2506 of file blenkernel/intern/object.cc.
References copy_v3_v3(), copy_v4_v4(), Object::loc, Object::quat, Object::rot, Object::rotAngle, Object::rotAxis, Object::rotmode, and Object::scale.
Referenced by blender::ed::object::add_hook_object(), blender::ed::object::apply_objects_internal(), blender::ed::object::ignore_parent_tx(), blender::ed::object::modifier_skin_armature_create(), blender::ed::object::object_origin_set_exec(), set_plane_exec(), and blender::ed::object::visual_transform_apply_exec().
| void BKE_object_update_select_id | ( | Main * | bmain | ) |
Updates select_id of all objects in the given bmain.
Definition at line 5386 of file blenkernel/intern/object.cc.
References ListBase::first, Object::id, ID::next, Main::objects, and Object::runtime.
Referenced by armature_select_linked_pick_invoke(), armature_shortest_path_pick_invoke(), blender::ui::bonedropper_invoke(), ed_view3d_give_base_under_cursor_ex(), view3d_box_select_exec(), view3d_circle_select_exec(), view3d_lasso_select_exec(), and view3d_select_exec().
| int BKE_object_visibility | ( | const Object * | ob, |
| int | dag_eval_mode ) |
Return which parts of the object are visible, as evaluated by depsgraph.
Definition at line 1887 of file blenkernel/intern/object.cc.
References BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT, Object::base_flag, DAG_EVAL_RENDER, DAG_EVAL_VIEWPORT, Object::duplicator_visibility_flag, ListBase::first, OB_DUPLI, OB_DUPLI_FLAG_RENDER, OB_DUPLI_FLAG_VIEWPORT, OB_VISIBLE_INSTANCES, OB_VISIBLE_PARTICLES, OB_VISIBLE_SELF, blender::bke::object_has_geometry_set_instances(), Object::particlesystem, and Object::transflag.
Referenced by DRW_object_visibility_in_active_context(), DRW_render_check_grease_pencil(), init_meta(), blender::io::HierarchyContext::is_object_visible(), blender::io::hydra::ObjectData::is_visible(), lineart_main_load_geometries(), and Freestyle::BlenderFileLoader::Load().
Compute object world transform and store it in ob->object_to_world().ptr().
Definition at line 3368 of file blenkernel/intern/object.cc.
References DEG_get_ctime(), depsgraph, and object_where_is_calc_ex().
Referenced by blender::ed::object::add_hook_object(), blender::ed::object::apply_objects_internal(), BKE_object_add_from(), BKE_object_calc_parent(), ED_view3d_cameracontrol_acquire(), blender::ed::object::object_origin_set_exec(), blender::ed::transform::ObjectToTransData(), set_plane_exec(), txt_add_object(), and blender::ed::object::visual_transform_apply_exec().
| void BKE_object_where_is_calc_ex | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| RigidBodyWorld * | rbw, | ||
| Object * | ob, | ||
| float | r_originmat[3][3] ) |
Definition at line 3362 of file blenkernel/intern/object.cc.
References DEG_get_ctime(), depsgraph, and object_where_is_calc_ex().
Referenced by BKE_object_add_from(), BKE_object_handle_update_ex(), and snap_sel_to_grid_exec().
| void BKE_object_where_is_calc_mat4 | ( | const Object * | ob, |
| float | r_obmat[4][4] ) |
Calculate object transformation matrix without recalculating dependencies and constraints – assume dependencies are already solved by depsgraph. No changes to object and its parent would be done. Used for bundles orientation in 3d space relative to parented blender camera.
Definition at line 3351 of file blenkernel/intern/object.cc.
References BKE_object_to_mat4(), Object::parent, and solve_parenting().
Referenced by BKE_object_add_from(), BKE_tracking_get_camera_object_matrix(), followtrack_distance_from_viewplane_get(), and object_solver_inverted_matrix().
| void BKE_object_where_is_calc_time | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob, | ||
| float | ctime ) |
Definition at line 3340 of file blenkernel/intern/object.cc.
References Object::adt, ADT_RECALC_ALL, BKE_animsys_eval_context_construct(), BKE_animsys_evaluate_animdata(), DEG_is_active(), depsgraph, Object::id, and object_where_is_calc_ex().
Referenced by BKE_object_add_from(), BKE_object_modifier_update_subframe(), and evaluate_emitter_anim().
| void BKE_object_workob_clear | ( | Object * | workob | ) |
Definition at line 1115 of file blenkernel/intern/object.cc.
References Object::dscale, ROT_MODE_EUL, Object::rotmode, and Object::scale.
Referenced by BKE_object_calc_parent(), and what_does_obaction().
| void BKE_scene_foreach_display_point | ( | Depsgraph * | depsgraph, |
| void(* | func_cb )(const float[3], void *), | ||
| void * | user_data ) |
Definition at line 3897 of file blenkernel/intern/object.cc.
References Object::base_flag, BASE_SELECTED, BKE_object_foreach_display_point(), DEG_ITER_OBJECT_FLAG_DUPLI, DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY, DEG_ITER_OBJECT_FLAG_VISIBLE, DEG_OBJECT_ITER_BEGIN, DEG_OBJECT_ITER_END, DEGObjectIterSettings::depsgraph, depsgraph, and DEGObjectIterSettings::flags.
Referenced by BKE_camera_view_frame_fit_to_scene(), and BKE_object_minmax_dupli().
|
static |
Definition at line 3595 of file blenkernel/intern/object.cc.
References bounds(), and blender::math::to_scale().
Referenced by BKE_object_dimensions_eval_cached_get(), and BKE_object_dimensions_get().
|
static |
Definition at line 4738 of file blenkernel/intern/object.cc.
References ArrayModifierData::curve_ob, eModifierType_Array, eModifierType_MeshSequenceCache, eModifierType_Mirror, eModifierType_Nodes, eModifierType_Screw, ArrayModifierData::end_cap, MirrorModifierData::mirror_ob, ScrewModifierData::ob_axis, object_moves_in_time(), ArrayModifierData::offset_ob, ArrayModifierData::start_cap, and ModifierData::type.
Referenced by BKE_object_is_deform_modified().
|
static |
Copy CCG related data. Used to sync copy of mesh with reshaped original mesh.
Definition at line 1507 of file blenkernel/intern/object.cc.
References BLI_assert, CD_SET_DEFAULT, Mesh::corner_data, Mesh::corners_num, CustomData_add_layer(), CustomData_copy_layer_type_data(), CustomData_free_layer(), CustomData_get_layer_index(), and CustomData_has_layer().
Referenced by object_update_from_subsurf_ccg().
Definition at line 2331 of file blenkernel/intern/object.cc.
References BKE_constraint_targets_flush(), BKE_constraint_targets_get(), BKE_pose_copy_data_ex(), bPose::chanbase, flag, LISTBASE_FOREACH, Object::pose, POSE_LOC, POSE_ROT, and POSE_SCALE.
Referenced by object_copy_data().
|
static |
Definition at line 687 of file blenkernel/intern/object.cc.
References BLO_read_struct_list, and LISTBASE_FOREACH.
Referenced by object_blend_read_data().
|
static |
Definition at line 1942 of file blenkernel/intern/object.cc.
References BLT_I18NCONTEXT_ID_ID, BLT_I18NCONTEXT_ID_LIGHT, CLOG_ERROR, CTX_DATA_, DATA_, LOG, OB_ARMATURE, OB_CAMERA, OB_CURVES, OB_CURVES_LEGACY, OB_EMPTY, OB_FONT, OB_GREASE_PENCIL, OB_LAMP, OB_LATTICE, OB_LIGHTPROBE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SPEAKER, OB_SURF, and OB_VOLUME.
Referenced by BKE_object_add_only_object(), and BKE_object_obdata_add_from_type().
|
static |
Definition at line 3069 of file blenkernel/intern/object.cc.
References add_v3_v3(), BKE_curve_nurbs_get(), BKE_displist_find(), BKE_nurbList_index_get_co(), BKE_object_get_editmesh_eval_final(), BKE_object_get_evaluated_mesh(), BLI_assert, BLI_assert_msg, BMEditMesh::bm, BM_mesh_elem_table_ensure(), BM_VERT, BM_vert_at_index(), CD_ORIGINDEX, CLOG_ERROR, copy_v3_v3(), count, CustomData_get_layer(), CustomData_has_layer(), Object::data, Lattice::def, DL_VERTS, Lattice::editlatt, ELEM, BMesh::elem_table_dirty, i, EditLatt::latt, lock, LOG, ME_WRAPPER_TYPE_BMESH, mul_v3_fl(), DispList::nr, OB_CURVES_LEGACY, OB_LATTICE, OB_MESH, OB_SURF, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, Mesh::runtime, Object::runtime, BMesh::totvert, Object::type, v, BPoint::vec, Mesh::vert_data, DispList::verts, Mesh::verts_num, vparent_lock, and zero_v3().
Referenced by BKE_object_get_parent_matrix(), and ob_parvert3().
|
static |
Definition at line 4466 of file blenkernel/intern/object.cc.
References BKE_curve_nurbs_get(), BKE_key_add(), BKE_key_evaluate_object(), BKE_keyblock_add_ctime(), BKE_keyblock_convert_from_curve(), Key::block, data, KeyBlock::data, Object::data, ListBase::first, Curve::key, KEY_RELATIVE, MEM_dupallocN(), KeyBlock::totelem, and Key::type.
Referenced by BKE_object_shapekey_insert().
|
static |
Definition at line 4428 of file blenkernel/intern/object.cc.
References BKE_key_add(), BKE_key_evaluate_object(), BKE_keyblock_add_ctime(), BKE_keyblock_convert_from_lattice(), Key::block, data, KeyBlock::data, Object::data, ListBase::first, Lattice::key, KEY_RELATIVE, MEM_dupallocN(), KeyBlock::totelem, and Key::type.
Referenced by BKE_object_shapekey_insert().
|
static |
Definition at line 4396 of file blenkernel/intern/object.cc.
References BKE_key_add(), BKE_key_evaluate_object(), BKE_keyblock_add_ctime(), BKE_keyblock_convert_from_mesh(), data, KeyBlock::data, Object::data, KEY_RELATIVE, KeyBlock::totelem, and Key::type.
Referenced by BKE_object_shapekey_insert().
|
static |
Definition at line 372 of file blenkernel/intern/object.cc.
References BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_lib_query_foreachid_process(), data, IDWALK_CB_NOP, and IDWALK_CB_USER.
Referenced by object_foreach_id().
|
static |
Definition at line 351 of file blenkernel/intern/object.cc.
References BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_lib_query_foreachid_process(), and data.
Referenced by object_foreach_id().
|
static |
Definition at line 341 of file blenkernel/intern/object.cc.
References BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_lib_query_foreachid_process(), and data.
Referenced by object_foreach_id().
|
static |
Definition at line 383 of file blenkernel/intern/object.cc.
References BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_lib_query_foreachid_process(), and data.
Referenced by object_foreach_id().
|
static |
Definition at line 362 of file blenkernel/intern/object.cc.
References BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_lib_query_foreachid_process(), and data.
Referenced by object_foreach_id().
|
static |
Definition at line 4778 of file blenkernel/intern/object.cc.
References AnimData::action, Object::adt, AnimData::drivers, blender::animrig::legacy::fcurves_for_assigned_action(), and LISTBASE_FOREACH.
Referenced by BKE_object_is_deform_modified().
Definition at line 3035 of file blenkernel/intern/object.cc.
References add_v3_v3(), BKE_pose_channel_find_name(), bPoseChannel::bone, BONE_RELATIVE_PARENTING, bPoseChannel::chan_mat, CLOG_WARN, copy_m4_m4(), copy_v3_v3(), Bone::flag, Object::id, Bone::length, LOG, mul_v3_fl(), ID::name, OB_ARMATURE, Object::parsubstr, Object::pose, bPoseChannel::pose_mat, Object::type, and unit_m4().
Referenced by BKE_object_get_parent_matrix().
Definition at line 2975 of file blenkernel/intern/object.cc.
References BKE_where_on_path(), CLAMP, copy_m4_m4(), copy_v3_v3(), Curve::ctime, CU_FOLLOW, CU_PATH_CLAMP, CU_PATH_RADIUS, Object::data, Curve::flag, mul_m4_m4m4(), normalize_qt(), Curve::pathlen, quat_apply_track(), quat_to_mat4(), Object::runtime, scale_m4_fl(), Object::trackflag, unit_m4(), and Object::upflag.
Referenced by BKE_object_get_parent_matrix().
Definition at line 3190 of file blenkernel/intern/object.cc.
References copy_m4_m3(), give_parvert(), mid_v3_v3v3v3(), OB_PARENT_USE_FINAL_INDICES, OB_TYPE_SUPPORT_PARVERT, Object::par1, Object::par2, Object::par3, quat_to_mat3(), Object::transflag, tri_to_quat(), Object::type, unit_m4(), and v2.
Referenced by BKE_object_get_parent_matrix().
|
static |
Definition at line 2107 of file blenkernel/intern/object.cc.
References BKE_object_add_only_object(), BKE_object_obdata_add_from_type(), BKE_view_layer_base_deselect_all(), Object::data, DEG_id_tag_update_ex(), Object::id, ID_RECALC_ANIMATION, ID_RECALC_GEOMETRY, and ID_RECALC_TRANSFORM.
Referenced by BKE_object_add(), and BKE_object_add_from().
|
static |
Definition at line 1056 of file blenkernel/intern/object.cc.
References BKE_object_dimensions_get(), blender::bke::idprop::create(), is_zero_v3(), and float3::x.
Referenced by object_asset_metadata_ensure().
|
static |
Definition at line 1067 of file blenkernel/intern/object.cc.
References BKE_asset_metadata_idprop_ensure(), BLI_assert, GS, Object::id, ID_OB, ID::name, and object_asset_dimensions_property().
|
static |
Definition at line 913 of file blenkernel/intern/object.cc.
References BKE_curve_type_test(), BKE_object_materials_sync_length(), BKE_particle_system_blend_read_after_liblink(), BKE_pose_blend_read_after_liblink(), BKE_pose_free_ex(), BLI_assert, BLO_read_lib_get_main(), BLO_read_lib_reports(), BLO_reportf_wrap(), Object::data, ELEM, Library::filepath, GS, Object::id, ID_CU_LEGACY, ID::lib, Object::mode, ID::name, OB_CURVES_LEGACY, OB_EMPTY, OB_FONT, OB_MODE_POSE, OB_SURF, Object::particlesystem, Object::pose, reports, RPT_, RPT_INFO, and Object::type.
|
static |
Definition at line 696 of file blenkernel/intern/object.cc.
References animviz_motionpath_blend_read_data(), BKE_constraint_blend_read_data(), BKE_effector_add_weights(), BKE_gpencil_modifier_blend_read_data(), BKE_lightprobe_cache_blend_read(), BKE_modifier_blend_read_data(), BKE_modifier_new(), BKE_modifier_unique_name(), BKE_modifiers_persistent_uid_init(), BKE_object_empty_draw_type_set(), BKE_object_sculpt_data_create(), BKE_particle_partdeflect_blend_read_data(), BKE_particle_system_blend_read_data(), BKE_pose_blend_read_data(), BKE_previewimg_blend_read(), BKE_ptcache_blend_read_data(), BKE_shaderfx_blend_read_data(), BLI_addhead(), BLI_addtail(), BLI_remlink(), BLO_read_char_array(), BLO_read_data_is_undo(), BLO_read_int32_array(), BLO_read_pointer_array(), BLO_read_struct, BLO_read_struct_list, SoftBody::bpoint, SoftBody::bspring, HookModifierData::cent, ObHook::cent, CLAMP, Object::constraints, copy_v3_v3(), WaveEff::damp, WaveModifierData::damp, direct_link_nlastrips(), EFF_BUILD, EFF_PARTICLE, EFF_WAVE, SoftBody::effector_weights, eModifierType_Build, eModifierType_Hook, eModifierType_Wave, Object::empty_drawtype, HookModifierData::falloff, ObHook::falloff, WaveEff::flag, WaveModifierData::flag, HookModifierData::force, ObHook::force, Object::greasepencil_modifiers, WaveEff::height, WaveModifierData::height, Object::id, ID_TAG_EXTERN, ID_TAG_INDIRECT, HookModifierData::indexar, ObHook::indexar, HookModifierData::indexar_num, Object::iuser, PartEff::keys, SoftBody::keys, BuildEff::len, BuildModifierData::length, WaveEff::lifetime, WaveModifierData::lifetime, Object::light_linking, Object::lightgroup, Object::lightprobe_cache, Object::mat, Object::matbits, MEM_callocN(), MEM_freeN(), Object::mode, BuildModifierData::modifier, HookModifierData::modifier, WaveModifierData::modifier, Object::modifiers, Object::mpath, WaveEff::narrow, WaveModifierData::narrow, next, PartEff::next, OB_EMPTY, OB_EMPTY_IMAGE, OB_MODE_ALL_MODE_DATA, OB_MODE_ALL_SCULPT, OB_MODE_EDIT, OB_MODE_PARTICLE_EDIT, HookModifierData::object, ObHook::parent, HookModifierData::parentinv, ObHook::parentinv, Object::particlesystem, Object::pc_ids, Object::pd, RigidBodyCon::physics_constraint, SoftBody_Shared::pointcache, Object::pose, Object::preview, SoftBody_Shared::ptcaches, BuildModifierData::randomize, Object::rigidbody_constraint, Object::rigidbody_object, ROT_MODE_MAX, ROT_MODE_MIN, Object::rotmode, Object::runtime, SoftBody::scratch, Object::sculpt, BuildModifierData::seed, BuildEff::sfra, Object::shader_fx, RigidBodyOb::shared, SoftBody::shared, Object::soft, WaveEff::speed, WaveModifierData::speed, BuildModifierData::start, WaveEff::startx, WaveModifierData::startx, WaveModifierData::starty, ID::tag, WaveEff::timeoffs, WaveModifierData::timeoffs, Object::totcol, ObHook::totindex, SoftBody::totkey, Object::type, PartEff::type, WaveEff::width, and WaveModifierData::width.
|
static |
Definition at line 606 of file blenkernel/intern/object.cc.
References animviz_motionpath_blend_write(), BKE_constraint_blend_write(), BKE_id_blend_write(), BKE_lightprobe_cache_blend_write(), BKE_modifier_blend_write(), BKE_particle_system_blend_write(), BKE_pose_blend_write(), BKE_previewimg_blend_write(), BKE_ptcache_blend_write(), BKE_shaderfx_blend_write(), BLO_write_char_array(), BLO_write_id_struct, BLO_write_is_undo(), BLO_write_pointer_array(), BLO_write_struct, BLO_write_struct_list, Object::constraints, Object::data, SoftBody::effector_weights, Object::empty_drawtype, Object::id, Object::iuser, Object::light_linking, Object::lightgroup, Object::lightprobe_cache, Object::mat, Object::matbits, Object::mode, Object::modifiers, Object::mpath, OB_ARMATURE, OB_EMPTY, OB_EMPTY_IMAGE, OB_MODE_EDIT, Object::particlesystem, Object::pc_ids, Object::pd, SoftBody_Shared::pointcache, Object::pose, Object::preview, SoftBody_Shared::ptcaches, Object::rigidbody_constraint, Object::rigidbody_object, Object::runtime, Object::sculpt, Object::shader_fx, SoftBody::shared, Object::soft, Object::totcol, and Object::type.
|
static |
Set "ignore cache" flag for all caches on this object.
Definition at line 5214 of file blenkernel/intern/object.cc.
References BKE_ptcache_ids_from_object(), BLI_freelistN(), LISTBASE_FOREACH, PTCACHE_IGNORE_CLEAR, and state.
Referenced by BKE_object_modifier_update_subframe().
|
static |
Definition at line 188 of file blenkernel/intern/object.cc.
References animviz_copy_motionpath(), Object::avs, BKE_constraints_copy_ex(), BKE_lightprobe_cache_copy(), BKE_modifiers_persistent_uids_are_valid(), BKE_object_modifier_stack_copy(), BKE_object_runtime_reset_on_copy(), BKE_pose_rebuild(), BKE_previewimg_id_copy(), BKE_rigidbody_object_copy(), BKE_shaderfx_copydata_ex(), BKE_shaderfx_new(), BLI_addtail(), BLI_assert, BLI_assert_msg, BLI_listbase_clear(), Object::constraints, copy_object_pose(), Object::data, flag, Object::greasepencil_modifiers, Object::id, Object::iuser, LIB_ID_COPY_NO_PREVIEW, LIB_ID_COPY_SET_COPIED_ON_WRITE, LIB_ID_CREATE_NO_USER_REFCOUNT, Object::light_linking, Object::lightgroup, Object::lightprobe_cache, LISTBASE_FOREACH, Object::mat, Object::matbits, MEM_dupallocN(), Object::mode, Object::modifiers, Object::mpath, ShaderFxData::name, OB_ARMATURE, OB_MODE_OBJECT, Object::pc_ids, Object::pd, Object::pose, Object::preview, Object::runtime, Object::sculpt, Object::shader_fx, LightProbeObjectCache::shared, STRNCPY(), Object::totcol, and Object::type.
|
static |
Find a psys matching given psys_src in ob_dst (i.e. sharing the same ParticleSettings ID), or add one, and return valid psys from ob_dst.
Definition at line 1325 of file blenkernel/intern/object.cc.
References LISTBASE_FOREACH, object_copy_particle_system(), ParticleSystem::part, and Object::particlesystem.
Referenced by BKE_object_copy_modifier().
|
static |
Definition at line 4727 of file blenkernel/intern/object.cc.
References BKE_key_from_object(), BLI_listbase_is_empty(), and object_moves_in_time().
Referenced by BKE_object_is_deform_modified().
|
static |
Definition at line 590 of file blenkernel/intern/object.cc.
References BKE_modifier_get_info(), LISTBASE_FOREACH, and Object::modifiers.
|
static |
Definition at line 393 of file blenkernel/intern/object.cc.
References BKE_constraints_id_loop(), BKE_gpencil_modifiers_foreach_ID_link(), BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL, BKE_LIB_FOREACHID_PROCESS_ID, BKE_LIB_FOREACHID_PROCESS_ID_NOCHECK, BKE_LIB_FOREACHID_PROCESS_IDSUPER, BKE_lib_query_foreachid_process_flags_get(), BKE_modifiers_findby_type(), BKE_modifiers_foreach_ID_link(), BKE_object_do_version_give_parteff_245(), BKE_particlesystem_id_loop(), BKE_shaderfx_foreach_ID_link(), LightLinking::blocker_collection, bPose::chanbase, SoftBody::collision_group, Object::constraints, data, Object::data, SoftBody::effector_weights, eModifierType_Fluidsim, PartDeflect::f_source, flag, FluidsimModifierData::fss, EffectorWeights::group, PartEff::group, i, IDP_foreach_property(), IDP_TYPE_FILTER_ID, IDWALK_CB_NEVER_NULL, IDWALK_CB_NEVER_SELF, IDWALK_CB_NOP, IDWALK_CB_OVERRIDE_LIBRARY_HIERARCHY_DEFAULT, IDWALK_CB_USER, IDWALK_DO_DEPRECATED_POINTERS, Object::instance_collection, FluidsimSettings::ipo, library_foreach_constraintObjectLooper(), library_foreach_gpencil_modifiersForeachIDLink(), library_foreach_modifiersForeachIDLink(), library_foreach_particlesystemsObjectLooper(), library_foreach_shaderfxForeachIDLink(), Object::light_linking, LISTBASE_FOREACH, Object::mat, RigidBodyCon::ob1, RigidBodyCon::ob2, OB_EMPTY, Object::parent, Object::particlesystem, Object::pd, Object::pose, LightLinking::receiver_collection, Object::rigidbody_constraint, Object::soft, PartDeflect::tex, Object::track, and Object::type.
|
static |
Definition at line 538 of file blenkernel/intern/object.cc.
References BKE_bpath_foreach_path_fixed_process(), FluidDomainSettings::cache_directory, OceanModifierData::cachepath, FluidModifierData::domain, eModifierType_Cloth, eModifierType_Fluid, eModifierType_Fluidsim, eModifierType_MeshCache, eModifierType_Ocean, MeshCacheModifierData::filepath, FluidsimModifierData::fss, LISTBASE_FOREACH, MOD_FLUID_TYPE_DOMAIN, Object::modifiers, object_foreach_path_pointcache(), Object::particlesystem, ClothModifierData::ptcaches, SoftBody_Shared::ptcaches, SoftBody::shared, Object::soft, FluidsimSettings::surfdataPath, and FluidModifierData::type.
|
static |
Definition at line 526 of file blenkernel/intern/object.cc.
References BKE_bpath_foreach_path_fixed_process(), ListBase::first, and PTCACHE_DISK_CACHE.
Referenced by object_foreach_path().
|
static |
Definition at line 288 of file blenkernel/intern/object.cc.
References animviz_free_motionpath(), BKE_constraints_free_ex(), BKE_curve_bevelList_free(), BKE_lightprobe_cache_free(), BKE_object_free_modifiers(), BKE_object_free_shaderfx(), BKE_partdeflect_free(), BKE_pose_free_ex(), BKE_previewimg_free(), BKE_rigidbody_free_constraint(), BKE_rigidbody_free_object(), BKE_sculptsession_free(), BLI_freelistN(), Object::constraints, Object::iuser, LIB_ID_CREATE_NO_USER_REFCOUNT, Object::light_linking, Object::lightgroup, Object::mat, Object::matbits, MEM_freeN(), MEM_SAFE_FREE, Object::mpath, Object::pc_ids, Object::pd, Object::pose, Object::preview, Object::runtime, and sbFree().
|
static |
Definition at line 1983 of file blenkernel/intern/object.cc.
References Object::dtx, ELEM, Object::id, Object::ima_ofs, OB_CAMERA, OB_EMPTY, OB_GREASE_PENCIL, OB_HIDE_CAMERA, OB_LAMP, OB_NEGZ, OB_POSY, OB_SHADOW_CATCHER, OB_SPEAKER, OB_USE_GPENCIL_LIGHTS, object_init_data(), Object::trackflag, Object::type, Object::upflag, Object::visibility_flag, and zero_v2().
Referenced by BKE_object_add_only_object().
|
static |
Definition at line 171 of file blenkernel/intern/object.cc.
References animviz_settings_init(), Object::avs, BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, MEMCPY_STRUCT_AFTER, OB_EMPTY, OB_POSY, OB_POSZ, Object::runtime, Object::trackflag, Object::type, and Object::upflag.
Referenced by object_init().
Definition at line 990 of file blenkernel/intern/object.cc.
References BKE_ptcache_ids_from_object(), BLI_freelistN(), PTCacheID::data_types, PTCacheID::default_step, PTCacheID::file_type, ListBase::first, PointCache::flag, PTCacheID::info_types, LISTBASE_FOREACH, PTCacheID::max_step, PointCache::name, PointCache::next, PTCacheID::next, PTCACHE_BAKED, PTCACHE_FLAG_INFO_DIRTY, PTCACHE_OUTDATED, PTCacheID::ptcaches, STREQ, and PTCacheID::type.
|
static |
Utility used to implement
The actual updating may be done by a callback: ctx.update_or_tag_fn, called by this function for each object.
Definition at line 5248 of file blenkernel/intern/object.cc.
References BKE_constraint_targets_flush(), BKE_constraint_targets_get(), BKE_modifiers_findby_type(), DynamicPaintModifierData::canvas, Object::constraints, ELEM, eModifierType_DynamicPaint, eModifierType_Fluid, LISTBASE_FOREACH, MOD_FLUID_TYPE_DOMAIN, ObjectModifierUpdateContext::modifier_type, object_modifier_recurse_for_update_subframe(), Object::parent, Object::partype, PARVERT1, PARVERT3, Object::track, FluidModifierData::type, and ObjectModifierUpdateContext::update_or_tag_fn.
Referenced by BKE_object_modifier_update_subframe_only_callback(), and object_modifier_recurse_for_update_subframe().
|
static |
Definition at line 1311 of file blenkernel/intern/object.cc.
References ELEM, eModifierType_Collision, and eModifierType_Hook.
Referenced by BKE_object_copy_modifier(), and BKE_object_modifier_stack_copy().
|
static |
Definition at line 4722 of file blenkernel/intern/object.cc.
References BKE_object_moves_in_time().
Referenced by constructive_modifier_is_deform_modified(), and object_deforms_in_time().
|
static |
Definition at line 1527 of file blenkernel/intern/object.cc.
References BKE_object_get_evaluated_mesh_no_subsurf_unchecked(), CD_GRID_PAINT_MASK, CD_MDISPS, SubdivCCG::coords, copy_ccg_data(), Object::data, DEG_get_original(), SubdivCCG::dirty, SubdivCCG::hidden, multiresModifier_reshapeFromCCG(), OB_MESH, and Mesh::runtime.
Referenced by BKE_object_free_derived_caches().
|
static |
Definition at line 3301 of file blenkernel/intern/object.cc.
References BKE_constraints_clear_evalob(), BKE_constraints_make_evalob(), BKE_constraints_solve(), BKE_object_to_mat4(), BKE_rigidbody_sync_transforms(), CONSTRAINT_OBTYPE_OBJECT, Object::constraints, depsgraph, ListBase::first, is_negative_m4(), OB_NEG_SCALE, OB_NO_CONSTRAINTS, Object::parent, Scene::rigidbody_world, Object::runtime, solve_parenting(), and Object::transflag.
Referenced by BKE_object_where_is_calc(), BKE_object_where_is_calc_ex(), and BKE_object_where_is_calc_time().
Find an associated armature object.
Definition at line 4950 of file blenkernel/intern/object.cc.
References eModifierType_Armature, LISTBASE_FOREACH, mod, Object::modifiers, OB_ARMATURE, Object::parent, PARSKEL, Object::partype, and Object::type.
Referenced by BKE_object_relational_superset().
Definition at line 4973 of file blenkernel/intern/object.cc.
References BLI_linklist_prepend(), Object::id, ID_TAG_DOIT, and ID::tag.
Referenced by BKE_object_relational_superset().
|
static |
Definition at line 4968 of file blenkernel/intern/object.cc.
References Object::id, ID_TAG_DOIT, and ID::tag.
Referenced by BKE_object_relational_superset().
|
static |
Definition at line 4324 of file blenkernel/intern/object.cc.
References b, LinkData::data, and POINTER_AS_INT.
Referenced by BKE_object_insert_ptcache().
|
static |
Definition at line 4361 of file blenkernel/intern/object.cc.
References LinkData::data, ListBase::first, LinkData::next, and POINTER_AS_INT.
Referenced by BKE_object_delete_ptcache().
|
static |
| r_originmat | Optional matrix that stores the space the object is in (without its own matrix applied) |
Definition at line 3267 of file blenkernel/intern/object.cc.
References BKE_object_get_parent_matrix(), BKE_object_to_mat4(), copy_m3_m4(), copy_v3_v3(), mul_m4_m4m4(), Object::parentinv, PARSKEL, PARTYPE, Object::partype, and Object::runtime.
Referenced by BKE_object_where_is_calc_mat4(), and object_where_is_calc_ex().
|
static |
Definition at line 1078 of file blenkernel/intern/object.cc.
| IDTypeInfo IDType_ID_OB |
Definition at line 1084 of file blenkernel/intern/object.cc.
|
static |
Definition at line 155 of file blenkernel/intern/object.cc.
|
static |
Definition at line 166 of file blenkernel/intern/object.cc.
Referenced by give_parvert().