97 #include "RNA_prototypes.h"
130 view_layer_(nullptr),
131 view_layer_index_(-1),
132 collection_(nullptr),
133 is_parent_collection_visible_(true)
140 if (id_info->id_cow !=
nullptr) {
154 ID *id_cow =
nullptr;
159 if (id_info !=
nullptr) {
165 id_info->
id_cow =
nullptr;
168 id_node->previously_visible_components_mask = previously_visible_components_mask;
169 id_node->previous_eval_flags = previous_eval_flags;
170 id_node->previous_customdata_masks = previous_customdata_masks;
173 const bool is_newly_created =
id_node->components.is_empty();
175 if (is_newly_created) {
190 if (id_type ==
ID_OB) {
198 visibility_operation = visibility_component->
add_operation(
nullptr,
223 const char *comp_name)
238 if (op_node ==
nullptr) {
239 op_node = comp_node->
add_operation(op, opcode, name, name_tag);
244 "add_operation: Operation already exists - %s has %s at %p\n",
255 const char *comp_name,
277 const char *comp_name,
284 if (operation !=
nullptr) {
298 if (operation !=
nullptr) {
306 const char *comp_name,
316 const char *comp_name,
364 id_info->
id_cow =
nullptr;
406 if (id_pointer->
orig_id ==
nullptr) {
464 if (
id_node->previously_visible_components_mask == 0) {
508 if (comp_node ==
nullptr) {
512 entry_tag.opcode, entry_tag.name.c_str(), entry_tag.name_tag);
513 if (op_node ==
nullptr) {
669 const bool is_collection_restricted = (collection->
flag & visibility_flag);
674 if (is_collection_visible &&
id_node->is_visible_on_build ==
false &&
675 id_node->is_collection_fully_expanded ==
true) {
680 else if (from_layer_collection ==
nullptr && !
id_node->is_collection_fully_expanded) {
691 id_node->is_visible_on_build = is_collection_visible;
696 if (from_layer_collection !=
nullptr) {
718 id_node->is_collection_fully_expanded =
true;
738 id_node->is_visible_on_build |= is_visible;
739 id_node->has_base |= (base_index != -1);
752 id_node->linked_state = linked_state;
757 id_node->is_visible_on_build =
true;
760 id_node->is_visible_on_build = is_visible;
762 id_node->has_base |= (base_index != -1);
768 if (object->
parent !=
nullptr) {
813 (object->
pd->
tex !=
nullptr)) {
828 BKE_object_sync_to_original(depsgraph, object_cow);
851 if (base_index == -1) {
862 [view_layer_index =
view_layer_index_, scene_cow, object_cow, base_index, is_from_set](
864 BKE_object_eval_eval_base_flags(
865 depsgraph, scene_cow, view_layer_index, object_cow, base_index, is_from_set);
882 if (object->
data ==
nullptr) {
886 switch (object->
type) {
924 if (materials_ptr !=
nullptr) {
968 [ob_cow](::
Depsgraph *
depsgraph) { BKE_object_eval_local_transform(depsgraph, ob_cow); });
970 if (object->
parent !=
nullptr) {
986 [ob_cow](::
Depsgraph *
depsgraph) { BKE_object_eval_uber_transform(depsgraph, ob_cow); });
995 [ob_cow](::
Depsgraph *
depsgraph) { BKE_object_eval_transform_final(depsgraph, ob_cow); });
1025 BKE_object_eval_constraints(depsgraph, scene_cow, object_cow);
1040 BKE_object_eval_ptcache_reset(depsgraph, scene_cow, object_cow);
1050 if (adt ==
nullptr) {
1053 if (adt->
action !=
nullptr) {
1078 int driver_index = 0;
1088 if (strip->act !=
nullptr) {
1091 else if (strip->strips.first !=
nullptr) {
1101 bool has_image_animation =
false;
1104 if (
ntree !=
nullptr &&
1106 has_image_animation =
true;
1155 if (dtar->id ==
nullptr) {
1167 if (
id ==
nullptr || rna_path ==
nullptr) {
1177 if (prop ==
nullptr) {
1282 [scene_cow](::
Depsgraph *
depsgraph) { BKE_rigidbody_rebuild_sim(depsgraph, scene_cow); });
1288 BKE_rigidbody_eval_simulation(depsgraph,
1295 if (rbw->
group !=
nullptr) {
1298 if (object->type !=
OB_MESH) {
1301 if (object->rigidbody_object ==
nullptr) {
1317 BKE_rigidbody_object_sync_transforms(depsgraph, scene_cow, object_cow);
1326 if (rbc ==
nullptr || rbc->
ob1 ==
nullptr || rbc->
ob2 ==
nullptr) {
1376 if (
ELEM(particle_target->ob,
nullptr,
object)) {
1420 BKE_particle_settings_eval_reset(depsgraph, particle_settings_cow);
1426 for (
MTex *mtex : particle_settings->
mtex) {
1427 if (mtex ==
nullptr || mtex->
tex ==
nullptr) {
1470 BKE_object_eval_uber_data(depsgraph, scene_cow, object_cow);
1485 [object_cow](::
Depsgraph *
depsgraph) { BKE_object_select_update(depsgraph, object_cow); });
1533 if (cu->
bevobj !=
nullptr) {
1568 Curves *curves_id =
reinterpret_cast<Curves *
>(obdata);
1573 if (curves_id->
surface !=
nullptr) {
1625 BKE_armature_refresh_layer_used(depsgraph, armature_cow);
1646 if (
camera->dof.focus_object !=
nullptr) {
1692 if (
ntree ==
nullptr) {
1718 if (
id ==
nullptr) {
1722 if (id_type ==
ID_MA) {
1725 else if (id_type ==
ID_TE) {
1728 else if (id_type ==
ID_IM) {
1731 else if (id_type ==
ID_OB) {
1735 else if (id_type ==
ID_SCE) {
1742 if (node_scene->
camera !=
nullptr) {
1747 else if (id_type ==
ID_TXT) {
1750 else if (id_type ==
ID_MSK) {
1753 else if (id_type ==
ID_MC) {
1756 else if (id_type ==
ID_VF) {
1792 [material_cow](::
Depsgraph *
depsgraph) { BKE_material_eval(depsgraph, material_cow); });
1803 for (
int i = 0; i < num_materials; i++) {
1826 if (texture->
ima !=
nullptr) {
1850 ID *cache_file_id = &cache_file->
id;
1891 for (
int i = 0; i < spline->tot_point; i++) {
1894 if (parent ==
nullptr || parent->
id ==
nullptr) {
1921 ID *clip_id = &clip->
id;
1965 if (speaker->
sound !=
nullptr) {
1981 BKE_sound_evaluate(depsgraph, bmain, sound_cow);
2006 BKE_simulation_data_update(depsgraph, scene_cow, simulation_cow);
2025 if (seq->
sound !=
nullptr) {
2028 if (seq->
scene !=
nullptr) {
2056 SEQ_eval_sequences(depsgraph, scene_cow, &scene_cow->ed->seqbase);
2079 BKE_scene_update_tag_audio_volume(depsgraph, scene_cow);
2086 Object *
object = base->object;
2104 if (
id ==
nullptr) {
2112 data->builder->build_id(
id);
2124 if (
id ==
nullptr) {
2132 data->builder->build_id(
id);
Blender kernel action and pose functionality.
struct AnimData * BKE_animdata_from_id(const struct ID *id)
void BKE_animsys_eval_animdata(struct Depsgraph *depsgraph, struct ID *id)
void BKE_animsys_eval_driver(struct Depsgraph *depsgraph, struct ID *id, int driver_index, struct FCurve *fcu_orig)
void BKE_cachefile_eval(struct Main *bmain, struct Depsgraph *depsgraph, struct CacheFile *cache_file)
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_END
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(_collection, _object)
void BKE_constraints_id_loop(struct ListBase *list, ConstraintIDFunc func, void *userdata)
void BKE_curve_eval_geometry(struct Depsgraph *depsgraph, struct Curve *curve)
#define DRIVER_TARGETS_USED_LOOPER_BEGIN(dvar)
#define DRIVER_TARGETS_LOOPER_END
void BKE_gpencil_frame_active_set(struct Depsgraph *depsgraph, struct bGPdata *gpd)
void void BKE_gpencil_modifiers_foreach_ID_link(struct Object *ob, GreasePencilIDWalkFunc walk, void *userData)
void IDP_foreach_property(struct IDProperty *id_property_root, int type_filter, IDPForeachPropertyCallback callback, void *user_data)
void BKE_image_user_id_eval_animation(struct Depsgraph *depsgraph, struct ID *id)
bool BKE_image_user_id_has_animation(struct ID *id)
struct Key * BKE_key_from_id(struct ID *id)
void BKE_lattice_eval_geometry(struct Depsgraph *depsgraph, struct Lattice *latt)
struct ViewLayer * BKE_view_layer_default_render(const struct Scene *scene)
void BKE_id_eval_properties_copy(struct ID *id_cow, struct ID *id)
#define MAIN_ID_SESSION_UUID_UNSET
void BKE_library_foreach_ID_link(struct Main *bmain, struct ID *id, LibraryIDLinkCallback callback, void *user_data, int flag)
@ IDWALK_IGNORE_EMBEDDED_ID
General operations, lookup, etc. for blender lights.
void BKE_mask_eval_update(struct Depsgraph *depsgraph, struct Mask *mask)
void BKE_mask_eval_animation(struct Depsgraph *depsgraph, struct Mask *mask)
General operations, lookup, etc. for materials.
struct Material *** BKE_object_material_array_p(struct Object *ob)
short * BKE_object_material_len_p(struct Object *ob)
void BKE_mesh_eval_geometry(struct Depsgraph *depsgraph, struct Mesh *mesh)
void BKE_modifiers_foreach_ID_link(struct Object *ob, IDWalkFunc walk, void *userData)
void BKE_movieclip_eval_update(struct Depsgraph *depsgraph, struct Main *bmain, struct MovieClip *clip)
void BKE_movieclip_eval_selection_update(struct Depsgraph *depsgraph, struct MovieClip *clip)
#define NODE_CUSTOM_GROUP
struct bNodeTree ** BKE_ntree_ptr_from_id(struct ID *id)
General operations, lookup, etc. for blender objects.
void BKE_object_data_select_update(struct Depsgraph *depsgraph, struct ID *object_data)
void BKE_particle_system_eval_init(struct Depsgraph *depsgraph, struct Object *object)
bool BKE_ptcache_object_has(struct Scene *scene, struct Object *ob, int duplis)
API for Blender-side Rigid Body stuff.
void BKE_shaderfx_foreach_ID_link(struct Object *ob, ShaderFxIDWalkFunc walk, void *userData)
void BKE_volume_eval_geometry(struct Depsgraph *depsgraph, struct Volume *volume)
#define BLI_assert_msg(a, msg)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
@ ID_RECALC_COPY_ON_WRITE
#define ID_TYPE_SUPPORTS_PARAMS_WITHOUT_COW(id_type)
@ LIB_TAG_COPIED_ON_WRITE
Object groups, one object can be in many groups at once.
@ COLLECTION_HIDE_VIEWPORT
@ NTREE_RUNTIME_FLAG_HAS_IMAGE_ANIMATION
Object is a sort of wrapper for general info.
Types and defines for representing Rigid Body entities.
Read Guarded memory(de)allocation.
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between camera
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block TEX_IMAGE
void append(const T &value)
bool checkIsBuiltAndTag(ID *id, int tag=TAG_COMPLETE)
bool checkIsBuilt(ID *id, int tag=TAG_COMPLETE) const
virtual bool need_pull_base_into_graph(const Base *base)
virtual void build_scene_parameters(Scene *scene)
virtual void build_scene_sequencer(Scene *scene)
virtual void build_object_data_camera(Object *object)
virtual void build_object_data_geometry(Object *object)
ID * ensure_cow_id(ID *id_orig)
IDNode * find_id_node(ID *id)
virtual void build_object_pointcache(Object *object)
virtual void build_animdata(ID *id)
static void modifier_walk(void *user_data, struct Object *object, struct ID **idpoin, int cb_flag)
virtual void build_world(World *world)
virtual void build_object(int base_index, Object *object, eDepsNode_LinkedState_Type linked_state, bool is_visible)
OperationNode * ensure_operation_node(ID *id, NodeType comp_type, const char *comp_name, OperationCode opcode, const DepsEvalOperationCb &op=nullptr, const char *name="", int name_tag=-1)
IDNode * add_id_node(ID *id)
virtual void build_freestyle_linestyle(FreestyleLineStyle *linestyle)
virtual void build_scene_speakers(Scene *scene, ViewLayer *view_layer)
virtual void build_cachefile(CacheFile *cache_file)
virtual void build_object_instance_collection(Object *object, bool is_object_visible)
virtual void build_object_data_speaker(Object *object)
OperationNode * add_operation_node(ComponentNode *comp_node, OperationCode opcode, const DepsEvalOperationCb &op=nullptr, const char *name="", int name_tag=-1)
virtual void build_vfont(VFont *vfont)
virtual void build_texture(Tex *tex)
virtual void build_object_data(Object *object)
virtual void build_particle_settings(ParticleSettings *part)
static void constraint_walk(bConstraint *constraint, ID **idpoin, bool is_reference, void *user_data)
virtual void build_particle_systems(Object *object, bool is_object_visible)
virtual void build_dimensions(Object *object)
virtual void build_armature(bArmature *armature)
virtual void build_scene_audio(Scene *scene)
virtual void build_simulation(Simulation *simulation)
ComponentNode * add_component_node(ID *id, NodeType comp_type, const char *comp_name="")
virtual void build_id(ID *id)
virtual void build_driver_variables(ID *id, FCurve *fcurve)
virtual void build_shapekeys(Key *key)
virtual void build_action(bAction *action)
virtual void build_animdata_nlastrip_targets(ListBase *strips)
virtual void build_animation_images(ID *id)
virtual void build_material(Material *ma)
virtual void build_materials(Material **materials, int num_materials)
virtual void build_collection(LayerCollection *from_layer_collection, Collection *collection)
virtual void build_rigidbody(Scene *scene)
virtual void build_object_transform(Object *object)
OperationNode * find_operation_node(ID *id, NodeType comp_type, const char *comp_name, OperationCode opcode, const char *name="", int name_tag=-1)
virtual void build_movieclip(MovieClip *clip)
Vector< SavedEntryTag > saved_entry_tags_
virtual void build_object_data_light(Object *object)
Map< uint, IDInfo * > id_info_hash_
bool is_parent_collection_visible_
virtual void build_image(Image *image)
virtual void build_speaker(Speaker *speaker)
virtual void build_sound(bSound *sound)
virtual void build_object_data_geometry_datablock(ID *obdata)
DepsgraphNodeBuilder(Main *bmain, Depsgraph *graph, DepsgraphBuilderCache *cache)
void update_invalid_cow_pointers()
virtual void build_object_flags(int base_index, Object *object, eDepsNode_LinkedState_Type linked_state)
ID * get_cow_id(const ID *id_orig) const
virtual void build_rig(Object *object)
TimeSourceNode * add_time_source()
virtual void build_driver_id_property(ID *id, const char *rna_path)
virtual void build_parameters(ID *id)
virtual void build_lightprobe(LightProbe *probe)
int foreach_id_cow_detect_need_for_update_callback(ID *id_cow_self, ID *id_pointer)
virtual void build_nodetree(bNodeTree *ntree)
virtual void build_idproperties(IDProperty *id_property)
virtual void build_camera(Camera *camera)
virtual void build_light(Light *lamp)
virtual void build_armature_bones(ListBase *bones)
virtual void build_driver(ID *id, FCurve *fcurve, int driver_index)
virtual void begin_build()
virtual void build_mask(Mask *mask)
bool has_operation_node(ID *id, NodeType comp_type, const char *comp_name, OperationCode opcode, const char *name="", int name_tag=-1)
virtual void build_nodetree_socket(bNodeSocket *socket)
virtual void build_object_data_lightprobe(Object *object)
virtual void build_generic_id(ID *id)
virtual void build_object_constraints(Object *object)
void tag_previously_tagged_nodes()
T * get_cow_datablock(const T *orig) const
virtual void build_object_from_layer(int base_index, Object *object, eDepsNode_LinkedState_Type linked_state)
FreestyleLineStyle linestyle
const Depsgraph * depsgraph
SyclQueue void void size_t num_bytes void
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
smooth(Type::VEC4, "color_mul") .smooth(Type gpFillTexture gpSceneDepthTexture materials[GPENCIL_MATERIAL_BUFFER_LEN]
void SEQ_for_each_callback(ListBase *seqbase, SeqForEachFunc callback, void *user_data)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
static bool seq_node_build_cb(Sequence *seq, void *user_data)
bool rna_prop_affects_parameters_node(const PointerRNA *ptr, const PropertyRNA *prop)
void deg_evaluate_object_node_visibility(::Depsgraph *depsgraph, IDNode *id_node)
static void build_idproperties_callback(IDProperty *id_property, void *user_data)
bool deg_copy_on_write_is_needed(const ID *id_orig)
@ GENERIC_DATABLOCK_UPDATE
@ TRANSFORM_SIMULATION_INIT
@ OBJECT_FROM_LAYER_ENTRY
@ RIGIDBODY_TRANSFORM_COPY
@ SYNCHRONIZE_TO_ORIGINAL
@ PARTICLE_SETTINGS_RESET
@ MOVIECLIP_SELECT_UPDATE
uint64_t IDComponentsMask
eDepsNode_LinkedState_Type
@ DEG_ID_LINKED_INDIRECTLY
bool deg_copy_on_write_is_expanded(const ID *id_cow)
@ DEPSOP_FLAG_AFFECTS_VISIBILITY
void deg_evaluate_copy_on_write(struct ::Depsgraph *graph, const IDNode *id_node)
void graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag, eUpdateSource update_source)
static int foreach_id_cow_detect_need_for_update_callback(LibraryIDLinkCallbackData *cb_data)
void deg_free_copy_on_write_datablock(ID *id_cow)
function< void(struct ::Depsgraph *)> DepsEvalOperationCb
@ DEG_UPDATE_SOURCE_USER_EDIT
@ DEG_UPDATE_SOURCE_RELATIONS
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
const char * RNA_property_identifier(const PropertyRNA *prop)
bool RNA_path_resolve_full(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
struct Object * textoncurve
struct bNodeTree * nodetree
unsigned int session_uuid
struct bNodeTree * nodetree
struct bNodeTree * nodetree
struct Collection * instance_collection
ListBase greasepencil_modifiers
struct Collection * instance_collection
struct Object * instance_object
struct Collection * constraints
struct Collection * group
struct RigidBodyWorld * rigidbody_world
struct bNodeTree * nodetree
struct bNodeTree * nodetree
struct bNodeTree * nodetree
bNodeTreeRuntimeHandle * runtime
OperationNode * find_operation(OperationIDKey key) const
OperationNode * add_operation(const DepsEvalOperationCb &op, OperationCode opcode, const char *name="", int name_tag=-1)
OperationNode * entry_operation
virtual string identifier() const override
DEGCustomDataMeshMasks previous_customdata_masks
IDComponentsMask previously_visible_components_mask
uint32_t previous_eval_flags
ID * get_cow_id(const ID *id_orig) const
IDNode * find_id_node(const ID *id) const
IDNode * add_id_node(ID *id, ID *id_cow_hint=nullptr)
OperationNodes operations
TimeSourceNode * add_time_source()
Set< OperationNode * > entry_tags
virtual void tag_update(Depsgraph *graph, eUpdateSource source) override
virtual string identifier() const override