Cleanup: Remove unnecessary struct keyword from newly C++ headers
Also remove `void` in `(void)`.
This commit is contained in:
parent
bb39f4fa41
commit
8a9dad1f2c
|
@ -16,8 +16,8 @@ struct ID;
|
|||
struct ImBuf;
|
||||
struct PreviewImage;
|
||||
|
||||
void BKE_preview_images_init(void);
|
||||
void BKE_preview_images_free(void);
|
||||
void BKE_preview_images_init();
|
||||
void BKE_preview_images_free();
|
||||
|
||||
/**
|
||||
* Free the preview image for use in list.
|
||||
|
@ -63,7 +63,7 @@ void BKE_previewimg_id_free(ID *id);
|
|||
/**
|
||||
* Create a new preview image.
|
||||
*/
|
||||
PreviewImage *BKE_previewimg_create(void);
|
||||
PreviewImage *BKE_previewimg_create();
|
||||
|
||||
/**
|
||||
* Create a copy of the preview image.
|
||||
|
|
|
@ -159,7 +159,7 @@ void blo_write_id_struct(BlendWriter *writer, int struct_id, const void *id_addr
|
|||
*/
|
||||
struct BLO_Write_IDBuffer;
|
||||
|
||||
BLO_Write_IDBuffer *BLO_write_allocate_id_buffer(void);
|
||||
BLO_Write_IDBuffer *BLO_write_allocate_id_buffer();
|
||||
void BLO_write_init_id_buffer_from_id(BLO_Write_IDBuffer *id_buffer, ID *id, const bool is_undo);
|
||||
ID *BLO_write_get_id_buffer_temp_id(BLO_Write_IDBuffer *id_buffer);
|
||||
void BLO_write_destroy_id_buffer(BLO_Write_IDBuffer **id_buffer);
|
||||
|
|
|
@ -33,19 +33,18 @@
|
|||
#include "DNA_ID.h"
|
||||
|
||||
/* Dependency Graph */
|
||||
typedef struct Depsgraph Depsgraph;
|
||||
struct Depsgraph;
|
||||
|
||||
/* ------------------------------------------------ */
|
||||
|
||||
struct Main;
|
||||
|
||||
struct Scene;
|
||||
struct ViewLayer;
|
||||
|
||||
typedef enum eEvaluationMode {
|
||||
enum eEvaluationMode {
|
||||
DAG_EVAL_VIEWPORT = 0, /* evaluate for OpenGL viewport */
|
||||
DAG_EVAL_RENDER = 1, /* evaluate for render purposes */
|
||||
} eEvaluationMode;
|
||||
};
|
||||
|
||||
/* DagNode->eval_flags */
|
||||
enum {
|
||||
|
@ -72,10 +71,7 @@ enum {
|
|||
*
|
||||
* TODO: what arguments are needed here? What's the building-graph entry point?
|
||||
*/
|
||||
Depsgraph *DEG_graph_new(struct Main *bmain,
|
||||
struct Scene *scene,
|
||||
struct ViewLayer *view_layer,
|
||||
eEvaluationMode mode);
|
||||
Depsgraph *DEG_graph_new(Main *bmain, Scene *scene, ViewLayer *view_layer, eEvaluationMode mode);
|
||||
|
||||
/**
|
||||
* Replace the "owner" pointers (currently Main/Scene/ViewLayer) of this depsgraph.
|
||||
|
@ -83,10 +79,10 @@ Depsgraph *DEG_graph_new(struct Main *bmain,
|
|||
* - Undo steps when we do want to re-use the old depsgraph data as much as possible.
|
||||
* - Rendering where we want to re-use objects between different view layers.
|
||||
*/
|
||||
void DEG_graph_replace_owners(struct Depsgraph *depsgraph,
|
||||
struct Main *bmain,
|
||||
struct Scene *scene,
|
||||
struct ViewLayer *view_layer);
|
||||
void DEG_graph_replace_owners(Depsgraph *depsgraph,
|
||||
Main *bmain,
|
||||
Scene *scene,
|
||||
ViewLayer *view_layer);
|
||||
|
||||
/** Free graph's contents and graph itself. */
|
||||
void DEG_graph_free(Depsgraph *graph);
|
||||
|
@ -98,10 +94,10 @@ void DEG_graph_free(Depsgraph *graph);
|
|||
* \{ */
|
||||
|
||||
/** Register all node types. */
|
||||
void DEG_register_node_types(void);
|
||||
void DEG_register_node_types();
|
||||
|
||||
/** Free node type registry on exit. */
|
||||
void DEG_free_node_types(void);
|
||||
void DEG_free_node_types();
|
||||
|
||||
/** \} */
|
||||
|
||||
|
@ -113,7 +109,7 @@ void DEG_free_node_types(void);
|
|||
void DEG_graph_tag_on_visible_update(Depsgraph *depsgraph, bool do_time);
|
||||
|
||||
/** Tag all dependency graphs for update when visible scenes/layers changes. */
|
||||
void DEG_tag_on_visible_update(struct Main *bmain, bool do_time);
|
||||
void DEG_tag_on_visible_update(Main *bmain, bool do_time);
|
||||
|
||||
/**
|
||||
* \note Will return NULL if the flag is not known, allowing to gracefully handle situations
|
||||
|
@ -122,36 +118,33 @@ void DEG_tag_on_visible_update(struct Main *bmain, bool do_time);
|
|||
const char *DEG_update_tag_as_string(IDRecalcFlag flag);
|
||||
|
||||
/** Tag given ID for an update in all the dependency graphs. */
|
||||
void DEG_id_tag_update(struct ID *id, unsigned int flags);
|
||||
void DEG_id_tag_update_ex(struct Main *bmain, struct ID *id, unsigned int flags);
|
||||
void DEG_id_tag_update(ID *id, unsigned int flags);
|
||||
void DEG_id_tag_update_ex(Main *bmain, ID *id, unsigned int flags);
|
||||
|
||||
void DEG_graph_id_tag_update(struct Main *bmain,
|
||||
struct Depsgraph *depsgraph,
|
||||
struct ID *id,
|
||||
unsigned int flags);
|
||||
void DEG_graph_id_tag_update(Main *bmain, Depsgraph *depsgraph, ID *id, unsigned int flags);
|
||||
|
||||
/** Tag all dependency graphs when time has changed. */
|
||||
void DEG_time_tag_update(struct Main *bmain);
|
||||
void DEG_time_tag_update(Main *bmain);
|
||||
|
||||
/** Tag a dependency graph when time has changed. */
|
||||
void DEG_graph_time_tag_update(struct Depsgraph *depsgraph);
|
||||
void DEG_graph_time_tag_update(Depsgraph *depsgraph);
|
||||
|
||||
/**
|
||||
* Mark a particular data-block type as having changing.
|
||||
* This does not cause any updates but is used by external
|
||||
* render engines to detect if for example a data-block was removed.
|
||||
*/
|
||||
void DEG_graph_id_type_tag(struct Depsgraph *depsgraph, short id_type);
|
||||
void DEG_id_type_tag(struct Main *bmain, short id_type);
|
||||
void DEG_graph_id_type_tag(Depsgraph *depsgraph, short id_type);
|
||||
void DEG_id_type_tag(Main *bmain, short id_type);
|
||||
|
||||
/**
|
||||
* Set a depsgraph to flush updates to editors. This would be done
|
||||
* for viewport depsgraphs, but not render or export depsgraph for example.
|
||||
*/
|
||||
void DEG_enable_editors_update(struct Depsgraph *depsgraph);
|
||||
void DEG_enable_editors_update(Depsgraph *depsgraph);
|
||||
|
||||
/** Check if something was changed in the database and inform editors about this. */
|
||||
void DEG_editors_update(struct Depsgraph *depsgraph, bool time);
|
||||
void DEG_editors_update(Depsgraph *depsgraph, bool time);
|
||||
|
||||
/** Clear recalc flags after editors or renderers have handled updates. */
|
||||
void DEG_ids_clear_recalc(Depsgraph *depsgraph, bool backup);
|
||||
|
@ -193,15 +186,15 @@ void DEG_evaluate_on_refresh(Depsgraph *graph);
|
|||
* to do their own updates based on changes.
|
||||
* \{ */
|
||||
|
||||
typedef struct DEGEditorUpdateContext {
|
||||
struct Main *bmain;
|
||||
struct Depsgraph *depsgraph;
|
||||
struct Scene *scene;
|
||||
struct ViewLayer *view_layer;
|
||||
} DEGEditorUpdateContext;
|
||||
struct DEGEditorUpdateContext {
|
||||
Main *bmain;
|
||||
Depsgraph *depsgraph;
|
||||
Scene *scene;
|
||||
ViewLayer *view_layer;
|
||||
};
|
||||
|
||||
typedef void (*DEG_EditorUpdateIDCb)(const DEGEditorUpdateContext *update_ctx, struct ID *id);
|
||||
typedef void (*DEG_EditorUpdateSceneCb)(const DEGEditorUpdateContext *update_ctx, bool updated);
|
||||
using DEG_EditorUpdateIDCb = void (*)(const DEGEditorUpdateContext *update_ctx, ID *id);
|
||||
using DEG_EditorUpdateSceneCb = void (*)(const DEGEditorUpdateContext *update_ctx, bool updated);
|
||||
|
||||
/** Set callbacks which are being called when depsgraph changes. */
|
||||
void DEG_editors_set_update_cb(DEG_EditorUpdateIDCb id_func, DEG_EditorUpdateSceneCb scene_func);
|
||||
|
@ -212,11 +205,11 @@ void DEG_editors_set_update_cb(DEG_EditorUpdateIDCb id_func, DEG_EditorUpdateSce
|
|||
/** \name Evaluation
|
||||
* \{ */
|
||||
|
||||
bool DEG_is_evaluating(const struct Depsgraph *depsgraph);
|
||||
bool DEG_is_evaluating(const Depsgraph *depsgraph);
|
||||
|
||||
bool DEG_is_active(const struct Depsgraph *depsgraph);
|
||||
void DEG_make_active(struct Depsgraph *depsgraph);
|
||||
void DEG_make_inactive(struct Depsgraph *depsgraph);
|
||||
bool DEG_is_active(const Depsgraph *depsgraph);
|
||||
void DEG_make_active(Depsgraph *depsgraph);
|
||||
void DEG_make_inactive(Depsgraph *depsgraph);
|
||||
|
||||
/**
|
||||
* Disable the visibility optimization making it so IDs which affect hidden objects or disabled
|
||||
|
@ -224,7 +217,7 @@ void DEG_make_inactive(struct Depsgraph *depsgraph);
|
|||
*
|
||||
* For example, this ensures that an object which is needed by a modifier is ignoring checks about
|
||||
* whether the object is hidden or the modifier is disabled. */
|
||||
void DEG_disable_visibility_optimization(struct Depsgraph *depsgraph);
|
||||
void DEG_disable_visibility_optimization(Depsgraph *depsgraph);
|
||||
|
||||
/** \} */
|
||||
|
||||
|
@ -232,14 +225,14 @@ void DEG_disable_visibility_optimization(struct Depsgraph *depsgraph);
|
|||
/** \name Evaluation Debug
|
||||
* \{ */
|
||||
|
||||
void DEG_debug_print_begin(struct Depsgraph *depsgraph);
|
||||
void DEG_debug_print_begin(Depsgraph *depsgraph);
|
||||
|
||||
void DEG_debug_print_eval(struct Depsgraph *depsgraph,
|
||||
void DEG_debug_print_eval(Depsgraph *depsgraph,
|
||||
const char *function_name,
|
||||
const char *object_name,
|
||||
const void *object_address);
|
||||
|
||||
void DEG_debug_print_eval_subdata(struct Depsgraph *depsgraph,
|
||||
void DEG_debug_print_eval_subdata(Depsgraph *depsgraph,
|
||||
const char *function_name,
|
||||
const char *object_name,
|
||||
const void *object_address,
|
||||
|
@ -247,7 +240,7 @@ void DEG_debug_print_eval_subdata(struct Depsgraph *depsgraph,
|
|||
const char *subdata_name,
|
||||
const void *subdata_address);
|
||||
|
||||
void DEG_debug_print_eval_subdata_index(struct Depsgraph *depsgraph,
|
||||
void DEG_debug_print_eval_subdata_index(Depsgraph *depsgraph,
|
||||
const char *function_name,
|
||||
const char *object_name,
|
||||
const void *object_address,
|
||||
|
@ -256,7 +249,7 @@ void DEG_debug_print_eval_subdata_index(struct Depsgraph *depsgraph,
|
|||
const void *subdata_address,
|
||||
int subdata_index);
|
||||
|
||||
void DEG_debug_print_eval_parent_typed(struct Depsgraph *depsgraph,
|
||||
void DEG_debug_print_eval_parent_typed(Depsgraph *depsgraph,
|
||||
const char *function_name,
|
||||
const char *object_name,
|
||||
const void *object_address,
|
||||
|
@ -264,7 +257,7 @@ void DEG_debug_print_eval_parent_typed(struct Depsgraph *depsgraph,
|
|||
const char *parent_name,
|
||||
const void *parent_address);
|
||||
|
||||
void DEG_debug_print_eval_time(struct Depsgraph *depsgraph,
|
||||
void DEG_debug_print_eval_time(Depsgraph *depsgraph,
|
||||
const char *function_name,
|
||||
const char *object_name,
|
||||
const void *object_address,
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "BLI_sys_types.h"
|
||||
|
||||
/* ************************************************* */
|
||||
|
||||
/* Dependency Graph */
|
||||
|
@ -26,23 +28,21 @@ struct Object;
|
|||
struct Scene;
|
||||
struct bNodeTree;
|
||||
|
||||
#include "BLI_sys_types.h"
|
||||
|
||||
/* Graph Building -------------------------------- */
|
||||
|
||||
/** Build depsgraph for the given scene layer, and dump results in given graph container. */
|
||||
void DEG_graph_build_from_view_layer(struct Depsgraph *graph);
|
||||
void DEG_graph_build_from_view_layer(Depsgraph *graph);
|
||||
|
||||
/**
|
||||
* Build depsgraph for all objects (so also invisible ones) in the given view layer.
|
||||
*/
|
||||
void DEG_graph_build_for_all_objects(struct Depsgraph *graph);
|
||||
void DEG_graph_build_for_all_objects(Depsgraph *graph);
|
||||
|
||||
/**
|
||||
* Special version of builder which produces dependency graph suitable for the render pipeline.
|
||||
* It will contain sequencer and compositor (if needed) and all their dependencies.
|
||||
*/
|
||||
void DEG_graph_build_for_render_pipeline(struct Depsgraph *graph);
|
||||
void DEG_graph_build_for_render_pipeline(Depsgraph *graph);
|
||||
|
||||
/**
|
||||
* Builds minimal dependency graph for compositor preview.
|
||||
|
@ -50,21 +50,21 @@ void DEG_graph_build_for_render_pipeline(struct Depsgraph *graph);
|
|||
* Note that compositor editor might have pinned node tree, which is different from scene's node
|
||||
* tree.
|
||||
*/
|
||||
void DEG_graph_build_for_compositor_preview(struct Depsgraph *graph, struct bNodeTree *nodetree);
|
||||
void DEG_graph_build_for_compositor_preview(Depsgraph *graph, bNodeTree *nodetree);
|
||||
|
||||
/**
|
||||
* Builds the minimal dependency graph needed for evaluation of the given IDs.
|
||||
*/
|
||||
void DEG_graph_build_from_ids(struct Depsgraph *graph, struct ID **ids, int num_ids);
|
||||
void DEG_graph_build_from_ids(Depsgraph *graph, ID **ids, int num_ids);
|
||||
|
||||
/** Tag relations from the given graph for update. */
|
||||
void DEG_graph_tag_relations_update(struct Depsgraph *graph);
|
||||
void DEG_graph_tag_relations_update(Depsgraph *graph);
|
||||
|
||||
/** Create or update relations in the specified graph. */
|
||||
void DEG_graph_relations_update(struct Depsgraph *graph);
|
||||
void DEG_graph_relations_update(Depsgraph *graph);
|
||||
|
||||
/** Tag all relations in the database for update. */
|
||||
void DEG_relations_tag_update(struct Main *bmain);
|
||||
void DEG_relations_tag_update(Main *bmain);
|
||||
|
||||
/* Add Dependencies ----------------------------- */
|
||||
|
||||
|
@ -116,39 +116,37 @@ typedef enum eDepsObjectComponentType {
|
|||
DEG_OB_COMP_CACHE,
|
||||
} eDepsObjectComponentType;
|
||||
|
||||
void DEG_add_scene_relation(struct DepsNodeHandle *node_handle,
|
||||
struct Scene *scene,
|
||||
void DEG_add_scene_relation(DepsNodeHandle *node_handle,
|
||||
Scene *scene,
|
||||
eDepsSceneComponentType component,
|
||||
const char *description);
|
||||
void DEG_add_object_relation(struct DepsNodeHandle *node_handle,
|
||||
struct Object *object,
|
||||
void DEG_add_object_relation(DepsNodeHandle *node_handle,
|
||||
Object *object,
|
||||
eDepsObjectComponentType component,
|
||||
const char *description);
|
||||
void DEG_add_collection_geometry_relation(struct DepsNodeHandle *node_handle,
|
||||
struct Collection *collection,
|
||||
void DEG_add_collection_geometry_relation(DepsNodeHandle *node_handle,
|
||||
Collection *collection,
|
||||
const char *description);
|
||||
void DEG_add_collection_geometry_customdata_mask(struct DepsNodeHandle *node_handle,
|
||||
struct Collection *collection,
|
||||
const struct CustomData_MeshMasks *masks);
|
||||
void DEG_add_node_tree_output_relation(struct DepsNodeHandle *node_handle,
|
||||
struct bNodeTree *node_tree,
|
||||
void DEG_add_collection_geometry_customdata_mask(DepsNodeHandle *node_handle,
|
||||
Collection *collection,
|
||||
const CustomData_MeshMasks *masks);
|
||||
void DEG_add_node_tree_output_relation(DepsNodeHandle *node_handle,
|
||||
bNodeTree *node_tree,
|
||||
const char *description);
|
||||
void DEG_add_bone_relation(struct DepsNodeHandle *handle,
|
||||
struct Object *object,
|
||||
void DEG_add_bone_relation(DepsNodeHandle *handle,
|
||||
Object *object,
|
||||
const char *bone_name,
|
||||
eDepsObjectComponentType component,
|
||||
const char *description);
|
||||
void DEG_add_object_cache_relation(struct DepsNodeHandle *handle,
|
||||
struct CacheFile *cache_file,
|
||||
void DEG_add_object_cache_relation(DepsNodeHandle *handle,
|
||||
CacheFile *cache_file,
|
||||
eDepsObjectComponentType component,
|
||||
const char *description);
|
||||
/**
|
||||
* Adds relation from #DEG_OPCODE_GENERIC_DATABLOCK_UPDATE of a given ID.
|
||||
* Is used for such entities as textures and images.
|
||||
*/
|
||||
void DEG_add_generic_id_relation(struct DepsNodeHandle *node_handle,
|
||||
struct ID *id,
|
||||
const char *description);
|
||||
void DEG_add_generic_id_relation(DepsNodeHandle *node_handle, ID *id, const char *description);
|
||||
|
||||
/**
|
||||
* Special function which is used from modifiers' #update_depsgraph() callback
|
||||
|
@ -157,26 +155,25 @@ void DEG_add_generic_id_relation(struct DepsNodeHandle *node_handle,
|
|||
* This function will take care of checking which operation is required to
|
||||
* have transformation for the modifier, taking into account possible simulation solvers.
|
||||
*/
|
||||
void DEG_add_depends_on_transform_relation(struct DepsNodeHandle *node_handle,
|
||||
const char *description);
|
||||
void DEG_add_depends_on_transform_relation(DepsNodeHandle *node_handle, const char *description);
|
||||
|
||||
/**
|
||||
* Adds relations from the given component of a given object to the given node
|
||||
* handle AND the component to the point cache component of the node's ID.
|
||||
*/
|
||||
void DEG_add_object_pointcache_relation(struct DepsNodeHandle *node_handle,
|
||||
struct Object *object,
|
||||
void DEG_add_object_pointcache_relation(DepsNodeHandle *node_handle,
|
||||
Object *object,
|
||||
eDepsObjectComponentType component,
|
||||
const char *description);
|
||||
|
||||
void DEG_add_special_eval_flag(struct DepsNodeHandle *handle, struct ID *id, uint32_t flag);
|
||||
void DEG_add_customdata_mask(struct DepsNodeHandle *handle,
|
||||
struct Object *object,
|
||||
const struct CustomData_MeshMasks *masks);
|
||||
void DEG_add_special_eval_flag(DepsNodeHandle *handle, ID *id, uint32_t flag);
|
||||
void DEG_add_customdata_mask(DepsNodeHandle *handle,
|
||||
Object *object,
|
||||
const CustomData_MeshMasks *masks);
|
||||
|
||||
struct ID *DEG_get_id_from_handle(struct DepsNodeHandle *node_handle);
|
||||
struct Depsgraph *DEG_get_graph_from_handle(struct DepsNodeHandle *node_handle);
|
||||
ID *DEG_get_id_from_handle(DepsNodeHandle *node_handle);
|
||||
Depsgraph *DEG_get_graph_from_handle(DepsNodeHandle *node_handle);
|
||||
|
||||
bool DEG_object_has_geometry_component(struct Object *object);
|
||||
bool DEG_object_has_geometry_component(Object *object);
|
||||
|
||||
/* ************************************************ */
|
||||
|
|
|
@ -10,9 +10,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
|
||||
struct Depsgraph;
|
||||
struct Main;
|
||||
struct Scene;
|
||||
struct ViewLayer;
|
||||
|
||||
|
@ -20,11 +21,11 @@ struct ViewLayer;
|
|||
|
||||
/* NOTE: Those flags are same bit-mask as #G.debug_flags */
|
||||
|
||||
void DEG_debug_flags_set(struct Depsgraph *depsgraph, int flags);
|
||||
int DEG_debug_flags_get(const struct Depsgraph *depsgraph);
|
||||
void DEG_debug_flags_set(Depsgraph *depsgraph, int flags);
|
||||
int DEG_debug_flags_get(const Depsgraph *depsgraph);
|
||||
|
||||
void DEG_debug_name_set(struct Depsgraph *depsgraph, const char *name);
|
||||
const char *DEG_debug_name_get(struct Depsgraph *depsgraph);
|
||||
void DEG_debug_name_set(Depsgraph *depsgraph, const char *name);
|
||||
const char *DEG_debug_name_get(Depsgraph *depsgraph);
|
||||
|
||||
/* ------------------------------------------------ */
|
||||
|
||||
|
@ -34,7 +35,7 @@ const char *DEG_debug_name_get(struct Depsgraph *depsgraph);
|
|||
* \param[out] r_operations: The number of operation nodes in the graph.
|
||||
* \param[out] r_relations: The number of relations between (executable) nodes in the graph.
|
||||
*/
|
||||
void DEG_stats_simple(const struct Depsgraph *graph,
|
||||
void DEG_stats_simple(const Depsgraph *graph,
|
||||
size_t *r_outer,
|
||||
size_t *r_operations,
|
||||
size_t *r_relations);
|
||||
|
@ -42,9 +43,9 @@ void DEG_stats_simple(const struct Depsgraph *graph,
|
|||
/* ************************************************ */
|
||||
/* Diagram-Based Graph Debugging */
|
||||
|
||||
void DEG_debug_relations_graphviz(const struct Depsgraph *graph, FILE *fp, const char *label);
|
||||
void DEG_debug_relations_graphviz(const Depsgraph *graph, FILE *fp, const char *label);
|
||||
|
||||
void DEG_debug_stats_gnuplot(const struct Depsgraph *graph,
|
||||
void DEG_debug_stats_gnuplot(const Depsgraph *graph,
|
||||
FILE *fp,
|
||||
const char *label,
|
||||
const char *output_filename);
|
||||
|
@ -52,13 +53,13 @@ void DEG_debug_stats_gnuplot(const struct Depsgraph *graph,
|
|||
/* ************************************************ */
|
||||
|
||||
/** Compare two dependency graphs. */
|
||||
bool DEG_debug_compare(const struct Depsgraph *graph1, const struct Depsgraph *graph2);
|
||||
bool DEG_debug_compare(const Depsgraph *graph1, const Depsgraph *graph2);
|
||||
|
||||
/** Check that dependencies in the graph are really up to date. */
|
||||
bool DEG_debug_graph_relations_validate(struct Depsgraph *graph,
|
||||
struct Main *bmain,
|
||||
struct Scene *scene,
|
||||
struct ViewLayer *view_layer);
|
||||
bool DEG_debug_graph_relations_validate(Depsgraph *graph,
|
||||
Main *bmain,
|
||||
Scene *scene,
|
||||
ViewLayer *view_layer);
|
||||
|
||||
/** Perform consistency check on the graph. */
|
||||
bool DEG_debug_consistency_check(struct Depsgraph *graph);
|
||||
bool DEG_debug_consistency_check(Depsgraph *graph);
|
||||
|
|
|
@ -12,41 +12,42 @@
|
|||
|
||||
#include "DEG_depsgraph.hh"
|
||||
|
||||
struct Collection;
|
||||
struct DepsNodeHandle;
|
||||
struct Depsgraph;
|
||||
struct EffectorWeights;
|
||||
struct ListBase;
|
||||
struct ModifierData;
|
||||
struct Object;
|
||||
|
||||
typedef enum ePhysicsRelationType {
|
||||
enum ePhysicsRelationType {
|
||||
DEG_PHYSICS_EFFECTOR = 0,
|
||||
DEG_PHYSICS_COLLISION = 1,
|
||||
DEG_PHYSICS_SMOKE_COLLISION = 2,
|
||||
DEG_PHYSICS_DYNAMIC_BRUSH = 3,
|
||||
DEG_PHYSICS_RELATIONS_NUM = 4,
|
||||
} ePhysicsRelationType;
|
||||
};
|
||||
|
||||
/* Get collision/effector relations from collection or entire scene. These
|
||||
* created during depsgraph relations building and should only be accessed
|
||||
* during evaluation. */
|
||||
struct ListBase *DEG_get_effector_relations(const struct Depsgraph *depsgraph,
|
||||
struct Collection *collection);
|
||||
struct ListBase *DEG_get_collision_relations(const struct Depsgraph *depsgraph,
|
||||
struct Collection *collection,
|
||||
ListBase *DEG_get_effector_relations(const Depsgraph *depsgraph, Collection *collection);
|
||||
ListBase *DEG_get_collision_relations(const Depsgraph *depsgraph,
|
||||
Collection *collection,
|
||||
unsigned int modifier_type);
|
||||
|
||||
/* Build collision/effector relations for depsgraph. */
|
||||
typedef bool (*DEG_CollobjFilterFunction)(struct Object *obj, struct ModifierData *md);
|
||||
using DEG_CollobjFilterFunction = bool (*)(Object *obj, ModifierData *md);
|
||||
|
||||
void DEG_add_collision_relations(struct DepsNodeHandle *handle,
|
||||
struct Object *object,
|
||||
struct Collection *collection,
|
||||
void DEG_add_collision_relations(DepsNodeHandle *handle,
|
||||
Object *object,
|
||||
Collection *collection,
|
||||
unsigned int modifier_type,
|
||||
DEG_CollobjFilterFunction filter_function,
|
||||
const char *name);
|
||||
void DEG_add_forcefield_relations(struct DepsNodeHandle *handle,
|
||||
struct Object *object,
|
||||
struct EffectorWeights *eff,
|
||||
void DEG_add_forcefield_relations(DepsNodeHandle *handle,
|
||||
Object *object,
|
||||
EffectorWeights *eff,
|
||||
bool add_absorption,
|
||||
int skip_forcefield,
|
||||
const char *name);
|
||||
|
|
|
@ -35,13 +35,13 @@ struct ViewerPath;
|
|||
* \{ */
|
||||
|
||||
/** Get scene that depsgraph was built for. */
|
||||
struct Scene *DEG_get_input_scene(const Depsgraph *graph);
|
||||
Scene *DEG_get_input_scene(const Depsgraph *graph);
|
||||
|
||||
/** Get view layer that depsgraph was built for. */
|
||||
struct ViewLayer *DEG_get_input_view_layer(const Depsgraph *graph);
|
||||
ViewLayer *DEG_get_input_view_layer(const Depsgraph *graph);
|
||||
|
||||
/** Get bmain that depsgraph was built for. */
|
||||
struct Main *DEG_get_bmain(const Depsgraph *graph);
|
||||
Main *DEG_get_bmain(const Depsgraph *graph);
|
||||
|
||||
/** Get evaluation mode that depsgraph was built for. */
|
||||
eEvaluationMode DEG_get_mode(const Depsgraph *graph);
|
||||
|
@ -56,19 +56,19 @@ float DEG_get_ctime(const Depsgraph *graph);
|
|||
* \{ */
|
||||
|
||||
/** Check if given ID type was tagged for update. */
|
||||
bool DEG_id_type_updated(const struct Depsgraph *depsgraph, short id_type);
|
||||
bool DEG_id_type_any_updated(const struct Depsgraph *depsgraph);
|
||||
bool DEG_id_type_updated(const Depsgraph *depsgraph, short id_type);
|
||||
bool DEG_id_type_any_updated(const Depsgraph *depsgraph);
|
||||
|
||||
/** Check if given ID type is present in the depsgraph */
|
||||
bool DEG_id_type_any_exists(const struct Depsgraph *depsgraph, short id_type);
|
||||
bool DEG_id_type_any_exists(const Depsgraph *depsgraph, short id_type);
|
||||
|
||||
/** Get additional evaluation flags for the given ID. */
|
||||
uint32_t DEG_get_eval_flags_for_id(const struct Depsgraph *graph, const struct ID *id);
|
||||
uint32_t DEG_get_eval_flags_for_id(const Depsgraph *graph, const ID *id);
|
||||
|
||||
/** Get additional mesh CustomData_MeshMasks flags for the given object. */
|
||||
void DEG_get_customdata_mask_for_object(const struct Depsgraph *graph,
|
||||
struct Object *object,
|
||||
struct CustomData_MeshMasks *r_mask);
|
||||
void DEG_get_customdata_mask_for_object(const Depsgraph *graph,
|
||||
Object *object,
|
||||
CustomData_MeshMasks *r_mask);
|
||||
|
||||
/**
|
||||
* Get scene at its evaluated state.
|
||||
|
@ -77,30 +77,30 @@ void DEG_get_customdata_mask_for_object(const struct Depsgraph *graph,
|
|||
* This function will check that the data-block has been expanded (and copied) from the original
|
||||
* one. Assert will happen if it's not.
|
||||
*/
|
||||
struct Scene *DEG_get_evaluated_scene(const struct Depsgraph *graph);
|
||||
Scene *DEG_get_evaluated_scene(const Depsgraph *graph);
|
||||
|
||||
/**
|
||||
* Get view layer at its evaluated state.
|
||||
* This is a shortcut for accessing active view layer from evaluated scene.
|
||||
*/
|
||||
struct ViewLayer *DEG_get_evaluated_view_layer(const struct Depsgraph *graph);
|
||||
ViewLayer *DEG_get_evaluated_view_layer(const Depsgraph *graph);
|
||||
|
||||
/** Get evaluated version of object for given original one. */
|
||||
struct Object *DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object);
|
||||
Object *DEG_get_evaluated_object(const Depsgraph *depsgraph, Object *object);
|
||||
|
||||
/** Get evaluated version of given ID data-block. */
|
||||
struct ID *DEG_get_evaluated_id(const struct Depsgraph *depsgraph, struct ID *id);
|
||||
ID *DEG_get_evaluated_id(const Depsgraph *depsgraph, ID *id);
|
||||
|
||||
/** Get evaluated version of data pointed to by RNA pointer */
|
||||
void DEG_get_evaluated_rna_pointer(const struct Depsgraph *depsgraph,
|
||||
struct PointerRNA *ptr,
|
||||
struct PointerRNA *r_ptr_eval);
|
||||
void DEG_get_evaluated_rna_pointer(const Depsgraph *depsgraph,
|
||||
PointerRNA *ptr,
|
||||
PointerRNA *r_ptr_eval);
|
||||
|
||||
/** Get original version of object for given evaluated one. */
|
||||
struct Object *DEG_get_original_object(struct Object *object);
|
||||
Object *DEG_get_original_object(Object *object);
|
||||
|
||||
/** Get original version of given evaluated ID data-block. */
|
||||
struct ID *DEG_get_original_id(struct ID *id);
|
||||
ID *DEG_get_original_id(ID *id);
|
||||
|
||||
/**
|
||||
* Check whether given ID is an original.
|
||||
|
@ -108,22 +108,22 @@ struct ID *DEG_get_original_id(struct ID *id);
|
|||
* Original IDs are considered all the IDs which are not covered by copy-on-write system and are
|
||||
* not out-of-main localized data-blocks.
|
||||
*/
|
||||
bool DEG_is_original_id(const struct ID *id);
|
||||
bool DEG_is_original_object(const struct Object *object);
|
||||
bool DEG_is_original_id(const ID *id);
|
||||
bool DEG_is_original_object(const Object *object);
|
||||
|
||||
/* Opposite of the above.
|
||||
*
|
||||
* If the data-block is not original it must be evaluated, and vice versa. */
|
||||
|
||||
bool DEG_is_evaluated_id(const struct ID *id);
|
||||
bool DEG_is_evaluated_object(const struct Object *object);
|
||||
bool DEG_is_evaluated_id(const ID *id);
|
||||
bool DEG_is_evaluated_object(const Object *object);
|
||||
|
||||
/**
|
||||
* Check whether depsgraph is fully evaluated. This includes the following checks:
|
||||
* - Relations are up-to-date.
|
||||
* - Nothing is tagged for update.
|
||||
*/
|
||||
bool DEG_is_fully_evaluated(const struct Depsgraph *depsgraph);
|
||||
bool DEG_is_fully_evaluated(const Depsgraph *depsgraph);
|
||||
|
||||
/** \} */
|
||||
|
||||
|
@ -140,8 +140,8 @@ typedef enum DegIterFlag {
|
|||
} DegIterFlag;
|
||||
ENUM_OPERATORS(DegIterFlag, DEG_ITER_OBJECT_FLAG_DUPLI)
|
||||
|
||||
typedef struct DEGObjectIterSettings {
|
||||
struct Depsgraph *depsgraph;
|
||||
struct DEGObjectIterSettings {
|
||||
Depsgraph *depsgraph;
|
||||
/**
|
||||
* Bit-field of the #DegIterFlag.
|
||||
*
|
||||
|
@ -155,8 +155,8 @@ typedef struct DEGObjectIterSettings {
|
|||
* When set, the final evaluated geometry of the corresponding object is omitted. Instead the
|
||||
* geometry for the viewer path included in the iterator.
|
||||
*/
|
||||
const struct ViewerPath *viewer_path;
|
||||
} DEGObjectIterSettings;
|
||||
const ViewerPath *viewer_path;
|
||||
};
|
||||
|
||||
/**
|
||||
* Flags to get objects for draw manager and final render.
|
||||
|
@ -165,43 +165,43 @@ typedef struct DEGObjectIterSettings {
|
|||
DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY | DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET | \
|
||||
DEG_ITER_OBJECT_FLAG_VISIBLE | DEG_ITER_OBJECT_FLAG_DUPLI
|
||||
|
||||
typedef struct DEGObjectIterData {
|
||||
struct DEGObjectIterData {
|
||||
DEGObjectIterSettings *settings;
|
||||
struct Depsgraph *graph;
|
||||
Depsgraph *graph;
|
||||
int flag;
|
||||
|
||||
struct Scene *scene;
|
||||
Scene *scene;
|
||||
|
||||
eEvaluationMode eval_mode;
|
||||
|
||||
/** Object whose preview instead of evaluated geometry should be part of the iterator. */
|
||||
struct Object *object_orig_with_preview;
|
||||
Object *object_orig_with_preview;
|
||||
|
||||
struct Object *next_object;
|
||||
Object *next_object;
|
||||
|
||||
/* **** Iteration over dupli-list. *** */
|
||||
|
||||
/* Object which created the dupli-list. */
|
||||
struct Object *dupli_parent;
|
||||
Object *dupli_parent;
|
||||
/* List of duplicated objects. */
|
||||
struct ListBase *dupli_list;
|
||||
ListBase *dupli_list;
|
||||
/* Next duplicated object to step into. */
|
||||
struct DupliObject *dupli_object_next;
|
||||
DupliObject *dupli_object_next;
|
||||
/* Corresponds to current object: current iterator object is evaluated from
|
||||
* this duplicated object. */
|
||||
struct DupliObject *dupli_object_current;
|
||||
DupliObject *dupli_object_current;
|
||||
/* Temporary storage to report fully populated DNA to the render engine or
|
||||
* other users of the iterator. */
|
||||
struct Object temp_dupli_object;
|
||||
Object temp_dupli_object;
|
||||
|
||||
/* **** Iteration over ID nodes **** */
|
||||
size_t id_node_index;
|
||||
size_t num_id_nodes;
|
||||
} DEGObjectIterData;
|
||||
};
|
||||
|
||||
void DEG_iterator_objects_begin(struct BLI_Iterator *iter, DEGObjectIterData *data);
|
||||
void DEG_iterator_objects_next(struct BLI_Iterator *iter);
|
||||
void DEG_iterator_objects_end(struct BLI_Iterator *iter);
|
||||
void DEG_iterator_objects_begin(BLI_Iterator *iter, DEGObjectIterData *data);
|
||||
void DEG_iterator_objects_next(BLI_Iterator *iter);
|
||||
void DEG_iterator_objects_end(BLI_Iterator *iter);
|
||||
|
||||
#define DEG_OBJECT_ITER_BEGIN(settings_, instance_) \
|
||||
{ \
|
||||
|
@ -229,17 +229,17 @@ void DEG_iterator_objects_end(struct BLI_Iterator *iter);
|
|||
/** \name DEG ID iterators
|
||||
* \{ */
|
||||
|
||||
typedef struct DEGIDIterData {
|
||||
struct Depsgraph *graph;
|
||||
struct DEGIDIterData {
|
||||
Depsgraph *graph;
|
||||
bool only_updated;
|
||||
|
||||
size_t id_node_index;
|
||||
size_t num_id_nodes;
|
||||
} DEGIDIterData;
|
||||
};
|
||||
|
||||
void DEG_iterator_ids_begin(struct BLI_Iterator *iter, DEGIDIterData *data);
|
||||
void DEG_iterator_ids_next(struct BLI_Iterator *iter);
|
||||
void DEG_iterator_ids_end(struct BLI_Iterator *iter);
|
||||
void DEG_iterator_ids_begin(BLI_Iterator *iter, DEGIDIterData *data);
|
||||
void DEG_iterator_ids_next(BLI_Iterator *iter);
|
||||
void DEG_iterator_ids_end(BLI_Iterator *iter);
|
||||
|
||||
/** \} */
|
||||
|
||||
|
@ -247,8 +247,8 @@ void DEG_iterator_ids_end(struct BLI_Iterator *iter);
|
|||
/** \name DEG traversal
|
||||
* \{ */
|
||||
|
||||
typedef void (*DEGForeachIDCallback)(ID *id, void *user_data);
|
||||
typedef void (*DEGForeachIDComponentCallback)(ID *id,
|
||||
using DEGForeachIDCallback = void (*)(ID *id, void *user_data);
|
||||
using DEGForeachIDComponentCallback = void (*)(ID *id,
|
||||
eDepsObjectComponentType component,
|
||||
void *user_data);
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ struct ID;
|
|||
|
||||
namespace blender::deg {
|
||||
|
||||
void deg_editors_id_update(const DEGEditorUpdateContext *update_ctx, struct ID *id);
|
||||
void deg_editors_id_update(const DEGEditorUpdateContext *update_ctx, ID *id);
|
||||
|
||||
void deg_editors_scene_update(const DEGEditorUpdateContext *update_ctx, bool updated);
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ struct ComponentNode;
|
|||
|
||||
/* Evaluation Operation for atomic operation */
|
||||
/* XXX: move this to another header that can be exposed? */
|
||||
typedef function<void(struct ::Depsgraph *)> DepsEvalOperationCb;
|
||||
typedef function<void(::Depsgraph *)> DepsEvalOperationCb;
|
||||
|
||||
/* Identifiers for common operations (as an enum). */
|
||||
enum class OperationCode {
|
||||
|
|
|
@ -936,6 +936,6 @@ eRNAOverrideStatus RNA_property_override_library_status(struct Main *bmainm,
|
|||
int index);
|
||||
|
||||
void RNA_struct_state_owner_set(const char *name);
|
||||
const char *RNA_struct_state_owner_get(void);
|
||||
const char *RNA_struct_state_owner_get();
|
||||
|
||||
#endif /* __RNA_ACCESS_H__ */
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
/* Blender RNA */
|
||||
|
||||
BlenderRNA *RNA_create(void);
|
||||
BlenderRNA *RNA_create();
|
||||
void RNA_define_free(BlenderRNA *brna);
|
||||
void RNA_free(BlenderRNA *brna);
|
||||
|
||||
|
@ -53,8 +53,8 @@ void RNA_define_fallback_property_update(int noteflag, const char *updatefunc);
|
|||
*/
|
||||
void RNA_define_lib_overridable(bool make_overridable);
|
||||
|
||||
void RNA_init(void);
|
||||
void RNA_exit(void);
|
||||
void RNA_init();
|
||||
void RNA_exit();
|
||||
|
||||
/* Struct */
|
||||
|
||||
|
|
Loading…
Reference in New Issue