Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_scene_api.c
| Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | static void rna_Scene_frame_set(Scene *scene, Main *bmain, int frame, float subframe) | ||||
| BKE_scene_frame_set(scene, cfra); | BKE_scene_frame_set(scene, cfra); | ||||
| # ifdef WITH_PYTHON | # ifdef WITH_PYTHON | ||||
| BPy_BEGIN_ALLOW_THREADS; | BPy_BEGIN_ALLOW_THREADS; | ||||
| # endif | # endif | ||||
| for (ViewLayer *view_layer = scene->view_layers.first; view_layer != NULL; | for (ViewLayer *view_layer = scene->view_layers.first; view_layer != NULL; | ||||
| view_layer = view_layer->next) { | view_layer = view_layer->next) { | ||||
| Depsgraph *depsgraph = BKE_scene_get_depsgraph(bmain, scene, view_layer, true); | Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true); | ||||
| BKE_scene_graph_update_for_newframe(depsgraph, bmain); | BKE_scene_graph_update_for_newframe(depsgraph, bmain); | ||||
| } | } | ||||
| # ifdef WITH_PYTHON | # ifdef WITH_PYTHON | ||||
| BPy_END_ALLOW_THREADS; | BPy_END_ALLOW_THREADS; | ||||
| # endif | # endif | ||||
| BKE_scene_camera_switch_update(scene); | BKE_scene_camera_switch_update(scene); | ||||
| ▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | static void rna_Scene_ray_cast(Scene *scene, | ||||
| float r_location[3], | float r_location[3], | ||||
| float r_normal[3], | float r_normal[3], | ||||
| int *r_index, | int *r_index, | ||||
| Object **r_ob, | Object **r_ob, | ||||
| float r_obmat[16]) | float r_obmat[16]) | ||||
| { | { | ||||
| normalize_v3(direction); | normalize_v3(direction); | ||||
| Depsgraph *depsgraph = BKE_scene_get_depsgraph(bmain, scene, view_layer, true); | Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true); | ||||
| SnapObjectContext *sctx = ED_transform_snap_object_context_create(bmain, scene, depsgraph, 0); | SnapObjectContext *sctx = ED_transform_snap_object_context_create(bmain, scene, depsgraph, 0); | ||||
| bool ret = ED_transform_snap_object_project_ray_ex(sctx, | bool ret = ED_transform_snap_object_project_ray_ex(sctx, | ||||
| &(const struct SnapObjectParams){ | &(const struct SnapObjectParams){ | ||||
| .snap_select = SNAP_ALL, | .snap_select = SNAP_ALL, | ||||
| }, | }, | ||||
| origin, | origin, | ||||
| direction, | direction, | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||