21 #define STATS_MAX_SIZE 16384
46 typedef struct RNA_DepsgraphIterator {
54 } RNA_DepsgraphIterator;
59 RNA_DepsgraphIterator *di =
ptr->
data;
60 return &di->py_instance;
66 RNA_DepsgraphIterator *di =
ptr->
data;
70 static int rna_DepsgraphObjectInstance_is_instance_get(
PointerRNA *
ptr)
72 RNA_DepsgraphIterator *di =
ptr->
data;
79 RNA_DepsgraphIterator *di =
ptr->
data;
88 static bool rna_DepsgraphObjectInstance_show_self_get(
PointerRNA *
ptr)
90 RNA_DepsgraphIterator *di =
ptr->
data;
96 static bool rna_DepsgraphObjectInstance_show_particles_get(
PointerRNA *
ptr)
98 RNA_DepsgraphIterator *di =
ptr->
data;
106 RNA_DepsgraphIterator *di =
ptr->
data;
117 RNA_DepsgraphIterator *di =
ptr->
data;
126 static void rna_DepsgraphObjectInstance_persistent_id_get(
PointerRNA *
ptr,
int *persistent_id)
128 RNA_DepsgraphIterator *di =
ptr->
data;
131 memcpy(persistent_id,
140 static unsigned int rna_DepsgraphObjectInstance_random_id_get(
PointerRNA *
ptr)
142 RNA_DepsgraphIterator *di =
ptr->
data;
152 static void rna_DepsgraphObjectInstance_matrix_world_get(
PointerRNA *
ptr,
float *mat)
154 RNA_DepsgraphIterator *di =
ptr->
data;
167 static void rna_DepsgraphObjectInstance_orco_get(
PointerRNA *
ptr,
float *orco)
169 RNA_DepsgraphIterator *di =
ptr->
data;
179 static void rna_DepsgraphObjectInstance_uv_get(
PointerRNA *
ptr,
float *uv)
181 RNA_DepsgraphIterator *di =
ptr->
data;
206 static bool rna_DepsgraphUpdate_is_updated_transform_get(
PointerRNA *
ptr)
212 static bool rna_DepsgraphUpdate_is_updated_shading_get(
PointerRNA *
ptr)
220 static bool rna_DepsgraphUpdate_is_updated_geometry_get(
PointerRNA *
ptr)
239 static void rna_Depsgraph_debug_relations_graphviz(
Depsgraph *
depsgraph,
const char *filename)
241 FILE *f = fopen(filename,
"w");
250 const char *filename,
253 FILE *f = fopen(filename,
"w");
268 size_t outer, ops, rels;
272 "Approx %zu Operations, %zu Relations, %zu Outer Nodes",
341 typedef struct RNA_Depsgraph_Instances_Iterator {
342 RNA_DepsgraphIterator iterators[2];
346 } RNA_Depsgraph_Instances_Iterator;
358 di_it->iterators[0].iter.valid =
true;
360 iter->
valid = di_it->iterators[0].iter.valid;
365 RNA_Depsgraph_Instances_Iterator *di_it = (RNA_Depsgraph_Instances_Iterator *)
369 di_it->iterators[(di_it->counter + 1) % 2].iter = di_it->iterators[di_it->counter % 2].iter;
370 di_it->deg_data[(di_it->counter + 1) % 2] = di_it->deg_data[di_it->counter % 2];
373 di_it->iterators[di_it->counter % 2].iter.data = &di_it->deg_data[di_it->counter % 2];
380 if (di_it->deg_data[di_it->counter % 2].dupli_object_current !=
NULL) {
381 di_it->dupli_object_current[di_it->counter % 2] =
382 *di_it->deg_data[di_it->counter % 2].dupli_object_current;
383 di_it->deg_data[di_it->counter % 2].dupli_object_current =
384 &di_it->dupli_object_current[di_it->counter % 2];
386 iter->
valid = di_it->iterators[di_it->counter % 2].iter.valid;
391 RNA_Depsgraph_Instances_Iterator *di_it = (RNA_Depsgraph_Instances_Iterator *)
393 for (
int i = 0; i <
ARRAY_SIZE(di_it->iterators); i++) {
394 RNA_DepsgraphIterator *di = &di_it->iterators[i];
398 if (di->py_instance) {
409 RNA_Depsgraph_Instances_Iterator *di_it = (RNA_Depsgraph_Instances_Iterator *)
411 RNA_DepsgraphIterator *di = &di_it->iterators[di_it->counter % 2];
454 data->only_updated =
true;
524 "Dependency Graph Object Instance",
525 "Extended information about dependency graph object iterator "
526 "(Warning: All data here is 'evaluated' one, not original .blend IDs)");
541 prop,
"Show Self",
"The object geometry itself should be visible in the render");
547 prop,
"Show Particles",
"Particles part of the object should be visible in the render");
553 prop,
"Is Instance",
"Denotes if the object is generated by another object");
559 prop,
"Instance Object",
"Evaluated object which is being instanced by this iterator");
562 prop,
"rna_DepsgraphObjectInstance_instance_object_get",
NULL,
NULL,
NULL);
567 prop,
"Parent",
"If the object is an instance, the parent object that generated it");
575 prop,
"Particle System",
"Evaluated particle system that this object was instanced from");
577 prop,
"rna_DepsgraphObjectInstance_particle_system_get",
NULL,
NULL,
NULL);
583 "Persistent identifier for inter-frame matching of objects with motion blur");
591 prop,
"Instance Random ID",
"Random id for this instance, typically for randomized shading");
604 prop,
"Generated Coordinates",
"Generated coordinates in parent object space");
663 prop =
RNA_def_enum(srna,
"mode", enum_depsgraph_mode_items, 0,
"Mode",
"Evaluation mode");
670 srna,
"debug_relations_graphviz",
"rna_Depsgraph_debug_relations_graphviz");
672 func,
"filename",
NULL,
FILE_MAX,
"File Name",
"Output path for the graphviz debug file");
675 func =
RNA_def_function(srna,
"debug_stats_gnuplot",
"rna_Depsgraph_debug_stats_gnuplot");
677 func,
"filename",
NULL,
FILE_MAX,
"File Name",
"Output path for the gnuplot debug file");
684 "File name where gnuplot script will save the result");
687 func =
RNA_def_function(srna,
"debug_tag_update",
"rna_Depsgraph_debug_tag_update");
701 "Re-evaluate any modified data-blocks, for example for animation or modifiers. "
702 "This invalidates all references to evaluated data-blocks from this dependency graph.");
718 prop,
"View Layer",
"Original view layer dependency graph is built for");
724 func,
"id",
"ID",
"",
"Original ID to get evaluated complementary part for");
726 parm =
RNA_def_pointer(func,
"id_eval",
"ID",
"",
"Evaluated ID for the given original one");
729 func =
RNA_def_function(srna,
"id_type_updated",
"rna_Depsgraph_id_type_updated");
736 "True if any datablock with this type was added, updated or removed");
750 prop,
"View Layer",
"Original view layer dependency graph is built for");
757 "rna_Depsgraph_ids_begin",
758 "rna_Depsgraph_ids_next",
759 "rna_Depsgraph_ids_end",
760 "rna_Depsgraph_ids_get",
770 "rna_Depsgraph_objects_begin",
771 "rna_Depsgraph_objects_next",
772 "rna_Depsgraph_objects_end",
773 "rna_Depsgraph_objects_get",
783 "rna_Depsgraph_object_instances_begin",
784 "rna_Depsgraph_object_instances_next",
785 "rna_Depsgraph_object_instances_end",
786 "rna_Depsgraph_object_instances_get",
793 "All object instances to display or render "
794 "(Warning: Only use this as an iterator, never as a sequence, "
795 "and do not keep any references to its items)");
800 "rna_Depsgraph_updates_begin",
801 "rna_Depsgraph_ids_next",
802 "rna_Depsgraph_ids_end",
803 "rna_Depsgraph_updates_get",
General operations, lookup, etc. for blender objects.
int BKE_object_visibility(const struct Object *ob, int dag_eval_mode)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_scene_graph_update_tagged(struct Depsgraph *depsgraph, struct Main *bmain)
void copy_m4_m4(float m1[4][4], const float m2[4][4])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void zero_v2(float r[2])
MINLINE void zero_v3(float r[3])
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define BPy_BEGIN_ALLOW_THREADS
void BPY_DECREF_RNA_INVALIDATE(void *pyob_ptr)
#define BPy_END_ALLOW_THREADS
struct Depsgraph Depsgraph
bool DEG_is_evaluating(const struct Depsgraph *depsgraph)
void DEG_graph_tag_relations_update(struct Depsgraph *graph)
void DEG_debug_relations_graphviz(const struct Depsgraph *graph, FILE *fp, const char *label)
void DEG_stats_simple(const struct Depsgraph *graph, size_t *r_outer, size_t *r_operations, size_t *r_relations)
void DEG_debug_stats_gnuplot(const struct Depsgraph *graph, FILE *fp, const char *label, const char *output_filename)
void DEG_iterator_objects_next(struct BLI_Iterator *iter)
struct Scene * DEG_get_input_scene(const Depsgraph *graph)
void DEG_iterator_ids_begin(struct BLI_Iterator *iter, DEGIDIterData *data)
eEvaluationMode DEG_get_mode(const Depsgraph *graph)
void DEG_iterator_ids_end(struct BLI_Iterator *iter)
struct ID * DEG_get_evaluated_id(const struct Depsgraph *depsgraph, struct ID *id)
@ DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY
@ DEG_ITER_OBJECT_FLAG_VISIBLE
@ DEG_ITER_OBJECT_FLAG_DUPLI
@ DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET
struct ViewLayer * DEG_get_evaluated_view_layer(const struct Depsgraph *graph)
void DEG_iterator_objects_end(struct BLI_Iterator *iter)
void DEG_iterator_objects_begin(struct BLI_Iterator *iter, DEGObjectIterData *data)
void DEG_iterator_ids_next(struct BLI_Iterator *iter)
struct ViewLayer * DEG_get_input_view_layer(const Depsgraph *graph)
bool DEG_id_type_updated(const struct Depsgraph *depsgraph, short id_type)
struct Scene * DEG_get_evaluated_scene(const struct Depsgraph *graph)
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
return(oflags[bm->toolflag_index].f &oflag) !=0
const char * output_filename
const Depsgraph * depsgraph
ccl_gpu_kernel_postfix ccl_global int * counter
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
const EnumPropertyItem rna_enum_id_type_items[]
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
PropertyRNA * RNA_def_string_file_path(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_function_output(FunctionRNA *UNUSED(func), PropertyRNA *ret)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const char *unreg, const char *instance)
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
const int rna_matrix_dimsize_4x4[]
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_depsgraph(BlenderRNA *brna)
static void rna_def_depsgraph_instance(BlenderRNA *brna)
static void rna_def_depsgraph_update(BlenderRNA *brna)
static void rna_def_depsgraph(BlenderRNA *brna)
union CollectionPropertyIterator::@1147 internal
eEvaluationMode eval_mode
struct Object * dupli_parent
struct DupliObject * dupli_object_current
struct ParticleSystem * particle_system