|
Blender V5.0
|
#include <climits>#include <cstddef>#include <cstdlib>#include <iostream>#include <fmt/format.h>#include "MEM_guardedalloc.h"#include "BLI_listbase.h"#include "BLI_math_vector.h"#include "BLI_string_utf8.h"#include "BLI_array.hh"#include "BLI_hash.h"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.hh"#include "BLI_rand.h"#include "BLI_set.hh"#include "BLI_span.hh"#include "BLI_string_ref.hh"#include "BLI_vector_list.hh"#include "DNA_collection_types.h"#include "DNA_curves_types.h"#include "DNA_grease_pencil_types.h"#include "DNA_mesh_types.h"#include "DNA_modifier_types.h"#include "DNA_pointcloud_types.h"#include "DNA_scene_types.h"#include "DNA_volume_types.h"#include "DNA_world_types.h"#include "BKE_collection.hh"#include "BKE_duplilist.hh"#include "BKE_editmesh.hh"#include "BKE_editmesh_cache.hh"#include "BKE_geometry_set.hh"#include "BKE_geometry_set_instances.hh"#include "BKE_global.hh"#include "BKE_idprop.hh"#include "BKE_instances.hh"#include "BKE_main.hh"#include "BKE_mesh.hh"#include "BKE_object.hh"#include "BKE_object_types.hh"#include "BKE_particle.h"#include "BKE_vfont.hh"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_query.hh"#include "NOD_geometry_nodes_log.hh"#include "RNA_access.hh"#include "RNA_path.hh"#include "RNA_prototypes.hh"#include "MOD_nodes.hh"Go to the source code of this file.
Classes | |
| struct | DupliContext |
| struct | DupliGenerator |
| struct | VertexDupliData_Params |
| struct | VertexDupliData_Mesh |
| struct | VertexDupliData_EditMesh |
| struct | FaceDupliData_Params |
| struct | FaceDupliData_Mesh |
| struct | FaceDupliData_EditMesh |
| class | VectorList< T, CapacityStart, CapacityMax > |
| struct | GeometrySet |
| class | InstanceReference |
| class | Instances |
Typedefs | |
| using | float2 |
| using | float3 |
| using | float4x4 |
Functions | |
Internal Data Access Utilities | |
| static const Mesh * | mesh_data_from_duplicator_object (Object *ob, BMEditMesh **r_em, Span< float3 > *r_vert_coords, Span< float3 > *r_vert_normals) |
Dupli-Container Implementation | |
| void | object_duplilist (Depsgraph *depsgraph, Scene *sce, Object *ob, Set< const Object * > *include_objects, DupliList &r_duplilist) |
| void | object_duplilist_preview (Depsgraph *depsgraph, Scene *sce, Object *ob_eval, const ViewerPath *viewer_path, DupliList &r_duplilist) |
| blender::bke::Instances | object_duplilist_legacy_instances (Depsgraph &depsgraph, Scene &scene, Object &ob) |
Uniform attribute lookup | |
| static bool | find_geonode_attribute_rgba (const DupliObject *dupli, const char *name, float r_value[4]) |
| static bool | find_property_rgba (PointerRNA *id_ptr, const char *name, float r_data[4]) |
| static bool | find_property_rgba (const ID *id, const char *name, float r_data[4]) |
| bool | BKE_object_dupli_find_rgba_attribute (const Object *ob, const DupliObject *dupli, const Object *dupli_parent, const char *name, float r_value[4]) |
| bool | BKE_view_layer_find_rgba_attribute (const Scene *scene, const ViewLayer *layer, const char *name, float r_value[4]) |
Internal Child Duplicates (Used by Other Functions) | |
| using | MakeChildDuplisFunc = void (*)(const DupliContext *ctx, void *userdata, Object *child) |
| static bool | is_child (const Object *ob, const Object *parent) |
| static void | make_child_duplis (const DupliContext *ctx, void *userdata, MakeChildDuplisFunc make_child_duplis_cb) |
Internal Duplicate Context | |
| static constexpr short | GEOMETRY_SET_DUPLI_GENERATOR_TYPE = 1 |
| static const DupliGenerator * | get_dupli_generator (const DupliContext *ctx) |
| static void | init_context (DupliContext *r_ctx, Depsgraph *depsgraph, Scene *scene, Object *ob, const float space_mat[4][4], blender::Set< const Object * > *include_objects, Vector< Object * > &instance_stack, Vector< short > &dupli_gen_type_stack, DupliList &duplilist) |
| static bool | copy_dupli_context (DupliContext *r_ctx, const DupliContext *ctx, Object *ob, const float mat[4][4], int index, const GeometrySet *geometry=nullptr, int64_t instance_index=0) |
| static DupliObject * | make_dupli (const DupliContext *ctx, Object *ob, const ID *object_data, const float mat[4][4], int index, const GeometrySet *geometry=nullptr, int64_t instance_index=0) |
| static DupliObject * | make_dupli (const DupliContext *ctx, Object *ob, const float mat[4][4], int index, const GeometrySet *geometry=nullptr, int64_t instance_index=0) |
| static void | make_recursive_duplis (const DupliContext *ctx, Object *ob, const float space_mat[4][4], int index, const GeometrySet *geometry=nullptr, int64_t instance_index=0) |
Dupli-Collection Implementation (#OB_DUPLICOLLECTION) | |
| static const DupliGenerator | gen_dupli_collection |
| static void | make_duplis_collection (const DupliContext *ctx) |
Dupli-Vertices Implementation (#OB_DUPLIVERTS for Geometry) | |
| static const DupliGenerator | gen_dupli_verts |
| static void | get_duplivert_transform (const float3 &co, const float3 &no, const bool use_rotation, const short axis, const short upflag, float r_mat[4][4]) |
| static DupliObject * | vertex_dupli (const DupliContext *ctx, Object *inst_ob, const float child_imat[4][4], int index, const float3 &co, const float3 &no, const bool use_rotation) |
| static void | make_child_duplis_verts_from_mesh (const DupliContext *ctx, void *userdata, Object *inst_ob) |
| static void | make_child_duplis_verts_from_editmesh (const DupliContext *ctx, void *userdata, Object *inst_ob) |
| static void | make_duplis_verts (const DupliContext *ctx) |
Dupli-Vertices Implementation (#OB_DUPLIVERTS for 3D Text) | |
| static const DupliGenerator | gen_dupli_verts_font |
| static Object * | find_family_object (Main *bmain, const char *family, size_t family_len, uint ch, GHash *family_gh) |
| static void | make_duplis_font (const DupliContext *ctx) |
Instances Geometry Component Implementation | |
| static const DupliGenerator | gen_dupli_geometry_set |
| static void | make_duplis_geometry_set_impl (const DupliContext *ctx, const GeometrySet &geometry_set, const float parent_transform[4][4], bool geometry_set_is_instance, bool use_new_curves_type) |
| static void | make_duplis_geometry_set (const DupliContext *ctx) |
Dupli-Faces Implementation (#OB_DUPLIFACES) | |
| static const DupliGenerator | gen_dupli_faces |
| static void | get_dupliface_transform_from_coords (Span< float3 > coords, const bool use_scale, const float scale_fac, float r_mat[4][4]) |
| static DupliObject * | face_dupli (const DupliContext *ctx, Object *inst_ob, const float child_imat[4][4], const int index, const bool use_scale, const float scale_fac, Span< float3 > coords) |
| static DupliObject * | face_dupli_from_mesh (const DupliContext *ctx, Object *inst_ob, const float child_imat[4][4], const int index, const bool use_scale, const float scale_fac, const Span< int > face_verts, const Span< float3 > vert_positions) |
| static DupliObject * | face_dupli_from_editmesh (const DupliContext *ctx, Object *inst_ob, const float child_imat[4][4], const int index, const bool use_scale, const float scale_fac, BMFace *f, const Span< float3 > vert_positions_deform) |
| static void | make_child_duplis_faces_from_mesh (const DupliContext *ctx, void *userdata, Object *inst_ob) |
| static void | make_child_duplis_faces_from_editmesh (const DupliContext *ctx, void *userdata, Object *inst_ob) |
| static void | make_duplis_faces (const DupliContext *ctx) |
Dupli-Particles Implementation (#OB_DUPLIPARTS) | |
| static const DupliGenerator | gen_dupli_particles |
| static void | make_duplis_particle_system (const DupliContext *ctx, ParticleSystem *psys) |
| static void | make_duplis_particles (const DupliContext *ctx) |
| using blender::float2 |
Definition at line 618 of file BLI_math_vector_types.hh.
| 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.
| using MakeChildDuplisFunc = void (*)(const DupliContext *ctx, void *userdata, Object *child) |
Definition at line 398 of file object_dupli.cc.
| bool BKE_object_dupli_find_rgba_attribute | ( | const Object * | ob, |
| const DupliObject * | dupli, | ||
| const Object * | dupli_parent, | ||
| const char * | name, | ||
| float | r_value[4] ) |
Look up the RGBA value of a uniform shader attribute.
Definition at line 2075 of file object_dupli.cc.
References copy_v4_fl(), Object::data, find_geonode_attribute_rgba(), find_property_rgba(), Object::id, ParticleSettings::id, name, ParticleSystem::part, and DupliObject::particle_system.
Referenced by blender::draw::ObjectRef::find_rgba_attribute(), and lookup_instance_property().
| bool BKE_view_layer_find_rgba_attribute | ( | const Scene * | scene, |
| const ViewLayer * | layer, | ||
| const char * | name, | ||
| float | r_value[4] ) |
Look up the RGBA value of a view layer/scene/world shader attribute.
Definition at line 2116 of file object_dupli.cc.
References copy_v4_fl(), find_property_rgba(), Scene::id, World::id, name, RNA_pointer_create_discrete(), and Scene::world.
Referenced by LayerAttribute::sync().
|
static |
Create sub-context for recursive duplis.
Definition at line 197 of file object_dupli.cc.
References DupliContext::collection, DupliContext::dupli_gen_type_stack, float, DupliContext::gen, GEOMETRY_SET_DUPLI_GENERATOR_TYPE, get_dupli_generator(), Object::id, Object::instance_collection, DupliContext::instance_data, DupliContext::instance_idx, DupliContext::instance_stack, blender::StringRefBase::is_empty(), DupliContext::level, MAX_DUPLI_RECUR, mul_m4_m4m4(), ID::name, OB_DUPLICOLLECTION, DupliContext::object, DupliContext::persistent_id, DupliContext::space_mat, and DupliGenerator::type.
Referenced by make_child_duplis(), make_duplis_geometry_set_impl(), make_duplis_particles(), and make_recursive_duplis().
|
static |
Definition at line 1162 of file object_dupli.cc.
References copy_m3_m4(), get_dupliface_transform_from_coords(), make_dupli(), make_recursive_duplis(), mul_m4_m3m4(), mul_m4_m4m4(), mul_mat3_m4_v3(), and Object::parentinv.
Referenced by face_dupli_from_editmesh(), and face_dupli_from_mesh().
|
static |
Definition at line 1222 of file object_dupli.cc.
References BM_elem_index_get, BM_FACE_FIRST_LOOP, BMVert::co, copy_v3_v3(), face_dupli(), i, blender::Span< T >::is_empty(), BMFace::len, BMLoop::next, and BMLoop::v.
Referenced by make_child_duplis_faces_from_editmesh().
|
static |
Definition at line 1202 of file object_dupli.cc.
References face_dupli(), i, and blender::Span< T >::size().
Referenced by make_child_duplis_faces_from_mesh().
|
static |
Definition at line 798 of file object_dupli.cc.
References BLI_ghash_insert(), BLI_ghash_lookup_p(), BLI_str_utf8_from_unicode(), BLI_UTF8_MAX, LISTBASE_FOREACH, Main::objects, POINTER_FROM_UINT, and STREQLEN.
Referenced by make_duplis_font().
|
static |
Lookup instance attributes assigned via geometry nodes.
Definition at line 1963 of file object_dupli.cc.
References ARRAY_SIZE, blender::bke::InstancesComponent::attributes(), copy_v4_v4(), data, blender::bke::GeometrySet::get_component(), i, DupliObject::instance_data, DupliObject::instance_idx, and name.
Referenced by BKE_object_dupli_find_rgba_attribute().
Definition at line 2069 of file object_dupli.cc.
References find_property_rgba(), name, ptr, and RNA_id_pointer_create().
|
static |
Lookup an arbitrary Custom or RNA property and convert it to RGBA if possible.
Definition at line 1999 of file object_dupli.cc.
References copy_v4_fl4(), PointerRNA::data, float, i, IDP_GetPropertyFromGroup(), IDP_GROUP, name, PROP_BOOLEAN, PROP_FLOAT, PROP_INT, ptr, RNA_path_resolve(), RNA_property_array_length(), RNA_property_boolean_get(), RNA_property_float_get(), RNA_property_float_get_array(), RNA_property_int_get(), RNA_property_int_get_array(), RNA_property_type(), RNA_struct_idprops(), and IDProperty::type.
Referenced by BKE_object_dupli_find_rgba_attribute(), BKE_view_layer_find_rgba_attribute(), and find_property_rgba().
|
static |
Definition at line 1744 of file object_dupli.cc.
References DAG_EVAL_RENDER, DEG_get_mode(), DupliContext::depsgraph, gen_dupli_collection, gen_dupli_faces, gen_dupli_geometry_set, gen_dupli_particles, gen_dupli_verts, gen_dupli_verts_font, DupliContext::level, OB_DUPLI, OB_DUPLICOLLECTION, OB_DUPLIFACES, OB_DUPLIPARTS, OB_DUPLIVERTS, OB_FONT, OB_HIDE_RENDER, OB_HIDE_VIEWPORT, OB_MBALL, OB_MESH, DupliContext::object, blender::bke::object_has_geometry_set_instances(), Object::runtime, Object::transflag, Object::type, and Object::visibility_flag.
Referenced by copy_dupli_context(), and init_context().
|
static |
Definition at line 1129 of file object_dupli.cc.
References area_poly_v3(), blender::math::cross_poly(), blender::Span< T >::data(), float, loc_quat_size_to_mat4(), normalize, blender::math::scale(), blender::Span< T >::size(), sqrtf, and tri_to_quat_ex().
Referenced by face_dupli().
|
static |
| no | The direction, currently this is copied from a short[3] normal without division. Can be null when use_rotation is false. |
Definition at line 630 of file object_dupli.cc.
References loc_quat_size_to_mat4(), negate_v3_v3(), size(), unit_qt(), and vec_to_quat().
Referenced by vertex_dupli().
|
static |
Create initial context for root object.
Definition at line 155 of file object_dupli.cc.
References DupliContext::collection, copy_m4_m4(), depsgraph, DupliContext::depsgraph, DupliContext::dupli_gen_type_stack, DupliContext::duplilist, DupliContext::gen, GEOMETRY_SET_DUPLI_GENERATOR_TYPE, get_dupli_generator(), DupliContext::include_objects, DupliContext::instance_stack, DupliContext::level, DupliContext::obedit, OBEDIT_FROM_OBACT, DupliContext::object, DupliContext::preview_base_geometry, DupliContext::preview_instance_index, DupliContext::root_object, DupliContext::scene, DupliContext::space_mat, DupliGenerator::type, and unit_m4().
Referenced by blender::ed::transform::createTransTrackingTracksData(), blender::ed::transform::markerToTransDataInit(), object_duplilist(), object_duplilist_legacy_instances(), object_duplilist_preview(), blender::ed::transform::planeMarkerToTransDataInit(), blender::ed::transform::planeTrackToTransData(), blender::ed::transform::planeTrackToTransDataIfNeeded(), blender::ed::transform::trackToTransData(), and blender::ed::transform::trackToTransDataIfNeeded().
Definition at line 400 of file object_dupli.cc.
References Object::parent.
Referenced by make_child_duplis(), and blender::draw::particle_batch_cache_fill_segments().
|
static |
Create duplis from every child in scene or collection.
Definition at line 415 of file object_dupli.cc.
References DupliContext::collection, copy_dupli_context(), DEG_get_mode(), DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY, DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET, DEG_OBJECT_ITER_BEGIN, DEG_OBJECT_ITER_END, DEGObjectIterSettings::depsgraph, DupliContext::depsgraph, DupliContext::dupli_gen_type_stack, DEGObjectIterSettings::flags, FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN, FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_END, DupliContext::gen, GEOMETRY_SET_DUPLI_GENERATOR_TYPE, is_child(), OB_DONE, OB_MBALL, DupliContext::obedit, DupliContext::object, and DupliGenerator::type.
Referenced by make_duplis_faces(), and make_duplis_verts().
|
static |
Definition at line 1296 of file object_dupli.cc.
References BLI_assert, BMEditMesh::bm, BM_FACE_FIRST_LOOP, BM_face_uv_calc_center_median(), BM_FACES_OF_MESH, BM_ITER_MESH_INDEX, BM_VERT, FaceDupliData_EditMesh::cd_loop_uv_offset, BMVert::co, FaceDupliData_Params::ctx, BMesh::elem_index_dirty, FaceDupliData_EditMesh::em, face_dupli_from_editmesh(), float, FaceDupliData_EditMesh::has_orco, FaceDupliData_EditMesh::has_uvs, Object::instance_faces_scale, invert_m4_m4(), blender::Span< T >::is_empty(), BMFace::len, madd_v3_v3fl(), mul_m4_m4m4(), BMLoop::next, DupliContext::object, DupliObject::orco, FaceDupliData_EditMesh::params, Object::runtime, FaceDupliData_Params::use_scale, DupliObject::uv, BMLoop::v, FaceDupliData_EditMesh::vert_positions_deform, and w().
Referenced by make_duplis_faces().
|
static |
Definition at line 1253 of file object_dupli.cc.
References FaceDupliData_Mesh::corner_verts, FaceDupliData_Params::ctx, face_dupli_from_mesh(), FaceDupliData_Mesh::faces, float, Object::instance_faces_scale, invert_m4_m4(), madd_v2_v2fl(), madd_v3_v3fl(), mul_m4_m4m4(), DupliContext::object, DupliObject::orco, FaceDupliData_Mesh::orco, FaceDupliData_Mesh::params, Object::runtime, blender::IndexRange::size(), FaceDupliData_Mesh::totface, FaceDupliData_Params::use_scale, DupliObject::uv, FaceDupliData_Mesh::uv_map, FaceDupliData_Mesh::vert_positions, and w().
Referenced by make_duplis_faces().
|
static |
Definition at line 712 of file object_dupli.cc.
References BMEditMesh::bm, BM_ITER_MESH_INDEX, BM_VERTS_OF_MESH, copy_v3_v3(), VertexDupliData_Params::ctx, VertexDupliData_EditMesh::em, VertexDupliData_EditMesh::has_orco, i, invert_m4_m4(), blender::Span< T >::is_empty(), mul_m4_m4m4(), DupliContext::object, DupliObject::orco, VertexDupliData_EditMesh::params, Object::runtime, VertexDupliData_Params::use_rotation, v, VertexDupliData_EditMesh::vert_normals_deform, VertexDupliData_EditMesh::vert_positions_deform, and vertex_dupli().
Referenced by make_duplis_verts().
|
static |
Definition at line 684 of file object_dupli.cc.
References copy_v3_v3(), VertexDupliData_Params::ctx, i, invert_m4_m4(), mul_m4_m4m4(), DupliContext::object, DupliObject::orco, VertexDupliData_Mesh::orco, VertexDupliData_Mesh::params, Object::runtime, VertexDupliData_Mesh::totvert, VertexDupliData_Params::use_rotation, VertexDupliData_Mesh::vert_normals, VertexDupliData_Mesh::vert_positions, and vertex_dupli().
Referenced by make_duplis_verts().
|
static |
Definition at line 346 of file object_dupli.cc.
References Object::data, and make_dupli().
|
static |
Generate a dupli instance.
| mat | is transform of the object relative to current context (including #Object.object_to_world). |
Definition at line 260 of file object_dupli.cc.
References blender::VectorList< T, CapacityStart, CapacityMax >::append(), ARRAY_SIZE, BLI_hash_int(), BLI_hash_int_2d(), BLI_hash_string(), DupliContext::dupli_gen_type_stack, DupliContext::duplilist, float, DupliContext::gen, GS, i, Object::id, ID_MB, DupliContext::instance_data, DupliObject::instance_data, DupliContext::instance_idx, DupliObject::instance_idx, blender::VectorList< T, CapacityStart, CapacityMax >::last(), DupliContext::level, DupliObject::level, DupliObject::mat, MAX_DUPLI_RECUR, mul_m4_m4m4(), ID::name, DupliObject::no_draw, DupliObject::ob, DupliObject::ob_data, DupliContext::persistent_id, DupliObject::persistent_id, DupliContext::preview_base_geometry, DupliObject::preview_base_geometry, DupliContext::preview_instance_index, DupliObject::preview_instance_index, DupliObject::random_id, DupliContext::root_object, DupliContext::space_mat, and DupliObject::type.
Referenced by face_dupli(), make_dupli(), make_duplis_collection(), make_duplis_font(), make_duplis_geometry_set_impl(), make_duplis_particle_system(), and vertex_dupli().
|
static |
Definition at line 531 of file object_dupli.cc.
References DEG_get_mode(), DupliContext::depsgraph, FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN, FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_END, Object::id, DupliContext::include_objects, Object::instance_collection, Collection::instance_offset, make_dupli(), make_recursive_duplis(), mul_m4_m4m4(), DupliContext::object, ID::orig_id, sub_v3_v3(), and unit_m4().
|
static |
Definition at line 1335 of file object_dupli.cc.
References BMEditMesh::bm, FaceDupliData_EditMesh::cd_loop_uv_offset, CD_ORCO, CD_PROP_FLOAT2, Mesh::corner_data, FaceDupliData_Mesh::corner_verts, CustomData_get_layer(), CustomData_get_layer_n(), CustomData_get_n_offset(), CustomData_get_render_layer(), FaceDupliData_EditMesh::em, FaceDupliData_Mesh::faces, Mesh::faces_num, float, FaceDupliData_EditMesh::has_orco, FaceDupliData_EditMesh::has_uvs, blender::Span< T >::is_empty(), BMesh::ldata, make_child_duplis(), make_child_duplis_faces_from_editmesh(), make_child_duplis_faces_from_mesh(), mesh_data_from_duplicator_object(), OB_DUPLIFACES_SCALE, DupliContext::object, FaceDupliData_Mesh::orco, FaceDupliData_EditMesh::params, FaceDupliData_Mesh::params, FaceDupliData_Mesh::totface, Object::transflag, FaceDupliData_Mesh::uv_map, Mesh::vert_data, FaceDupliData_Mesh::vert_positions, and FaceDupliData_EditMesh::vert_positions_deform.
|
static |
Definition at line 828 of file object_dupli.cc.
References axis_angle_to_mat4_single(), BKE_vfont_to_curve_ex(), BLI_ghash_free(), BLI_ghash_int_new_ex(), DupliContext::collection, copy_m4_m4(), copy_v3_v3(), Object::data, DEG_get_evaluated(), DEG_is_evaluated(), DupliContext::depsgraph, Curve::family, find_family_object(), FO_DUPLI, Curve::fsize, G, make_dupli(), MEM_freeN(), mul_m4_m4m4(), mul_m4_v3(), DupliContext::object, CharTrans::offset, CharTrans::rotate, text_free(), UNLIKELY, Curve::xof, Curve::yof, and zero_v3().
|
static |
Definition at line 1078 of file object_dupli.cc.
References make_duplis_geometry_set_impl(), DupliContext::object, and Object::runtime.
|
static |
Definition at line 924 of file object_dupli.cc.
References blender::bke::InstanceReference::collection(), copy_dupli_context(), DEG_get_mode(), DupliContext::depsgraph, ELEM, FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN, FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_END, blender::bke::InstanceReference::geometry_set(), blender::bke::GeometrySet::get_component(), blender::bke::GeometrySet::get_grease_pencil(), blender::bke::GeometrySet::get_instances(), blender::bke::GeometrySet::get_mesh(), blender::bke::GeometrySet::get_pointcloud(), blender::bke::GeometrySet::get_volume(), i, Object::id, blender::Span< T >::index_range(), Collection::instance_offset, make_dupli(), make_duplis_geometry_set_impl(), make_recursive_duplis(), mul_m4_m4_pre(), mul_m4_m4m4(), OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GREASE_PENCIL, OB_MESH, OB_POINTCLOUD, OB_VOLUME, blender::bke::InstanceReference::object(), DupliContext::object, DupliContext::preview_base_geometry, DupliContext::preview_instance_index, ptr, blender::bke::Instances::reference_handles(), blender::bke::Instances::references(), sub_v3_v3(), blender::bke::Instances::transforms(), blender::bke::InstanceReference::type(), Object::type, blender::bke::Instances::unique_ids(), and unit_m4().
Referenced by make_duplis_geometry_set(), make_duplis_geometry_set_impl(), and object_duplilist_preview().
|
static |
Definition at line 1391 of file object_dupli.cc.
References add_v3_v3v3(), b, BKE_collection_object_cache_get(), BLI_findptr(), BLI_listbase_is_empty(), BLI_rng_free(), BLI_rng_get_int(), BLI_rng_new_srandom(), ParticleSystem::child, ParticleSystem::childcache, ParticleCacheKey::co, copy_m4_m4(), copy_v3_v3(), DAG_EVAL_RENDER, DEG_get_ctime(), DEG_get_mode(), DupliContext::depsgraph, ParticleSimulationData::depsgraph, ParticleSettings::draw, ParticleSettings::draw_as, ELEM, ParticleData::flag, ParticleSystem::flag, FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN, FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_END, ParticleSettings::instance_collection, ParticleSettings::instance_object, Collection::instance_offset, ParticleSettings::instance_weights, invert_m4(), invert_m4_m4(), LISTBASE_FOREACH, make_dupli(), mat4_to_size(), MEM_calloc_arrayN(), MEM_freeN(), mul_m4_m4m4(), mul_mat3_m4_fl(), mul_v3_fl(), normalize_qt_qt(), ParticleData::num, ParticleSimulationData::ob, DupliContext::object, offsetof, DupliObject::orco, PARS_NO_DISP, PARS_UNEXIST, ParticleSystem::part, PART_DRAW_COUNT_GR, PART_DRAW_GLOBAL_OB, PART_DRAW_GR, PART_DRAW_NO_SCALE_OB, PART_DRAW_OB, PART_DRAW_PARENT, PART_DRAW_RAND_GR, PART_DRAW_REND, PART_DRAW_ROTATE_OB, PART_DRAW_WHOLE_GR, PART_HAIR, DupliObject::particle_system, ParticleSystem::particles, ParticleSystem::pathcache, ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_check_enabled(), psys_find_group_weights(), psys_get_child_size(), psys_get_dupli_path_transform(), psys_get_dupli_texture(), psys_get_modifier(), psys_get_particle_state(), PSYS_HAIR_DONE, psys_sim_data_free(), psys_sim_data_init(), ptr, quat_to_mat4(), ParticleSettings::ren_as, Object::runtime, blender::math::scale(), DupliContext::scene, ParticleSimulationData::scene, ParticleSystem::seed, ParticleCacheKey::segments, ParticleData::size, size(), size_to_mat4(), state, sub_v3_v3(), ParticleSystem::totcached, ParticleSystem::totchild, ParticleSystem::totchildcache, ParticleSystem::totpart, Object::trackflag, ParticleSettings::type, Object::upflag, DupliObject::uv, vec_to_quat(), and zero_v3().
Referenced by make_duplis_particles().
|
static |
Definition at line 1720 of file object_dupli.cc.
References copy_dupli_context(), LISTBASE_FOREACH_INDEX, make_duplis_particle_system(), DupliContext::object, and Object::particlesystem.
|
static |
Definition at line 749 of file object_dupli.cc.
References CD_ORCO, CustomData_get_layer(), VertexDupliData_EditMesh::em, float, VertexDupliData_EditMesh::has_orco, blender::Span< T >::is_empty(), make_child_duplis(), make_child_duplis_verts_from_editmesh(), make_child_duplis_verts_from_mesh(), mesh_data_from_duplicator_object(), OB_DUPLIROT, DupliContext::object, VertexDupliData_Mesh::orco, VertexDupliData_EditMesh::params, VertexDupliData_Mesh::params, VertexDupliData_Mesh::totvert, Object::transflag, Mesh::vert_data, VertexDupliData_Mesh::vert_normals, VertexDupliData_EditMesh::vert_normals_deform, VertexDupliData_Mesh::vert_positions, VertexDupliData_EditMesh::vert_positions_deform, and Mesh::verts_num.
|
static |
Recursive dupli-objects.
| space_mat | is the local dupli-space (excluding dupli #Object.object_to_world). |
Definition at line 361 of file object_dupli.cc.
References copy_dupli_context(), DupliContext::dupli_gen_type_stack, DupliContext::gen, GEOMETRY_SET_DUPLI_GENERATOR_TYPE, Object::id, DupliContext::instance_stack, DupliContext::level, DupliGenerator::make_duplis, MAX_DUPLI_RECUR, ID::name, printf, and DupliGenerator::type.
Referenced by face_dupli(), make_duplis_collection(), make_duplis_geometry_set_impl(), and vertex_dupli().
|
static |
Definition at line 481 of file object_dupli.cc.
References BKE_editmesh_cache_ensure_vert_normals(), BKE_editmesh_from_object(), BKE_object_get_editmesh_eval_cage(), BKE_object_get_evaluated_mesh(), ME_WRAPPER_TYPE_BMESH, Mesh::runtime, and blender::bke::EditMeshData::vert_positions.
Referenced by make_duplis_faces(), and make_duplis_verts().
| void object_duplilist | ( | Depsgraph * | depsgraph, |
| Scene * | sce, | ||
| Object * | ob, | ||
| blender::Set< const Object * > * | include_objects, | ||
| DupliList & | r_duplilist ) |
Fill a Vector of DupliObject.
Definition at line 1807 of file object_dupli.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), depsgraph, DupliContext::gen, init_context(), and DupliGenerator::make_duplis.
Referenced by BKE_object_minmax_dupli(), BKE_scene_base_iter_next(), blender::draw::foreach_obref_in_scene(), blender::ed::greasepencil::get_bake_targets(), blender::ed::transform::iter_snap_objects(), and blender::ed::object::make_object_duplilist_real().
| blender::bke::Instances object_duplilist_legacy_instances | ( | Depsgraph & | depsgraph, |
| Scene & | scene, | ||
| Object & | ob ) |
Get the legacy instances of this object. That includes instances coming from these sources:
This does not include collection instances which are not considered legacy and should be treated properly at a higher level.
Also see get_dupli_generator for the different existing dupli generators.
Definition at line 1876 of file object_dupli.cc.
References VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::bke::Instances::add_new_reference(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::Instances::attributes_for_write(), BLI_assert, depsgraph, blender::bke::SpanAttributeWriter< T >::finish(), DupliContext::gen, gen_dupli_geometry_set, gen_dupli_particles, i, VectorSet< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of(), init_context(), blender::bke::Instance, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), DupliGenerator::make_duplis, DupliObject::mat, DupliObject::ob, DupliObject::persistent_id, blender::bke::Instances::reference_handles_for_write(), blender::bke::Instances::resize(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::bke::SpanAttributeWriter< T >::span, and blender::bke::Instances::transforms_for_write().
Referenced by BPy_GeometrySet_static_from_evaluated_object().
| void object_duplilist_preview | ( | Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob, | ||
| const ViewerPath * | viewer_path, | ||
| DupliList & | r_duplilist ) |
Fill a Vector of DupliObject for the preview geometry referenced by the ViewerPath.
Definition at line 1831 of file object_dupli.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), DEG_get_original(), depsgraph, eModifierType_Nodes, blender::nodes::geo_eval_log::GeoNodesLog::find_viewer_node_log_for_path(), init_context(), LISTBASE_FOREACH, make_duplis_geometry_set_impl(), Object::modifiers, OB_CURVES, DupliContext::preview_base_geometry, NodesModifierData::runtime, and Object::type.
|
static |
Definition at line 653 of file object_dupli.cc.
References get_duplivert_transform(), make_dupli(), make_recursive_duplis(), mul_m4_m4m4(), mul_mat3_m4_v3(), Object::trackflag, and Object::upflag.
Referenced by make_child_duplis_verts_from_editmesh(), and make_child_duplis_verts_from_mesh().
|
static |
Definition at line 575 of file object_dupli.cc.
Referenced by get_dupli_generator().
|
static |
Definition at line 1380 of file object_dupli.cc.
Referenced by get_dupli_generator().
|
static |
Definition at line 1085 of file object_dupli.cc.
Referenced by get_dupli_generator(), and object_duplilist_legacy_instances().
|
static |
Definition at line 1733 of file object_dupli.cc.
Referenced by get_dupli_generator(), and object_duplilist_legacy_instances().
|
static |
Definition at line 788 of file object_dupli.cc.
Referenced by get_dupli_generator().
|
static |
Definition at line 914 of file object_dupli.cc.
Referenced by get_dupli_generator().
|
staticconstexpr |
Definition at line 88 of file object_dupli.cc.
Referenced by copy_dupli_context(), init_context(), make_child_duplis(), and make_recursive_duplis().