Cleanup, naming of engine type variable
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 28 Nov 2017 14:06:32 +0000 (15:06 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 28 Nov 2017 14:06:32 +0000 (15:06 +0100)
21 files changed:
source/blender/blenkernel/intern/context.c
source/blender/blenkernel/intern/sequencer.c
source/blender/depsgraph/DEG_depsgraph.h
source/blender/depsgraph/intern/depsgraph_eval.cc
source/blender/draw/DRW_engine.h
source/blender/draw/engines/external/external_engine.c
source/blender/draw/intern/DRW_render.h
source/blender/draw/intern/draw_manager.c
source/blender/editors/curve/editcurve.c
source/blender/editors/include/ED_transform_snap_object_context.h
source/blender/editors/include/ED_view3d.h
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_walk.c
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/transform/transform_snap_object.c
source/blender/makesrna/intern/rna_context.c
source/blender/makesrna/intern/rna_scene_api.c

index b9fef2993b6cffebc1aed152c6f2a39f745aaa03..5b0df663cc999f3a7d84b9c2fe849dc0cb709253 100644 (file)
@@ -1269,8 +1269,8 @@ void CTX_data_eval_ctx(const bContext *C, EvaluationContext *eval_ctx)
 
        Scene *scene = CTX_data_scene(C);
        ViewLayer *view_layer = CTX_data_view_layer(C);
-       RenderEngineType *engine = CTX_data_engine(C);
+       RenderEngineType *engine_type = CTX_data_engine(C);
        DEG_evaluation_context_init_from_scene(eval_ctx,
-                                              scene, view_layer, engine,
+                                              scene, view_layer, engine_type,
                                               DAG_EVAL_VIEWPORT);
 }
index ced94af26d2df5f706875d47fe751489a85e0ce3..f925259e2066623604d4199440bb2b48c21c3442 100644 (file)
@@ -3321,7 +3321,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq
                        context->scene->r.seq_prev_type = 3 /* == OB_SOLID */;
 
                /* opengl offscreen render */
-               context->eval_ctx->engine = RE_engines_find(scene->view_render.engine_id);
+               context->eval_ctx->engine_type = RE_engines_find(scene->view_render.engine_id);
                BKE_scene_graph_update_for_newframe(context->eval_ctx, depsgraph, context->bmain, scene, view_layer);
                ibuf = sequencer_view3d_cb(
                        /* set for OpenGL render (NULL when scrubbing) */
index 25e5714a7d7d2ef11c9ea213862fac2a600596ec..b95fea24053720803a0e9136c144b9d3a54caec7 100644 (file)
@@ -86,7 +86,7 @@ typedef struct EvaluationContext {
 
        struct Depsgraph *depsgraph;
        struct ViewLayer *view_layer;
-       struct RenderEngineType *engine;
+       struct RenderEngineType *engine_type;
 } EvaluationContext;
 
 /* DagNode->eval_flags */
@@ -218,7 +218,7 @@ void DEG_evaluation_context_init(struct EvaluationContext *eval_ctx,
 void DEG_evaluation_context_init_from_scene(struct EvaluationContext *eval_ctx,
                                             struct Scene *scene,
                                             struct ViewLayer *view_layer,
-                                            struct RenderEngineType *engine,
+                                            struct RenderEngineType *engine_type,
                                             eEvaluationMode mode);
 
 /* Free evaluation context. */
index 31332b416d58493639e54eed0fb6c961bcd6530f..1d389b902b87d8333fc7cf30cca41f676a5b841b 100644 (file)
@@ -81,13 +81,13 @@ void DEG_evaluation_context_init(EvaluationContext *eval_ctx,
 void DEG_evaluation_context_init_from_scene(EvaluationContext *eval_ctx,
                                             Scene *scene,
                                             ViewLayer *view_layer,
-                                            RenderEngineType *engine,
+                                            RenderEngineType *engine_type,
                                             eEvaluationMode mode)
 {
        DEG_evaluation_context_init(eval_ctx, mode);
        eval_ctx->depsgraph = BKE_scene_get_depsgraph(scene, view_layer, false);
        eval_ctx->view_layer = view_layer;
-       eval_ctx->engine = engine;
+       eval_ctx->engine_type = engine_type;
        eval_ctx->ctime = BKE_scene_frame_get(scene);
        BLI_assert(eval_ctx->depsgraph != NULL);
 }
index da7524754de294443183ad3911d4967cf059308c..ec0c7a6682ebab9cdc38a22ca312184658bfe449 100644 (file)
@@ -74,7 +74,7 @@ void DRW_draw_view(const struct bContext *C);
 
 void DRW_draw_render_loop_ex(
         struct Depsgraph *graph,
-        struct RenderEngineType *engine,
+        struct RenderEngineType *engine_type,
         struct ARegion *ar, struct View3D *v3d,
         const struct bContext *evil_C);
 void DRW_draw_render_loop(
@@ -82,7 +82,7 @@ void DRW_draw_render_loop(
         struct ARegion *ar, struct View3D *v3d);
 void DRW_draw_render_loop_offscreen(
         struct Depsgraph *graph,
-        struct RenderEngineType *engine,
+        struct RenderEngineType *engine_type,
         struct ARegion *ar, struct View3D *v3d,
         struct GPUOffScreen *ofs);
 void DRW_draw_select_loop(
index 76f5b4d98403aba46784d05c4beb841a6964fa8a..bdf53fd3046b4133bc1076d84e473d6792cb2e2f 100644 (file)
@@ -151,7 +151,7 @@ static void external_draw_scene(void *vedata)
 
        /* Create render engine. */
        if (!rv3d->render_engine) {
-               RenderEngineType *engine_type = draw_ctx->engine;
+               RenderEngineType *engine_type = draw_ctx->engine_type;
 
                if (!(engine_type->view_update && engine_type->render_to_view)) {
                        return;
index 8d89454fa6a21f6c9f1c78347bc7d5e345c025a6..793608c62a975b1ec27440680837f19ecde0d267 100644 (file)
@@ -443,7 +443,7 @@ typedef struct DRWContextState {
        /* Use 'scene->obedit' for edit-mode */
        struct Object *obact;   /* 'OBACT' */
 
-       struct RenderEngineType *engine;
+       struct RenderEngineType *engine_type;
 
        /* Last resort (some functions take this as an arg so we can't easily avoid).
         * May be NULL when used for selection or depth buffer. */
index 1e0061bc29c14f4329eaacf1ebdd10419f1fcd9a..9bb3f3def904bfed6fb75ec8fbca8f62ebc300c7 100644 (file)
@@ -2978,14 +2978,14 @@ static void use_drw_engine(DrawEngineType *engine)
 /* TODO revisit this when proper layering is implemented */
 /* Gather all draw engines needed and store them in DST.enabled_engines
  * That also define the rendering order of engines */
-static void DRW_engines_enable_from_engine(RenderEngineType *engine)
+static void DRW_engines_enable_from_engine(RenderEngineType *engine_type)
 {
        /* TODO layers */
-       if (engine->draw_engine != NULL) {
-               use_drw_engine(engine->draw_engine);
+       if (engine_type->draw_engine != NULL) {
+               use_drw_engine(engine_type->draw_engine);
        }
 
-       if ((engine->flag & RE_INTERNAL) == 0) {
+       if ((engine_type->flag & RE_INTERNAL) == 0) {
                DRW_engines_enable_external();
        }
 }
@@ -3062,12 +3062,12 @@ static void DRW_engines_enable_external(void)
        use_drw_engine(DRW_engine_viewport_external_type.draw_engine);
 }
 
-static void DRW_engines_enable(const Scene *scene, ViewLayer *view_layer, RenderEngineType *engine)
+static void DRW_engines_enable(const Scene *scene, ViewLayer *view_layer, RenderEngineType *engine_type)
 {
        Object *obact = OBACT(view_layer);
        const int mode = CTX_data_mode_enum_ex(scene->obedit, obact);
 
-       DRW_engines_enable_from_engine(engine);
+       DRW_engines_enable_from_engine(engine_type);
 
        if (DRW_state_draw_support()) {
                DRW_engines_enable_from_object_mode();
@@ -3226,7 +3226,7 @@ void DRW_notify_view_update(const bContext *C)
        View3D *v3d = CTX_wm_view3d(C);
        RegionView3D *rv3d = ar->regiondata;
        Scene *scene = DEG_get_evaluated_scene(graph);
-       RenderEngineType *engine = CTX_data_engine(C);
+       RenderEngineType *engine_type = CTX_data_engine(C);
        ViewLayer *view_layer = CTX_data_view_layer(C);
 
        if (rv3d->viewport == NULL) {
@@ -3239,10 +3239,10 @@ void DRW_notify_view_update(const bContext *C)
 
        DST.viewport = rv3d->viewport;
        DST.draw_ctx = (DRWContextState){
-               ar, rv3d, v3d, scene, view_layer, OBACT(view_layer), engine, C,
+               ar, rv3d, v3d, scene, view_layer, OBACT(view_layer), engine_type, C,
        };
 
-       DRW_engines_enable(scene, view_layer, engine);
+       DRW_engines_enable(scene, view_layer, engine_type);
 
        for (LinkData *link = DST.enabled_engines.first; link; link = link->next) {
                DrawEngineType *draw_engine = link->data;
@@ -3271,13 +3271,13 @@ void DRW_notify_view_update(const bContext *C)
 void DRW_draw_view(const bContext *C)
 {
        struct Depsgraph *graph = CTX_data_depsgraph(C);
-       RenderEngineType *engine = CTX_data_engine(C);
+       RenderEngineType *engine_type = CTX_data_engine(C);
        ARegion *ar = CTX_wm_region(C);
        View3D *v3d = CTX_wm_view3d(C);
 
        /* Reset before using it. */
        memset(&DST, 0x0, sizeof(DST));
-       DRW_draw_render_loop_ex(graph, engine, ar, v3d, C);
+       DRW_draw_render_loop_ex(graph, engine_type, ar, v3d, C);
 }
 
 /**
@@ -3286,7 +3286,7 @@ void DRW_draw_view(const bContext *C)
  */
 void DRW_draw_render_loop_ex(
         struct Depsgraph *graph,
-        RenderEngineType *engine,
+        RenderEngineType *engine_type,
         ARegion *ar, View3D *v3d,
         const bContext *evil_C)
 {
@@ -3303,7 +3303,7 @@ void DRW_draw_render_loop_ex(
        GPU_viewport_engines_data_validate(DST.viewport, DRW_engines_get_hash());
 
        DST.draw_ctx = (DRWContextState){
-           ar, rv3d, v3d, scene, view_layer, OBACT(view_layer), engine,
+           ar, rv3d, v3d, scene, view_layer, OBACT(view_layer), engine_type,
 
            /* reuse if caller sets */
            DST.draw_ctx.evil_C,
@@ -3312,7 +3312,7 @@ void DRW_draw_render_loop_ex(
        DRW_viewport_var_init();
 
        /* Get list of enabled engines */
-       DRW_engines_enable(scene, view_layer, engine);
+       DRW_engines_enable(scene, view_layer, engine_type);
 
        /* Update ubos */
        DRW_globals_update();
@@ -3419,13 +3419,13 @@ void DRW_draw_render_loop(
        memset(&DST, 0x0, sizeof(DST));
 
        Scene *scene = DEG_get_evaluated_scene(graph);
-       RenderEngineType *engine = RE_engines_find(scene->view_render.engine_id);
+       RenderEngineType *engine_type = RE_engines_find(scene->view_render.engine_id);
 
-       DRW_draw_render_loop_ex(graph, engine, ar, v3d, NULL);
+       DRW_draw_render_loop_ex(graph, engine_type, ar, v3d, NULL);
 }
 
 void DRW_draw_render_loop_offscreen(
-        struct Depsgraph *graph, RenderEngineType *engine,
+        struct Depsgraph *graph, RenderEngineType *engine_type,
         ARegion *ar, View3D *v3d, GPUOffScreen *ofs)
 {
        RegionView3D *rv3d = ar->regiondata;
@@ -3440,7 +3440,7 @@ void DRW_draw_render_loop_offscreen(
        /* Reset before using it. */
        memset(&DST, 0x0, sizeof(DST));
        DST.options.is_image_render = true;
-       DRW_draw_render_loop_ex(graph, engine, ar, v3d, NULL);
+       DRW_draw_render_loop_ex(graph, engine_type, ar, v3d, NULL);
 
        /* restore */
        {
@@ -3465,7 +3465,7 @@ void DRW_draw_select_loop(
         bool UNUSED(use_obedit_skip), bool UNUSED(use_nearest), const rcti *rect)
 {
        Scene *scene = DEG_get_evaluated_scene(graph);
-       RenderEngineType *engine = RE_engines_find(scene->view_render.engine_id);
+       RenderEngineType *engine_type = RE_engines_find(scene->view_render.engine_id);
        ViewLayer *view_layer = DEG_get_evaluated_view_layer(graph);
 #ifndef USE_GPU_SELECT
        UNUSED_VARS(vc, scene, view_layer, v3d, ar, rect);
@@ -3517,7 +3517,7 @@ void DRW_draw_select_loop(
 
        /* Instead of 'DRW_context_state_init(C, &DST.draw_ctx)', assign from args */
        DST.draw_ctx = (DRWContextState){
-               ar, rv3d, v3d, scene, view_layer, OBACT(view_layer), engine, (bContext *)NULL,
+               ar, rv3d, v3d, scene, view_layer, OBACT(view_layer), engine_type, (bContext *)NULL,
        };
 
        DRW_viewport_var_init();
@@ -3583,7 +3583,7 @@ void DRW_draw_depth_loop(
         ARegion *ar, View3D *v3d)
 {
        Scene *scene = DEG_get_evaluated_scene(graph);
-       RenderEngineType *engine = RE_engines_find(scene->view_render.engine_id);
+       RenderEngineType *engine_type = RE_engines_find(scene->view_render.engine_id);
        ViewLayer *view_layer = DEG_get_evaluated_view_layer(graph);
        RegionView3D *rv3d = ar->regiondata;
 
@@ -3614,7 +3614,7 @@ void DRW_draw_depth_loop(
 
        /* Instead of 'DRW_context_state_init(C, &DST.draw_ctx)', assign from args */
        DST.draw_ctx = (DRWContextState){
-               ar, rv3d, v3d, scene, view_layer, OBACT(view_layer), engine, (bContext *)NULL,
+               ar, rv3d, v3d, scene, view_layer, OBACT(view_layer), engine_type, (bContext *)NULL,
        };
 
        DRW_viewport_var_init();
index e8c784f15d593cc60c98e8b24596c6cb208b2448..79b63f36b76358a32a273470046202ead8ed8575 100644 (file)
@@ -5020,7 +5020,7 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, const wmEvent *event)
                        const float mval[2] = {UNPACK2(event->mval)};
 
                        struct SnapObjectContext *snap_context = ED_transform_snap_object_context_create_view3d(
-                               CTX_data_main(C), vc.scene, vc.view_layer, vc.engine, 0,
+                               CTX_data_main(C), vc.scene, vc.view_layer, vc.engine_type, 0,
                                vc.ar, vc.v3d);
 
                        ED_transform_snap_object_project_view3d_mixed(
index 49e856008190bd53b30f82e9011700e98dce13d0..8761f2c53614b7e30101135992aad1f806a54f0e 100644 (file)
@@ -76,9 +76,9 @@ struct SnapObjectParams {
 
 typedef struct SnapObjectContext SnapObjectContext;
 SnapObjectContext *ED_transform_snap_object_context_create(
-        struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct RenderEngineType *engine, int flag);
+        struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct RenderEngineType *engine_type, int flag);
 SnapObjectContext *ED_transform_snap_object_context_create_view3d(
-        struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct RenderEngineType *engine, int flag,
+        struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct RenderEngineType *engine_type, int flag,
         /* extra args for view3d */
         const struct ARegion *ar, const struct View3D *v3d);
 void ED_transform_snap_object_context_destroy(SnapObjectContext *sctx);
index feb3686db9f6ad29cd6b9227e107c0931c13cc11..69061bdcd266547c25fe66ec2429897eead73773 100644 (file)
@@ -78,7 +78,7 @@ typedef struct ViewContext {
        struct Depsgraph *depsgraph;
        struct Scene *scene;
        struct ViewLayer *view_layer;
-       struct RenderEngineType *engine;
+       struct RenderEngineType *engine_type;
        struct Object *obact;
        struct Object *obedit;
        struct ARegion *ar;
index 8024a733f40a05a940e09df7a322e140fc2d6460..c341a4cde1c725aa9931e0a517addcafd1999a10 100644 (file)
@@ -1931,8 +1931,8 @@ static void view3d_stereo3d_setup_offscreen(
 
 void ED_view3d_draw_offscreen_init(const EvaluationContext *eval_ctx, Scene *scene, ViewLayer *view_layer, View3D *v3d)
 {
-       RenderEngineType *type = eval_ctx->engine;
-       if (type->flag & RE_USE_LEGACY_PIPELINE) {
+       RenderEngineType *engine_type = eval_ctx->engine_type;
+       if (engine_type->flag & RE_USE_LEGACY_PIPELINE) {
                /* shadow buffers, before we setup matrices */
                if (draw_glsl_material(scene, view_layer, NULL, v3d, v3d->drawtype)) {
                        VP_deprecated_gpu_update_lamps_shadows_world(eval_ctx, scene, v3d);
@@ -2014,8 +2014,8 @@ void ED_view3d_draw_offscreen(
                view3d_main_region_setup_view(eval_ctx, scene, v3d, ar, viewmat, winmat, NULL);
 
        /* main drawing call */
-       RenderEngineType *type = eval_ctx->engine;
-       if (type->flag & RE_USE_LEGACY_PIPELINE) {
+       RenderEngineType *engine_type = eval_ctx->engine_type;
+       if (engine_type->flag & RE_USE_LEGACY_PIPELINE) {
 
                /* framebuffer fx needed, we need to draw offscreen first */
                if (v3d->fx_settings.fx_flag && fx) {
@@ -2058,7 +2058,7 @@ void ED_view3d_draw_offscreen(
                /* XXX, should take depsgraph as arg */
                Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, false);
                BLI_assert(depsgraph != NULL);
-               DRW_draw_render_loop_offscreen(depsgraph, eval_ctx->engine, ar, v3d, ofs);
+               DRW_draw_render_loop_offscreen(depsgraph, eval_ctx->engine_type, ar, v3d, ofs);
        }
 
        /* restore size */
index 4658ca566d2557d439deabae5d57a67c7508e4ad..5894d46a0f96fbf19659b18bed7c0ccb96291046 100644 (file)
@@ -113,7 +113,7 @@ void view3d_set_viewcontext(bContext *C, ViewContext *vc)
        vc->depsgraph = CTX_data_depsgraph(C);
        vc->scene = CTX_data_scene(C);
        vc->view_layer = CTX_data_view_layer(C);
-       vc->engine = CTX_data_engine(C);
+       vc->engine_type = CTX_data_engine(C);
        vc->v3d = CTX_wm_view3d(C);
        vc->win = CTX_wm_window(C);
        vc->rv3d = CTX_wm_region_view3d(C);
index 2901588b040cc400be2d3eda01bdb1991c646fa7..152f342f765f96fe34acfdddfdca69d8c8d1c590 100644 (file)
@@ -251,7 +251,7 @@ typedef struct WalkInfo {
        ARegion *ar;
        Scene *scene;
        ViewLayer *view_layer;
-       RenderEngineType *engine;
+       RenderEngineType *engine_type;
 
        wmTimer *timer; /* needed for redraws */
 
@@ -515,7 +515,7 @@ static bool initWalkInfo(bContext *C, WalkInfo *walk, wmOperator *op)
        walk->ar = CTX_wm_region(C);
        walk->scene = CTX_data_scene(C);
        walk->view_layer = CTX_data_view_layer(C);
-       walk->engine = CTX_data_engine(C);
+       walk->engine_type = CTX_data_engine(C);
 
 #ifdef NDOF_WALK_DEBUG
        puts("\n-- walk begin --");
@@ -604,7 +604,7 @@ static bool initWalkInfo(bContext *C, WalkInfo *walk, wmOperator *op)
        walk->rv3d->rflag |= RV3D_NAVIGATING;
 
        walk->snap_context = ED_transform_snap_object_context_create_view3d(
-               CTX_data_main(C), walk->scene, walk->view_layer, walk->engine, 0,
+               CTX_data_main(C), walk->scene, walk->view_layer, walk->engine_type, 0,
                walk->ar, walk->v3d);
 
        walk->v3d_camera_control = ED_view3d_cameracontrol_acquire(
index b6a9ba1079a2c5544697bd3dc03c996d95195926..d9bfcd0c289b8c40cb871cd4355f1a438d08c827 100644 (file)
@@ -470,7 +470,7 @@ typedef struct TransInfo {
        struct ARegion  *ar;
        struct Scene    *scene;
        struct ViewLayer *view_layer;
-       struct RenderEngineType *engine;
+       struct RenderEngineType *engine_type;
        struct ToolSettings *settings;
        struct wmTimer *animtimer;
        struct wmKeyMap *keymap;  /* so we can do lookups for header text */
index 89c43187bd487fea3b1e65602396ce0360f8f837..d2c48c4aea00a03df600a04d4a423a1f87186815 100644 (file)
@@ -2485,7 +2485,7 @@ static void createTransEditVerts(TransInfo *t)
        int *island_vert_map = NULL;
 
        DEG_evaluation_context_init_from_scene(&eval_ctx,
-                                              t->scene, t->view_layer, t->engine,
+                                              t->scene, t->view_layer, t->engine_type,
                                               DAG_EVAL_VIEWPORT);
 
        /* Even for translation this is needed because of island-orientation, see: T51651. */
@@ -5561,7 +5561,7 @@ static void set_trans_object_base_flags(TransInfo *t)
        /* handle pending update events, otherwise they got copied below */
        EvaluationContext eval_ctx;
        DEG_evaluation_context_init_from_scene(&eval_ctx,
-                                              t->scene, t->view_layer, t->engine,
+                                              t->scene, t->view_layer, t->engine_type,
                                               DAG_EVAL_VIEWPORT);
        for (base = view_layer->object_bases.first; base; base = base->next) {
                if (base->object->recalc & OB_RECALC_ALL) {
index f6ec93d8ff98c2d180c67d003471016832c9a2fc..36d8f8d44e7c8fc42644c1566ab71098dbbdb455 100644 (file)
@@ -1123,12 +1123,12 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
        Object *obedit = CTX_data_edit_object(C);
        Object *ob = CTX_data_active_object(C);
        bGPdata *gpd = CTX_data_gpencil_data(C);
-       RenderEngineType *engine = CTX_data_engine(C);
+       RenderEngineType *engine_type = CTX_data_engine(C);
        PropertyRNA *prop;
        
        t->scene = sce;
        t->view_layer = view_layer;
-       t->engine = engine;
+       t->engine_type = engine_type;
        t->sa = sa;
        t->ar = ar;
        t->obedit = obedit;
index 6b3167a0392a35b8a5b92ed265e966b38b5e0c02..63026cdcc46d98c9d2e3c17aec4a403f8b92c436 100644 (file)
@@ -585,7 +585,7 @@ static void initSnappingMode(TransInfo *t)
        if (t->spacetype == SPACE_VIEW3D) {
                if (t->tsnap.object_context == NULL) {
                        t->tsnap.object_context = ED_transform_snap_object_context_create_view3d(
-                               G.main, t->scene, t->view_layer, t->engine, 0,
+                               G.main, t->scene, t->view_layer, t->engine_type, 0,
                                t->ar, t->view);
 
                        ED_transform_snap_object_context_set_editmesh_callbacks(
index 61705ba2868abd7a1b875c4d914e8a7676974941..d92417ec68ac7db6a97f291efb7fc2a47d3810ba 100644 (file)
@@ -2096,7 +2096,7 @@ static bool snapObjectsRay(
  * \{ */
 
 SnapObjectContext *ED_transform_snap_object_context_create(
-        Main *bmain, Scene *scene, ViewLayer *view_layer, RenderEngineType *engine, int flag)
+        Main *bmain, Scene *scene, ViewLayer *view_layer, RenderEngineType *engine_type, int flag)
 {
        SnapObjectContext *sctx = MEM_callocN(sizeof(*sctx), __func__);
 
@@ -2105,7 +2105,7 @@ SnapObjectContext *ED_transform_snap_object_context_create(
        sctx->bmain = bmain;
        sctx->scene = scene;
 
-       DEG_evaluation_context_init_from_scene(&sctx->eval_ctx, scene, view_layer, engine, DAG_EVAL_VIEWPORT);
+       DEG_evaluation_context_init_from_scene(&sctx->eval_ctx, scene, view_layer, engine_type, DAG_EVAL_VIEWPORT);
 
        sctx->cache.object_map = BLI_ghash_ptr_new(__func__);
        sctx->cache.mem_arena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, __func__);
@@ -2114,11 +2114,11 @@ SnapObjectContext *ED_transform_snap_object_context_create(
 }
 
 SnapObjectContext *ED_transform_snap_object_context_create_view3d(
-        Main *bmain, Scene *scene, ViewLayer *view_layer, RenderEngineType *engine, int flag,
+        Main *bmain, Scene *scene, ViewLayer *view_layer, RenderEngineType *engine_type, int flag,
         /* extra args for view3d */
         const ARegion *ar, const View3D *v3d)
 {
-       SnapObjectContext *sctx = ED_transform_snap_object_context_create(bmain, scene, view_layer, engine, flag);
+       SnapObjectContext *sctx = ED_transform_snap_object_context_create(bmain, scene, view_layer, engine_type, flag);
 
        sctx->use_v3d = true;
        sctx->v3d_data.ar = ar;
index 911f2cca2f64b4cfdd144b1c148d84f936ab9192..6e6aca2d98d7b751ed7c258cb9c18fbd586910d9 100644 (file)
@@ -144,15 +144,15 @@ static PointerRNA rna_Context_view_render_get(PointerRNA *ptr)
 static void rna_Context_engine_get(PointerRNA *ptr, char *value)
  {
        bContext *C = (bContext *)ptr->data;
-       RenderEngineType *engine = CTX_data_engine(C);
-       strcpy(value, engine->idname);
+       RenderEngineType *engine_type = CTX_data_engine(C);
+       strcpy(value, engine_type->idname);
 }
 
 static int rna_Context_engine_length(PointerRNA *ptr)
 {
        bContext *C = (bContext *)ptr->data;
-       RenderEngineType *engine = CTX_data_engine(C);
-       return strlen(engine->idname);
+       RenderEngineType *engine_type = CTX_data_engine(C);
+       return strlen(engine_type->idname);
 }
 
 static PointerRNA rna_Context_scene_collection_get(PointerRNA *ptr)
index b245d12bbd5ad2a1828995f58fd3cce17569600c..7d8bf4949d5a38b6f12ab338cf66cdfd267ab958 100644 (file)
@@ -176,19 +176,19 @@ static void rna_Scene_ray_cast(
         int *r_success, float r_location[3], float r_normal[3], int *r_index,
         Object **r_ob, float r_obmat[16])
 {
-       RenderEngineType *engine;
+       RenderEngineType *engine_type;
 
        if (engine_id == NULL || engine_id[0] == '\0') {
-               engine = RE_engines_find(scene->view_render.engine_id);
+               engine_type = RE_engines_find(scene->view_render.engine_id);
        }
        else {
-               engine = RE_engines_find(engine_id);
+               engine_type = RE_engines_find(engine_id);
        }
 
        normalize_v3(direction);
 
        SnapObjectContext *sctx = ED_transform_snap_object_context_create(
-               G.main, scene, view_layer, engine, 0);
+               G.main, scene, view_layer, engine_type, 0);
 
        bool ret = ED_transform_snap_object_project_ray_ex(
                sctx,