Cleanup: iterator macros
- put render iterator in own scope (would shadow it's own variable if used multiple times). - enforce semicolon at end of iterator macros. - no need to typedef one-off macro structs.
This commit is contained in:
@@ -80,6 +80,6 @@ void BKE_group_eval_view_layers(const struct EvaluationContext *eval_ctx,
|
|||||||
BLI_assert(_object != NULL);
|
BLI_assert(_object != NULL);
|
||||||
|
|
||||||
#define FOREACH_GROUP_OBJECT_END \
|
#define FOREACH_GROUP_OBJECT_END \
|
||||||
}
|
} ((void)0)
|
||||||
|
|
||||||
#endif /* __BKE_GROUP_H__ */
|
#endif /* __BKE_GROUP_H__ */
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ void BKE_visible_bases_iterator_end(BLI_Iterator *iter);
|
|||||||
|
|
||||||
#define FOREACH_OBJECT_END \
|
#define FOREACH_OBJECT_END \
|
||||||
} \
|
} \
|
||||||
}
|
} ((void)0)
|
||||||
|
|
||||||
#define FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, flag, _instance) \
|
#define FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, flag, _instance) \
|
||||||
{ \
|
{ \
|
||||||
@@ -269,10 +269,10 @@ void BKE_visible_bases_iterator_end(BLI_Iterator *iter);
|
|||||||
|
|
||||||
|
|
||||||
#define FOREACH_OBJECT_FLAG_END \
|
#define FOREACH_OBJECT_FLAG_END \
|
||||||
ITER_END \
|
ITER_END; \
|
||||||
}
|
} ((void)0)
|
||||||
|
|
||||||
typedef struct ObjectsRenderableIteratorData {
|
struct ObjectsRenderableIteratorData {
|
||||||
struct Scene *scene;
|
struct Scene *scene;
|
||||||
struct Base base_temp;
|
struct Base base_temp;
|
||||||
struct Scene scene_temp;
|
struct Scene scene_temp;
|
||||||
@@ -282,10 +282,11 @@ typedef struct ObjectsRenderableIteratorData {
|
|||||||
struct Base *base;
|
struct Base *base;
|
||||||
struct Scene *set;
|
struct Scene *set;
|
||||||
} iter;
|
} iter;
|
||||||
} ObjectsRenderableIteratorData;
|
};
|
||||||
|
|
||||||
#define FOREACH_OBJECT_RENDERABLE_BEGIN(scene_, _instance) \
|
#define FOREACH_OBJECT_RENDERABLE_BEGIN(scene_, _instance) \
|
||||||
ObjectsRenderableIteratorData data_ = { \
|
{ \
|
||||||
|
struct ObjectsRenderableIteratorData data_ = { \
|
||||||
.scene = (scene_), \
|
.scene = (scene_), \
|
||||||
}; \
|
}; \
|
||||||
ITER_BEGIN(BKE_renderable_objects_iterator_begin, \
|
ITER_BEGIN(BKE_renderable_objects_iterator_begin, \
|
||||||
@@ -295,7 +296,8 @@ typedef struct ObjectsRenderableIteratorData {
|
|||||||
|
|
||||||
|
|
||||||
#define FOREACH_OBJECT_RENDERABLE_END \
|
#define FOREACH_OBJECT_RENDERABLE_END \
|
||||||
ITER_END
|
ITER_END; \
|
||||||
|
} ((void)0)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ bool BKE_collection_remove(ID *owner_id, SceneCollection *sc)
|
|||||||
link = link_next;
|
link = link_next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_COLLECTION_END
|
FOREACH_SCENE_COLLECTION_END;
|
||||||
|
|
||||||
for (LinkData *link = collection_objects.first; link; link = link->next) {
|
for (LinkData *link = collection_objects.first; link; link = link->next) {
|
||||||
BKE_collection_object_add(owner_id, sc_master, link->data);
|
BKE_collection_object_add(owner_id, sc_master, link->data);
|
||||||
@@ -411,7 +411,7 @@ void BKE_collection_object_add_from(Scene *scene, Object *ob_src, Object *ob_dst
|
|||||||
collection_object_add(&scene->id, sc, ob_dst);
|
collection_object_add(&scene->id, sc, ob_dst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_COLLECTION_END
|
FOREACH_SCENE_COLLECTION_END;
|
||||||
|
|
||||||
for (ViewLayer *view_layer = scene->view_layers.first; view_layer; view_layer = view_layer->next) {
|
for (ViewLayer *view_layer = scene->view_layers.first; view_layer; view_layer = view_layer->next) {
|
||||||
Base *base_src = BKE_view_layer_base_find(view_layer, ob_src);
|
Base *base_src = BKE_view_layer_base_find(view_layer, ob_src);
|
||||||
@@ -484,7 +484,7 @@ bool BKE_collections_object_remove(Main *bmain, ID *owner_id, Object *ob, const
|
|||||||
{
|
{
|
||||||
removed |= BKE_collection_object_remove(bmain, owner_id, sc, ob, free_us);
|
removed |= BKE_collection_object_remove(bmain, owner_id, sc, ob, free_us);
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_COLLECTION_END
|
FOREACH_SCENE_COLLECTION_END;
|
||||||
return removed;
|
return removed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -556,7 +556,7 @@ Group *BKE_collection_group_create(Main *bmain, Scene *scene, LayerCollection *l
|
|||||||
{
|
{
|
||||||
sc_group->type = COLLECTION_TYPE_GROUP_INTERNAL;
|
sc_group->type = COLLECTION_TYPE_GROUP_INTERNAL;
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_COLLECTION_END
|
FOREACH_SCENE_COLLECTION_END;
|
||||||
|
|
||||||
lc_dst = BKE_collection_link(group->view_layer, sc_dst);
|
lc_dst = BKE_collection_link(group->view_layer, sc_dst);
|
||||||
layer_collection_sync(lc_dst, lc_src);
|
layer_collection_sync(lc_dst, lc_src);
|
||||||
|
|||||||
@@ -510,7 +510,7 @@ static void add_collision_object(Object ***objs, unsigned int *numobj, unsigned
|
|||||||
{
|
{
|
||||||
add_collision_object(objs, numobj, maxobj, object, self, level+1, modifier_type);
|
add_collision_object(objs, numobj, maxobj, object, self, level+1, modifier_type);
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -531,7 +531,7 @@ Object **get_collisionobjects_ext(Scene *scene, Object *self, Group *group, unsi
|
|||||||
{
|
{
|
||||||
add_collision_object(&objs, &numobj, &maxobj, object, self, level, modifier_type);
|
add_collision_object(&objs, &numobj, &maxobj, object, self, level, modifier_type);
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Scene *sce_iter;
|
Scene *sce_iter;
|
||||||
@@ -588,7 +588,7 @@ static void add_collider_cache_object(ListBase **objs, Object *ob, Object *self,
|
|||||||
{
|
{
|
||||||
add_collider_cache_object(objs, object, self, level+1);
|
add_collider_cache_object(objs, object, self, level+1);
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -602,7 +602,7 @@ ListBase *get_collider_cache(Scene *scene, Object *self, Group *group)
|
|||||||
{
|
{
|
||||||
add_collider_cache_object(&objs, object, self, 0);
|
add_collider_cache_object(&objs, object, self, 0);
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Scene *sce_iter;
|
Scene *sce_iter;
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ static bool group_object_cyclic_check_internal(Object *object, Group *group)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* un-flag the object, it's allowed to have the same group multiple times in parallel */
|
/* un-flag the object, it's allowed to have the same group multiple times in parallel */
|
||||||
@@ -284,7 +284,7 @@ bool BKE_group_is_animated(Group *group, Object *UNUSED(parent))
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -375,7 +375,7 @@ void BKE_group_handle_recalc_and_update(const struct EvaluationContext *eval_ctx
|
|||||||
BKE_object_handle_update(eval_ctx, scene, object);
|
BKE_object_handle_update(eval_ctx, scene, object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2137,7 +2137,7 @@ void BKE_visible_bases_iterator_end(BLI_Iterator *UNUSED(iter))
|
|||||||
|
|
||||||
void BKE_renderable_objects_iterator_begin(BLI_Iterator *iter, void *data_in)
|
void BKE_renderable_objects_iterator_begin(BLI_Iterator *iter, void *data_in)
|
||||||
{
|
{
|
||||||
ObjectsRenderableIteratorData *data = data_in;
|
struct ObjectsRenderableIteratorData *data = data_in;
|
||||||
|
|
||||||
/* Tag objects to prevent going over the same object twice. */
|
/* Tag objects to prevent going over the same object twice. */
|
||||||
for (Scene *scene = data->scene; scene; scene = scene->set) {
|
for (Scene *scene = data->scene; scene; scene = scene->set) {
|
||||||
@@ -2165,7 +2165,7 @@ void BKE_renderable_objects_iterator_next(BLI_Iterator *iter)
|
|||||||
/* Set it early in case we need to exit and we are running from within a loop. */
|
/* Set it early in case we need to exit and we are running from within a loop. */
|
||||||
iter->skip = true;
|
iter->skip = true;
|
||||||
|
|
||||||
ObjectsRenderableIteratorData *data = iter->data;
|
struct ObjectsRenderableIteratorData *data = iter->data;
|
||||||
Base *base = data->iter.base->next;
|
Base *base = data->iter.base->next;
|
||||||
|
|
||||||
/* There is still a base in the current scene layer. */
|
/* There is still a base in the current scene layer. */
|
||||||
|
|||||||
@@ -446,7 +446,7 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, LibraryIDLinkCallback call
|
|||||||
CALLBACK_INVOKE_ID(link->data, IDWALK_CB_USER);
|
CALLBACK_INVOKE_ID(link->data, IDWALK_CB_USER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_COLLECTION_END
|
FOREACH_SCENE_COLLECTION_END;
|
||||||
|
|
||||||
ViewLayer *view_layer;
|
ViewLayer *view_layer;
|
||||||
for (view_layer = scene->view_layers.first; view_layer; view_layer = view_layer->next) {
|
for (view_layer = scene->view_layers.first; view_layer; view_layer = view_layer->next) {
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ static void libblock_remap_data_preprocess(IDRemap *r_id_remap_data)
|
|||||||
libblock_remap_data_preprocess_group_unlink(
|
libblock_remap_data_preprocess_group_unlink(
|
||||||
r_id_remap_data, ob_iter, skip_indirect, is_indirect);
|
r_id_remap_data, ob_iter, skip_indirect, is_indirect);
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
}
|
}
|
||||||
else if (GS(r_id_remap_data->old_id->name) == ID_OB) {
|
else if (GS(r_id_remap_data->old_id->name) == ID_OB) {
|
||||||
/* ... a specific object from scene. */
|
/* ... a specific object from scene. */
|
||||||
@@ -405,7 +405,7 @@ static void libblock_remap_data_postprocess_group_scene_unlink(Main *UNUSED(bmai
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void libblock_remap_data_postprocess_obdata_relink(Main *UNUSED(bmain), Object *ob, ID *new_id)
|
static void libblock_remap_data_postprocess_obdata_relink(Main *UNUSED(bmain), Object *ob, ID *new_id)
|
||||||
|
|||||||
@@ -937,7 +937,7 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem
|
|||||||
(void) object;
|
(void) object;
|
||||||
totgroup++;
|
totgroup++;
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we also copy the actual objects to restore afterwards, since
|
/* we also copy the actual objects to restore afterwards, since
|
||||||
@@ -967,7 +967,7 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -1082,7 +1082,7 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem
|
|||||||
|
|
||||||
b++;
|
b++;
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* to give ipos in object correct offset */
|
/* to give ipos in object correct offset */
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ void psys_check_group_weights(ParticleSettings *part)
|
|||||||
BLI_addtail(&part->dupliweights, dw);
|
BLI_addtail(&part->dupliweights, dw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
|
|
||||||
dw = part->dupliweights.first;
|
dw = part->dupliweights.first;
|
||||||
for (; dw; dw = dw->next) {
|
for (; dw; dw = dw->next) {
|
||||||
|
|||||||
@@ -2967,7 +2967,7 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra, cons
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
|
|
||||||
if (!skip) {
|
if (!skip) {
|
||||||
psys_cache_paths(sim, cfra, use_render_params);
|
psys_cache_paths(sim, cfra, use_render_params);
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ void BKE_rigidbody_free_world(RigidBodyWorld *rbw)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rbw->group) {
|
if (rbw->group) {
|
||||||
@@ -114,7 +114,7 @@ void BKE_rigidbody_free_world(RigidBodyWorld *rbw)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
/* free dynamics world */
|
/* free dynamics world */
|
||||||
RB_dworld_delete(rbw->physics_world);
|
RB_dworld_delete(rbw->physics_world);
|
||||||
@@ -1157,7 +1157,7 @@ void BKE_rigidbody_remove_object(Scene *scene, Object *ob)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1206,7 +1206,7 @@ static void rigidbody_update_ob_array(RigidBodyWorld *rbw)
|
|||||||
rbw->objects[i] = object;
|
rbw->objects[i] = object;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rigidbody_update_sim_world(Scene *scene, RigidBodyWorld *rbw)
|
static void rigidbody_update_sim_world(Scene *scene, RigidBodyWorld *rbw)
|
||||||
@@ -1341,7 +1341,7 @@ static void rigidbody_update_simulation(const struct EvaluationContext *eval_ctx
|
|||||||
rbc->physics_constraint = NULL;
|
rbc->physics_constraint = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update objects */
|
/* update objects */
|
||||||
@@ -1388,7 +1388,7 @@ static void rigidbody_update_simulation(const struct EvaluationContext *eval_ctx
|
|||||||
rigidbody_update_sim_ob(eval_ctx, scene, rbw, ob, rbo);
|
rigidbody_update_sim_ob(eval_ctx, scene, rbw, ob, rbo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
|
|
||||||
/* update constraints */
|
/* update constraints */
|
||||||
if (rbw->constraints == NULL) /* no constraints, move on */
|
if (rbw->constraints == NULL) /* no constraints, move on */
|
||||||
@@ -1422,7 +1422,7 @@ static void rigidbody_update_simulation(const struct EvaluationContext *eval_ctx
|
|||||||
rbc->flag &= ~RBC_FLAG_NEEDS_VALIDATE;
|
rbc->flag &= ~RBC_FLAG_NEEDS_VALIDATE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rigidbody_update_simulation_post_step(RigidBodyWorld *rbw)
|
static void rigidbody_update_simulation_post_step(RigidBodyWorld *rbw)
|
||||||
|
|||||||
@@ -965,7 +965,7 @@ void BKE_scene_set_background(Main *bmain, Scene *scene)
|
|||||||
{
|
{
|
||||||
object->flag |= OB_FROMGROUP;
|
object->flag |= OB_FROMGROUP;
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* copy layers and flags from bases to objects */
|
/* copy layers and flags from bases to objects */
|
||||||
|
|||||||
@@ -57,6 +57,6 @@ typedef void (*IteratorBeginCb)(BLI_Iterator *iter, void *data_in);
|
|||||||
#define ITER_END \
|
#define ITER_END \
|
||||||
} \
|
} \
|
||||||
callback_end_func(&iter_macro); \
|
callback_end_func(&iter_macro); \
|
||||||
}
|
} ((void)0)
|
||||||
|
|
||||||
#endif /* __BLI_ITERATOR_H__ */
|
#endif /* __BLI_ITERATOR_H__ */
|
||||||
|
|||||||
@@ -1352,7 +1352,7 @@ static void write_particlesettings(WriteData *wd, ParticleSettings *part)
|
|||||||
dw->index++;
|
dw->index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
writestruct(wd, DATA, ParticleDupliWeight, 1, dw);
|
writestruct(wd, DATA, ParticleDupliWeight, 1, dw);
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ void SceneExporter::writeNodes(const EvaluationContext *eval_ctx, Object *ob, Sc
|
|||||||
{
|
{
|
||||||
printf("\t%s\n", object->id.name);
|
printf("\t%s\n", object->id.name);
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ void DEG_iterator_objects_end(struct BLI_Iterator *iter);
|
|||||||
&data_, Object *, instance_)
|
&data_, Object *, instance_)
|
||||||
|
|
||||||
#define DEG_OBJECT_ITER_END \
|
#define DEG_OBJECT_ITER_END \
|
||||||
ITER_END \
|
ITER_END; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1112,7 +1112,7 @@ void DRW_draw_render_loop_ex(
|
|||||||
{
|
{
|
||||||
drw_engines_cache_populate(ob);
|
drw_engines_cache_populate(ob);
|
||||||
}
|
}
|
||||||
DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END
|
DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END;
|
||||||
|
|
||||||
drw_engines_cache_finish();
|
drw_engines_cache_finish();
|
||||||
|
|
||||||
@@ -1485,17 +1485,18 @@ void DRW_draw_select_loop(
|
|||||||
drw_engines_cache_populate(obact);
|
drw_engines_cache_populate(obact);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DEG_OBJECT_ITER_BEGIN(depsgraph, ob, DRW_iterator_mode_get(),
|
DEG_OBJECT_ITER_BEGIN(
|
||||||
DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY |
|
depsgraph, ob, DRW_iterator_mode_get(),
|
||||||
DEG_ITER_OBJECT_FLAG_VISIBLE |
|
DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY |
|
||||||
DEG_ITER_OBJECT_FLAG_DUPLI)
|
DEG_ITER_OBJECT_FLAG_VISIBLE |
|
||||||
|
DEG_ITER_OBJECT_FLAG_DUPLI)
|
||||||
{
|
{
|
||||||
if ((ob->base_flag & BASE_SELECTABLED) != 0) {
|
if ((ob->base_flag & BASE_SELECTABLED) != 0) {
|
||||||
DRW_select_load_id(ob->select_color);
|
DRW_select_load_id(ob->select_color);
|
||||||
drw_engines_cache_populate(ob);
|
drw_engines_cache_populate(ob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEG_OBJECT_ITER_END
|
DEG_OBJECT_ITER_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
drw_engines_cache_finish();
|
drw_engines_cache_finish();
|
||||||
@@ -1661,7 +1662,7 @@ void DRW_draw_depth_loop(
|
|||||||
{
|
{
|
||||||
drw_engines_cache_populate(ob);
|
drw_engines_cache_populate(ob);
|
||||||
}
|
}
|
||||||
DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END
|
DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END;
|
||||||
|
|
||||||
drw_engines_cache_finish();
|
drw_engines_cache_finish();
|
||||||
|
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ void BIF_makeListTemplates(const bContext *C)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_OBJECT_END
|
FOREACH_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* UNUSED */
|
#if 0 /* UNUSED */
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ static void id_search_cb_objects_from_scene(const bContext *C, void *arg_templat
|
|||||||
{
|
{
|
||||||
ob_iter->id.tag |= LIB_TAG_DOIT;
|
ob_iter->id.tag |= LIB_TAG_DOIT;
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
id_search_cb_tagged(C, arg_template, str, items);
|
id_search_cb_tagged(C, arg_template, str, items);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1739,7 +1739,7 @@ static int convert_exec(bContext *C, wmOperator *op)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
ListBase selected_editable_bases = CTX_data_collection_get(C, "selected_editable_bases");
|
ListBase selected_editable_bases = CTX_data_collection_get(C, "selected_editable_bases");
|
||||||
@@ -2022,7 +2022,7 @@ static int convert_exec(bContext *C, wmOperator *op)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* delete object should renew depsgraph */
|
/* delete object should renew depsgraph */
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ static const EnumPropertyItem *proxy_group_object_itemf(bContext *C, PointerRNA
|
|||||||
item_tmp.value = i++;
|
item_tmp.value = i++;
|
||||||
RNA_enum_item_add(&item, &totitem, &item_tmp);
|
RNA_enum_item_add(&item, &totitem, &item_tmp);
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
|
|
||||||
RNA_enum_item_end(&item, &totitem);
|
RNA_enum_item_end(&item, &totitem);
|
||||||
*r_free = true;
|
*r_free = true;
|
||||||
@@ -1717,7 +1717,7 @@ static void single_object_users(Main *bmain, Scene *scene, View3D *v3d, const in
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
|
|
||||||
if (all_duplicated) {
|
if (all_duplicated) {
|
||||||
groupn = ID_NEW_SET(group, BKE_group_copy(bmain, group));
|
groupn = ID_NEW_SET(group, BKE_group_copy(bmain, group));
|
||||||
@@ -1751,7 +1751,7 @@ void ED_object_single_user(Main *bmain, Scene *scene, Object *ob)
|
|||||||
{
|
{
|
||||||
ob_iter->flag &= ~OB_DONE;
|
ob_iter->flag &= ~OB_DONE;
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
|
|
||||||
/* tag only the one object */
|
/* tag only the one object */
|
||||||
ob->flag |= OB_DONE;
|
ob->flag |= OB_DONE;
|
||||||
@@ -1865,7 +1865,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_OBJECT_FLAG_END
|
FOREACH_OBJECT_FLAG_END;
|
||||||
|
|
||||||
me = bmain->mesh.first;
|
me = bmain->mesh.first;
|
||||||
while (me) {
|
while (me) {
|
||||||
@@ -1877,11 +1877,13 @@ static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer
|
|||||||
static void single_object_action_users(Scene *scene, ViewLayer *view_layer, const int flag)
|
static void single_object_action_users(Scene *scene, ViewLayer *view_layer, const int flag)
|
||||||
{
|
{
|
||||||
FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, flag, ob)
|
FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, flag, ob)
|
||||||
|
{
|
||||||
if (!ID_IS_LINKED(ob)) {
|
if (!ID_IS_LINKED(ob)) {
|
||||||
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||||
BKE_animdata_copy_id_action(&ob->id, false);
|
BKE_animdata_copy_id_action(&ob->id, false);
|
||||||
}
|
}
|
||||||
FOREACH_OBJECT_FLAG_END
|
}
|
||||||
|
FOREACH_OBJECT_FLAG_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void single_mat_users(Main *bmain, Scene *scene, ViewLayer *view_layer, const int flag, const bool do_textures)
|
static void single_mat_users(Main *bmain, Scene *scene, ViewLayer *view_layer, const int flag, const bool do_textures)
|
||||||
@@ -1891,6 +1893,7 @@ static void single_mat_users(Main *bmain, Scene *scene, ViewLayer *view_layer, c
|
|||||||
int a, b;
|
int a, b;
|
||||||
|
|
||||||
FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, flag, ob)
|
FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, flag, ob)
|
||||||
|
{
|
||||||
if (!ID_IS_LINKED(ob)) {
|
if (!ID_IS_LINKED(ob)) {
|
||||||
for (a = 1; a <= ob->totcol; a++) {
|
for (a = 1; a <= ob->totcol; a++) {
|
||||||
ma = give_current_material(ob, a);
|
ma = give_current_material(ob, a);
|
||||||
@@ -1920,7 +1923,8 @@ static void single_mat_users(Main *bmain, Scene *scene, ViewLayer *view_layer, c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_OBJECT_FLAG_END
|
}
|
||||||
|
FOREACH_OBJECT_FLAG_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void do_single_tex_user(Main *bmain, Tex **from)
|
static void do_single_tex_user(Main *bmain, Tex **from)
|
||||||
@@ -2051,7 +2055,7 @@ void ED_object_single_users(Main *bmain, Scene *scene, const bool full, const bo
|
|||||||
IDP_RelinkProperty(ob->id.properties);
|
IDP_RelinkProperty(ob->id.properties);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
|
|
||||||
if (scene->nodetree) {
|
if (scene->nodetree) {
|
||||||
IDP_RelinkProperty(scene->nodetree->id.properties);
|
IDP_RelinkProperty(scene->nodetree->id.properties);
|
||||||
|
|||||||
@@ -3376,7 +3376,7 @@ static int vertex_group_copy_to_linked_exec(bContext *C, wmOperator *UNUSED(op))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ static int ptcache_free_bake_all_exec(bContext *C, wmOperator *UNUSED(op))
|
|||||||
|
|
||||||
WM_event_add_notifier(C, NC_OBJECT|ND_POINTCACHE, ob);
|
WM_event_add_notifier(C, NC_OBJECT|ND_POINTCACHE, ob);
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
|
|
||||||
WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
|
WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
|
|||||||
{
|
{
|
||||||
CTX_data_id_list_add(result, &ob->id);
|
CTX_data_id_list_add(result, &ob->id);
|
||||||
}
|
}
|
||||||
FOREACH_VISIBLE_BASE_END
|
FOREACH_VISIBLE_BASE_END;
|
||||||
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
|
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -125,7 +125,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
|
|||||||
{
|
{
|
||||||
CTX_data_id_list_add(result, &ob->id);
|
CTX_data_id_list_add(result, &ob->id);
|
||||||
}
|
}
|
||||||
FOREACH_SELECTED_OBJECT_END
|
FOREACH_SELECTED_OBJECT_END;
|
||||||
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
|
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -136,7 +136,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
|
|||||||
CTX_data_id_list_add(result, &ob->id);
|
CTX_data_id_list_add(result, &ob->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_SELECTED_OBJECT_END
|
FOREACH_SELECTED_OBJECT_END;
|
||||||
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
|
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -148,7 +148,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
|
|||||||
CTX_data_id_list_add(result, &ob->id);
|
CTX_data_id_list_add(result, &ob->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_VISIBLE_OBJECT_END
|
FOREACH_VISIBLE_OBJECT_END;
|
||||||
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
|
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -157,7 +157,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
|
|||||||
{
|
{
|
||||||
CTX_data_list_add(result, &scene->id, &RNA_ObjectBase, base);
|
CTX_data_list_add(result, &scene->id, &RNA_ObjectBase, base);
|
||||||
}
|
}
|
||||||
FOREACH_VISIBLE_BASE_END
|
FOREACH_VISIBLE_BASE_END;
|
||||||
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
|
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ static Object *get_camera_with_movieclip(Scene *scene, MovieClip *clip)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
|
|
||||||
return camera;
|
return camera;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -937,7 +937,7 @@ static void do_outliner_item_activate_tree_element(
|
|||||||
{
|
{
|
||||||
ED_object_base_select(BKE_view_layer_base_find(view_layer, object), sel);
|
ED_object_base_select(BKE_view_layer_base_find(view_layer, object), sel);
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BKE_view_layer_base_deselect_all(view_layer);
|
BKE_view_layer_base_deselect_all(view_layer);
|
||||||
@@ -952,7 +952,7 @@ static void do_outliner_item_activate_tree_element(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
|
WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
|
||||||
|
|||||||
@@ -553,7 +553,7 @@ static void group_linkobs2scene_cb(
|
|||||||
|
|
||||||
base->flag |= BASE_SELECTED;
|
base->flag |= BASE_SELECTED;
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void group_instance_cb(
|
static void group_instance_cb(
|
||||||
|
|||||||
@@ -2384,7 +2384,7 @@ void outliner_build_tree(
|
|||||||
{
|
{
|
||||||
outliner_add_element(soops, eval_ctx, &soops->tree, ob, NULL, 0, 0);
|
outliner_add_element(soops, eval_ctx, &soops->tree, ob, NULL, 0, 0);
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
outliner_make_hierarchy(&soops->tree);
|
outliner_make_hierarchy(&soops->tree);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ static int view3d_copybuffer_exec(bContext *C, wmOperator *op)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
BLI_make_file_string("/", str, BKE_tempdir_base(), "copybuffer.blend");
|
BLI_make_file_string("/", str, BKE_tempdir_base(), "copybuffer.blend");
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ BlenderStrokeRenderer::~BlenderStrokeRenderer()
|
|||||||
{
|
{
|
||||||
BLI_freelistN(&sc->objects);
|
BLI_freelistN(&sc->objects);
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_COLLECTION_END
|
FOREACH_SCENE_COLLECTION_END;
|
||||||
BLI_freelistN(&view_layer->object_bases);
|
BLI_freelistN(&view_layer->object_bases);
|
||||||
|
|
||||||
// release materials
|
// release materials
|
||||||
|
|||||||
@@ -911,18 +911,19 @@ static void rna_LayerObjects_selected_begin(CollectionPropertyIterator *iter, Po
|
|||||||
static void rna_ViewLayer_update_tagged(ViewLayer *UNUSED(view_layer), bContext *C)
|
static void rna_ViewLayer_update_tagged(ViewLayer *UNUSED(view_layer), bContext *C)
|
||||||
{
|
{
|
||||||
Depsgraph *graph = CTX_data_depsgraph(C);
|
Depsgraph *graph = CTX_data_depsgraph(C);
|
||||||
DEG_OBJECT_ITER_BEGIN(graph, ob, DEG_ITER_OBJECT_MODE_VIEWPORT,
|
DEG_OBJECT_ITER_BEGIN(
|
||||||
DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY |
|
graph, ob, DEG_ITER_OBJECT_MODE_VIEWPORT,
|
||||||
DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET |
|
DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY |
|
||||||
DEG_ITER_OBJECT_FLAG_LINKED_INDIRECTLY |
|
DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET |
|
||||||
DEG_ITER_OBJECT_FLAG_VISIBLE |
|
DEG_ITER_OBJECT_FLAG_LINKED_INDIRECTLY |
|
||||||
DEG_ITER_OBJECT_FLAG_DUPLI)
|
DEG_ITER_OBJECT_FLAG_VISIBLE |
|
||||||
|
DEG_ITER_OBJECT_FLAG_DUPLI)
|
||||||
{
|
{
|
||||||
/* Don't do anything, we just need to run the iterator to flush
|
/* Don't do anything, we just need to run the iterator to flush
|
||||||
* the base info to the objects. */
|
* the base info to the objects. */
|
||||||
UNUSED_VARS(ob);
|
UNUSED_VARS(ob);
|
||||||
}
|
}
|
||||||
DEG_OBJECT_ITER_END
|
DEG_OBJECT_ITER_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rna_ObjectBase_select_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
static void rna_ObjectBase_select_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
||||||
|
|||||||
@@ -613,7 +613,7 @@ static void rna_EffectorWeight_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
|
|||||||
{
|
{
|
||||||
BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH);
|
BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH);
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DEG_id_tag_update(id, OB_RECALC_DATA | PSYS_RECALC_RESET);
|
DEG_id_tag_update(id, OB_RECALC_DATA | PSYS_RECALC_RESET);
|
||||||
|
|||||||
@@ -1473,7 +1473,7 @@ static void rna_Physics_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe
|
|||||||
{
|
{
|
||||||
BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH);
|
BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH);
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rna_Scene_editmesh_select_mode_set(PointerRNA *ptr, const int *value)
|
static void rna_Scene_editmesh_select_mode_set(PointerRNA *ptr, const int *value)
|
||||||
@@ -1549,7 +1549,7 @@ static void rna_Scene_use_simplify_update(Main *UNUSED(bmain), Scene *UNUSED(sce
|
|||||||
{
|
{
|
||||||
object_simplify_update(ob);
|
object_simplify_update(ob);
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
|
|
||||||
for (SETLOOPER_SET_ONLY(sce, sce_iter, base)) {
|
for (SETLOOPER_SET_ONLY(sce, sce_iter, base)) {
|
||||||
object_simplify_update(base->object);
|
object_simplify_update(base->object);
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ bool render_result_has_views(struct RenderResult *rr);
|
|||||||
|
|
||||||
#define FOREACH_VIEW_LAYER_TO_RENDER_END \
|
#define FOREACH_VIEW_LAYER_TO_RENDER_END \
|
||||||
} \
|
} \
|
||||||
}
|
} ((void)0)
|
||||||
|
|
||||||
#endif /* __RENDER_RESULT_H__ */
|
#endif /* __RENDER_RESULT_H__ */
|
||||||
|
|
||||||
|
|||||||
@@ -4016,7 +4016,7 @@ static void add_lightgroup(Render *re, Group *group, int exclusive)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_BASE_END
|
FOREACH_GROUP_BASE_END;
|
||||||
#else
|
#else
|
||||||
UNUSED_VARS(re, exclusive);
|
UNUSED_VARS(re, exclusive);
|
||||||
#endif
|
#endif
|
||||||
@@ -4950,7 +4950,7 @@ static void dupli_render_particle_set(const EvaluationContext *eval_ctx, Render
|
|||||||
{
|
{
|
||||||
dupli_render_particle_set(eval_ctx, re, object, timeoffset, level+1, enable);
|
dupli_render_particle_set(eval_ctx, re, object, timeoffset, level+1, enable);
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_vector_viewlayers(Scene *UNUSED(sce))
|
static int get_vector_viewlayers(Scene *UNUSED(sce))
|
||||||
@@ -4981,7 +4981,7 @@ static void add_group_render_dupli_obs(const EvaluationContext *eval_ctx, Render
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void database_init_objects(const EvaluationContext *eval_ctx, Render *re, unsigned int UNUSED(renderlay),
|
static void database_init_objects(const EvaluationContext *eval_ctx, Render *re, unsigned int UNUSED(renderlay),
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ static void env_set_imats(Render *re)
|
|||||||
mul_m4_m4m4(mat, re->viewmat, ob->obmat);
|
mul_m4_m4m4(mat, re->viewmat, ob->obmat);
|
||||||
invert_m4_m4(ob->imat, mat);
|
invert_m4_m4(ob->imat, mat);
|
||||||
}
|
}
|
||||||
FOREACH_SCENE_OBJECT_END
|
FOREACH_SCENE_OBJECT_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|||||||
@@ -771,7 +771,7 @@ int RE_engine_render(Render *re, int do_all)
|
|||||||
DEG_graph_free(depsgraph);
|
DEG_graph_free(depsgraph);
|
||||||
DEG_evaluation_context_free(eval_ctx);
|
DEG_evaluation_context_free(eval_ctx);
|
||||||
}
|
}
|
||||||
FOREACH_VIEW_LAYER_TO_RENDER_END
|
FOREACH_VIEW_LAYER_TO_RENDER_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
engine->tile_x = 0;
|
engine->tile_x = 0;
|
||||||
|
|||||||
@@ -2043,7 +2043,7 @@ static void tag_dependend_objects_for_render(Scene *scene, int UNUSED(renderlay)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_OBJECT_RENDERABLE_END
|
FOREACH_OBJECT_RENDERABLE_END;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ RenderResult *render_result_new(Render *re, rcti *partrct, int crop, int savebuf
|
|||||||
#undef RENDER_LAYER_ADD_PASS_SAFE
|
#undef RENDER_LAYER_ADD_PASS_SAFE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_VIEW_LAYER_TO_RENDER_END
|
FOREACH_VIEW_LAYER_TO_RENDER_END;
|
||||||
|
|
||||||
/* sss, previewrender and envmap don't do layers, so we make a default one */
|
/* sss, previewrender and envmap don't do layers, so we make a default one */
|
||||||
if (BLI_listbase_is_empty(&rr->layers) && !(layername && layername[0])) {
|
if (BLI_listbase_is_empty(&rr->layers) && !(layername && layername[0])) {
|
||||||
|
|||||||
@@ -2095,7 +2095,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_OBJECT_END
|
FOREACH_GROUP_OBJECT_END;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -761,7 +761,7 @@ void KX_Scene::DupliGroupRecurse(CValue* obj, int level)
|
|||||||
}
|
}
|
||||||
m_groupGameObjects.insert(gameobj);
|
m_groupGameObjects.insert(gameobj);
|
||||||
}
|
}
|
||||||
FOREACH_GROUP_BASE_END
|
FOREACH_GROUP_BASE_END;
|
||||||
|
|
||||||
set<CValue*>::iterator oit;
|
set<CValue*>::iterator oit;
|
||||||
for (oit=m_groupGameObjects.begin(); oit != m_groupGameObjects.end(); oit++)
|
for (oit=m_groupGameObjects.begin(); oit != m_groupGameObjects.end(); oit++)
|
||||||
|
|||||||
Reference in New Issue
Block a user