Cleanup: Snake style in depsgraph
While it's kind of common to use camel case in C++ this is not currently agreed style for C++ in Blender. Got confused by working on other areas with 3rd party libraries.
This commit is contained in:
parent
d3294fd93f
commit
f864cbd705
@ -80,7 +80,7 @@ void visibility_animated_check_cb(ID * /*id*/, FCurve *fcu, void *user_data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isObjectVisibilityAnimated(Depsgraph *graph, Object *object)
|
bool is_object_visibility_animated(Depsgraph *graph, Object *object)
|
||||||
{
|
{
|
||||||
AnimData* anim_data = BKE_animdata_from_id(&object->id);
|
AnimData* anim_data = BKE_animdata_from_id(&object->id);
|
||||||
if (anim_data == NULL) {
|
if (anim_data == NULL) {
|
||||||
@ -100,14 +100,14 @@ DepsgraphBuilder::DepsgraphBuilder(Main *bmain, Depsgraph *graph)
|
|||||||
graph_(graph) {
|
graph_(graph) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DepsgraphBuilder::needPullBaseIntoGraph(struct Base *base)
|
bool DepsgraphBuilder::need_pull_base_into_graph(struct Base *base)
|
||||||
{
|
{
|
||||||
const int base_flag = (graph_->mode == DAG_EVAL_VIEWPORT) ?
|
const int base_flag = (graph_->mode == DAG_EVAL_VIEWPORT) ?
|
||||||
BASE_ENABLED_VIEWPORT : BASE_ENABLED_RENDER;
|
BASE_ENABLED_VIEWPORT : BASE_ENABLED_RENDER;
|
||||||
if (base->flag & base_flag) {
|
if (base->flag & base_flag) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (isObjectVisibilityAnimated(graph_, base->object)) {
|
if (is_object_visibility_animated(graph_, base->object)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -32,7 +32,7 @@ struct Depsgraph;
|
|||||||
|
|
||||||
class DepsgraphBuilder {
|
class DepsgraphBuilder {
|
||||||
public:
|
public:
|
||||||
bool needPullBaseIntoGraph(struct Base *base);
|
bool need_pull_base_into_graph(struct Base *base);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DepsgraphBuilder(Main *bmain, Depsgraph *graph);
|
DepsgraphBuilder(Main *bmain, Depsgraph *graph);
|
||||||
|
@ -99,7 +99,7 @@ void DepsgraphNodeBuilder::build_view_layer(
|
|||||||
int base_index = 0;
|
int base_index = 0;
|
||||||
LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) {
|
LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) {
|
||||||
/* object itself */
|
/* object itself */
|
||||||
if (needPullBaseIntoGraph(base)) {
|
if (need_pull_base_into_graph(base)) {
|
||||||
/* NOTE: We consider object visible even if it's currently
|
/* NOTE: We consider object visible even if it's currently
|
||||||
* restricted by the base/restriction flags. Otherwise its drivers
|
* restricted by the base/restriction flags. Otherwise its drivers
|
||||||
* will never be evaluated.
|
* will never be evaluated.
|
||||||
|
@ -84,7 +84,7 @@ void DepsgraphRelationBuilder::build_view_layer(Scene *scene, ViewLayer *view_la
|
|||||||
* passed to the evaluation functions. During relations builder we only
|
* passed to the evaluation functions. During relations builder we only
|
||||||
* do NULL-pointer check of the base, so it's fine to pass original one. */
|
* do NULL-pointer check of the base, so it's fine to pass original one. */
|
||||||
LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) {
|
LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) {
|
||||||
if (needPullBaseIntoGraph(base)) {
|
if (need_pull_base_into_graph(base)) {
|
||||||
build_object(base, base->object);
|
build_object(base, base->object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user