Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiming Wu <xp8110@outlook.com>2019-06-12 16:35:05 +0300
committerYiming Wu <xp8110@outlook.com>2019-06-12 16:35:05 +0300
commite09dfe644ba10ecbb330dbb5ed8c1f1a3bfca251 (patch)
treef6f5329e7ffcbee774b1c3eae49463e9f8993675
parent6034edfb416bd02da8d082a5c012fde4d65c0d59 (diff)
parent7a50d078fe4125788dfb084cd23a5164070fe69b (diff)
Merge remote-tracking branch 'origin/master' into soc-2019-npr
# Conflicts: # release/datafiles/locale # release/scripts/addons # release/scripts/addons_contrib
-rw-r--r--intern/cycles/blender/blender_python.cpp4
-rw-r--r--intern/cycles/kernel/closure/bssrdf.h2
-rw-r--r--intern/cycles/kernel/kernel_camera.h4
-rw-r--r--intern/cycles/kernel/kernel_passes.h5
-rw-r--r--intern/cycles/kernel/kernel_types.h4
-rw-r--r--intern/cycles/render/session.cpp4
-rw-r--r--intern/cycles/subd/subd_dice.cpp2
-rw-r--r--intern/cycles/util/util_math_matrix.h2
-rw-r--r--intern/cycles/util/util_task.cpp4
-rw-r--r--intern/ghost/GHOST_C-api.h4
-rw-r--r--intern/ghost/intern/GHOST_ContextCGL.mm9
-rw-r--r--intern/ghost/intern/GHOST_DropTargetWin32.h2
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm3
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.cpp2
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py37
-rw-r--r--release/scripts/startup/bl_operators/wm.py22
-rw-r--r--release/scripts/startup/bl_ui/properties_data_armature.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_material_gpencil.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_particle.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_cloth.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_field.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_smoke.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_softbody.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_render.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_scene.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_texture.py2
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py4
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py4
-rw-r--r--release/scripts/startup/bl_ui/space_graph.py4
-rw-r--r--release/scripts/startup/bl_ui/space_image.py20
-rw-r--r--release/scripts/startup/bl_ui/space_nla.py4
-rw-r--r--release/scripts/startup/bl_ui/space_node.py10
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py4
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py8
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py9
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py19
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py26
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py14
-rw-r--r--source/blender/blenkernel/BKE_animsys.h2
-rw-r--r--source/blender/blenkernel/BKE_gpencil_modifier.h13
-rw-r--r--source/blender/blenkernel/BKE_modifier.h8
-rw-r--r--source/blender/blenkernel/BKE_nla.h4
-rw-r--r--source/blender/blenkernel/BKE_particle.h4
-rw-r--r--source/blender/blenkernel/BKE_sequencer.h5
-rw-r--r--source/blender/blenkernel/BKE_shader_fx.h4
-rw-r--r--source/blender/blenkernel/BKE_sound.h33
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c2
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c14
-rw-r--r--source/blender/blenkernel/intern/blendfile.c6
-rw-r--r--source/blender/blenkernel/intern/collection.c24
-rw-r--r--source/blender/blenkernel/intern/constraint.c2
-rw-r--r--source/blender/blenkernel/intern/customdata.c2
-rw-r--r--source/blender/blenkernel/intern/data_transfer.c6
-rw-r--r--source/blender/blenkernel/intern/fcurve.c2
-rw-r--r--source/blender/blenkernel/intern/fmodifier.c2
-rw-r--r--source/blender/blenkernel/intern/image.c4
-rw-r--r--source/blender/blenkernel/intern/ipo.c8
-rw-r--r--source/blender/blenkernel/intern/layer.c2
-rw-r--r--source/blender/blenkernel/intern/library.c42
-rw-r--r--source/blender/blenkernel/intern/library_query.c20
-rw-r--r--source/blender/blenkernel/intern/library_remap.c14
-rw-r--r--source/blender/blenkernel/intern/lightprobe.c2
-rw-r--r--source/blender/blenkernel/intern/main.c2
-rw-r--r--source/blender/blenkernel/intern/mask_rasterize.c1
-rw-r--r--source/blender/blenkernel/intern/movieclip.c2
-rw-r--r--source/blender/blenkernel/intern/multires.c2
-rw-r--r--source/blender/blenkernel/intern/nla.c19
-rw-r--r--source/blender/blenkernel/intern/object_update.c2
-rw-r--r--source/blender/blenkernel/intern/pbvh.c2
-rw-r--r--source/blender/blenkernel/intern/pbvh_bmesh.c4
-rw-r--r--source/blender/blenkernel/intern/pointcache.c20
-rw-r--r--source/blender/blenkernel/intern/scene.c2
-rw-r--r--source/blender/blenkernel/intern/seqcache.c8
-rw-r--r--source/blender/blenkernel/intern/sequencer.c37
-rw-r--r--source/blender/blenkernel/intern/softbody.c11
-rw-r--r--source/blender/blenkernel/intern/sound.c138
-rw-r--r--source/blender/blenkernel/intern/subdiv_converter_mesh.c2
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c4
-rw-r--r--source/blender/blenkernel/intern/text.c2
-rw-r--r--source/blender/blenkernel/intern/unit.c2
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c9
-rw-r--r--source/blender/blenlib/intern/expr_pylike_eval.c2
-rw-r--r--source/blender/blenlib/intern/math_geom.c2
-rw-r--r--source/blender/blenlib/intern/math_matrix.c2
-rw-r--r--source/blender/blenlib/intern/scanfill.c2
-rw-r--r--source/blender/blenlib/intern/string_utils.c4
-rw-r--r--source/blender/blenlib/intern/threads.c2
-rw-r--r--source/blender/blenloader/intern/blend_validate.c4
-rw-r--r--source/blender/blenloader/intern/readblenentry.c10
-rw-r--r--source/blender/blenloader/intern/readfile.c24
-rw-r--r--source/blender/blenloader/intern/versioning_270.c2
-rw-r--r--source/blender/blenloader/intern/versioning_280.c2
-rw-r--r--source/blender/blenloader/intern/writefile.c6
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.c6
-rw-r--r--source/blender/bmesh/intern/bmesh_operators.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_query.c4
-rw-r--r--source/blender/bmesh/intern/bmesh_walkers.c5
-rw-r--r--source/blender/bmesh/intern/bmesh_walkers.h2
-rw-r--r--source/blender/collada/Materials.cpp25
-rw-r--r--source/blender/compositor/COM_defines.h2
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.cpp2
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.cpp6
-rw-r--r--source/blender/depsgraph/DEG_depsgraph_query.h6
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc14
-rw-r--r--source/blender/depsgraph/intern/depsgraph_query.cc14
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc25
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h10
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_flush.cc8
-rw-r--r--source/blender/depsgraph/intern/node/deg_node_id.cc5
-rw-r--r--source/blender/depsgraph/intern/node/deg_node_operation.h4
-rw-r--r--source/blender/draw/engines/eevee/eevee_bloom.c6
-rw-r--r--source/blender/draw/engines/eevee/eevee_depth_of_field.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_effects.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightcache.c8
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightprobes.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_lights.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_lookdev.c2
-rw-r--r--source/blender/draw/engines/eevee/eevee_screen_raytrace.c2
-rw-r--r--source/blender/draw/engines/eevee/shaders/effect_downsample_cube_frag.glsl2
-rw-r--r--source/blender/draw/engines/eevee/shaders/effect_downsample_frag.glsl2
-rw-r--r--source/blender/draw/engines/eevee/shaders/effect_minmaxz_frag.glsl2
-rw-r--r--source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_frag.glsl2
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c4
-rw-r--r--source/blender/draw/intern/draw_manager.c2
-rw-r--r--source/blender/draw/intern/draw_manager.h2
-rw-r--r--source/blender/draw/modes/edit_mesh_mode.c9
-rw-r--r--source/blender/draw/modes/overlay_mode.c16
-rw-r--r--source/blender/draw/modes/shaders/overlay_face_wireframe_vert.glsl2
-rw-r--r--source/blender/editors/animation/anim_filter.c26
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c4
-rw-r--r--source/blender/editors/animation/anim_markers.c6
-rw-r--r--source/blender/editors/animation/drivers.c2
-rw-r--r--source/blender/editors/animation/keyframes_edit.c2
-rw-r--r--source/blender/editors/armature/armature_utils.c116
-rw-r--r--source/blender/editors/armature/pose_lib.c12
-rw-r--r--source/blender/editors/armature/pose_slide.c35
-rw-r--r--source/blender/editors/gpencil/annotate_paint.c22
-rw-r--r--source/blender/editors/gpencil/gpencil_armature.c3
-rw-r--r--source/blender/editors/gpencil/gpencil_brush.c7
-rw-r--r--source/blender/editors/gpencil/gpencil_data.c9
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c6
-rw-r--r--source/blender/editors/gpencil/gpencil_fill.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_interpolate.c4
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c27
-rw-r--r--source/blender/editors/gpencil/gpencil_primitive.c20
-rw-r--r--source/blender/editors/include/ED_armature.h3
-rw-r--r--source/blender/editors/interface/interface_handlers.c8
-rw-r--r--source/blender/editors/interface/interface_query.c4
-rw-r--r--source/blender/editors/interface/interface_region_tooltip.c2
-rw-r--r--source/blender/editors/interface/interface_templates.c6
-rw-r--r--source/blender/editors/interface/interface_widgets.c4
-rw-r--r--source/blender/editors/interface/resources.c3
-rw-r--r--source/blender/editors/interface/view2d_ops.c2
-rw-r--r--source/blender/editors/mask/mask_ops.c2
-rw-r--r--source/blender/editors/mesh/editmesh_bevel.c26
-rw-r--r--source/blender/editors/mesh/editmesh_bisect.c4
-rw-r--r--source/blender/editors/mesh/editmesh_inset.c2
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c10
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c6
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c10
-rw-r--r--source/blender/editors/object/object_add.c3
-rw-r--r--source/blender/editors/object/object_relations.c14
-rw-r--r--source/blender/editors/render/render_internal.c30
-rw-r--r--source/blender/editors/render/render_opengl.c4
-rw-r--r--source/blender/editors/screen/screen_user_menu.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c6
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c4
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c2
-rw-r--r--source/blender/editors/space_action/action_select.c2
-rw-r--r--source/blender/editors/space_buttons/buttons_texture.c2
-rw-r--r--source/blender/editors/space_clip/clip_buttons.c22
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c2
-rw-r--r--source/blender/editors/space_clip/tracking_ops_track.c4
-rw-r--r--source/blender/editors/space_file/filelist.c2
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c25
-rw-r--r--source/blender/editors/space_image/image_buttons.c22
-rw-r--r--source/blender/editors/space_info/info_stats.c24
-rw-r--r--source/blender/editors/space_nla/nla_edit.c3
-rw-r--r--source/blender/editors/space_node/node_relationships.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_dragdrop.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c4
-rw-r--r--source/blender/editors/space_outliner/outliner_intern.h2
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c16
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c46
-rw-r--r--source/blender/editors/space_sequencer/sequencer_preview.c4
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c8
-rw-r--r--source/blender/editors/transform/transform.c182
-rw-r--r--source/blender/editors/transform/transform_constraints.c32
-rw-r--r--source/blender/editors/transform/transform_orientations.c14
-rw-r--r--source/blender/editors/transform/transform_snap_object.c11
-rw-r--r--source/blender/editors/util/ed_util.c16
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c4
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c4
-rw-r--r--source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp6
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c2
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer.c2
-rw-r--r--source/blender/imbuf/intern/cineon/logImageCore.h2
-rw-r--r--source/blender/imbuf/intern/colormanagement.c2
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp8
-rw-r--r--source/blender/makesdna/DNA_ID.h30
-rw-r--r--source/blender/makesdna/DNA_anim_types.h6
-rw-r--r--source/blender/makesdna/DNA_gpencil_types.h10
-rw-r--r--source/blender/makesdna/DNA_lightprobe_types.h3
-rw-r--r--source/blender/makesdna/DNA_sound_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_armature.c23
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c2
-rw-r--r--source/blender/makesrna/intern/rna_scene.c10
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c11
-rw-r--r--source/blender/makesrna/intern/rna_sequencer_api.c58
-rw-r--r--source/blender/makesrna/intern/rna_space.c25
-rw-r--r--source/blender/makesrna/intern/rna_ui.c13
-rw-r--r--source/blender/python/generic/py_capi_utils.c2
-rw-r--r--source/blender/python/intern/bpy_app.c6
-rw-r--r--source/blender/python/intern/bpy_rna_id_collection.c2
-rw-r--r--source/blender/python/mathutils/mathutils.c2
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.c2
-rw-r--r--source/blender/python/mathutils/mathutils_bvhtree.c2
-rw-r--r--source/blender/python/mathutils/mathutils_geometry.c2
-rw-r--r--source/blender/render/intern/source/bake_api.c2
-rw-r--r--source/blender/render/intern/source/pipeline.c12
-rw-r--r--source/blender/windowmanager/WM_api.h2
-rw-r--r--source/blender/windowmanager/WM_types.h4
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c7
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c33
-rw-r--r--source/blender/windowmanager/intern/wm_files.c51
-rw-r--r--source/blender/windowmanager/intern/wm_gesture_ops.c2
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operator_type.c2
-rw-r--r--source/blender/windowmanager/intern/wm_toolsystem.c3
-rw-r--r--source/blender/windowmanager/intern/wm_tooltip.c2
-rw-r--r--source/creator/creator_args.c190
236 files changed, 1383 insertions, 1112 deletions
diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp
index 3ab8c8bd6d9..80c6fee9723 100644
--- a/intern/cycles/blender/blender_python.cpp
+++ b/intern/cycles/blender/blender_python.cpp
@@ -138,7 +138,7 @@ static const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce)
const char *result = _PyUnicode_AsString(py_str);
if (result) {
/* 99% of the time this is enough but we better support non unicode
- * chars since blender doesnt limit this.
+ * chars since blender doesn't limit this.
*/
return result;
}
@@ -151,7 +151,7 @@ static const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce)
return PyBytes_AS_STRING(*coerce);
}
else {
- /* Clear the error, so Cycles can be at leadt used without
+ /* Clear the error, so Cycles can be at least used without
* GPU and OSL support,
*/
PyErr_Clear();
diff --git a/intern/cycles/kernel/closure/bssrdf.h b/intern/cycles/kernel/closure/bssrdf.h
index 125ca4dd830..0da4d6bd060 100644
--- a/intern/cycles/kernel/closure/bssrdf.h
+++ b/intern/cycles/kernel/closure/bssrdf.h
@@ -226,7 +226,7 @@ ccl_device float bssrdf_burley_eval(const float d, float r)
if (r >= Rm)
return 0.0f;
- /* Burley refletance profile, equation (3).
+ /* Burley reflectance profile, equation (3).
*
* NOTES:
* - Surface albedo is already included into sc->weight, no need to
diff --git a/intern/cycles/kernel/kernel_camera.h b/intern/cycles/kernel/kernel_camera.h
index 1085930c33a..68a10dd03b8 100644
--- a/intern/cycles/kernel/kernel_camera.h
+++ b/intern/cycles/kernel/kernel_camera.h
@@ -377,9 +377,9 @@ ccl_device_inline void camera_sample(KernelGlobals *kg,
const int shutter_table_offset = kernel_data.cam.shutter_table_offset;
ray->time = lookup_table_read(kg, time, shutter_table_offset, SHUTTER_TABLE_SIZE);
/* TODO(sergey): Currently single rolling shutter effect type only
- * where scanlines are acquired from top to bottom and whole scanline
+ * where scan-lines are acquired from top to bottom and whole scanline
* is acquired at once (no delay in acquisition happens between pixels
- * of single scanline).
+ * of single scan-line).
*
* Might want to support more models in the future.
*/
diff --git a/intern/cycles/kernel/kernel_passes.h b/intern/cycles/kernel/kernel_passes.h
index 462ec037ee7..e84937e2fd9 100644
--- a/intern/cycles/kernel/kernel_passes.h
+++ b/intern/cycles/kernel/kernel_passes.h
@@ -71,8 +71,9 @@ ccl_device_inline void kernel_write_pass_float_variance(ccl_global float *buffer
{
kernel_write_pass_float(buffer, value);
- /* The online one-pass variance update that's used for the megakernel can't easily be implemented
- * with atomics, so for the split kernel the E[x^2] - 1/N * (E[x])^2 fallback is used. */
+ /* The online one-pass variance update that's used for the mega-kernel can't easily be
+ * implemented with atomics,
+ * so for the split kernel the E[x^2] - 1/N * (E[x])^2 fallback is used. */
kernel_write_pass_float(buffer + 1, value * value);
}
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index 08c0c199af6..b93af6c068c 100644
--- a/intern/cycles/kernel/kernel_types.h
+++ b/intern/cycles/kernel/kernel_types.h
@@ -314,7 +314,7 @@ enum PathRayFlag {
/* Ray is to be terminated, but continue with transparent bounces and
* emission as long as we encounter them. This is required to make the
* MIS between direct and indirect light rays match, as shadow rays go
- * through transparent surfaces to reach emisison too. */
+ * through transparent surfaces to reach emission too. */
PATH_RAY_TERMINATE_AFTER_TRANSPARENT = (1 << 21),
/* Ray is to be terminated. */
PATH_RAY_TERMINATE = (PATH_RAY_TERMINATE_IMMEDIATE | PATH_RAY_TERMINATE_AFTER_TRANSPARENT),
@@ -1148,7 +1148,7 @@ typedef struct KernelCamera {
ProjectionTransform worldtondc;
Transform worldtocamera;
- /* Stores changes in the projeciton matrix. Use for camera zoom motion
+ /* Stores changes in the projection matrix. Use for camera zoom motion
* blur and motion pass output for perspective camera. */
ProjectionTransform perspective_pre;
ProjectionTransform perspective_post;
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index 29eb779a7d6..da2be0b147b 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -184,8 +184,8 @@ bool Session::draw_gpu(BufferParams &buffer_params, DeviceDrawParams &draw_param
/* then verify the buffers have the expected size, so we don't
* draw previous results in a resized window */
if (!buffer_params.modified(display->params)) {
- /* for CUDA we need to do tonemapping still, since we can
- * only access GL buffers from the main thread */
+ /* for CUDA we need to do tone-mapping still, since we can
+ * only access GL buffers from the main thread. */
if (gpu_need_tonemap) {
thread_scoped_lock buffers_lock(buffers_mutex);
tonemap(tile_manager.state.sample);
diff --git a/intern/cycles/subd/subd_dice.cpp b/intern/cycles/subd/subd_dice.cpp
index 6b062ecfea2..fb96be5065b 100644
--- a/intern/cycles/subd/subd_dice.cpp
+++ b/intern/cycles/subd/subd_dice.cpp
@@ -317,7 +317,7 @@ void QuadDice::dice(SubPatch &sub, EdgeFactors &ef)
int Mu = max(ef.tu0, ef.tu1);
int Mv = max(ef.tv0, ef.tv1);
-#if 0 /* Doesnt work very well, especially at grazing angles. */
+#if 0 /* Doesn't work very well, especially at grazing angles. */
float S = scale_factor(sub, ef, Mu, Mv);
#else
float S = 1.0f;
diff --git a/intern/cycles/util/util_math_matrix.h b/intern/cycles/util/util_math_matrix.h
index e1c7d5d838f..a8fe5f8cc2c 100644
--- a/intern/cycles/util/util_math_matrix.h
+++ b/intern/cycles/util/util_math_matrix.h
@@ -198,7 +198,7 @@ ccl_device void math_trimatrix_cholesky(ccl_global float *A, int n, int stride)
}
/* Solve A*S=y for S given A and y,
- * where A is symmetrical positive-semidefinite and both inputs are destroyed in the process.
+ * where A is symmetrical positive-semi-definite and both inputs are destroyed in the process.
*
* We can apply Cholesky decomposition to find a lower triangular L so that L*Lt = A.
* With that we get (L*Lt)*S = L*(Lt*S) = L*b = y, defining b as Lt*S.
diff --git a/intern/cycles/util/util_task.cpp b/intern/cycles/util/util_task.cpp
index 2f771e2717e..fdbc3800806 100644
--- a/intern/cycles/util/util_task.cpp
+++ b/intern/cycles/util/util_task.cpp
@@ -243,7 +243,7 @@ vector<int> distribute_threads_on_nodes(const int num_threads)
if (num_active_group_processors >= num_threads) {
/* If the current thread is set up in a way that its affinity allows to
* use at least requested number of threads we do not explicitly set
- * affinity to the worker therads.
+ * affinity to the worker threads.
* This way we allow users to manually edit affinity of the parent
* thread, and here we follow that affinity. This way it's possible to
* have two Cycles/Blender instances running manually set to a different
@@ -254,7 +254,7 @@ vector<int> distribute_threads_on_nodes(const int num_threads)
vector<int> num_per_node_processors;
get_per_node_num_processors(&num_per_node_processors);
if (num_per_node_processors.size() == 0) {
- /* Error was already repported, here we can't do anything, so we simply
+ /* Error was already reported, here we can't do anything, so we simply
* leave default affinity to all the worker threads. */
return thread_nodes;
}
diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h
index ea9d6925e23..b54c097c2ab 100644
--- a/intern/ghost/GHOST_C-api.h
+++ b/intern/ghost/GHOST_C-api.h
@@ -446,8 +446,8 @@ extern GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
***************************************************************************************/
/**
- * Sets 3D mouse deadzone
- * \param deadzone Deadzone of the 3D mouse (both for rotation and pan) relative to full range
+ * Sets 3D mouse dead-zone.
+ * \param deadzone: Dead-zone of the 3D mouse (both for rotation and pan) relative to full range.
*/
extern void GHOST_setNDOFDeadZone(float deadzone);
#endif
diff --git a/intern/ghost/intern/GHOST_ContextCGL.mm b/intern/ghost/intern/GHOST_ContextCGL.mm
index 0fca41306a6..12c340ffe97 100644
--- a/intern/ghost/intern/GHOST_ContextCGL.mm
+++ b/intern/ghost/intern/GHOST_ContextCGL.mm
@@ -34,8 +34,7 @@
static void ghost_fatal_error_dialog(const char *msg)
{
- @autoreleasepool
- {
+ @autoreleasepool {
NSString *message = [NSString stringWithFormat:@"Error opening window:\n%s", msg];
NSAlert *alert = [[NSAlert alloc] init];
@@ -338,8 +337,7 @@ static const OSType METAL_CORE_VIDEO_PIXEL_FORMAT = kCVPixelFormatType_32BGRA;
void GHOST_ContextCGL::metalInit()
{
- @autoreleasepool
- {
+ @autoreleasepool {
id<MTLDevice> device = m_metalLayer.device;
// Create a command queue for blit/present operation
@@ -534,8 +532,7 @@ void GHOST_ContextCGL::metalUpdateFramebuffer()
void GHOST_ContextCGL::metalSwapBuffers()
{
- @autoreleasepool
- {
+ @autoreleasepool {
updateDrawingContext();
glFlush();
diff --git a/intern/ghost/intern/GHOST_DropTargetWin32.h b/intern/ghost/intern/GHOST_DropTargetWin32.h
index 588d89f1549..ee124f3ba0e 100644
--- a/intern/ghost/intern/GHOST_DropTargetWin32.h
+++ b/intern/ghost/intern/GHOST_DropTargetWin32.h
@@ -89,7 +89,7 @@ class GHOST_DropTargetWin32 : public IDropTarget {
/* Internal helper functions */
/**
- * Base the effect on those allowed by the dropsource.
+ * Base the effect on those allowed by the drop-source.
* \param dwAllowed Drop sources allowed drop effect.
* \return The allowed drop effect.
*/
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index 80a521a7ca5..376ebfa2a21 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -1358,8 +1358,7 @@ bool GHOST_SystemCocoa::handleOpenDocumentRequest(void *filepathStr)
// Check open windows if some changes are not saved
if (m_windowManager->getAnyModifiedState()) {
- @autoreleasepool
- {
+ @autoreleasepool {
NSAlert *alert = [[NSAlert alloc] init];
NSString *title = [NSString stringWithFormat:@"Opening %@", [filepath lastPathComponent]];
NSString *text = @"Current document has not been saved.\nDo you really want to proceed?";
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index a8cbb874c50..48bdfa37565 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -957,7 +957,7 @@ GHOST_TWindowState GHOST_WindowX11::getState() const
state = icccmGetState();
/*
* In the Iconic and Withdrawn state, the window
- * is unmaped, so only need return a Minimized state.
+ * is unmapped, so only need return a Minimized state.
*/
if ((state == IconicState) || (state == WithdrawnState))
state_ret = GHOST_kWindowStateMinimized;
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 0ee71cfe4ff..72204762a22 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -1357,9 +1357,11 @@ def km_graph_editor(params):
{"properties": [("extend", False), ("column", False), ("curves", True)]}),
("graph.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True, "alt": True},
{"properties": [("extend", True), ("column", False), ("curves", True)]}),
- ("graph.select_leftright", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True},
+ ("graph.select_leftright",
+ {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "alt": not params.legacy},
{"properties": [("mode", 'CHECK'), ("extend", False)]}),
- ("graph.select_leftright", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True},
+ ("graph.select_leftright",
+ {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "shift": True, "alt": not params.legacy},
{"properties": [("mode", 'CHECK'), ("extend", True)]}),
("graph.select_leftright", {"type": 'LEFT_BRACKET', "value": 'PRESS'},
{"properties": [("mode", 'LEFT'), ("extend", False)]}),
@@ -1378,6 +1380,8 @@ def km_graph_editor(params):
{"properties": [("tweak", True), ("mode", 'SET')]}),
("graph.select_box", {"type": params.select_tweak, "value": 'ANY', "shift": True},
{"properties": [("tweak", True), ("mode", 'ADD')]}),
+ ("graph.select_box", {"type": params.select_tweak, "value": 'ANY', "ctrl": True},
+ {"properties": [("tweak", True), ("mode", 'SUB')]}),
("graph.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True},
{"properties": [("mode", 'ADD')]}),
("graph.select_lasso", {"type": params.action_tweak, "value": 'ANY', "shift": True, "ctrl": True},
@@ -1441,7 +1445,6 @@ def km_graph_editor(params):
if params.select_mouse == 'LEFTMOUSE' and not params.legacy:
items.extend([
("graph.cursor_set", {"type": 'RIGHTMOUSE', "value": 'PRESS', "shift": True}, None),
- ("graph.cursor_set", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True}, None),
])
else:
items.extend([
@@ -1887,9 +1890,11 @@ def km_dopesheet(params):
{"properties": [("extend", False), ("column", False), ("channel", True)]}),
("action.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True, "alt": True},
{"properties": [("extend", True), ("column", False), ("channel", True)]}),
- ("action.select_leftright", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True},
+ ("action.select_leftright",
+ {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "alt": not params.legacy},
{"properties": [("mode", 'CHECK'), ("extend", False)]}),
- ("action.select_leftright", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True},
+ ("action.select_leftright",
+ {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "shift": True, "alt": not params.legacy},
{"properties": [("mode", 'CHECK'), ("extend", True)]}),
("action.select_leftright", {"type": 'LEFT_BRACKET', "value": 'PRESS'},
{"properties": [("mode", 'LEFT'), ("extend", False)]}),
@@ -1904,6 +1909,8 @@ def km_dopesheet(params):
{"properties": [("tweak", True), ("mode", 'SET')]}),
("action.select_box", {"type": params.select_tweak, "value": 'ANY', "shift": True},
{"properties": [("tweak", True), ("mode", 'ADD')]}),
+ ("action.select_box", {"type": params.select_tweak, "value": 'ANY', "ctrl": True},
+ {"properties": [("tweak", True), ("mode", 'SUB')]}),
("action.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True},
{"properties": [("mode", 'ADD')]}),
("action.select_lasso", {"type": params.action_tweak, "value": 'ANY', "shift": True, "ctrl": True},
@@ -2026,9 +2033,11 @@ def km_nla_editor(params):
{"properties": [("extend", False), ("deselect_all", not params.legacy)]}),
("nla.click_select", {"type": params.select_mouse, "value": 'PRESS', "shift": True},
{"properties": [("extend", True)]}),
- ("nla.select_leftright", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True},
+ ("nla.select_leftright",
+ {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "alt": not params.legacy},
{"properties": [("mode", 'CHECK'), ("extend", False)]}),
- ("nla.select_leftright", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True},
+ ("nla.select_leftright",
+ {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "shift": True, "alt": not params.legacy},
{"properties": [("mode", 'CHECK'), ("extend", True)]}),
("nla.select_leftright", {"type": 'LEFT_BRACKET', "value": 'PRESS'},
{"properties": [("mode", 'LEFT'), ("extend", False)]}),
@@ -2043,6 +2052,8 @@ def km_nla_editor(params):
{"properties": [("tweak", True), ("mode", 'SET')]}),
("nla.select_box", {"type": params.select_tweak, "value": 'ANY', "shift": True},
{"properties": [("tweak", True), ("mode", 'ADD')]}),
+ ("nla.select_box", {"type": params.select_tweak, "value": 'ANY', "ctrl": True},
+ {"properties": [("tweak", True), ("mode", 'SUB')]}),
("nla.previewrange_set", {"type": 'P', "value": 'PRESS', "ctrl": True, "alt": True}, None),
("nla.view_all", {"type": 'HOME', "value": 'PRESS'}, None),
("nla.view_all", {"type": 'NDOF_BUTTON_FIT', "value": 'PRESS'}, None),
@@ -2344,10 +2355,12 @@ def km_sequencer(params):
{"properties": [("extend", False), ("linked_handle", True), ("left_right", 'NONE'), ("linked_time", False)]}),
("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "alt": True},
{"properties": [("extend", True), ("linked_handle", True), ("left_right", 'NONE'), ("linked_time", False)]}),
- ("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True},
- {"properties": [("extend", False), ("linked_handle", False), ("left_right", 'MOUSE'), ("linked_time", True)]}),
- ("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True},
- {"properties": [("extend", True), ("linked_handle", False), ("left_right", 'NONE'), ("linked_time", True)]}),
+ ("sequencer.select",
+ {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "alt": not params.legacy},
+ {"properties": [("linked_handle", False), ("left_right", 'MOUSE'), ("linked_time", True), ("extend", False)]}),
+ ("sequencer.select",
+ {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "shift": True, "alt": not params.legacy},
+ {"properties": [("linked_handle", False), ("left_right", 'MOUSE'), ("linked_time", True), ("extend", True)]}),
("sequencer.select_more", {"type": 'NUMPAD_PLUS', "value": 'PRESS', "ctrl": True}, None),
("sequencer.select_less", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "ctrl": True}, None),
("sequencer.select_linked_pick", {"type": 'L', "value": 'PRESS'},
@@ -2782,7 +2795,6 @@ def km_animation(params):
if params.select_mouse == 'LEFTMOUSE' and not params.legacy:
items.extend([
("anim.change_frame", {"type": 'RIGHTMOUSE', "value": 'PRESS', "shift": True}, None),
- ("anim.change_frame", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True}, None),
])
else:
items.extend([
@@ -5765,6 +5777,7 @@ def km_3d_view_tool_edit_gpencil_to_sphere(params):
)
+# Also used for weight paint.
def km_3d_view_tool_sculpt_gpencil_paint(_params):
return (
"3D View Tool: Sculpt Gpencil, Paint",
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 0788e3bc51c..774c8e63002 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -69,6 +69,14 @@ rna_space_type_prop = EnumProperty(
default='EMPTY',
)
+# Note, this can be used for more operators,
+# currently not used for all "WM_OT_context_" operators.
+rna_module_prop = StringProperty(
+ name="Module",
+ description="Optionally override the context with a module",
+ maxlen=1024,
+)
+
def context_path_validate(context, data_path):
try:
@@ -325,16 +333,24 @@ class WM_OT_context_toggle(Operator):
bl_options = {'UNDO', 'INTERNAL'}
data_path: rna_path_prop
+ module: rna_module_prop
def execute(self, context):
data_path = self.data_path
- if context_path_validate(context, data_path) is Ellipsis:
+ module = self.module
+ if not module:
+ base = context
+ else:
+ from importlib import import_module
+ base = import_module(self.module)
+
+ if context_path_validate(base, data_path) is Ellipsis:
return {'PASS_THROUGH'}
- exec("context.%s = not (context.%s)" % (data_path, data_path))
+ exec("base.%s = not (base.%s)" % (data_path, data_path))
- return operator_path_undo_return(context, data_path)
+ return operator_path_undo_return(base, data_path)
class WM_OT_context_toggle_enum(Operator):
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index 9df767d50c7..d44af702d46 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -21,7 +21,7 @@ import bpy
from bpy.types import Panel, Menu
from rna_prop_ui import PropertyPanel
-from .properties_animviz import (
+from bl_ui.properties_animviz import (
MotionPathButtonsPanel,
MotionPathButtonsPanel_display,
)
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 06131942505..c5afc51aa30 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -241,7 +241,7 @@ class GreasePencilStrokeSculptPanel:
layout.template_icon_view(settings, "sculpt_tool", show_labels=True)
if not self.is_popover:
- from .properties_paint_common import (
+ from bl_ui.properties_paint_common import (
brush_basic_gpencil_sculpt_settings,
)
brush_basic_gpencil_sculpt_settings(layout, context, brush)
diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py
index b6668258c78..7cd68f34e9e 100644
--- a/release/scripts/startup/bl_ui/properties_material_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py
@@ -22,7 +22,7 @@ from bpy.types import Menu, Panel, UIList
from rna_prop_ui import PropertyPanel
from bl_ui.utils import PresetPanel
-from .properties_grease_pencil_common import (
+from bl_ui.properties_grease_pencil_common import (
GreasePencilMaterialsPanel,
)
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 526ec17f2cb..0e45f4c97ae 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -17,7 +17,7 @@
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
-from .properties_animviz import (
+from bl_ui.properties_animviz import (
MotionPathButtonsPanel,
MotionPathButtonsPanel_display,
)
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 00c4f0e8e01..5e8aa16c8e6 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -24,7 +24,7 @@ from bpy.app.translations import pgettext_iface as iface_
from bpy.app.translations import contexts as i18n_contexts
from bl_ui.utils import PresetPanel
-from .properties_physics_common import (
+from bl_ui.properties_physics_common import (
point_cache_ui,
effector_weights_ui,
basic_force_field_settings_ui,
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index 7463f10185d..b896e5f5408 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -23,7 +23,7 @@ from bpy.types import (
)
from bl_ui.utils import PresetPanel
-from .properties_physics_common import (
+from bl_ui.properties_physics_common import (
point_cache_ui,
effector_weights_ui,
)
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
index 5dd9800347f..2b8e488cbe9 100644
--- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
@@ -22,7 +22,7 @@ from bpy.types import (
Panel,
UIList,
)
-from .properties_physics_common import (
+from bl_ui.properties_physics_common import (
point_cache_ui,
effector_weights_ui,
)
diff --git a/release/scripts/startup/bl_ui/properties_physics_field.py b/release/scripts/startup/bl_ui/properties_physics_field.py
index c38dad25cf4..00dc068a51a 100644
--- a/release/scripts/startup/bl_ui/properties_physics_field.py
+++ b/release/scripts/startup/bl_ui/properties_physics_field.py
@@ -21,7 +21,7 @@
from bpy.types import (
Panel,
)
-from .properties_physics_common import (
+from bl_ui.properties_physics_common import (
basic_force_field_settings_ui,
basic_force_field_falloff_ui,
)
diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py
index 898e1f3804e..057e7ddf211 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -22,7 +22,7 @@ import bpy
from bpy.types import (
Panel,
)
-from .properties_physics_common import (
+from bl_ui.properties_physics_common import (
point_cache_ui,
effector_weights_ui,
)
diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py
index 6157446fd5a..3b080822b95 100644
--- a/release/scripts/startup/bl_ui/properties_physics_softbody.py
+++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py
@@ -21,7 +21,7 @@
from bpy.types import (
Panel,
)
-from .properties_physics_common import (
+from bl_ui.properties_physics_common import (
point_cache_ui,
effector_weights_ui,
)
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 41e3309d8cd..8734989a56f 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -19,7 +19,7 @@
# <pep8 compliant>
from bpy.types import Panel
-from .space_view3d import (
+from bl_ui.space_view3d import (
VIEW3D_PT_shading_lighting,
VIEW3D_PT_shading_color,
VIEW3D_PT_shading_options,
diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py
index 8f68a447876..ca8e5337d55 100644
--- a/release/scripts/startup/bl_ui/properties_scene.py
+++ b/release/scripts/startup/bl_ui/properties_scene.py
@@ -26,7 +26,7 @@ from bpy.types import (
from rna_prop_ui import PropertyPanel
-from .properties_physics_common import (
+from bl_ui.properties_physics_common import (
point_cache_ui,
effector_weights_ui,
)
diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py
index 41c17831c2c..40a630ff834 100644
--- a/release/scripts/startup/bl_ui/properties_texture.py
+++ b/release/scripts/startup/bl_ui/properties_texture.py
@@ -32,7 +32,7 @@ from bpy.types import (
)
from rna_prop_ui import PropertyPanel
-from .properties_paint_common import brush_texture_settings
+from bl_ui.properties_paint_common import brush_texture_settings
class TEXTURE_MT_context_menu(Menu):
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index e811619683e..d138615e9be 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -22,7 +22,7 @@ import bpy
from bpy.types import Panel, Header, Menu, UIList
from bpy.app.translations import pgettext_iface as iface_
from bl_ui.utils import PresetPanel
-from .properties_grease_pencil_common import (
+from bl_ui.properties_grease_pencil_common import (
AnnotationDrawingToolsPanel,
AnnotationDataPanel,
)
@@ -1106,7 +1106,7 @@ class CLIP_PT_proxy(CLIP_PT_clip_view_panel, Panel):
# -----------------------------------------------------------------------------
# Mask (similar code in space_image.py, keep in sync)
-from .properties_mask_common import (
+from bl_ui.properties_mask_common import (
MASK_PT_mask,
MASK_PT_layers,
MASK_PT_spline,
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 87bbb274e66..c0274a64bd0 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -199,7 +199,7 @@ class DOPESHEET_HT_header(Header):
layout.template_header()
if st.mode == 'TIMELINE':
- from .space_time import (
+ from bl_ui.space_time import (
TIME_MT_editor_menus,
TIME_HT_editor_buttons,
)
@@ -394,7 +394,7 @@ class DOPESHEET_MT_marker(Menu):
def draw(self, context):
layout = self.layout
- from .space_time import marker_menu_generic
+ from bl_ui.space_time import marker_menu_generic
marker_menu_generic(layout, context)
st = context.space_data
diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py
index a5bc29362ec..422990760b4 100644
--- a/release/scripts/startup/bl_ui/space_graph.py
+++ b/release/scripts/startup/bl_ui/space_graph.py
@@ -19,7 +19,7 @@
# <pep8 compliant>
from bpy.types import Header, Menu, Panel
-from .space_dopesheet import (
+from bl_ui.space_dopesheet import (
DopesheetFilterPopoverBase,
dopesheet_filter,
)
@@ -207,7 +207,7 @@ class GRAPH_MT_marker(Menu):
def draw(self, context):
layout = self.layout
- from .space_time import marker_menu_generic
+ from bl_ui.space_time import marker_menu_generic
marker_menu_generic(layout, context)
# TODO: pose markers for action edit mode only?
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 6af3f8865ca..1a0bc03dd38 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -24,7 +24,7 @@ from bpy.types import (
Panel,
UIList,
)
-from .properties_paint_common import (
+from bl_ui.properties_paint_common import (
UnifiedPaintPanel,
brush_texture_settings,
brush_texpaint_common,
@@ -34,10 +34,10 @@ from .properties_paint_common import (
brush_texpaint_common_options,
brush_mask_texture_settings,
)
-from .properties_grease_pencil_common import (
+from bl_ui.properties_grease_pencil_common import (
AnnotationDataPanel,
)
-from .space_toolsystem_common import (
+from bl_ui.space_toolsystem_common import (
ToolActivePanelHelper,
)
@@ -548,7 +548,7 @@ class IMAGE_HT_tool_header(Header):
# Active Tool
# -----------
- from .space_toolsystem_common import ToolSelectPanelHelper
+ from bl_ui.space_toolsystem_common import ToolSelectPanelHelper
tool = ToolSelectPanelHelper.draw_active_tool_header(context, layout)
tool_mode = context.mode if tool is None else tool.mode
@@ -580,7 +580,7 @@ class IMAGE_HT_tool_header(Header):
# Active Tool
# -----------
- from .space_toolsystem_common import ToolSelectPanelHelper
+ from bl_ui.space_toolsystem_common import ToolSelectPanelHelper
tool = ToolSelectPanelHelper.tool_active_from_context(context)
tool_mode = context.mode if tool is None else tool.mode
@@ -597,7 +597,7 @@ class _draw_tool_settings_context_mode:
uv_sculpt = tool_settings.uv_sculpt
brush = uv_sculpt.brush
if brush:
- from .properties_paint_common import UnifiedPaintPanel
+ from bl_ui.properties_paint_common import UnifiedPaintPanel
row = layout.row(align=True)
UnifiedPaintPanel.prop_unified_size(row, context, brush, "size", slider=True)
@@ -619,7 +619,7 @@ class _draw_tool_settings_context_mode:
if brush is None:
return
- from .properties_paint_common import (
+ from bl_ui.properties_paint_common import (
UnifiedPaintPanel,
brush_basic_texpaint_settings,
)
@@ -770,7 +770,7 @@ class MASK_MT_editor_menus(Menu):
# Mask (similar code in space_clip.py, keep in sync)
# note! - panel placement does _not_ fit well with image panels... need to fix.
-from .properties_mask_common import (
+from bl_ui.properties_mask_common import (
MASK_PT_mask,
MASK_PT_layers,
MASK_PT_spline,
@@ -1407,14 +1407,14 @@ class IMAGE_PT_uv_sculpt_brush(Panel):
sima = context.space_data
# TODO(campbell): nicer way to check if we're in uv sculpt mode.
if sima and sima.show_uvedit:
- from .space_toolsystem_common import ToolSelectPanelHelper
+ from bl_ui.space_toolsystem_common import ToolSelectPanelHelper
tool = ToolSelectPanelHelper.tool_active_from_context(context)
if tool.has_datablock:
return True
return False
def draw(self, context):
- from .properties_paint_common import UnifiedPaintPanel
+ from bl_ui.properties_paint_common import UnifiedPaintPanel
layout = self.layout
tool_settings = context.tool_settings
diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py
index d4d8fe2dae0..06bd69928d8 100644
--- a/release/scripts/startup/bl_ui/space_nla.py
+++ b/release/scripts/startup/bl_ui/space_nla.py
@@ -20,7 +20,7 @@
from bpy.types import Header, Menu, Panel
from bpy.app.translations import contexts as i18n_contexts
-from .space_dopesheet import (
+from bl_ui.space_dopesheet import (
DopesheetFilterPopoverBase,
dopesheet_filter,
)
@@ -143,7 +143,7 @@ class NLA_MT_marker(Menu):
def draw(self, context):
layout = self.layout
- from .space_time import marker_menu_generic
+ from bl_ui.space_time import marker_menu_generic
marker_menu_generic(layout, context)
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index 1c066cded06..c65893ae280 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -23,21 +23,21 @@ from bpy.types import Header, Menu, Panel
from bpy.app.translations import pgettext_iface as iface_
from bpy.app.translations import contexts as i18n_contexts
from bl_ui.utils import PresetPanel
-from .properties_grease_pencil_common import (
+from bl_ui.properties_grease_pencil_common import (
AnnotationDataPanel,
GreasePencilToolsPanel,
)
-from .space_toolsystem_common import (
+from bl_ui.space_toolsystem_common import (
ToolActivePanelHelper,
)
-from .properties_material import (
+from bl_ui.properties_material import (
EEVEE_MATERIAL_PT_settings,
MATERIAL_PT_viewport
)
-from .properties_world import (
+from bl_ui.properties_world import (
WORLD_PT_viewport_display
)
-from .properties_data_light import (
+from bl_ui.properties_data_light import (
DATA_PT_light,
DATA_PT_EEVEE_light,
)
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 558a188bf97..a9ca3f9dd5d 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -27,7 +27,7 @@ from bpy.app.translations import (
contexts as i18n_contexts,
pgettext_iface as iface_,
)
-from .properties_grease_pencil_common import (
+from bl_ui.properties_grease_pencil_common import (
AnnotationDataPanel,
GreasePencilToolsPanel,
)
@@ -362,7 +362,7 @@ class SEQUENCER_MT_marker(Menu):
st = context.space_data
is_sequencer_view = st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}
- from .space_time import marker_menu_generic
+ from bl_ui.space_time import marker_menu_generic
marker_menu_generic(layout, context)
if is_sequencer_view:
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index 4ed0d5b1bbb..59d38cc8ae4 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -27,7 +27,7 @@
import bpy
from bpy.types import Panel
-from .space_toolsystem_common import (
+from bl_ui.space_toolsystem_common import (
ToolSelectPanelHelper,
ToolDef,
)
@@ -1072,7 +1072,7 @@ class _defs_weight_paint:
def draw_settings(context, layout, tool):
brush = context.tool_settings.weight_paint.brush
if brush is not None:
- from .properties_paint_common import UnifiedPaintPanel
+ from bl_ui.properties_paint_common import UnifiedPaintPanel
UnifiedPaintPanel.prop_unified_weight(layout, context, brush, "weight", slider=True)
UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", slider=True)
props = tool.operator_properties("paint.weight_gradient")
@@ -1494,6 +1494,10 @@ class _defs_gpencil_weight:
icon_prefix="ops.gpencil.sculpt_",
type=bpy.types.GPencilSculptSettings,
attr="weight_tool",
+ tooldef_keywords=dict(
+ operator="gpencil.sculpt_paint",
+ keymap="3D View Tool: Sculpt Gpencil, Paint",
+ ),
)
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index d99df2eced7..35c4a5ec5a1 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -334,15 +334,6 @@ class TOPBAR_MT_file_defaults(Menu):
if app_template:
props.app_template = app_template
- if prefs.use_preferences_save:
- props = layout.operator(
- "wm.read_factory_settings",
- text="Load Factory Settings (Temporary)"
- )
- if app_template:
- props.app_template = app_template
- props.use_temporary_preferences = True
-
class TOPBAR_MT_app_about(Menu):
bl_label = "About"
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 79f7cdf6d5a..8da5237b7f9 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -40,10 +40,21 @@ class USERPREF_HT_header(Header):
row = layout.row()
row.menu("USERPREF_MT_save_load", text="", icon='COLLAPSEMENU')
- if not prefs.use_preferences_save:
- sub_revert = row.row(align=True)
- sub_revert.active = prefs.is_dirty
- sub_revert.operator("wm.save_userpref")
+ if prefs.use_preferences_save:
+ if bpy.app.use_userpref_skip_save_on_exit:
+ # We should have an 'alert' icon, for now use 'error'.
+ sub = row.row(align=True)
+ props = sub.operator(
+ "wm.context_toggle",
+ text="Skip Auto-Save",
+ icon='CHECKBOX_HLT',
+ )
+ props.module = "bpy.app"
+ props.data_path = "use_userpref_skip_save_on_exit"
+ else:
+ sub = row.row(align=True)
+ sub.active = prefs.is_dirty
+ sub.operator("wm.save_userpref")
def draw(self, context):
layout = self.layout
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 1508cf746fe..41592d604c1 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -23,15 +23,15 @@ from bpy.types import (
Menu,
Panel,
)
-from .properties_paint_common import (
+from bl_ui.properties_paint_common import (
UnifiedPaintPanel,
)
-from .properties_grease_pencil_common import (
+from bl_ui.properties_grease_pencil_common import (
AnnotationDataPanel,
AnnotationOnionSkin,
GreasePencilMaterialsPanel,
)
-from .space_toolsystem_common import (
+from bl_ui.space_toolsystem_common import (
ToolActivePanelHelper,
)
from bpy.app.translations import contexts as i18n_contexts
@@ -62,7 +62,7 @@ class VIEW3D_HT_tool_header(Header):
# Active Tool
# -----------
- from .space_toolsystem_common import ToolSelectPanelHelper
+ from bl_ui.space_toolsystem_common import ToolSelectPanelHelper
tool = ToolSelectPanelHelper.draw_active_tool_header(
context, layout,
tool_key=('VIEW_3D', tool_mode),
@@ -225,7 +225,7 @@ class _draw_tool_settings_context_mode:
if brush is None:
return
- from .properties_paint_common import (
+ from bl_ui.properties_paint_common import (
brush_basic_sculpt_settings,
)
brush_basic_sculpt_settings(layout, context, brush, compact=True)
@@ -242,7 +242,7 @@ class _draw_tool_settings_context_mode:
if brush is None:
return
- from .properties_paint_common import (
+ from bl_ui.properties_paint_common import (
UnifiedPaintPanel,
brush_basic_texpaint_settings,
)
@@ -263,7 +263,7 @@ class _draw_tool_settings_context_mode:
if brush is None:
return
- from .properties_paint_common import (
+ from bl_ui.properties_paint_common import (
UnifiedPaintPanel,
brush_basic_vpaint_settings,
)
@@ -283,7 +283,7 @@ class _draw_tool_settings_context_mode:
if brush is None:
return
- from .properties_paint_common import brush_basic_wpaint_settings
+ from bl_ui.properties_paint_common import brush_basic_wpaint_settings
brush_basic_wpaint_settings(layout, context, brush, compact=True)
@staticmethod
@@ -343,7 +343,7 @@ class _draw_tool_settings_context_mode:
if context.object and brush.gpencil_tool in {'FILL', 'DRAW'}:
draw_color_selector()
- from .properties_paint_common import (
+ from bl_ui.properties_paint_common import (
brush_basic_gpencil_paint_settings,
)
brush_basic_gpencil_paint_settings(layout, context, brush, compact=True)
@@ -377,7 +377,7 @@ class _draw_tool_settings_context_mode:
settings = tool_settings.gpencil_sculpt
brush = settings.brush
- from .properties_paint_common import (
+ from bl_ui.properties_paint_common import (
brush_basic_gpencil_sculpt_settings,
)
brush_basic_gpencil_sculpt_settings(layout, context, brush, compact=True)
@@ -390,7 +390,7 @@ class _draw_tool_settings_context_mode:
settings = tool_settings.gpencil_sculpt
brush = settings.brush
- from .properties_paint_common import (
+ from bl_ui.properties_paint_common import (
brush_basic_gpencil_weight_settings,
)
brush_basic_gpencil_weight_settings(layout, context, brush, compact=True)
@@ -482,7 +482,7 @@ class VIEW3D_HT_header(Header):
show_snap = True
else:
- from .properties_paint_common import UnifiedPaintPanel
+ from bl_ui.properties_paint_common import UnifiedPaintPanel
paint_settings = UnifiedPaintPanel.paint_settings(context)
if paint_settings:
@@ -4996,7 +4996,7 @@ class VIEW3D_PT_object_type_visibility(Panel):
("curve", "Curve"),
("surf", "Surface"),
("meta", "Meta"),
- ("font", "Font"),
+ ("font", "Text"),
("grease_pencil", "Grease Pencil"),
(None, None),
# Other
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 2893ea7873c..e7be73391b7 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -18,13 +18,13 @@
# <pep8 compliant>
from bpy.types import Menu, Panel, UIList
-from .properties_grease_pencil_common import (
+from bl_ui.properties_grease_pencil_common import (
GreasePencilStrokeEditPanel,
GreasePencilStrokeSculptPanel,
GreasePencilSculptOptionsPanel,
GreasePencilAppearancePanel,
)
-from .properties_paint_common import (
+from bl_ui.properties_paint_common import (
UnifiedPaintPanel,
brush_mask_texture_settings,
brush_texpaint_common,
@@ -304,7 +304,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
# Sculpt Mode #
if context.sculpt_object and brush:
- from .properties_paint_common import (
+ from bl_ui.properties_paint_common import (
brush_basic_sculpt_settings,
)
@@ -388,7 +388,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
# Weight Paint Mode #
elif context.weight_paint_object and brush:
- from .properties_paint_common import (
+ from bl_ui.properties_paint_common import (
brush_basic_wpaint_settings,
)
@@ -399,7 +399,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
# Vertex Paint Mode #
elif context.vertex_paint_object and brush:
- from .properties_paint_common import (
+ from bl_ui.properties_paint_common import (
brush_basic_vpaint_settings,
)
@@ -1740,7 +1740,7 @@ class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel):
row.prop(gp_settings, "use_material_pin", text="")
if not self.is_popover:
- from .properties_paint_common import (
+ from bl_ui.properties_paint_common import (
brush_basic_gpencil_paint_settings,
)
brush_basic_gpencil_paint_settings(layout, context, brush, compact=True)
@@ -2051,7 +2051,7 @@ class VIEW3D_PT_tools_grease_pencil_weight_paint(View3DPanel, Panel):
col = layout.column()
if not self.is_popover:
- from .properties_paint_common import (
+ from bl_ui.properties_paint_common import (
brush_basic_gpencil_weight_settings,
)
brush_basic_gpencil_weight_settings(col, context, brush)
diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h
index 583a90b2dee..64a8c78cfef 100644
--- a/source/blender/blenkernel/BKE_animsys.h
+++ b/source/blender/blenkernel/BKE_animsys.h
@@ -170,7 +170,7 @@ void BKE_animdata_fix_paths_rename_all(struct ID *ref_id,
const char *newName);
/* Fix the path after removing elements that are not ID (e.g., node).
- * Returen truth if any animation data was affected. */
+ * Return true if any animation data was affected. */
bool BKE_animdata_fix_paths_remove(struct ID *id, const char *path);
/* -------------------------------------- */
diff --git a/source/blender/blenkernel/BKE_gpencil_modifier.h b/source/blender/blenkernel/BKE_gpencil_modifier.h
index 4655abf6e02..d616c74520a 100644
--- a/source/blender/blenkernel/BKE_gpencil_modifier.h
+++ b/source/blender/blenkernel/BKE_gpencil_modifier.h
@@ -38,7 +38,8 @@ struct Object;
struct Scene;
struct ViewLayer;
struct bArmature;
-/* NOTE: bakeModifier() called from UI: needs to create new datablocks, hence the need for this. */
+/* NOTE: bakeModifier() called from UI:
+ * needs to create new databloc-ks, hence the need for this. */
struct bContext;
struct bGPDframe;
struct bGPDlayer;
@@ -159,11 +160,11 @@ typedef struct GpencilModifierTypeInfo {
struct bGPDframe *gpf);
/**
- * Bake-down GP modifier's effects into the GP datablock.
+ * Bake-down GP modifier's effects into the GP data-block.
*
* This gets called when the user clicks the "Apply" button in the UI.
* As such, this callback needs to go through all layers/frames in the
- * datablock, mutating the geometry and/or creating new datablocks/objects
+ * data-block, mutating the geometry and/or creating new data-blocks/objects
*/
void (*bakeModifier)(struct Main *bmain,
struct Depsgraph *depsgraph,
@@ -175,7 +176,7 @@ typedef struct GpencilModifierTypeInfo {
/**
* Callback for GP "time" modifiers that offset keyframe time
* Returns the frame number to be used after apply the modifier. This is
- * usually an offset of the animation for duplicated datablocks.
+ * usually an offset of the animation for duplicated data-blocks.
*
* This function is optional.
*/
@@ -243,9 +244,9 @@ typedef struct GpencilModifierTypeInfo {
/**
* Should call the given walk function with a pointer to each ID
- * pointer (i.e. each datablock pointer) that the modifier data
+ * pointer (i.e. each data-block pointer) that the modifier data
* stores. This is used for linking on file load and for
- * unlinking datablocks or forwarding datablock references.
+ * unlinking data-blocks or forwarding data-block references.
*
* This function is optional. If it is not present, foreachObjectLink
* will be used.
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index a34f570ad1f..0909e73777a 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -293,9 +293,9 @@ typedef struct ModifierTypeInfo {
void *userData);
/* Should call the given walk function with a pointer to each ID
- * pointer (i.e. each datablock pointer) that the modifier data
+ * pointer (i.e. each data-block pointer) that the modifier data
* stores. This is used for linking on file load and for
- * unlinking datablocks or forwarding datablock references.
+ * unlinking data-blocks or forwarding data-block references.
*
* This function is optional. If it is not present, foreachObjectLink
* will be used.
@@ -317,14 +317,14 @@ typedef struct ModifierTypeInfo {
TexWalkFunc walk,
void *userData);
- /* Free given runtime data.
+ /* Free given run-time data.
*
* This data is coming from a modifier of the corresponding type, but actual
* modifier data is not known here.
*
* Notes:
* - The data itself is to be de-allocated as well.
- * - This calback is allowed to receive NULL pointer as a data, so it's
+ * - This callback is allowed to receive NULL pointer as a data, so it's
* more like "ensure the data is freed".
*/
void (*freeRuntimeData)(void *runtime_data);
diff --git a/source/blender/blenkernel/BKE_nla.h b/source/blender/blenkernel/BKE_nla.h
index 423f79a8049..0ba83516e91 100644
--- a/source/blender/blenkernel/BKE_nla.h
+++ b/source/blender/blenkernel/BKE_nla.h
@@ -55,7 +55,9 @@ void BKE_nla_tracks_copy(struct Main *bmain, ListBase *dst, ListBase *src, const
struct NlaTrack *BKE_nlatrack_add(struct AnimData *adt, struct NlaTrack *prev);
struct NlaStrip *BKE_nlastrip_new(struct bAction *act);
struct NlaStrip *BKE_nlastack_add_strip(struct AnimData *adt, struct bAction *act);
-struct NlaStrip *BKE_nla_add_soundstrip(struct Scene *scene, struct Speaker *spk);
+struct NlaStrip *BKE_nla_add_soundstrip(struct Main *bmain,
+ struct Scene *scene,
+ struct Speaker *spk);
/* ----------------------------- */
/* API */
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index f9bd722f8ba..164dbbbf482 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -103,7 +103,7 @@ typedef struct SPHData {
struct EdgeHash *eh;
float *gravity;
float hfac;
- /* Average distance to neighbours (other particles in the support domain),
+ /* Average distance to neighbors (other particles in the support domain),
* for calculating the Courant number (adaptive time step). */
int pass;
float element_size;
@@ -263,7 +263,7 @@ BLI_INLINE float psys_frand(ParticleSystem *psys, unsigned int seed)
/* XXX far from ideal, this simply scrambles particle random numbers a bit
* to avoid obvious correlations.
* Can't use previous psys->frand arrays because these require initialization
- * inside psys_check_enabled, which wreaks havok in multithreaded depgraph updates.
+ * inside psys_check_enabled, which wreaks havoc in multi-threaded depgraph updates.
*/
unsigned int offset = PSYS_FRAND_SEED_OFFSET[psys->seed % PSYS_FRAND_COUNT];
unsigned int multiplier = PSYS_FRAND_SEED_MULTIPLIER[psys->seed % PSYS_FRAND_COUNT];
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h
index 7eb08e6f770..a9e1dfb2392 100644
--- a/source/blender/blenkernel/BKE_sequencer.h
+++ b/source/blender/blenkernel/BKE_sequencer.h
@@ -266,7 +266,8 @@ const char *BKE_sequence_give_name(struct Sequence *seq);
ListBase *BKE_sequence_seqbase_get(struct Sequence *seq, int *r_offset);
void BKE_sequence_calc(struct Scene *scene, struct Sequence *seq);
void BKE_sequence_calc_disp(struct Scene *scene, struct Sequence *seq);
-void BKE_sequence_reload_new_file(struct Scene *scene,
+void BKE_sequence_reload_new_file(struct Main *bmain,
+ struct Scene *scene,
struct Sequence *seq,
const bool lock_range);
int BKE_sequencer_evaluate_frame(struct Scene *scene, int cfra);
@@ -406,7 +407,7 @@ void BKE_sequencer_update_sound_bounds(struct Scene *scene, struct Sequence *seq
void BKE_sequencer_update_muting(struct Editing *ed);
void BKE_sequencer_update_sound(struct Scene *scene, struct bSound *sound);
-void BKE_sequencer_refresh_sound_length(struct Scene *scene);
+void BKE_sequencer_refresh_sound_length(struct Main *bmain, struct Scene *scene);
void BKE_sequence_base_unique_name_recursive(ListBase *seqbasep, struct Sequence *seq);
void BKE_sequence_base_dupli_recursive(const struct Scene *scene_src,
diff --git a/source/blender/blenkernel/BKE_shader_fx.h b/source/blender/blenkernel/BKE_shader_fx.h
index 0d5f1999193..e90dbfcf68d 100644
--- a/source/blender/blenkernel/BKE_shader_fx.h
+++ b/source/blender/blenkernel/BKE_shader_fx.h
@@ -153,9 +153,9 @@ typedef struct ShaderFxTypeInfo {
void *userData);
/* Should call the given walk function with a pointer to each ID
- * pointer (i.e. each datablock pointer) that the effect data
+ * pointer (i.e. each data-block pointer) that the effect data
* stores. This is used for linking on file load and for
- * unlinking datablocks or forwarding datablock references.
+ * unlinking data-blocks or forwarding data-block references.
*
* This function is optional. If it is not present, foreachObjectLink
* will be used.
diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h
index 07795e8438c..4694e86f4d6 100644
--- a/source/blender/blenkernel/BKE_sound.h
+++ b/source/blender/blenkernel/BKE_sound.h
@@ -78,10 +78,29 @@ void BKE_sound_ensure_loaded(struct Main *bmain, struct bSound *sound);
void BKE_sound_free(struct bSound *sound);
-/* Is used by sequencer to temporarily load audio to access information about channels and
- * duration. */
-void BKE_sound_load_audio(struct Main *main, struct bSound *sound);
-void BKE_sound_free_audio(struct bSound *sound);
+/* Matches AUD_Channels. */
+typedef enum eSoundChannels {
+ SOUND_CHANNELS_INVALID = 0,
+ SOUND_CHANNELS_MONO = 1,
+ SOUND_CHANNELS_STEREO = 2,
+ SOUND_CHANNELS_STEREO_LFE = 3,
+ SOUND_CHANNELS_SURROUND4 = 4,
+ SOUND_CHANNELS_SURROUND5 = 5,
+ SOUND_CHANNELS_SURROUND51 = 6,
+ SOUND_CHANNELS_SURROUND61 = 7,
+ SOUND_CHANNELS_SURROUND71 = 8,
+} eSoundChannels;
+
+typedef struct SoundInfo {
+ struct {
+ eSoundChannels channels;
+ } specs;
+ float length;
+} SoundInfo;
+
+/* Get information about given sound. Returns truth on success., false if sound can not be loaded
+ * or if the codes is not supported. */
+bool BKE_sound_info_get(struct Main *main, struct bSound *sound, SoundInfo *sound_info);
void BKE_sound_copy_data(struct Main *bmain,
struct bSound *sound_dst,
@@ -104,7 +123,7 @@ void BKE_sound_reset_scene_specs(struct Scene *scene);
void BKE_sound_mute_scene(struct Scene *scene, int muted);
-void BKE_sound_update_fps(struct Scene *scene);
+void BKE_sound_update_fps(struct Main *bmain, struct Scene *scene);
void BKE_sound_update_scene_listener(struct Scene *scene);
@@ -150,13 +169,13 @@ int BKE_sound_scene_playing(struct Scene *scene);
void BKE_sound_free_waveform(struct bSound *sound);
-void BKE_sound_read_waveform(struct bSound *sound, short *stop);
+void BKE_sound_read_waveform(struct Main *bmain, struct bSound *sound, short *stop);
void BKE_sound_update_scene(struct Depsgraph *depsgraph, struct Scene *scene);
void *BKE_sound_get_factory(void *sound);
-float BKE_sound_get_length(struct bSound *sound);
+float BKE_sound_get_length(struct Main *bmain, struct bSound *sound);
char **BKE_sound_get_device_names(void);
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 19f92f0b361..2fc486687bb 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -1679,7 +1679,7 @@ static void editbmesh_calc_modifier_final_normals(const Mesh *mesh_input,
if (!do_loop_normals) {
BKE_mesh_ensure_normals_for_display(mesh_final);
- /* Some modifiers, like datatransfer, may generate those data, we do not want to keep them,
+ /* Some modifiers, like data-transfer, may generate those data, we do not want to keep them,
* as they are used by display code when available (i.e. even if autosmooth is disabled). */
if (CustomData_has_layer(&mesh_final->ldata, CD_NORMAL)) {
CustomData_free_layers(&mesh_final->ldata, CD_NORMAL, mesh_final->totloop);
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 952859e0c7b..08faae9874b 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -284,7 +284,7 @@ void BKE_animdata_free(ID *id, const bool do_id_user)
/* Copying -------------------------------------------- */
/**
- * Make a copy of the given AnimData - to be used when copying datablocks.
+ * Make a copy of the given AnimData - to be used when copying data-blocks.
* \param flag: Control ID pointers management,
* see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_library.h
* \return The copied animdata.
@@ -464,7 +464,7 @@ static bool animpath_matches_basepath(const char path[], const char basepath[])
/* Move F-Curves in src action to dst action, setting up all the necessary groups
* for this to happen, but only if the F-Curves being moved have the appropriate
* "base path".
- * - This is used when data moves from one datablock to another, causing the
+ * - This is used when data moves from one data-block to another, causing the
* F-Curves to need to be moved over too
*/
void action_move_fcurves_by_basepath(bAction *srcAct, bAction *dstAct, const char basepath[])
@@ -638,7 +638,7 @@ void BKE_animdata_separate_by_basepath(Main *bmain, ID *srcID, ID *dstID, ListBa
* they will get picked up by the dependency system.
*
* \param C: Context pointer - for getting active data
- * \param[in,out] ptr: RNA pointer for property's datablock.
+ * \param[in,out] ptr: RNA pointer for property's data-block.
* May be modified as result of path remapping.
* \param prop: RNA definition of property to add for
* \return MEM_alloc'd string representing the path to the property from the given #PointerRNA
@@ -3260,7 +3260,7 @@ void nlastrip_evaluate(Depsgraph *depsgraph,
* we tag the current strip as being evaluated, and clear this when we leave.
*/
/* TODO: be careful with this flag, since some edit tools may be running and have
- * set this while animplayback was running */
+ * set this while animation playback was running. */
if (strip->flag & NLASTRIP_FLAG_EDIT_TOUCHED) {
return;
}
@@ -3524,7 +3524,7 @@ static bool animsys_evaluate_nla(Depsgraph *depsgraph,
dummy_strip->extendmode = adt->act_extendmode;
}
- /* Unless extendmode is Nothing (might be useful for flattening NLA evaluation),
+ /* Unless extend-mode is Nothing (might be useful for flattening NLA evaluation),
* disable range. */
if (dummy_strip->extendmode != NLASTRIP_EXTEND_NOTHING) {
dummy_strip->flag |= NLASTRIP_FLAG_NO_TIME_MAP;
@@ -3938,7 +3938,7 @@ void BKE_animsys_evaluate_all_animation(Main *main,
* - this is like EVAL_ANIM_IDS, but this handles the case "embedded nodetrees"
* (i.e. scene/material/texture->nodetree) which we need a special exception
* for, otherwise they'd get skipped
- * - ntp = "node tree parent" = datablock where node tree stuff resides
+ * - ntp = "node tree parent" = data-block where node tree stuff resides
*/
#define EVAL_ANIM_NODETREE_IDS(first, NtId_Type, aflag) \
for (id = first; id; id = id->next) { \
@@ -3956,7 +3956,7 @@ void BKE_animsys_evaluate_all_animation(Main *main,
(void)0
/* optimization:
- * when there are no actions, don't go over database and loop over heaps of datablocks,
+ * when there are no actions, don't go over database and loop over heaps of data-blocks,
* which should ultimately be empty, since it is not possible for now to have any animation
* without some actions, and drivers wouldn't get affected by any state changes
*
diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c
index c301588af0c..570805a01d0 100644
--- a/source/blender/blenkernel/intern/blendfile.c
+++ b/source/blender/blenkernel/intern/blendfile.c
@@ -362,7 +362,7 @@ static void setup_app_data(bContext *C,
if (mode == LOAD_UNDO) {
/* In undo/redo case, we do a whole lot of magic tricks to avoid having to re-read linked
- * datablocks from libraries (since those are not supposed to change). Unfortunately, that
+ * data-blocks from libraries (since those are not supposed to change). Unfortunately, that
* means that we do not reset their user count, however we do increase that one when doing
* lib_link on local IDs using linked ones.
* There is no real way to predict amount of changes here, so we have to fully redo
@@ -782,13 +782,13 @@ bool BKE_blendfile_write_partial(Main *bmain_src,
/* Backup paths because remap relative will overwrite them.
*
- * NOTE: we do this only on the list of datablocks that we are writing
+ * NOTE: we do this only on the list of data-blocks that we are writing
* because the restored full list is not guaranteed to be in the same
* order as before, as expected by BKE_bpath_list_restore.
*
* This happens because id_sort_by_name does not take into account
* string case or the library name, so the order is not strictly
- * defined for two linked datablocks with the same name! */
+ * defined for two linked data-blocks with the same name! */
if (write_flags & G_FILE_RELATIVE_REMAP) {
path_list_backup = BKE_bpath_list_backup(bmain_dst, path_list_flag);
}
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 03bae118f0f..88ec4f8793f 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -624,6 +624,26 @@ bool BKE_collection_is_empty(Collection *collection)
/********************** Collection Objects *********************/
+static void collection_tag_update_parent_recursive(Main *bmain,
+ Collection *collection,
+ const int flag)
+{
+ if (collection->flag & COLLECTION_IS_MASTER) {
+ return;
+ }
+
+ DEG_id_tag_update_ex(bmain, &collection->id, flag);
+
+ for (CollectionParent *collection_parent = collection->parents.first; collection_parent;
+ collection_parent = collection_parent->next) {
+ if (collection_parent->collection->flag & COLLECTION_IS_MASTER) {
+ /* We don't care about scene/master collection here. */
+ continue;
+ }
+ collection_tag_update_parent_recursive(bmain, collection_parent->collection, flag);
+ }
+}
+
static bool collection_object_add(
Main *bmain, Collection *collection, Object *ob, int flag, const bool add_us)
{
@@ -649,7 +669,7 @@ static bool collection_object_add(
}
if ((flag & LIB_ID_CREATE_NO_MAIN) == 0) {
- DEG_id_tag_update_ex(bmain, &collection->id, ID_RECALC_COPY_ON_WRITE);
+ collection_tag_update_parent_recursive(bmain, collection, ID_RECALC_COPY_ON_WRITE);
}
if ((flag & LIB_ID_CREATE_NO_MAIN) == 0) {
@@ -679,7 +699,7 @@ static bool collection_object_remove(Main *bmain,
id_us_min(&ob->id);
}
- DEG_id_tag_update_ex(bmain, &collection->id, ID_RECALC_COPY_ON_WRITE);
+ collection_tag_update_parent_recursive(bmain, collection, ID_RECALC_COPY_ON_WRITE);
return true;
}
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 04789adea2f..ee9041c5c18 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -5098,7 +5098,7 @@ static bConstraint *add_new_constraint_internal(const char *name, short type)
const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_from_type(type);
const char *newName;
- /* Set up a generic constraint datablock */
+ /* Set up a generic constraint data-block. */
con->type = type;
con->flag |= CONSTRAINT_EXPAND | CONSTRAINT_STATICOVERRIDE_LOCAL;
con->enforce = 1.0f;
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 22bc44a88d8..3af54603d67 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -2298,7 +2298,7 @@ static CustomDataLayer *customData_add_layer__internal(CustomData *data,
int flag = 0, index = data->totlayer;
void *newlayerdata = NULL;
- /* Passing a layerdata to copy from with an alloctype that won't copy is
+ /* Passing a layer-data to copy from with an alloctype that won't copy is
* most likely a bug */
BLI_assert(!layerdata || (alloctype == CD_ASSIGN) || (alloctype == CD_DUPLICATE) ||
(alloctype == CD_REFERENCE));
diff --git a/source/blender/blenkernel/intern/data_transfer.c b/source/blender/blenkernel/intern/data_transfer.c
index 98c6d519d17..8dcf1f0d001 100644
--- a/source/blender/blenkernel/intern/data_transfer.c
+++ b/source/blender/blenkernel/intern/data_transfer.c
@@ -90,8 +90,10 @@ void BKE_object_data_transfer_dttypes_to_cdmask(const int dtdata_types,
}
}
-/* Check what can do each layer type
- * (if it is actually handled by transferdata, if it supports advanced mixing... */
+/**
+ * Check what can do each layer type
+ * (if it is actually handled by transfer-data, if it supports advanced mixing.
+ */
bool BKE_object_data_transfer_get_dttypes_capacity(const int dtdata_types,
bool *r_advanced_mixing,
bool *r_threshold)
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 3bca77c5b51..754b3f5876d 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -2687,7 +2687,7 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime
if (fabsf(v1[1] - v4[1]) < FLT_EPSILON && fabsf(v2[1] - v3[1]) < FLT_EPSILON &&
fabsf(v3[1] - v4[1]) < FLT_EPSILON) {
- /* Optimisation: If all the handles are flat/at the same values,
+ /* Optimization: If all the handles are flat/at the same values,
* the value is simply the shared value (see T40372 -> F91346)
*/
cvalue = v1[1];
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index 794d07203af..4295a44098c 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -1418,7 +1418,7 @@ static float eval_fmodifier_influence(FModifier *fcm, float evaltime)
* several times by modifiers requesting the time be modified, as the final result
* would have required using the modified time
* - modifiers only ever receive the unmodified time, as subsequent modifiers should be
- * working on the 'global' result of the modified curve, not some localised segment,
+ * working on the 'global' result of the modified curve, not some localized segment,
* so nevaltime gets set to whatever the last time-modifying modifier likes...
* - we start from the end of the stack, as only the last one matters for now
*
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 9960994400f..14b6bc953b2 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -4907,10 +4907,10 @@ static void image_user_id_eval_animation(struct Image *ima,
void BKE_image_user_id_eval_animation(Depsgraph *depsgraph, ID *id)
{
/* This is called from the dependency graph to update the image
- * users in datablocks. It computes the current frame number
+ * users in data-blocks. It computes the current frame number
* and tags the image to be refreshed.
* This does not consider nested node trees as these are handled
- * as their own datablock. */
+ * as their own data-block. */
bool skip_nested_nodes = true;
image_walk_id_all_users(id, skip_nested_nodes, depsgraph, image_user_id_eval_animation);
}
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index 34b1f2e1837..e03b61bfba1 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -933,7 +933,7 @@ static const char *particle_adrcodes_to_paths(int adrcode, int *array_index)
* and 'root' parts of path.
*
* Input:
- * - id - the datablock that the curve's IPO block
+ * - id - the data-block that the curve's IPO block
* is attached to and/or which the new paths will start from
* - blocktype, adrcode - determines setting to get
* - actname, constname, seq - used to build path
@@ -1934,12 +1934,12 @@ static void nlastrips_to_animdata(ID *id, ListBase *strips)
/* Called from do_versions() in readfile.c to convert the old 'IPO/adrcode' system
* to the new 'Animato/RNA' system.
*
- * The basic method used here, is to loop over datablocks which have IPO-data, and
- * add those IPO's to new AnimData blocks as Actions.
+ * The basic method used here, is to loop over data-blocks which have IPO-data,
+ * and add those IPO's to new AnimData blocks as Actions.
* Action/NLA data only works well for Objects, so these only need to be checked for there.
*
* Data that has been converted should be freed immediately, which means that it is immediately
- * clear which datablocks have yet to be converted, and also prevent freeing errors when we exit.
+ * clear which data-blocks have yet to be converted, and also prevent freeing errors when we exit.
*/
// XXX currently done after all file reading...
void do_versions_ipos_to_animato(Main *bmain)
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 5bddec8a164..2b064c6b2a7 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -243,7 +243,7 @@ void BKE_view_layer_free_ex(ViewLayer *view_layer, const bool do_id_user)
}
/**
- * Tag all the selected objects of a renderlayer
+ * Tag all the selected objects of a render-layer.
*/
void BKE_view_layer_selected_objects_tag(ViewLayer *view_layer, const int tag)
{
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 7ea77ec2849..2a32c215d2a 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -329,7 +329,7 @@ void BKE_id_copy_ensure_local(Main *bmain, const ID *old_id, ID *new_id)
}
/**
- * Generic 'make local' function, works for most of datablock types...
+ * Generic 'make local' function, works for most of data-block types...
*/
void BKE_id_make_local_generic(Main *bmain,
ID *id,
@@ -609,7 +609,7 @@ bool BKE_id_copy_is_allowed(const ID *id)
}
/**
- * Generic entry point for copying a datablock (new API).
+ * Generic entry point for copying a data-block (new API).
*
* \note Copy is only affecting given data-block
* (no ID used by copied one will be affected, besides usercount).
@@ -619,7 +619,7 @@ bool BKE_id_copy_is_allowed(const ID *id)
* \note Usercount of new copy is always set to 1.
*
* \param bmain: Main database, may be NULL only if LIB_ID_CREATE_NO_MAIN is specified.
- * \param id: Source datablock.
+ * \param id: Source data-block.
* \param r_newid: Pointer to new (copied) ID pointer.
* \param flag: Set of copy options, see DNA_ID.h enum for details
* (leave to zero for default, full copy).
@@ -876,7 +876,7 @@ bool id_single_user(bContext *C, ID *id, PointerRNA *ptr, PropertyRNA *prop)
RNA_property_pointer_set(ptr, prop, idptr, NULL);
RNA_property_update(C, ptr, prop);
- /* tag grease pencil datablock and disable onion */
+ /* tag grease pencil data-block and disable onion */
if (GS(id->name) == ID_GD) {
DEG_id_tag_update(id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
DEG_id_tag_update(newid, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
@@ -920,7 +920,7 @@ static int libblock_management_us_min(void *UNUSED(user_data),
return IDWALK_RET_NOP;
}
-/** Add a 'NO_MAIN' datablock to given main (also sets usercounts of its IDs if needed). */
+/** Add a 'NO_MAIN' data-block to given main (also sets usercounts of its IDs if needed). */
void BKE_libblock_management_main_add(Main *bmain, void *idv)
{
ID *id = idv;
@@ -950,7 +950,7 @@ void BKE_libblock_management_main_add(Main *bmain, void *idv)
BKE_main_unlock(bmain);
}
-/** Remove a datablock from given main (set it to 'NO_MAIN' status). */
+/** Remove a data-block from given main (set it to 'NO_MAIN' status). */
void BKE_libblock_management_main_remove(Main *bmain, void *idv)
{
ID *id = idv;
@@ -1121,7 +1121,7 @@ void BKE_main_lib_objects_recalc_all(Main *bmain)
/* *********** ALLOC AND FREE *****************
*
* BKE_libblock_free(ListBase *lb, ID *id )
- * provide a list-basis and datablock, but only ID is read
+ * provide a list-basis and data-block, but only ID is read
*
* void *BKE_libblock_alloc(ListBase *lb, type, name)
* inserts in list and returns a new ID
@@ -1129,7 +1129,7 @@ void BKE_main_lib_objects_recalc_all(Main *bmain)
* **************************** */
/**
- * Get allocation size fo a given datablock type and optionally allocation name.
+ * Get allocation size fo a given data-block type and optionally allocation name.
*/
size_t BKE_libblock_get_alloc_info(short type, const char **name)
{
@@ -1369,7 +1369,7 @@ void BKE_libblock_init_empty(ID *id)
}
}
-/** Generic helper to create a new empty datablock of given type in given \a bmain database.
+/** Generic helper to create a new empty data-block of given type in given \a bmain database.
*
* \param name: can be NULL, in which case we get default name for this ID type. */
void *BKE_id_new(Main *bmain, const short type, const char *name)
@@ -1387,7 +1387,7 @@ void *BKE_id_new(Main *bmain, const short type, const char *name)
}
/**
- * Generic helper to create a new temporary empty datablock of given type,
+ * Generic helper to create a new temporary empty data-block of given type,
* *outside* of any Main database.
*
* \param name: can be NULL, in which case we get default name for this ID type. */
@@ -1566,7 +1566,7 @@ static ID *is_dupid(ListBase *lb, ID *id, const char *name)
*
* Normally the ID that's being check is already in the ListBase, so ID *id
* points at the new entry. The Python Library module needs to know what
- * the name of a datablock will be before it is appended; in this case ID *id
+ * the name of a data-block will be before it is appended; in this case ID *id
* id is NULL
*/
@@ -1760,7 +1760,7 @@ void id_clear_lib_data_ex(Main *bmain, ID *id, const bool id_in_mainlist)
}
}
- /* Internal bNodeTree blocks inside datablocks also stores id->lib,
+ /* Internal bNodeTree blocks inside data-blocks also stores id->lib,
* make sure this stays in sync. */
if ((ntree = ntreeFromID(id))) {
id_clear_lib_data_ex(bmain, &ntree->id, false); /* Datablocks' nodetree is never in Main. */
@@ -1906,11 +1906,11 @@ static void library_make_local_copying_check(ID *id,
BLI_gset_remove(loop_tags, id, NULL);
}
-/** Make linked datablocks local.
+/** Make linked data-blocks local.
*
* \param bmain: Almost certainly global main.
- * \param lib: If not NULL, only make local datablocks from this library.
- * \param untagged_only: If true, only make local datablocks not tagged with
+ * \param lib: If not NULL, only make local data-blocks from this library.
+ * \param untagged_only: If true, only make local data-blocks not tagged with
* LIB_TAG_PRE_EXISTING. \param set_fake: If true, set fake user on all localized data-blocks
* (except group and objects ones).
*/
@@ -1947,12 +1947,12 @@ void BKE_library_make_local(Main *bmain,
TIMEIT_VALUE_PRINT(make_local);
#endif
- /* Step 1: Detect datablocks to make local. */
+ /* Step 1: Detect data-blocks to make local. */
for (int a = set_listbasepointers(bmain, lbarray); a--;) {
ID *id = lbarray[a]->first;
/* Do not explicitly make local non-linkable IDs (shapekeys, in fact),
- * they are assumed to be handled by real datablocks responsible of them. */
+ * they are assumed to be handled by real data-blocks responsible of them. */
const bool do_skip = (id && !BKE_idcode_is_linkable(GS(id->name)));
for (; id; id = id->next) {
@@ -2000,11 +2000,11 @@ void BKE_library_make_local(Main *bmain,
}
#ifdef DEBUG_TIME
- printf("Step 1: Detect datablocks to make local: Done.\n");
+ printf("Step 1: Detect data-blocks to make local: Done.\n");
TIMEIT_VALUE_PRINT(make_local);
#endif
- /* Step 2: Check which datablocks we can directly make local
+ /* Step 2: Check which data-blocks we can directly make local
* (because they are only used by already, or future, local data),
* others will need to be duplicated. */
GSet *loop_tags = BLI_gset_ptr_new(__func__);
@@ -2019,7 +2019,7 @@ void BKE_library_make_local(Main *bmain,
BKE_main_relations_free(bmain);
#ifdef DEBUG_TIME
- printf("Step 2: Check which datablocks we can directly make local: Done.\n");
+ printf("Step 2: Check which data-blocks we can directly make local: Done.\n");
TIMEIT_VALUE_PRINT(make_local);
#endif
@@ -2385,7 +2385,7 @@ static int id_order_compare(const void *a, const void *b)
}
/**
- * Returns ordered list of datablocks for display in the UI.
+ * Returns ordered list of data-blocks for display in the UI.
* Result is list of LinkData of IDs that must be freed.
*/
void BKE_id_ordered_list(ListBase *ordered_lb, const ListBase *lb)
diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c
index 085051f633c..2b8973ff873 100644
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@ -1073,7 +1073,7 @@ FOREACH_FINALIZE:
#undef FOREACH_CALLBACK_INVOKE
/**
- * Loop over all of the ID's this datablock links to.
+ * Loop over all of the ID's this data-block links to.
*/
void BKE_library_foreach_ID_link(
Main *bmain, ID *id, LibraryIDLinkCallback callback, void *user_data, int flag)
@@ -1096,7 +1096,7 @@ void BKE_library_update_ID_link_user(ID *id_dst, ID *id_src, const int cb_flag)
}
/**
- * Say whether given \a id_type_owner can use (in any way) a datablock of \a id_type_used.
+ * Say whether given \a id_type_owner can use (in any way) a data-block of \a id_type_used.
*
* This is a 'simplified' abstract version of #BKE_library_foreach_ID_link() above,
* quite useful to reduce* useless iterations in some cases.
@@ -1123,7 +1123,7 @@ bool BKE_library_id_can_use_idtype(ID *id_owner, const short id_type_used)
}
if (BKE_animdata_from_id(id_owner)) {
- /* AnimationData can use virtually any kind of datablocks, through drivers especially. */
+ /* AnimationData can use virtually any kind of data-blocks, through drivers especially. */
return true;
}
@@ -1409,11 +1409,11 @@ static int foreach_libblock_used_linked_data_tag_clear_cb(void *user_data,
/**
* Detect orphaned linked data blocks (i.e. linked data not used (directly or indirectly)
* in any way by any local data), including complex cases like 'linked archipelagoes', i.e.
- * linked datablocks that use each other in loops,
+ * linked data-blocks that use each other in loops,
* which prevents their deletion by 'basic' usage checks.
*
* \param do_init_tag: if \a true, all linked data are checked, if \a false,
- * only linked datablocks already tagged with #LIB_TAG_DOIT are checked.
+ * only linked data-blocks already tagged with #LIB_TAG_DOIT are checked.
*/
void BKE_library_unused_linked_data_set_tag(Main *bmain, const bool do_init_tag)
{
@@ -1445,12 +1445,12 @@ void BKE_library_unused_linked_data_set_tag(Main *bmain, const bool do_init_tag)
}
/**
- * Untag linked data blocks used by other untagged linked datablocks.
- * Used to detect datablocks that we can forcefully make local
+ * Untag linked data blocks used by other untagged linked data-blocks.
+ * Used to detect data-blocks that we can forcefully make local
* (instead of copying them to later get rid of original):
- * All datablocks we want to make local are tagged by caller,
- * after this function has ran caller knows datablocks still tagged can directly be made local,
- * since they are only used by other datablocks that will also be made fully local.
+ * All data-blocks we want to make local are tagged by caller,
+ * after this function has ran caller knows data-blocks still tagged can directly be made local,
+ * since they are only used by other data-blocks that will also be made fully local.
*/
void BKE_library_indirectly_used_data_tag_clear(Main *bmain)
{
diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c
index 802f13ea69f..fb457c9f678 100644
--- a/source/blender/blenkernel/intern/library_remap.c
+++ b/source/blender/blenkernel/intern/library_remap.c
@@ -266,8 +266,8 @@ static int foreach_libblock_remap_callback(void *user_data, ID *id_self, ID **id
}
if (cb_flag & IDWALK_CB_USER) {
/* NOTE: We don't user-count IDs which are not in the main database.
- * This is because in certain conditions we can have datablocks in
- * the main which are referencing datablocks outside of it.
+ * This is because in certain conditions we can have data-blocks in
+ * the main which are referencing data-blocks outside of it.
* For example, BKE_mesh_new_from_object() called on an evaluated
* object will cause such situation.
*/
@@ -409,7 +409,7 @@ static void libblock_remap_data_postprocess_nodetree_update(Main *bmain, ID *new
}
/**
- * Execute the 'data' part of the remapping (that is, all ID pointers from other ID datablocks).
+ * Execute the 'data' part of the remapping (that is, all ID pointers from other ID data-blocks).
*
* Behavior differs depending on whether given \a id is NULL or not:
* - \a id NULL: \a old_id must be non-NULL, \a new_id may be NULL (unlinking \a old_id) or not
@@ -419,14 +419,14 @@ static void libblock_remap_data_postprocess_nodetree_update(Main *bmain, ID *new
* - \a id is non-NULL:
* + If \a old_id is NULL, \a new_id must also be NULL,
* and all ID pointers from \a id are cleared
- * (i.e. \a id does not references any other datablock anymore).
+ * (i.e. \a id does not references any other data-block anymore).
* + If \a old_id is non-NULL, behavior is as with a NULL \a id, but only within given \a id.
*
* \param bmain: the Main data storage to operate on (must never be NULL).
- * \param id: the datablock to operate on
+ * \param id: the data-block to operate on
* (can be NULL, in which case we operate over all IDs from given bmain).
- * \param old_id: the datablock to dereference (may be NULL if \a id is non-NULL).
- * \param new_id: the new datablock to replace \a old_id references with (may be NULL).
+ * \param old_id: the data-block to dereference (may be NULL if \a id is non-NULL).
+ * \param new_id: the new data-block to replace \a old_id references with (may be NULL).
* \param r_id_remap_data: if non-NULL, the IDRemap struct to use
* (uselful to retrieve info about remapping process).
*/
diff --git a/source/blender/blenkernel/intern/lightprobe.c b/source/blender/blenkernel/intern/lightprobe.c
index 5e6d298adbf..01b368ee0f8 100644
--- a/source/blender/blenkernel/intern/lightprobe.c
+++ b/source/blender/blenkernel/intern/lightprobe.c
@@ -60,7 +60,7 @@ void *BKE_lightprobe_add(Main *bmain, const char *name)
}
/**
- * Only copy internal data of LightProbe ID from source
+ * Only copy internal data of #LightProbe ID from source
* to already allocated/initialized destination.
* You probably never want to use that directly,
* use #BKE_id_copy or #BKE_id_copy_ex for typical needs.
diff --git a/source/blender/blenkernel/intern/main.c b/source/blender/blenkernel/intern/main.c
index e50e37c5428..170b8d0ab93 100644
--- a/source/blender/blenkernel/intern/main.c
+++ b/source/blender/blenkernel/intern/main.c
@@ -483,7 +483,7 @@ ListBase *which_libbase(Main *bmain, short type)
int set_listbasepointers(Main *bmain, ListBase **lb)
{
/* BACKWARDS! also watch order of free-ing! (mesh<->mat), first items freed last.
- * This is important because freeing data decreases usercounts of other datablocks,
+ * This is important because freeing data decreases user-counts of other data-blocks,
* if this data is its self freed it can crash. */
lb[INDEX_ID_LI] = &(
bmain->libraries); /* Libraries may be accessed from pretty much any other ID... */
diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c
index fe6ef2e047d..f5f0dbc6610 100644
--- a/source/blender/blenkernel/intern/mask_rasterize.c
+++ b/source/blender/blenkernel/intern/mask_rasterize.c
@@ -31,6 +31,7 @@
* This file is admittedly a bit confusticated,
* in quite few areas speed was chosen over readability,
* though it is commented - so shouldn't be so hard to see what's going on.
+ *
* Implementation:
*
* To rasterize the mask its converted into geometry that use a ray-cast for each pixel lookup.
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index 8d149af6a1f..6f5eb69e80f 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -1515,7 +1515,7 @@ static void movieclip_build_proxy_ibuf(
scaleibuf->planes = 24;
}
- /* TODO: currently the most weak part of multithreaded proxies,
+ /* TODO: currently the most weak part of multi-threaded proxies,
* could be solved in a way that thread only prepares memory
* buffer and write to disk happens separately
*/
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c
index e3953af7cbf..7fefabd1c12 100644
--- a/source/blender/blenkernel/intern/multires.c
+++ b/source/blender/blenkernel/intern/multires.c
@@ -2314,7 +2314,7 @@ static void multires_sync_levels(Scene *scene, Object *ob_src, Object *ob_dst)
if (!mmd_src) {
/* object could have MDISP even when there is no multires modifier
* this could lead to troubles due to i've got no idea how mdisp could be
- * upsampled correct without modifier data.
+ * up-sampled correct without modifier data.
* just remove mdisps if no multires present (nazgul) */
multires_customdata_delete(ob_src->data);
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 15e53e12ece..0b06bfab2ab 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -51,10 +51,7 @@
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_nla.h"
-
-#ifdef WITH_AUDASPACE
-# include <AUD_Special.h>
-#endif
+#include "BKE_sound.h"
#include "RNA_access.h"
#include "nla_private.h"
@@ -392,7 +389,7 @@ NlaStrip *BKE_nlastack_add_strip(AnimData *adt, bAction *act)
}
/* Add a NLA Strip referencing the given speaker's sound */
-NlaStrip *BKE_nla_add_soundstrip(Scene *scene, Speaker *speaker)
+NlaStrip *BKE_nla_add_soundstrip(Main *bmain, Scene *scene, Speaker *speaker)
{
NlaStrip *strip = MEM_callocN(sizeof(NlaStrip), "NlaSoundStrip");
@@ -401,17 +398,17 @@ NlaStrip *BKE_nla_add_soundstrip(Scene *scene, Speaker *speaker)
*/
#ifdef WITH_AUDASPACE
if (speaker->sound) {
- AUD_SoundInfo info = AUD_getInfo(speaker->sound->playback_handle);
-
- strip->end = (float)ceil((double)info.length * FPS);
+ SoundInfo info;
+ if (BKE_sound_info_get(bmain, speaker->sound, &info)) {
+ strip->end = (float)ceil((double)info.length * FPS);
+ }
}
else
#endif
{
strip->end = 10.0f;
/* quiet compiler warnings */
- (void)scene;
- (void)speaker;
+ UNUSED_VARS(bmain, scene, speaker);
}
/* general settings */
@@ -1859,7 +1856,7 @@ bool BKE_nla_action_stash(AnimData *adt)
BLI_assert(nlt != NULL);
/* We need to ensure that if there wasn't any previous instance,
- * it must go to tbe bottom of the stack. */
+ * it must go to be bottom of the stack. */
if (prev_track == NULL) {
BLI_remlink(&adt->nla_tracks, nlt);
BLI_addhead(&adt->nla_tracks, nlt);
diff --git a/source/blender/blenkernel/intern/object_update.c b/source/blender/blenkernel/intern/object_update.c
index 6dee936ca76..84e46f1ef70 100644
--- a/source/blender/blenkernel/intern/object_update.c
+++ b/source/blender/blenkernel/intern/object_update.c
@@ -139,7 +139,7 @@ void BKE_object_eval_transform_final(Depsgraph *depsgraph, Object *ob)
{
DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
/* Make sure inverse matrix is always up to date. This way users of it
- * do not need to worry about relcalculating it. */
+ * do not need to worry about recalculating it. */
invert_m4_m4(ob->imat, ob->obmat);
/* Set negative scale flag in object. */
if (is_negative_m4(ob->obmat)) {
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index a49d2da8cfc..44dbf7a1e47 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -1031,7 +1031,7 @@ static void pbvh_update_normals_accum_task_cb(void *__restrict userdata,
if (bvh->verts[v].flag & ME_VERT_PBVH_UPDATE) {
/* Note: This avoids `lock, add_v3_v3, unlock`
- * and is five to ten times quicker than a spinlock.
+ * and is five to ten times quicker than a spin-lock.
* Not exact equivalent though, since atomicity is only ensured for one component
* of the vector at a time, but here it shall not make any sensible difference. */
for (int k = 3; k--;) {
diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c
index 25f9948a835..cb4505880e2 100644
--- a/source/blender/blenkernel/intern/pbvh_bmesh.c
+++ b/source/blender/blenkernel/intern/pbvh_bmesh.c
@@ -1664,8 +1664,8 @@ struct FastNodeBuildInfo {
/**
* Recursively split the node if it exceeds the leaf_limit.
- * This function is multithreadabe since each invocation applies
- * to a sub part of the arrays
+ * This function is multi-threadabe since each invocation applies
+ * to a sub part of the arrays.
*/
static void pbvh_bmesh_node_limit_ensure_fast(
PBVH *bvh, BMFace **nodeinfo, BBC *bbc_array, struct FastNodeBuildInfo *node, MemArena *arena)
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index a55d0be4f95..d441ffdc8ff 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -3341,7 +3341,7 @@ int BKE_ptcache_write(PTCacheID *pid, unsigned int cfra)
return !error;
}
-/* youll need to close yourself after!
+/* you'll need to close yourself after!
* mode - PTCACHE_CLEAR_ALL,
*/
@@ -4482,13 +4482,13 @@ void BKE_ptcache_update_info(PTCacheID *pid)
/* smoke doesn't use frame 0 as info frame so can't check based on totpoint */
if (pid->type == PTCACHE_TYPE_SMOKE_DOMAIN && totframes) {
- BLI_snprintf(cache->info, sizeof(cache->info), IFACE_("%i frames found!"), totframes);
+ BLI_snprintf(cache->info, sizeof(cache->info), TIP_("%i frames found!"), totframes);
}
else if (totframes && cache->totpoint) {
- BLI_snprintf(cache->info, sizeof(cache->info), IFACE_("%i points found!"), cache->totpoint);
+ BLI_snprintf(cache->info, sizeof(cache->info), TIP_("%i points found!"), cache->totpoint);
}
else {
- BLI_strncpy(cache->info, IFACE_("No valid data to read!"), sizeof(cache->info));
+ BLI_strncpy(cache->info, TIP_("No valid data to read!"), sizeof(cache->info));
}
return;
}
@@ -4499,10 +4499,10 @@ void BKE_ptcache_update_info(PTCacheID *pid)
if (cache->totpoint > totpoint) {
BLI_snprintf(
- mem_info, sizeof(mem_info), IFACE_("%i cells + High Resolution cached"), totpoint);
+ mem_info, sizeof(mem_info), TIP_("%i cells + High Resolution cached"), totpoint);
}
else {
- BLI_snprintf(mem_info, sizeof(mem_info), IFACE_("%i cells cached"), totpoint);
+ BLI_snprintf(mem_info, sizeof(mem_info), TIP_("%i cells cached"), totpoint);
}
}
else {
@@ -4514,7 +4514,7 @@ void BKE_ptcache_update_info(PTCacheID *pid)
}
}
- BLI_snprintf(mem_info, sizeof(mem_info), IFACE_("%i frames on disk"), totframes);
+ BLI_snprintf(mem_info, sizeof(mem_info), TIP_("%i frames on disk"), totframes);
}
}
else {
@@ -4544,18 +4544,18 @@ void BKE_ptcache_update_info(PTCacheID *pid)
BLI_snprintf(mem_info,
sizeof(mem_info),
- IFACE_("%s frames in memory (%s)"),
+ TIP_("%s frames in memory (%s)"),
formatted_tot,
formatted_mem);
}
if (cache->flag & PTCACHE_OUTDATED) {
- BLI_snprintf(cache->info, sizeof(cache->info), IFACE_("%s, cache is outdated!"), mem_info);
+ BLI_snprintf(cache->info, sizeof(cache->info), TIP_("%s, cache is outdated!"), mem_info);
}
else if (cache->flag & PTCACHE_FRAMES_SKIPPED) {
BLI_snprintf(cache->info,
sizeof(cache->info),
- IFACE_("%s, not exact since frame %i"),
+ TIP_("%s, not exact since frame %i"),
mem_info,
cache->last_exact);
}
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index cab20ea53ca..fdbc7883dd1 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1546,7 +1546,7 @@ static void scene_update_sound(Depsgraph *depsgraph, Main *bmain)
BKE_sound_seek_scene(bmain, scene);
}
if (recalc & ID_RECALC_AUDIO_FPS) {
- BKE_sound_update_fps(scene);
+ BKE_sound_update_fps(bmain, scene);
}
if (recalc & ID_RECALC_AUDIO_VOLUME) {
BKE_sound_set_scene_volume(scene, scene->audio.volume);
diff --git a/source/blender/blenkernel/intern/seqcache.c b/source/blender/blenkernel/intern/seqcache.c
index 6f5b5f90d37..ff54327e406 100644
--- a/source/blender/blenkernel/intern/seqcache.c
+++ b/source/blender/blenkernel/intern/seqcache.c
@@ -40,7 +40,9 @@
#include "BKE_scene.h"
#include "BKE_main.h"
-/* ***************************** Sequencer cache design notes ******************************
+/**
+ * Sequencer Cache Design Notes
+ * ============================
*
* Cache key members:
* is_temp_cache - this cache entry will be freed before rendering next frame
@@ -50,8 +52,8 @@
*
* Linking: We use links to reduce number of iterations needed to manage cache.
* Entries are linked in order as they are put into cache.
- * Only pernament (is_temp_cache = 0) cache entries are linked.
- * Putting SEQ_CACHE_STORE_FINAL_OUT will reset linking
+ * Only permanent (is_temp_cache = 0) cache entries are linked.
+ * Putting #SEQ_CACHE_STORE_FINAL_OUT will reset linking
*
* Function:
* All images created during rendering are added to cache, even if the cache is already full.
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index ac242e35b03..2514bad5709 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -347,7 +347,7 @@ void BKE_sequencer_free_clipboard(void)
* note that these pointers should _never_ be access in the sequencer,
* they are only for storage while in the clipboard
* notice 'newid' is used for temp pointer storage here, validate on access (this is safe usage,
- * since those datablocks are fully out of Main lists).
+ * since those data-blocks are fully out of Main lists).
*/
#define ID_PT (*id_pt)
static void seqclipboard_ptr_free(Main *UNUSED(bmain), ID **id_pt)
@@ -406,7 +406,7 @@ static void seqclipboard_ptr_restore(Main *bmain, ID **id_pt)
}
}
- /* Replace with pointer to actual datablock. */
+ /* Replace with pointer to actual data-block. */
seqclipboard_ptr_free(bmain, id_pt);
ID_PT = id_restore;
}
@@ -909,7 +909,7 @@ static void seq_multiview_name(Scene *scene,
}
/* note: caller should run BKE_sequence_calc(scene, seq) after */
-void BKE_sequence_reload_new_file(Scene *scene, Sequence *seq, const bool lock_range)
+void BKE_sequence_reload_new_file(Main *bmain, Scene *scene, Sequence *seq, const bool lock_range)
{
char path[FILE_MAX];
int prev_startdisp = 0, prev_enddisp = 0;
@@ -1050,13 +1050,14 @@ void BKE_sequence_reload_new_file(Scene *scene, Sequence *seq, const bool lock_r
if (!seq->sound) {
return;
}
- seq->len = ceil((double)AUD_getInfo(seq->sound->playback_handle).length * FPS);
+ seq->len = ceil((double)BKE_sound_get_length(bmain, seq->sound) * FPS);
seq->len -= seq->anim_startofs;
seq->len -= seq->anim_endofs;
if (seq->len < 0) {
seq->len = 0;
}
#else
+ UNUSED_VARS(bmain);
return;
#endif
break;
@@ -4923,24 +4924,24 @@ bool BKE_sequence_base_shuffle_time(ListBase *seqbasep, Scene *evil_scene)
/* Unlike _update_sound_ funcs, these ones take info from audaspace to update sequence length! */
#ifdef WITH_AUDASPACE
-static bool sequencer_refresh_sound_length_recursive(Scene *scene, ListBase *seqbase)
+static bool sequencer_refresh_sound_length_recursive(Main *bmain, Scene *scene, ListBase *seqbase)
{
Sequence *seq;
bool changed = false;
for (seq = seqbase->first; seq; seq = seq->next) {
if (seq->type == SEQ_TYPE_META) {
- if (sequencer_refresh_sound_length_recursive(scene, &seq->seqbase)) {
+ if (sequencer_refresh_sound_length_recursive(bmain, scene, &seq->seqbase)) {
BKE_sequence_calc(scene, seq);
changed = true;
}
}
else if (seq->type == SEQ_TYPE_SOUND_RAM) {
- AUD_SoundInfo info = AUD_getInfo(seq->sound->playback_handle);
+ const float length = BKE_sound_get_length(bmain, seq->sound);
int old = seq->len;
float fac;
- seq->len = (int)ceil((double)info.length * FPS);
+ seq->len = (int)ceil((double)length * FPS);
fac = (float)seq->len / (float)old;
old = seq->startofs;
seq->startofs *= fac;
@@ -4955,14 +4956,14 @@ static bool sequencer_refresh_sound_length_recursive(Scene *scene, ListBase *seq
}
#endif
-void BKE_sequencer_refresh_sound_length(Scene *scene)
+void BKE_sequencer_refresh_sound_length(Main *bmain, Scene *scene)
{
#ifdef WITH_AUDASPACE
if (scene->ed) {
- sequencer_refresh_sound_length_recursive(scene, &scene->ed->seqbase);
+ sequencer_refresh_sound_length_recursive(bmain, scene, &scene->ed->seqbase);
}
#else
- (void)scene;
+ UNUSED_VARS(bmain, scene);
#endif
}
@@ -5562,17 +5563,13 @@ Sequence *BKE_sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoad
sound = BKE_sound_new_file(bmain, seq_load->path); /* handles relative paths */
- /* Load the original sound, so we can access number of channels and length information.
- * We free the sound handle on the original bSound datablock before existing this function, it is
- * to be allocated on an evaluated version after this. */
- BKE_sound_load_audio(bmain, sound);
- AUD_SoundInfo info = AUD_getInfo(sound->playback_handle);
- if (sound->playback_handle == NULL) {
+ SoundInfo info;
+ if (!BKE_sound_info_get(bmain, sound, &info)) {
BKE_id_free(bmain, sound);
return NULL;
}
- if (info.specs.channels == AUD_CHANNELS_INVALID) {
+ if (info.specs.channels == SOUND_CHANNELS_INVALID) {
BKE_id_free(bmain, sound);
return NULL;
}
@@ -5602,9 +5599,7 @@ Sequence *BKE_sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoad
seq_load_apply(bmain, scene, seq, seq_load);
- BKE_sound_free_audio(sound);
-
- /* TODO(sergey): Shall we tag here or in the oeprator? */
+ /* TODO(sergey): Shall we tag here or in the operator? */
DEG_relations_tag_update(bmain);
return seq;
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 55236bfefd0..5af3f22cad2 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -952,7 +952,7 @@ static void free_softbody_intern(SoftBody *sb)
*
* it actually checks if the particle intrudes a short range force field generated
* by the faces of the target object and returns a force to drive the particel out
- * the strength of the field grows exponetially if the particle is on the 'wrong' side of the face
+ * the strength of the field grows exponentially if the particle is on the 'wrong' side of the face
* 'wrong' side : projection to the face normal is negative (all referred to a vertex in the face)
*
* flaw of this: 'fast' particles as well as 'fast' colliding faces
@@ -962,7 +962,7 @@ static void free_softbody_intern(SoftBody *sb)
* besides our h is way larger than in QM because forces propagate way slower here
* we have to deal with fuzzy(time) in the range of 1/25 seconds (typical frame rate)
* yup collision targets are not known here any better
- * and 1/25 second is looong compared to real collision events
+ * and 1/25 second is very long compared to real collision events
* Q: why not use 'simple' collision here like bouncing back a particle
* --> reverting is velocity on the face normal
* A: because our particles are not alone here
@@ -1707,11 +1707,10 @@ static int sb_detect_vertex_collisionCached(float opco[3],
copy_v3_v3(nv3, mvert[vt->tri[2]].co);
if (mprevvert) {
- /* grab the average speed of the collider vertices
- * before we spoil nvX
+ /* Grab the average speed of the collider vertices before we spoil nvX
* humm could be done once a SB steps but then we' need to store that too
- * since the AABB reduced propabitlty to get here drasticallly
- * it might be a nice tradeof CPU <--> memory
+ * since the AABB reduced probability to get here drastically
+ * it might be a nice tradeoff CPU <--> memory.
*/
sub_v3_v3v3(vv1, nv1, mprevvert[vt->tri[0]].co);
sub_v3_v3v3(vv2, nv2, mprevvert[vt->tri[1]].co);
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 029fea5c300..038fc603364 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -71,16 +71,16 @@ BLI_INLINE void sound_verify_evaluated_id(ID *id)
UNUSED_VARS_NDEBUG(id);
/* This is a bit tricky and not quite reliable, but good enough check.
*
- * We don't want audio system handles to be allocated on amn original datablocks, and only want
- * them to be allocated on a datablocks which are result of dependency graph evaluation.
+ * We don't want audio system handles to be allocated on an original data-blocks, and only want
+ * them to be allocated on a data-blocks which are result of dependency graph evaluation.
*
- * Datablocks which are covered by a copy-on-write system of dependency graph will have
- * LIB_TAG_COPIED_ON_WRITE tag set on them. But if some of datablocks during its evaluation
+ * Data-blocks which are covered by a copy-on-write system of dependency graph will have
+ * LIB_TAG_COPIED_ON_WRITE tag set on them. But if some of data-blocks during its evaluation
* decides to re-allocate it's nested one (for example, object evaluation could re-allocate mesh
- * when evaluating modifier stack). Such datablocks will have LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT
- * tag set on them.
+ * when evaluating modifier stack). Such data-blocks will have
+ * LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT tag set on them.
*
- * Additionally, we also allow datablocks outside of main database. Those can not be "original"
+ * Additionally, we also allow data-blocks outside of main database. Those can not be "original"
* and could be used as a temporary evaluated result during operations like baking.
*
* NOTE: We conder ID evaluated if ANY of those flags is set. We do NOT require ALL of them. */
@@ -145,6 +145,24 @@ bSound *BKE_sound_new_file_exists(Main *bmain, const char *filepath)
return BKE_sound_new_file_exists_ex(bmain, filepath, NULL);
}
+static void sound_free_audio(bSound *sound)
+{
+#ifdef WITH_AUDASPACE
+ if (sound->handle) {
+ AUD_Sound_free(sound->handle);
+ sound->handle = NULL;
+ sound->playback_handle = NULL;
+ }
+
+ if (sound->cache) {
+ AUD_Sound_free(sound->cache);
+ sound->cache = NULL;
+ }
+#else
+ UNUSED_VARS(sound);
+#endif /* WITH_AUDASPACE */
+}
+
/** Free (or release) any data used by this sound (does not free the sound itself). */
void BKE_sound_free(bSound *sound)
{
@@ -155,7 +173,7 @@ void BKE_sound_free(bSound *sound)
sound->packedfile = NULL;
}
- BKE_sound_free_audio(sound);
+ sound_free_audio(sound);
BKE_sound_free_waveform(sound);
if (sound->spinlock) {
@@ -165,24 +183,6 @@ void BKE_sound_free(bSound *sound)
}
}
-void BKE_sound_free_audio(bSound *sound)
-{
-#ifdef WITH_AUDASPACE
- if (sound->handle) {
- AUD_Sound_free(sound->handle);
- sound->handle = NULL;
- sound->playback_handle = NULL;
- }
-
- if (sound->cache) {
- AUD_Sound_free(sound->cache);
- sound->cache = NULL;
- }
-#else
- UNUSED_VARS(sound);
-#endif /* WITH_AUDASPACE */
-}
-
/**
* Only copy internal data of Sound ID from source
* to already allocated/initialized destination.
@@ -412,13 +412,7 @@ void BKE_sound_delete_cache(bSound *sound)
}
}
-void BKE_sound_load(Main *bmain, bSound *sound)
-{
- sound_verify_evaluated_id(&sound->id);
- BKE_sound_load_audio(bmain, sound);
-}
-
-void BKE_sound_load_audio(Main *bmain, bSound *sound)
+static void sound_load_audio(Main *bmain, bSound *sound)
{
if (sound->cache) {
@@ -492,6 +486,12 @@ void BKE_sound_load_audio(Main *bmain, bSound *sound)
}
}
+void BKE_sound_load(Main *bmain, bSound *sound)
+{
+ sound_verify_evaluated_id(&sound->id);
+ sound_load_audio(bmain, sound);
+}
+
AUD_Device *BKE_sound_mixdown(Scene *scene, AUD_DeviceSpecs specs, int start, float volume)
{
sound_verify_evaluated_id(&scene->id);
@@ -560,7 +560,7 @@ void BKE_sound_mute_scene(Scene *scene, int muted)
}
}
-void BKE_sound_update_fps(Scene *scene)
+void BKE_sound_update_fps(Main *bmain, Scene *scene)
{
sound_verify_evaluated_id(&scene->id);
@@ -568,7 +568,7 @@ void BKE_sound_update_fps(Scene *scene)
AUD_Sequence_setFPS(scene->sound_scene, FPS);
}
- BKE_sequencer_refresh_sound_length(scene);
+ BKE_sequencer_refresh_sound_length(bmain, scene);
}
void BKE_sound_update_scene_listener(Scene *scene)
@@ -608,7 +608,7 @@ void *BKE_sound_add_scene_sound(
Scene *scene, Sequence *sequence, int startframe, int endframe, int frameskip)
{
sound_verify_evaluated_id(&scene->id);
- /* Happens when sequence's sound datablock was removed. */
+ /* Happens when sequence's sound data-block was removed. */
if (sequence->sound == NULL) {
return NULL;
}
@@ -895,11 +895,15 @@ void BKE_sound_free_waveform(bSound *sound)
sound->tags &= ~SOUND_TAGS_WAVEFORM_NO_RELOAD;
}
-/* TODO(sergey): Consider mamakinging this function fully autonomous, as in, not require having
- * an existing playback handle. That would make it easy to read waveforms, which doesn't seem to
- * be affected by evaluated scene (waveworm comes from file). */
-void BKE_sound_read_waveform(bSound *sound, short *stop)
+void BKE_sound_read_waveform(Main *bmain, bSound *sound, short *stop)
{
+ bool need_close_audio_handles = false;
+ if (sound->playback_handle == NULL) {
+ /* TOOD(sergey): Make it fully independent audio handle. */
+ sound_load_audio(bmain, sound);
+ need_close_audio_handles = true;
+ }
+
AUD_SoundInfo info = AUD_getInfo(sound->playback_handle);
SoundWaveform *waveform = MEM_mallocN(sizeof(SoundWaveform), "SoundWaveform");
@@ -936,6 +940,10 @@ void BKE_sound_read_waveform(bSound *sound, short *stop)
sound->waveform = waveform;
sound->tags &= ~SOUND_TAGS_WAVEFORM_LOADING;
BLI_spin_unlock(sound->spinlock);
+
+ if (need_close_audio_handles) {
+ sound_free_audio(sound);
+ }
}
static void sound_update_base(Scene *scene, Object *object, void *new_set)
@@ -1047,12 +1055,16 @@ void *BKE_sound_get_factory(void *sound)
return ((bSound *)sound)->playback_handle;
}
-/* stupid wrapper because AUD_C-API.h includes Python.h which makesrna doesn't like */
-float BKE_sound_get_length(bSound *sound)
+float BKE_sound_get_length(Main *bmain, bSound *sound)
{
- sound_verify_evaluated_id(&sound->id);
- AUD_SoundInfo info = AUD_getInfo(sound->playback_handle);
-
+ if (sound->playback_handle != NULL) {
+ AUD_SoundInfo info = AUD_getInfo(sound->playback_handle);
+ return info.length;
+ }
+ SoundInfo info;
+ if (!BKE_sound_info_get(bmain, sound, &info)) {
+ return 0.0f;
+ }
return info.length;
}
@@ -1065,6 +1077,29 @@ char **BKE_sound_get_device_names(void)
return audio_device_names;
}
+static bool sound_info_from_playback_handle(void *playback_handle, SoundInfo *sound_info)
+{
+ if (playback_handle == NULL) {
+ return false;
+ }
+ AUD_SoundInfo info = AUD_getInfo(playback_handle);
+ sound_info->specs.channels = (eSoundChannels)info.specs.channels;
+ sound_info->length = info.length;
+ return true;
+}
+
+bool BKE_sound_info_get(struct Main *main, struct bSound *sound, SoundInfo *sound_info)
+{
+ if (sound->playback_handle != NULL) {
+ return sound_info_from_playback_handle(sound->playback_handle, sound_info);
+ }
+ /* TOOD(sergey): Make it fully independent audio handle. */
+ sound_load_audio(main, sound);
+ const bool result = sound_info_from_playback_handle(sound->playback_handle, sound_info);
+ sound_free_audio(sound);
+ return result;
+}
+
#else /* WITH_AUDASPACE */
# include "BLI_utildefines.h"
@@ -1162,9 +1197,9 @@ int BKE_sound_scene_playing(Scene *UNUSED(scene))
{
return -1;
}
-void BKE_sound_read_waveform(bSound *sound, short *stop)
+void BKE_sound_read_waveform(Main *bmain, bSound *sound, short *stop)
{
- UNUSED_VARS(sound, stop);
+ UNUSED_VARS(sound, stop, bmain);
}
void BKE_sound_init_main(Main *UNUSED(bmain))
{
@@ -1184,7 +1219,7 @@ void BKE_sound_update_scene_sound(void *UNUSED(handle), bSound *UNUSED(sound))
void BKE_sound_update_scene_listener(Scene *UNUSED(scene))
{
}
-void BKE_sound_update_fps(Scene *UNUSED(scene))
+void BKE_sound_update_fps(Main *UNUSED(bmain), Scene *UNUSED(scene))
{
}
void BKE_sound_set_scene_sound_volume(void *UNUSED(handle),
@@ -1203,7 +1238,7 @@ void BKE_sound_set_scene_sound_pitch(void *UNUSED(handle),
char UNUSED(animated))
{
}
-float BKE_sound_get_length(bSound *UNUSED(sound))
+float BKE_sound_get_length(struct Main *UNUSED(bmain), bSound *UNUSED(sound))
{
return 0;
}
@@ -1217,8 +1252,11 @@ void BKE_sound_free_waveform(bSound *UNUSED(sound))
{
}
-void BKE_sound_load_audio(Main *UNUSED(bmain), bSound *UNUSED(sound))
+bool BKE_sound_info_get(struct Main *UNUSED(main),
+ struct bSound *UNUSED(sound),
+ SoundInfo *UNUSED(sound_info))
{
+ return false;
}
#endif /* WITH_AUDASPACE */
diff --git a/source/blender/blenkernel/intern/subdiv_converter_mesh.c b/source/blender/blenkernel/intern/subdiv_converter_mesh.c
index fc0c5db4466..37ca6d0e485 100644
--- a/source/blender/blenkernel/intern/subdiv_converter_mesh.c
+++ b/source/blender/blenkernel/intern/subdiv_converter_mesh.c
@@ -61,7 +61,7 @@ typedef struct ConverterStorage {
*/
int *manifold_vertex_index;
/* Indexed by vertex index from mesh, corresponds to whether this vertex has
- * infinite sharpness due to non-manifol topology.
+ * infinite sharpness due to non-manifold topology.
*/
BLI_bitmap *infinite_sharp_vertices_map;
/* Reverse mapping to above. */
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index ad81fc49b19..4171c1aac4f 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -2294,7 +2294,7 @@ static struct PBVH *ccgDM_getPBVH(Object *ob, DerivedMesh *dm)
}
if (ob->sculpt->pbvh) {
- /* Note that we have to clean up exisitng pbvh instead of updating it in case it does not
+ /* Note that we have to clean up existing pbvh instead of updating it in case it does not
* match current grid_pbvh status. */
const PBVHType pbvh_type = BKE_pbvh_type(ob->sculpt->pbvh);
if (grid_pbvh) {
@@ -3016,7 +3016,7 @@ struct DerivedMesh *subsurf_make_derived_from_derived(struct DerivedMesh *dm,
* subsurf structure in order to save computation time since
* re-creation is rather a complicated business.
*
- * TODO(sergey): There was a good eason why final calculation
+ * TODO(sergey): There was a good reason why final calculation
* used to free entirely cached subsurf structure. reason of
* this is to be investigated still to be sure we don't have
* regressions here.
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index f07751e349f..7d5862c1fb6 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -2019,7 +2019,7 @@ static void txt_undo_add_unprefix_op(Text *text,
* 4 bytes */
txt_undo_store_uint32(utxt->buf, &utxt->pos, line_index_mask_len);
- /* Adding linenumbers of lines that shall not be indented if undoing.
+ /* Adding line-numbers of lines that shall not be indented if undoing.
* 'line_index_mask_len * 4' bytes */
for (idata = line_index_mask->first; idata; idata = idata->next) {
txt_undo_store_uint32(utxt->buf, &utxt->pos, idata->value);
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index f5b73d88867..7e7d5c82654 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -157,7 +157,7 @@ static struct bUnitDef buMetricLenDef[] = {
static const struct bUnitCollection buMetricLenCollection = {buMetricLenDef, 3, 0, UNIT_COLLECTION_LENGTH(buMetricLenDef)};
static struct bUnitDef buImperialLenDef[] = {
- {"mile", "miles", "mi", "m", "Miles", "MILES", UN_SC_MI, 0.0, B_UNIT_DEF_NONE},
+ {"mile", "miles", "mi", NULL, "Miles", "MILES", UN_SC_MI, 0.0, B_UNIT_DEF_NONE},
{"furlong", "furlongs", "fur", NULL, "Furlongs", "FURLONGS", UN_SC_FUR, 0.0, B_UNIT_DEF_SUPPRESS},
{"chain", "chains", "ch", NULL, "Chains", "CHAINS", UN_SC_CH, 0.0, B_UNIT_DEF_SUPPRESS},
{"yard", "yards", "yd", NULL, "Yards", "YARDS", UN_SC_YD, 0.0, B_UNIT_DEF_SUPPRESS},
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index ae41b8f3272..fb8bfa1dfd9 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -589,8 +589,13 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
c->time_base.num = (int)rd->frs_sec_base;
}
else {
- c->time_base.den = rd->frs_sec * 100000;
- c->time_base.num = ((double)rd->frs_sec_base) * 100000;
+ // This calculates a fraction (DENUM_MAX / num) which approximates the scene
+ // frame rate (frs_sec / frs_sec_base).
+ const double DENUM_MAX = 2147483647;
+ const double num = (DENUM_MAX / (double)rd->frs_sec) * rd->frs_sec_base;
+
+ c->time_base.den = (int)DENUM_MAX;
+ c->time_base.num = (int)num;
}
c->gop_size = context->ffmpeg_gop_size;
diff --git a/source/blender/blenlib/intern/expr_pylike_eval.c b/source/blender/blenlib/intern/expr_pylike_eval.c
index 49c7fb19b7d..14fc4c5bf26 100644
--- a/source/blender/blenlib/intern/expr_pylike_eval.c
+++ b/source/blender/blenlib/intern/expr_pylike_eval.c
@@ -38,7 +38,7 @@
* sin, cos, tan, asin, acos, atan, atan2,
* exp, log, sqrt, pow, fmod
*
- * The implementation has no global state and can be used multithreaded.
+ * The implementation has no global state and can be used multi-threaded.
*/
#include <math.h>
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 99eee0aa51c..6b231c4916d 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -506,7 +506,7 @@ float dist_to_line_v3(const float p[3], const float l1[3], const float l2[3])
*
* \param axis_ref: used when v1,v2,v3 form a line and to check if the corner is concave/convex.
*
- * \note the distance from \a v1 & \a v3 to \a v2 doesnt matter
+ * \note the distance from \a v1 & \a v3 to \a v2 doesn't matter
* (it just defines the planes).
*
* \return the lowest squared distance to either of the planes.
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 71655084b2b..7c64206134b 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -625,7 +625,7 @@ void mul_m2v2(const float mat[2][2], float vec[2])
mul_v2_m2v2(vec, mat, vec);
}
-/* same as mul_m4_v3() but doesnt apply translation component */
+/** Same as #mul_m4_v3() but doesn't apply translation component. */
void mul_mat3_m4_v3(const float mat[4][4], float vec[3])
{
const float x = vec[0];
diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c
index 9b71c9e6797..08c3653153e 100644
--- a/source/blender/blenlib/intern/scanfill.c
+++ b/source/blender/blenlib/intern/scanfill.c
@@ -632,7 +632,7 @@ static unsigned int scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int fl
ed2 = ed1->next;
/* commented out... the ESC here delivers corrupted memory
- * (and doesnt work during grab) */
+ * (and doesn't work during grab). */
/* if (callLocalInterruptCallBack()) break; */
if (totface >= maxface) {
/* printf("Fill error: endless loop. Escaped at vert %d, tot: %d.\n", a, verts); */
diff --git a/source/blender/blenlib/intern/string_utils.c b/source/blender/blenlib/intern/string_utils.c
index fa12b4b3a37..f2b3ef2ad87 100644
--- a/source/blender/blenlib/intern/string_utils.c
+++ b/source/blender/blenlib/intern/string_utils.c
@@ -167,8 +167,8 @@ void BLI_string_flip_side_name(char *r_name,
/* We first check the case with a .### extension, let's find the last period */
if (isdigit(r_name[len - 1])) {
- index = strrchr(r_name, '.'); // last occurrence
- if (index && isdigit(index[1])) { // doesnt handle case bone.1abc2 correct..., whatever!
+ index = strrchr(r_name, '.'); /* last occurrence. */
+ if (index && isdigit(index[1])) { /* doesn't handle case bone.1abc2 correct..., whatever! */
if (strip_number == false) {
BLI_strncpy(number, index, name_len);
}
diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c
index 978dee319b4..3c87df55b2b 100644
--- a/source/blender/blenlib/intern/threads.c
+++ b/source/blender/blenlib/intern/threads.c
@@ -495,7 +495,7 @@ void BLI_spin_lock(SpinLock *spin)
#elif defined(_MSC_VER)
while (InterlockedExchangeAcquire(spin, 1)) {
while (*spin) {
- /* Spinlock hint for processors with hyperthreading. */
+ /* Spin-lock hint for processors with hyperthreading. */
YieldProcessor();
}
}
diff --git a/source/blender/blenloader/intern/blend_validate.c b/source/blender/blenloader/intern/blend_validate.c
index 323ecedb971..7fe06d90ac1 100644
--- a/source/blender/blenloader/intern/blend_validate.c
+++ b/source/blender/blenloader/intern/blend_validate.c
@@ -18,7 +18,7 @@
* \ingroup blenloader
*
* Utils to check/validate a Main is in sane state,
- * only checks relations between datablocks and libraries for now.
+ * only checks relations between data-blocks and libraries for now.
*
* \note Does not *fix* anything, only reports found errors.
*/
@@ -77,7 +77,7 @@ bool BLO_main_validate_libraries(Main *bmain, ReportList *reports)
for (Main *curmain = bmain->next; curmain != NULL; curmain = curmain->next) {
Library *curlib = curmain->curlib;
if (curlib == NULL) {
- BKE_report(reports, RPT_ERROR, "Library database with NULL library datablock!");
+ BKE_report(reports, RPT_ERROR, "Library database with NULL library data-block!");
continue;
}
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index 4b22a59a155..a4b96c9e59c 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -129,7 +129,7 @@ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp)
}
/**
- * Gets the names of all the datablocks in a file of a certain type
+ * Gets the names of all the data-blocks in a file of a certain type
* (e.g. all the scene names in a file).
*
* \param bh: The blendhandle to access.
@@ -161,7 +161,7 @@ LinkNode *BLO_blendhandle_get_datablock_names(BlendHandle *bh, int ofblocktype,
}
/**
- * Gets the previews of all the datablocks in a file of a certain type
+ * Gets the previews of all the data-blocks in a file of a certain type
* (e.g. all the scene previews in a file).
*
* \param bh: The blendhandle to access.
@@ -251,7 +251,7 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *to
}
/**
- * Gets the names of all the linkable datablock types available in a file.
+ * Gets the names of all the linkable data-block types available in a file.
* (e.g. "Scene", "Mesh", "Light", etc.).
*
* \param bh: The blendhandle to access.
@@ -357,7 +357,7 @@ BlendFileData *BLO_read_from_memory(const void *mem,
* (assuming their data are already loaded & valid).
*
* \param oldmain: old main,
- * from which we will keep libraries and other datablocks that should not have changed.
+ * from which we will keep libraries and other data-blocks that should not have changed.
* \param filename: current file, only for retrieving library data.
*/
BlendFileData *BLO_read_from_memfile(Main *oldmain,
@@ -439,7 +439,7 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain,
#endif
}
}
- /* In any case, we need to move all lib datablocks themselves - those are
+ /* In any case, we need to move all lib data-blocks themselves - those are
* 'first level data', getting rid of them would imply updating spaces & co
* to prevent invalid pointers access. */
BLI_movelisttolist(&newmain->libraries, &oldmain->libraries);
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 6cec6be9068..949234ff4a4 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -213,7 +213,7 @@
* - link all LibBlocks and indirect pointers to libblocks
* - initialize #FileGlobal and copy pointers to #Global
*
- * \note Still a weak point is the new-address function, that doesnt solve reading from
+ * \note Still a weak point is the new-address function, that doesn't solve reading from
* multiple files at the same time.
* (added remark: oh, i thought that was solved? will look at that... (ton).
*/
@@ -677,8 +677,8 @@ static Main *blo_find_main(FileData *fd, const char *filepath, const char *relab
m = BKE_main_new();
BLI_addtail(mainlist, m);
- /* Add library datablock itself to 'main' Main, since libraries are **never** linked data.
- * Fixes bug where you could end with all ID_LI datablocks having the same name... */
+ /* Add library data-block itself to 'main' Main, since libraries are **never** linked data.
+ * Fixes bug where you could end with all ID_LI data-blocks having the same name... */
lib = BKE_libblock_alloc(mainlist->first, ID_LI, BLI_path_basename(filepath), 0);
lib->id.us = ID_FAKE_USERS(
lib); /* Important, consistency with main ID reading code from read_libblock(). */
@@ -9514,8 +9514,8 @@ static void lib_link_all(FileData *fd, Main *main)
BLO_main_validate_shapekeys(main, NULL);
if (fd->memfile != NULL) {
- /* When doing redo, we perform a tremendous amount of esoterics magic tricks to avoid having to
- * re-read all library datablocks.
+ /* When doing redo, we perform a tremendous amount of esoteric magic tricks to avoid having to
+ * re-read all library data-blocks.
* Unfortunately, that means that we do not clear Collections' parents lists, which then get
* improperly extended in some cases by lib_link_scene() and lib_link_collection() calls above
* (when ome local collection is parent of linked ones).
@@ -9836,7 +9836,7 @@ static void sort_bhead_old_map(FileData *fd)
static BHead *find_previous_lib(FileData *fd, BHead *bhead)
{
- /* skip library datablocks in undo, see comment in read_libblock */
+ /* Skip library data-blocks in undo, see comment in read_libblock. */
if (fd->memfile) {
return NULL;
}
@@ -11720,7 +11720,7 @@ static void read_library_linked_ids(FileData *basefd,
/* BLI_assert(*realid != NULL); */
/* Now that we have a real ID, replace all pointers to placeholders in
- * fd->libmap with pointers to the real datablocks. We do this for all
+ * fd->libmap with pointers to the real data-blocks. We do this for all
* libraries since multiple might be referencing this ID. */
change_link_placeholder_to_real_ID_pointer(mainlist, basefd, id, *realid);
@@ -11825,11 +11825,11 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
BLO_main_expander(expand_doit_library);
/* At this point the base blend file has been read, and each library blend
- * encountered so far has a main with placeholders for linked datablocks.
+ * encountered so far has a main with placeholders for linked data-blocks.
*
* Now we will read the library blend files and replace the placeholders
- * with actual datablocks. We loop over library mains multiple times in
- * case a library needs to link additional datablocks from another library
+ * with actual data-blocks. We loop over library mains multiple times in
+ * case a library needs to link additional data-blocks from another library
* that had been read previously. */
while (do_it) {
do_it = false;
@@ -11837,10 +11837,10 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
/* Loop over mains of all library blend files encountered so far. Note
* this list gets longer as more indirectly library blends are found. */
for (Main *mainptr = mainl->next; mainptr; mainptr = mainptr->next) {
- /* Does this library have any more linked datablocks we need to read? */
+ /* Does this library have any more linked data-blocks we need to read? */
if (has_linked_ids_to_read(mainptr)) {
#if 0
- printf("Reading linked datablocks from %s (%s)\n",
+ printf("Reading linked data-blocks from %s (%s)\n",
mainptr->curlib->id.name,
mainptr->curlib->name);
#endif
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 4adbbac8cae..9d9906fc3e0 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1198,7 +1198,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
for (bGPdata *gpd = bmain->gpencils.first; gpd; gpd = gpd->id.next) {
bool enabled = false;
- /* Ensure that the datablock's onionskinning toggle flag
+ /* Ensure that the datablock's onion-skinning toggle flag
* stays in sync with the status of the actual layers
*/
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 93e276fd385..57891279ae1 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -784,7 +784,7 @@ void do_versions_after_linking_280(Main *bmain)
}
/* We need to assign lib pointer to generated hidden collections *after* all have been created,
- * otherwise we'll end up with several datablocks sharing same name/library,
+ * otherwise we'll end up with several data-blocks sharing same name/library,
* which is FORBIDDEN!
* Note: we need this to be recursive,
* since a child collection may be sorted before its parent in bmain. */
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index c339e154d57..3c44f082ac0 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -35,7 +35,7 @@
* _ = 4 byte pointer, - = 8 byte pointer
* </pre>
*
- * datablocks: (also see struct #BHead).
+ * data-blocks: (also see struct #BHead).
* <pre>
* <bh.code> 4 chars
* <bh.len> int, len data after BHead
@@ -2355,7 +2355,7 @@ static void write_light(WriteData *wd, Light *la)
static void write_collection_nolib(WriteData *wd, Collection *collection)
{
- /* Shared function for collection datablocks and scene master collection. */
+ /* Shared function for collection data-blocks and scene master collection. */
write_previews(wd, collection->preview);
for (CollectionObject *cob = collection->gobject.first; cob; cob = cob->next) {
@@ -3788,7 +3788,7 @@ static bool write_file_handle(Main *mainvar,
NULL :
BKE_override_static_operations_store_initialize();
- /* This outer loop allows to save first datablocks from real mainvar,
+ /* This outer loop allows to save first data-blocks from real mainvar,
* then the temp ones from override process,
* if needed, without duplicating whole code. */
Main *bmain = mainvar;
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c
index 579fbbdc05e..bb55365f619 100644
--- a/source/blender/bmesh/intern/bmesh_marking.c
+++ b/source/blender/bmesh/intern/bmesh_marking.c
@@ -856,7 +856,7 @@ void BM_editselection_normal(BMEditSelection *ese, float r_normal[3])
add_v3_v3v3(r_normal, eed->v1->no, eed->v2->no);
sub_v3_v3v3(plane, eed->v2->co, eed->v1->co);
- /* the 2 vertex normals will be close but not at rightangles to the edge
+ /* the 2 vertex normals will be close but not at right angles to the edge
* for rotate about edge we want them to be at right angles, so we need to
* do some extra calculation to correct the vert normals,
* we need the plane for this */
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c
index a35d10db697..dc42d86d800 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -368,7 +368,7 @@ typedef struct BMVertsCalcNormalsData {
const float (*edgevec)[3];
const float (*vcos)[3];
- /* Read-write data, protected by an atomic-based fake spinlock-like system... */
+ /* Read-write data, protected by an atomic-based fake spin-lock like system. */
float (*vnos)[3];
} BMVertsCalcNormalsData;
@@ -412,7 +412,7 @@ static void mesh_verts_calc_normals_accum_cb(void *userdata, MempoolIterData *mp
float *v_no = data->vnos ? data->vnos[BM_elem_index_get(l_iter->v)] : l_iter->v->no;
/* This block is a lockless threadsafe madd_v3_v3fl.
- * It uses the first float of the vector as a sort of cheap spinlock,
+ * It uses the first float of the vector as a sort of cheap spin-lock,
* assuming FLT_MAX is a safe 'illegal' value that cannot be set here otherwise.
* It also assumes that collisions between threads are highly unlikely,
* else performances would be quite bad here. */
@@ -617,7 +617,7 @@ static void bm_mesh_edges_sharp_tag(BMesh *bm,
else if (do_sharp_edges_tag) {
/* Note that we do not care about the other sharp-edge cases
* (sharp poly, non-manifold edge, etc.),
- * only tag edge as sharp when it is due to angle threashold. */
+ * only tag edge as sharp when it is due to angle threshold. */
BM_elem_flag_disable(e, BM_ELEM_SMOOTH);
}
}
diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c
index 2ec3ba4b91c..2534a8c35ad 100644
--- a/source/blender/bmesh/intern/bmesh_operators.c
+++ b/source/blender/bmesh/intern/bmesh_operators.c
@@ -1739,7 +1739,7 @@ static int BMO_opcode_from_opname_check(const char *opname)
*
* \note The common v/e/f suffix can be mixed,
* so `avef` is can be used for all verts, edges and faces.
- * Order is not important so `Hfev` is also valid (all unflagged verts, edges and faces).
+ * Order is not important so `Hfev` is also valid (all un-flagged verts, edges and faces).
*/
bool BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt, va_list vlist)
diff --git a/source/blender/bmesh/intern/bmesh_query.c b/source/blender/bmesh/intern/bmesh_query.c
index 479dc99beee..4a47bcccb25 100644
--- a/source/blender/bmesh/intern/bmesh_query.c
+++ b/source/blender/bmesh/intern/bmesh_query.c
@@ -1512,7 +1512,7 @@ float BM_loop_calc_face_normal_safe_ex(const BMLoop *l, const float epsilon_sq,
{
/* Note: we cannot use result of normal_tri_v3 here to detect colinear vectors
* (vertex on a straight line) from zero value,
- * because it does not normalize both vectors before making crossproduct.
+ * because it does not normalize both vectors before making cross-product.
* Instead of adding two costly normalize computations,
* just check ourselves for colinear case. */
/* Note: FEPSILON might need some finer tweaking at some point?
@@ -1529,7 +1529,7 @@ float BM_loop_calc_face_normal_safe_ex(const BMLoop *l, const float epsilon_sq,
mul_v3_v3fl(v_tmp, v2, fac);
sub_v3_v3(v_tmp, v1);
if (fac != 0.0f && !is_zero_v3(v1) && len_squared_v3(v_tmp) > epsilon_sq) {
- /* Not co-linear, we can compute crossproduct and normalize it into normal. */
+ /* Not co-linear, we can compute cross-product and normalize it into normal. */
cross_v3_v3v3(r_normal, v1, v2);
return normalize_v3(r_normal);
}
diff --git a/source/blender/bmesh/intern/bmesh_walkers.c b/source/blender/bmesh/intern/bmesh_walkers.c
index b850c87d5aa..05ae8c940af 100644
--- a/source/blender/bmesh/intern/bmesh_walkers.c
+++ b/source/blender/bmesh/intern/bmesh_walkers.c
@@ -64,9 +64,8 @@ void *BMW_begin(BMWalker *walker, void *start)
/**
* \brief Init Walker
*
- * Allocates and returns a new mesh walker of
- * a given type. The elements visited are filtered
- * by the bitmask 'searchmask'.
+ * Allocates and returns a new mesh walker of a given type.
+ * The elements visited are filtered by the bitmask 'searchmask'.
*/
void BMW_init(BMWalker *walker,
BMesh *bm,
diff --git a/source/blender/bmesh/intern/bmesh_walkers.h b/source/blender/bmesh/intern/bmesh_walkers.h
index 54cfccb9ed8..0b862a5e9a1 100644
--- a/source/blender/bmesh/intern/bmesh_walkers.h
+++ b/source/blender/bmesh/intern/bmesh_walkers.h
@@ -68,8 +68,6 @@ typedef struct BMWalker {
/* define to make BMW_init more clear */
#define BMW_MASK_NOP 0
-/* initialize a walker. searchmask restricts some (not all) walkers to
- * elements with a specific tool flag set. flags is specific to each walker.*/
void BMW_init(struct BMWalker *walker,
BMesh *bm,
int type,
diff --git a/source/blender/collada/Materials.cpp b/source/blender/collada/Materials.cpp
index 5b60eadef3d..aa35b71b9db 100644
--- a/source/blender/collada/Materials.cpp
+++ b/source/blender/collada/Materials.cpp
@@ -19,11 +19,13 @@
MaterialNode::MaterialNode(bContext *C, Material *ma, KeyImageMap &key_image_map)
: mContext(C), material(ma), effect(nullptr), key_image_map(&key_image_map)
{
- ntree = prepare_material_nodetree();
+ bNodeTree *new_ntree = prepare_material_nodetree();
setShaderType();
- shader_node = add_node(SH_NODE_BSDF_PRINCIPLED, 0, 300, "");
- output_node = add_node(SH_NODE_OUTPUT_MATERIAL, 300, 300, "");
- add_link(shader_node, 0, output_node, 0);
+ if (new_ntree) {
+ shader_node = add_node(SH_NODE_BSDF_PRINCIPLED, 0, 300, "");
+ output_node = add_node(SH_NODE_OUTPUT_MATERIAL, 300, 300, "");
+ add_link(shader_node, 0, output_node, 0);
+ }
}
MaterialNode::MaterialNode(bContext *C,
@@ -32,7 +34,7 @@ MaterialNode::MaterialNode(bContext *C,
UidImageMap &uid_image_map)
: mContext(C), material(ma), effect(ef), uid_image_map(&uid_image_map)
{
- ntree = prepare_material_nodetree();
+ prepare_material_nodetree();
setShaderType();
std::map<std::string, bNode *> nmap;
@@ -89,13 +91,18 @@ void MaterialNode::setShaderType()
#endif
}
+// returns null if material already has a node tree
bNodeTree *MaterialNode::prepare_material_nodetree()
{
- if (material->nodetree == NULL) {
- material->nodetree = ntreeAddTree(NULL, "Shader Nodetree", "ShaderNodeTree");
- material->use_nodes = true;
+ if (material->nodetree) {
+ ntree = material->nodetree;
+ return NULL;
}
- return material->nodetree;
+
+ material->nodetree = ntreeAddTree(NULL, "Shader Nodetree", "ShaderNodeTree");
+ material->use_nodes = true;
+ ntree = material->nodetree;
+ return ntree;
}
bNode *MaterialNode::add_node(int node_type, int locx, int locy, std::string label)
diff --git a/source/blender/compositor/COM_defines.h b/source/blender/compositor/COM_defines.h
index 7a38ad721bc..3707845ef9b 100644
--- a/source/blender/compositor/COM_defines.h
+++ b/source/blender/compositor/COM_defines.h
@@ -68,7 +68,7 @@ typedef enum CompositorPriority {
// workscheduler threading models
/**
- * COM_TM_QUEUE is a multithreaded model, which uses the BLI_thread_queue pattern.
+ * COM_TM_QUEUE is a multi-threaded model, which uses the BLI_thread_queue pattern.
* This is the default option.
*/
#define COM_TM_QUEUE 1
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
index 1718722e860..65c7429bb68 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
@@ -431,7 +431,7 @@ void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memo
char buf[128];
BLI_snprintf(buf,
sizeof(buf),
- IFACE_("Compositing | Tile %u-%u"),
+ TIP_("Compositing | Tile %u-%u"),
this->m_chunksFinished,
this->m_numberOfChunks);
this->m_bTree->stats_draw(this->m_bTree->sdh, buf);
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
index 0d1fefc857d..d502deb1c93 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
@@ -80,7 +80,7 @@ ExecutionSystem::ExecutionSystem(RenderData *rd,
viewer_border->xmin < viewer_border->xmax &&
viewer_border->ymin < viewer_border->ymax;
- editingtree->stats_draw(editingtree->sdh, IFACE_("Compositing | Determining resolution"));
+ editingtree->stats_draw(editingtree->sdh, TIP_("Compositing | Determining resolution"));
for (index = 0; index < this->m_groups.size(); index++) {
resolution[0] = 0;
@@ -131,7 +131,7 @@ void ExecutionSystem::set_operations(const Operations &operations, const Groups
void ExecutionSystem::execute()
{
const bNodeTree *editingtree = this->m_context.getbNodeTree();
- editingtree->stats_draw(editingtree->sdh, IFACE_("Compositing | Initializing execution"));
+ editingtree->stats_draw(editingtree->sdh, TIP_("Compositing | Initializing execution"));
DebugInfo::execute_started(this);
@@ -189,7 +189,7 @@ void ExecutionSystem::execute()
WorkScheduler::finish();
WorkScheduler::stop();
- editingtree->stats_draw(editingtree->sdh, IFACE_("Compositing | De-initializing execution"));
+ editingtree->stats_draw(editingtree->sdh, TIP_("Compositing | De-initializing execution"));
for (index = 0; index < this->m_operations.size(); index++) {
NodeOperation *operation = this->m_operations[index];
operation->deinitExecution();
diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h
index cc6c5e7282a..bd59ebcd869 100644
--- a/source/blender/depsgraph/DEG_depsgraph_query.h
+++ b/source/blender/depsgraph/DEG_depsgraph_query.h
@@ -81,7 +81,7 @@ void DEG_get_customdata_mask_for_object(const struct Depsgraph *graph,
/* Get scene at its evaluated state.
*
* Technically, this is a copied-on-written and fully evaluated version of the input scene.
- * This function will check that the datablock has been expanded (and copied) from the original
+ * 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);
@@ -119,13 +119,13 @@ struct ID *DEG_get_original_id(struct ID *id);
/* Check whether given ID is an original,
*
* Original IDs are considered all the IDs which are not covered by copy-on-write system and are
- * not out-of-main localized datablocks. */
+ * not out-of-main localized data-blocks. */
bool DEG_is_original_id(struct ID *id);
bool DEG_is_original_object(struct Object *object);
/* Opposite of the above.
*
- * If the datablock is not original it must be evaluated, and vice versa. */
+ * If the data-block is not original it must be evaluated, and vice versa. */
bool DEG_is_evaluated_id(struct ID *id);
bool DEG_is_evaluated_object(struct Object *object);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 9b1d528ab37..524a6c16a39 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1193,7 +1193,7 @@ void DepsgraphRelationBuilder::build_animdata_curves_targets(ID *id,
}
graph_->add_new_relation(
operation_from, operation_to, "Animation -> Prop", RELATION_CHECK_BEFORE_ADD);
- /* It is possible that animation is writing to a nested ID datablock,
+ /* It is possible that animation is writing to a nested ID data-block,
* need to make sure animation is evaluated after target ID is copied. */
const IDNode *id_node_from = operation_from->owner->owner;
const IDNode *id_node_to = operation_to->owner->owner;
@@ -1397,8 +1397,8 @@ void DepsgraphRelationBuilder::build_driver_data(ID *id, FCurve *fcu)
/* If it's not a Bone, handle the generic single dependency case. */
add_relation(driver_key, property_entry_key, "Driver -> Driven Property");
/* Similar to the case with f-curves, driver might drive a nested
- * datablock, which means driver execution should wait for that
- * datablock to be copied. */
+ * data-block, which means driver execution should wait for that
+ * data-block to be copied. */
{
PointerRNA id_ptr;
PointerRNA ptr;
@@ -1838,11 +1838,11 @@ void DepsgraphRelationBuilder::build_shapekeys(Key *key)
* Therefore, each user of a piece of shared geometry data ends up evaluating
* its own version of the stuff, complete with whatever modifiers it may use.
*
- * - The datablocks for the geometry data - "obdata" (e.g. ID_ME, ID_CU, ID_LT.)
+ * - The data-blocks for the geometry data - "obdata" (e.g. ID_ME, ID_CU, ID_LT.)
* are used for
* 1) calculating the bounding boxes of the geometry data,
* 2) aggregating inward links from other objects (e.g. for text on curve)
- * and also for the links coming from the shapekey datablocks
+ * and also for the links coming from the shapekey data-blocks
* - Animation/Drivers affecting the parameters of the geometry are made to
* trigger updates on the obdata geometry component, which then trigger
* downstream re-evaluation of the individual instances of this geometry. */
@@ -1966,7 +1966,7 @@ void DepsgraphRelationBuilder::build_object_data_geometry(Object *object)
&object->id, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL);
add_relation(time_key, obdata_ubereval_key, "Legacy particle time");
}
- /* Object data datablock. */
+ /* Object data data-block. */
build_object_data_geometry_datablock((ID *)object->data);
Key *key = BKE_key_from_object(object);
if (key != NULL) {
@@ -2502,7 +2502,7 @@ void DepsgraphRelationBuilder::build_copy_on_write_relations(IDNode *id_node)
}
GHASH_FOREACH_END();
/* NOTE: We currently ignore implicit relations to an external
- * datablocks for copy-on-write operations. This means, for example,
+ * data-blocks for copy-on-write operations. This means, for example,
* copy-on-write component of Object will not wait for copy-on-write
* component of it's Mesh. This is because pointers are all known
* already so remapping will happen all correct. And then If some object
diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc
index 865da20e6fd..48dbd4b0945 100644
--- a/source/blender/depsgraph/intern/depsgraph_query.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query.cc
@@ -153,7 +153,7 @@ Scene *DEG_get_evaluated_scene(const Depsgraph *graph)
{
const DEG::Depsgraph *deg_graph = reinterpret_cast<const DEG::Depsgraph *>(graph);
Scene *scene_cow = deg_graph->scene_cow;
- /* TODO(sergey): Shall we expand datablock here? Or is it OK to assume
+ /* TODO(sergey): Shall we expand data-block here? Or is it OK to assume
* that calleer is OK with just a pointer in case scene is not updated
* yet? */
BLI_assert(scene_cow != NULL && DEG::deg_copy_on_write_is_expanded(&scene_cow->id));
@@ -201,7 +201,7 @@ ID *DEG_get_evaluated_id(const Depsgraph *depsgraph, ID *id)
}
/* TODO(sergey): This is a duplicate of Depsgraph::get_cow_id(),
* but here we never do assert, since we don't know nature of the
- * incoming ID datablock. */
+ * incoming ID data-block. */
const DEG::Depsgraph *deg_graph = (const DEG::Depsgraph *)depsgraph;
const DEG::IDNode *id_node = deg_graph->find_id_node(id);
if (id_node == NULL) {
@@ -292,14 +292,14 @@ bool DEG_is_original_id(ID *id)
* What we want here is to be able to tell whether given ID is a result of dependency graph
* evaluation or not.
*
- * All the datablocks which are created by copy-on-write mechanism will have will be tagged with
- * LIB_TAG_COPIED_ON_WRITE tag. Those datablocks can not be original.
+ * All the data-blocks which are created by copy-on-write mechanism will have will be tagged with
+ * LIB_TAG_COPIED_ON_WRITE tag. Those data-blocks can not be original.
*
- * Modifier stack evaluation might create special datablocks which have all the modifiers
- * applied, and those will be tagged with LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT. Such datablocks
+ * Modifier stack evaluation might create special data-blocks which have all the modifiers
+ * applied, and those will be tagged with LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT. Such data-blocks
* can not be original as well.
*
- * Localization is usually happening from evaluated datablock, or will have some special pointer
+ * Localization is usually happening from evaluated data-block, or will have some special pointer
* magic which will make them to act as evaluated.
*
* NOTE: We conder ID evaluated if ANY of those flags is set. We do NOT require ALL of them. */
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index ef2862ab387..be78eee91cc 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -22,7 +22,7 @@
*/
/* Enable special; trickery to treat nested owned IDs (such as nodetree of
- * material) to be handled in same way as "real" datablocks, even tho some
+ * material) to be handled in same way as "real" data-blocks, even tho some
* internal BKE routines doesn't treat them like that.
*
* TODO(sergey): Re-evaluate that after new ID handling is in place. */
@@ -63,6 +63,7 @@ extern "C" {
#include "DNA_sound_types.h"
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
+#include "DNA_rigidbody_types.h"
#include "DRW_engine.h"
@@ -496,7 +497,7 @@ BLI_INLINE bool check_datablock_expanded(const ID *id_cow)
return (id_cow->name[0] != '\0');
}
-/* Those are datablocks which are not covered by dependency graph and hence
+/* Those are data-blocks which are not covered by dependency graph and hence
* does not need any remapping or anything.
*
* TODO(sergey): How to make it more robust for the future, so we don't have
@@ -736,7 +737,7 @@ void update_animation_data_after_copy(const ID *id_orig, ID *id_cow)
/* Do some special treatment of data transfer from original ID to it's
* CoW complementary part.
*
- * Only use for the newly created CoW datablocks. */
+ * Only use for the newly created CoW data-blocks. */
void update_id_after_copy(const Depsgraph *depsgraph,
const IDNode *id_node,
const ID *id_orig,
@@ -784,7 +785,7 @@ void update_id_after_copy(const Depsgraph *depsgraph,
BKE_animsys_update_driver_array(id_cow);
}
-/* This callback is used to validate that all nested ID datablocks are
+/* This callback is used to validate that all nested ID data-blocks are
* properly expanded. */
int foreach_libblock_validate_callback(void *user_data,
ID * /*id_self*/,
@@ -1010,6 +1011,7 @@ class SceneBackup {
void *playback_handle;
void *sound_scrub_handle;
void *speaker_handles;
+ float rigidbody_last_time;
SequencerBackup sequencer_backup;
};
@@ -1025,6 +1027,7 @@ void SceneBackup::reset()
playback_handle = NULL;
sound_scrub_handle = NULL;
speaker_handles = NULL;
+ rigidbody_last_time = -1;
}
void SceneBackup::init_from_scene(Scene *scene)
@@ -1034,6 +1037,10 @@ void SceneBackup::init_from_scene(Scene *scene)
sound_scrub_handle = scene->sound_scrub_handle;
speaker_handles = scene->speaker_handles;
+ if (scene->rigidbody_world != NULL) {
+ rigidbody_last_time = scene->rigidbody_world->ltime;
+ }
+
/* Clear pointers stored in the scene, so they are not freed when copied-on-written datablock
* is freed for re-allocation. */
scene->sound_scene = NULL;
@@ -1051,6 +1058,10 @@ void SceneBackup::restore_to_scene(Scene *scene)
scene->sound_scrub_handle = sound_scrub_handle;
scene->speaker_handles = speaker_handles;
+ if (scene->rigidbody_world != NULL) {
+ scene->rigidbody_world->ltime = rigidbody_last_time;
+ }
+
sequencer_backup.restore_to_scene(scene);
reset();
@@ -1483,10 +1494,10 @@ void discard_edit_mode_pointers(ID *id_cow)
} // namespace
-/* Free content of the CoW datablock
+/* Free content of the CoW data-block
* Notes:
- * - Does not recurs into nested ID datablocks.
- * - Does not free datablock itself. */
+ * - Does not recurs into nested ID data-blocks.
+ * - Does not free data-block itself. */
void deg_free_copy_on_write_datablock(ID *id_cow)
{
if (!check_datablock_expanded(id_cow)) {
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h
index b174941e3bb..2f83c2f54b9 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h
@@ -47,8 +47,8 @@ struct Depsgraph;
class DepsgraphNodeBuilder;
struct IDNode;
-/* Get fully expanded (ready for use) copy-on-write datablock for the given
- * original datablock.
+/* Get fully expanded (ready for use) copy-on-write data-block for the given
+ * original data-block.
*/
ID *deg_expand_copy_on_write_datablock(const struct Depsgraph *depsgraph,
const IDNode *id_node,
@@ -59,8 +59,8 @@ ID *deg_expand_copy_on_write_datablock(const struct Depsgraph *depsgraph,
DepsgraphNodeBuilder *node_builder = NULL,
bool create_placeholders = false);
-/* Makes sure given CoW datablock is brought back to state of the original
- * datablock.
+/* Makes sure given CoW data-block is brought back to state of the original
+ * data-block.
*/
ID *deg_update_copy_on_write_datablock(const struct Depsgraph *depsgraph, const IDNode *id_node);
ID *deg_update_copy_on_write_datablock(const struct Depsgraph *depsgraph, struct ID *id_orig);
@@ -88,7 +88,7 @@ bool deg_copy_on_write_is_expanded(const struct ID *id_cow);
/* Check whether copy-on-write datablock is needed for given ID.
*
- * There are some exceptions on datablocks which are covered by dependency graph
+ * There are some exceptions on data-blocks which are covered by dependency graph
* but which we don't want to start duplicating.
*
* This includes images.
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index 06e63b6868c..132b13d989b 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -56,7 +56,7 @@ extern "C" {
#include "intern/eval/deg_eval_copy_on_write.h"
-// Invalidate datablock data when update is flushed on it.
+// Invalidate data-block data when update is flushed on it.
//
// The idea of this is to help catching cases when area is accessing data which
// is not yet evaluated, which could happen due to missing relations. The issue
@@ -254,11 +254,11 @@ void flush_editors_id_update(Depsgraph *graph, const DEGEditorUpdateContext *upd
id_orig->name,
(unsigned int)id_cow->recalc);
- /* Inform editors. Only if the datablock is being evaluated a second
+ /* Inform editors. Only if the data-block is being evaluated a second
* time, to distinguish between user edits and initial evaluation when
- * the datablock becomes visible.
+ * the data-block becomes visible.
*
- * TODO: image datablocks do not use COW, so might not be detected
+ * TODO: image data-blocks do not use COW, so might not be detected
* correctly. */
if (deg_copy_on_write_is_expanded(id_cow)) {
if (graph->is_active && id_node->is_user_modified) {
diff --git a/source/blender/depsgraph/intern/node/deg_node_id.cc b/source/blender/depsgraph/intern/node/deg_node_id.cc
index 8a7ec927f8c..8dd01050753 100644
--- a/source/blender/depsgraph/intern/node/deg_node_id.cc
+++ b/source/blender/depsgraph/intern/node/deg_node_id.cc
@@ -206,6 +206,11 @@ ComponentNode *IDNode::add_component(NodeType type, const char *name)
void IDNode::tag_update(Depsgraph *graph, eUpdateSource source)
{
GHASH_FOREACH_BEGIN (ComponentNode *, comp_node, components) {
+ /* Relations update does explicit animation update when needed. Here we ignore animation
+ * component to avoid loss of possible unkeyed changes. */
+ if (comp_node->type == NodeType::ANIMATION && source == DEG_UPDATE_SOURCE_RELATIONS) {
+ continue;
+ }
comp_node->tag_update(graph, source);
}
GHASH_FOREACH_END();
diff --git a/source/blender/depsgraph/intern/node/deg_node_operation.h b/source/blender/depsgraph/intern/node/deg_node_operation.h
index 8fc565cfa77..b0776d186bb 100644
--- a/source/blender/depsgraph/intern/node/deg_node_operation.h
+++ b/source/blender/depsgraph/intern/node/deg_node_operation.h
@@ -100,7 +100,7 @@ enum class OperationCode {
/* Evaluation of geometry is completely done.. */
GEOMETRY_EVAL_DONE,
/* Evaluation of a shape key.
- * NOTE: Currently only for object data datablocks. */
+ * NOTE: Currently only for object data data-blocks. */
GEOMETRY_SHAPEKEY,
/* Object data. --------------------------------------------------------- */
@@ -188,7 +188,7 @@ enum class OperationCode {
/* Synchronization. ----------------------------------------------------- */
SYNCHRONIZE_TO_ORIGINAL,
- /* Generic datablock ---------------------------------------------------- */
+ /* Generic data-block --------------------------------------------------- */
GENERIC_DATABLOCK_UPDATE,
/* Sequencer. ----------------------------------------------------------- */
diff --git a/source/blender/draw/engines/eevee/eevee_bloom.c b/source/blender/draw/engines/eevee/eevee_bloom.c
index e0165ea020a..14faa827be5 100644
--- a/source/blender/draw/engines/eevee/eevee_bloom.c
+++ b/source/blender/draw/engines/eevee/eevee_bloom.c
@@ -207,9 +207,9 @@ void EEVEE_bloom_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *ved
/** Bloom algorithm
*
* Overview:
- * - Downsample the color buffer doing a small blur during each step.
- * - Accumulate bloom color using previously downsampled color buffers
- * and do an upsample blur for each new accumulated layer.
+ * - Down-sample the color buffer doing a small blur during each step.
+ * - Accumulate bloom color using previously down-sampled color buffers
+ * and do an up-sample blur for each new accumulated layer.
* - Finally add accumulation buffer onto the source color buffer.
*
* [1/1] is original copy resolution (can be half or quarter res for performance)
diff --git a/source/blender/draw/engines/eevee/eevee_depth_of_field.c b/source/blender/draw/engines/eevee/eevee_depth_of_field.c
index 8c3e58e76c9..d0f544dd3c6 100644
--- a/source/blender/draw/engines/eevee/eevee_depth_of_field.c
+++ b/source/blender/draw/engines/eevee/eevee_depth_of_field.c
@@ -185,7 +185,7 @@ void EEVEE_depth_of_field_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_
/** Depth of Field algorithm
*
* Overview :
- * - Downsample the color buffer into 2 buffers weighted with
+ * - Down-sample the color buffer into 2 buffers weighted with
* CoC values. Also output CoC into a texture.
* - Shoot quads for every pixel and expand it depending on the CoC.
* Do one pass for near Dof and one pass for far Dof.
diff --git a/source/blender/draw/engines/eevee/eevee_effects.c b/source/blender/draw/engines/eevee/eevee_effects.c
index 8f2fd633890..021afa64fee 100644
--- a/source/blender/draw/engines/eevee/eevee_effects.c
+++ b/source/blender/draw/engines/eevee/eevee_effects.c
@@ -487,7 +487,7 @@ void EEVEE_create_minmax_buffer(EEVEE_Data *vedata, GPUTexture *depth_src, int l
}
/**
- * Simple downsampling algorithm. Reconstruct mip chain up to mip level.
+ * Simple down-sampling algorithm. Reconstruct mip chain up to mip level.
*/
void EEVEE_downsample_buffer(EEVEE_Data *vedata, GPUTexture *texture_src, int level)
{
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c
index ebdc7813335..3977fd160fc 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.c
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.c
@@ -213,7 +213,7 @@ void EEVEE_lightcache_info_update(SceneEEVEE *eevee)
if (lcache != NULL) {
if (lcache->flag & LIGHTCACHE_BAKING) {
BLI_strncpy(
- eevee->light_cache_info, IFACE_("Baking light cache"), sizeof(eevee->light_cache_info));
+ eevee->light_cache_info, TIP_("Baking light cache"), sizeof(eevee->light_cache_info));
return;
}
@@ -224,14 +224,14 @@ void EEVEE_lightcache_info_update(SceneEEVEE *eevee)
BLI_snprintf(eevee->light_cache_info,
sizeof(eevee->light_cache_info),
- IFACE_("%d Ref. Cubemaps, %d Irr. Samples (%s in memory)"),
+ TIP_("%d Ref. Cubemaps, %d Irr. Samples (%s in memory)"),
lcache->cube_len - 1,
irr_samples,
formatted_mem);
}
else {
BLI_strncpy(eevee->light_cache_info,
- IFACE_("No light cache in this scene"),
+ TIP_("No light cache in this scene"),
sizeof(eevee->light_cache_info));
}
}
@@ -1248,7 +1248,7 @@ void EEVEE_lightbake_job(void *custom_data, short *stop, short *do_update, float
/* Assume that if lbake->gl_context is NULL
* we are not running in this in a job, so update
- * the scene lightcache pointer before deleting it. */
+ * the scene light-cache pointer before deleting it. */
if (lbake->gl_context == NULL) {
BLI_assert(BLI_thread_is_main());
EEVEE_lightbake_update(lbake);
diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c
index 71849c0de56..848634f311e 100644
--- a/source/blender/draw/engines/eevee/eevee_lightprobes.c
+++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c
@@ -754,7 +754,7 @@ void EEVEE_lightprobes_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *ved
}
planar_pool_ensure_alloc(vedata, pinfo->num_planar);
- /* If lightcache auto-update is enable we tag the relevant part
+ /* If light-cache auto-update is enable we tag the relevant part
* of the cache to update and fire up a baking job. */
if (!DRW_state_is_image_render() && !DRW_state_is_opengl_render() &&
(pinfo->do_grid_update || pinfo->do_cube_update)) {
diff --git a/source/blender/draw/engines/eevee/eevee_lights.c b/source/blender/draw/engines/eevee/eevee_lights.c
index c3a9c4bba41..f6e8cefd165 100644
--- a/source/blender/draw/engines/eevee/eevee_lights.c
+++ b/source/blender/draw/engines/eevee/eevee_lights.c
@@ -712,7 +712,7 @@ static float light_shape_power_get(const Light *la, const EEVEE_Light *evli)
}
else {
power = 1.0f / (evli->radius * evli->radius * M_PI); /* 1/(r²*Pi) */
- /* Make illumation power closer to cycles for bigger radii. Cycles uses a cos^3 term that we
+ /* Make illumination power closer to cycles for bigger radii. Cycles uses a cos^3 term that we
* cannot reproduce so we account for that by scaling the light power. This function is the
* result of a rough manual fitting. */
power += 1.0f / (2.0f * M_PI); /* power *= 1 + r²/2 */
diff --git a/source/blender/draw/engines/eevee/eevee_lookdev.c b/source/blender/draw/engines/eevee/eevee_lookdev.c
index a998bd3a71b..2d4cc069697 100644
--- a/source/blender/draw/engines/eevee/eevee_lookdev.c
+++ b/source/blender/draw/engines/eevee/eevee_lookdev.c
@@ -126,7 +126,7 @@ void EEVEE_lookdev_cache_init(EEVEE_Data *vedata,
MEM_SAFE_FREE(stl->lookdev_cube_mips);
/* We do this to use a special light cache for lookdev.
- * This lightcache needs to be per viewport. But we need to
+ * This light-cache needs to be per viewport. But we need to
* have correct freeing when the viewport is closed. So we
* need to reference all textures to the txl and the memblocks
* to the stl. */
diff --git a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c
index 26cdf62f989..7b80daf8ed6 100644
--- a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c
+++ b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c
@@ -209,7 +209,7 @@ void EEVEE_screen_raytrace_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *v
* - First pass Trace rays across the depth buffer. The hit position and pdf are
* recorded in a RGBA16F render target for each ray (sample).
*
- * - We downsample the previous frame color buffer.
+ * - We down-sample the previous frame color buffer.
*
* - For each final pixel, we gather neighbors rays and choose a color buffer
* mipmap for each ray using its pdf. (filtered importance sampling)
diff --git a/source/blender/draw/engines/eevee/shaders/effect_downsample_cube_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_downsample_cube_frag.glsl
index 4f4599e1398..0ac1cda9e3d 100644
--- a/source/blender/draw/engines/eevee/shaders/effect_downsample_cube_frag.glsl
+++ b/source/blender/draw/engines/eevee/shaders/effect_downsample_cube_frag.glsl
@@ -1,5 +1,5 @@
/**
- * Simple downsample shader. Takes the average of the 4 texels of lower mip.
+ * Simple down-sample shader. Takes the average of the 4 texels of lower mip.
*/
uniform samplerCube source;
diff --git a/source/blender/draw/engines/eevee/shaders/effect_downsample_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_downsample_frag.glsl
index 9a15ffe55db..a4637b9df91 100644
--- a/source/blender/draw/engines/eevee/shaders/effect_downsample_frag.glsl
+++ b/source/blender/draw/engines/eevee/shaders/effect_downsample_frag.glsl
@@ -1,5 +1,5 @@
/**
- * Simple downsample shader. Takes the average of the 4 texels of lower mip.
+ * Simple down-sample shader. Takes the average of the 4 texels of lower mip.
*/
uniform sampler2D source;
diff --git a/source/blender/draw/engines/eevee/shaders/effect_minmaxz_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_minmaxz_frag.glsl
index a8f3cf7a52b..b99037b1e80 100644
--- a/source/blender/draw/engines/eevee/shaders/effect_minmaxz_frag.glsl
+++ b/source/blender/draw/engines/eevee/shaders/effect_minmaxz_frag.glsl
@@ -1,5 +1,5 @@
/**
- * Shader that downsample depth buffer,
+ * Shader that down-sample depth buffer,
* saving min and max value of each texel in the above mipmaps.
* Adapted from http://rastergrid.com/blog/2010/10/hierarchical-z-map-based-occlusion-culling/
*/
diff --git a/source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_frag.glsl b/source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_frag.glsl
index 9c765ee72b6..0f575dfc2ed 100644
--- a/source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_frag.glsl
+++ b/source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_frag.glsl
@@ -1,5 +1,5 @@
/**
- * Simple downsample shader. Takes the average of the 4 texels of lower mip.
+ * Simple down-sample shader. Takes the average of the 4 texels of lower mip.
*/
uniform sampler2DArray source;
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 9babd8cd058..1300f7259f1 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -2060,8 +2060,8 @@ void DRW_gpencil_populate_particles(GPENCIL_e_data *e_data, GHash *gh_objects, v
for (int i = 0; i < stl->g_data->gp_cache_used; i++) {
tGPencilObjectCache *cache_ob = &stl->g_data->gp_object_cache[i];
if (cache_ob->is_dup_ob) {
- /* reasign duplicate objects because memory for particles is not available
- * and need to use the original datablock and runtime data */
+ /* Reassign duplicate objects because memory for particles is not available
+ * and need to use the original data-block and run-time data. */
Object *ob = (Object *)BLI_ghash_lookup(gh_objects, cache_ob->name);
if (ob) {
cache_ob->ob = ob;
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 2bf4b860bd4..502108a716b 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -850,7 +850,7 @@ void **DRW_view_layer_engine_data_ensure(DrawEngineType *engine_type,
* \{ */
/* Used for DRW_drawdata_from_id()
- * All ID-datablocks which have their own 'local' DrawData
+ * All ID-data-blocks which have their own 'local' DrawData
* should have the same arrangement in their structs.
*/
typedef struct IdDdtTemplate {
diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h
index ddbfa81985d..424d06a3e56 100644
--- a/source/blender/draw/intern/draw_manager.h
+++ b/source/blender/draw/intern/draw_manager.h
@@ -381,7 +381,7 @@ typedef struct DRWManager {
} uniform_names;
} DRWManager;
-extern DRWManager DST; /* TODO : get rid of this and allow multithreaded rendering */
+extern DRWManager DST; /* TODO: get rid of this and allow multi-threaded rendering. */
/* --------------- FUNCTIONS ------------- */
diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c
index 0a63f303db0..8365a7f1b72 100644
--- a/source/blender/draw/modes/edit_mesh_mode.c
+++ b/source/blender/draw/modes/edit_mesh_mode.c
@@ -175,7 +175,7 @@ typedef struct EDIT_MESH_PrivateData {
DRWView *view_faces;
DRWView *view_faces_cage;
DRWView *view_edges;
- DRWView *view_wires;
+ DRWView *view_verts;
int data_mask[4];
int ghost_ob;
@@ -333,7 +333,7 @@ static void EDIT_MESH_engine_init(void *vedata)
stl->g_data->view_faces = (DRWView *)DRW_view_default_get();
stl->g_data->view_faces_cage = DRW_view_create_with_zoffset(draw_ctx->rv3d, 0.5f);
stl->g_data->view_edges = DRW_view_create_with_zoffset(draw_ctx->rv3d, 1.0f);
- stl->g_data->view_wires = DRW_view_create_with_zoffset(draw_ctx->rv3d, 1.5f);
+ stl->g_data->view_verts = DRW_view_create_with_zoffset(draw_ctx->rv3d, 1.5f);
}
}
@@ -587,6 +587,7 @@ static void EDIT_MESH_cache_init(void *vedata)
psl->facefill_occlude_cage = DRW_pass_create("Front Face Cage Color", state);
if (g_data->do_faces) {
+ const bool select_face = (tsettings->selectmode & SCE_SELECT_FACE) != 0;
DRWShadingGroup *shgrp;
/* however we loose the front faces value (because we need the depth of occluded wires and
@@ -595,6 +596,7 @@ static void EDIT_MESH_cache_init(void *vedata)
psl->facefill_occlude);
DRW_shgroup_uniform_block(shgrp, "globalsBlock", G_draw.block_ubo);
DRW_shgroup_uniform_ivec4(shgrp, "dataMask", g_data->data_mask, 1);
+ DRW_shgroup_uniform_bool_copy(shgrp, "selectFaces", select_face);
if (rv3d->rflag & RV3D_CLIPPING) {
DRW_shgroup_state_enable(shgrp, DRW_STATE_CLIP_PLANES);
}
@@ -603,6 +605,7 @@ static void EDIT_MESH_cache_init(void *vedata)
sh_data->overlay_facefill, psl->facefill_occlude_cage);
DRW_shgroup_uniform_block(shgrp, "globalsBlock", G_draw.block_ubo);
DRW_shgroup_uniform_ivec4(shgrp, "dataMask", g_data->data_mask, 1);
+ DRW_shgroup_uniform_bool_copy(shgrp, "selectFaces", select_face);
if (rv3d->rflag & RV3D_CLIPPING) {
DRW_shgroup_state_enable(shgrp, DRW_STATE_CLIP_PLANES);
}
@@ -791,7 +794,7 @@ static void edit_mesh_draw_components(EDIT_MESH_ComponentPassList *passes,
DRW_view_set_active(g_data->view_edges);
DRW_draw_pass(passes->edges);
- DRW_view_set_active(g_data->view_wires);
+ DRW_view_set_active(g_data->view_verts);
DRW_draw_pass(passes->verts);
DRW_view_set_active(NULL);
diff --git a/source/blender/draw/modes/overlay_mode.c b/source/blender/draw/modes/overlay_mode.c
index fe989dbe8cd..aaaeefa81c9 100644
--- a/source/blender/draw/modes/overlay_mode.c
+++ b/source/blender/draw/modes/overlay_mode.c
@@ -166,7 +166,7 @@ static void overlay_engine_init(void *vedata)
#endif
}
- stl->g_data->view_wires = DRW_view_create_with_zoffset(draw_ctx->rv3d, 1.0f);
+ stl->g_data->view_wires = DRW_view_create_with_zoffset(draw_ctx->rv3d, 0.5f);
}
static void overlay_cache_init(void *vedata)
@@ -178,11 +178,9 @@ static void overlay_cache_init(void *vedata)
const DRWContextState *draw_ctx = DRW_context_state_get();
RegionView3D *rv3d = draw_ctx->rv3d;
+ View3D *v3d = draw_ctx->v3d;
OVERLAY_Shaders *sh_data = &e_data.sh_data[draw_ctx->sh_cfg];
- const DRWContextState *DCS = DRW_context_state_get();
-
- View3D *v3d = DCS->v3d;
if (v3d) {
g_data->overlay = v3d->overlay;
g_data->show_overlays = (v3d->flag2 & V3D_HIDE_OVERLAYS) == 0;
@@ -221,15 +219,6 @@ static void overlay_cache_init(void *vedata)
DRW_STATE_FIRST_VERTEX_CONVENTION;
float wire_size = U.pixelsize * 0.5f;
- float winmat[4][4];
- float viewdist = rv3d->dist;
- DRW_view_winmat_get(NULL, winmat, false);
- /* special exception for ortho camera (viewdist isnt used for perspective cameras) */
- if (rv3d->persp == RV3D_CAMOB && rv3d->is_persp == false) {
- viewdist = 1.0f / max_ff(fabsf(rv3d->winmat[0][0]), fabsf(rv3d->winmat[1][1]));
- }
- const float depth_ofs = bglPolygonOffsetCalc((float *)winmat, viewdist, 1.0f);
-
const bool use_select = (DRW_state_is_select() || DRW_state_is_depth());
GPUShader *face_wires_sh = use_select ? sh_data->select_wireframe : sh_data->face_wireframe;
@@ -238,7 +227,6 @@ static void overlay_cache_init(void *vedata)
g_data->face_wires_shgrp = DRW_shgroup_create(face_wires_sh, psl->face_wireframe_pass);
DRW_shgroup_uniform_float(
g_data->face_wires_shgrp, "wireStepParam", &g_data->wire_step_param, 1);
- DRW_shgroup_uniform_float_copy(g_data->face_wires_shgrp, "ofs", depth_ofs);
if (use_select || USE_GEOM_SHADER_WORKAROUND) {
DRW_shgroup_uniform_float_copy(g_data->face_wires_shgrp, "wireSize", wire_size);
DRW_shgroup_uniform_vec2(
diff --git a/source/blender/draw/modes/shaders/overlay_face_wireframe_vert.glsl b/source/blender/draw/modes/shaders/overlay_face_wireframe_vert.glsl
index 23f64e6e49c..9022456abb2 100644
--- a/source/blender/draw/modes/shaders/overlay_face_wireframe_vert.glsl
+++ b/source/blender/draw/modes/shaders/overlay_face_wireframe_vert.glsl
@@ -1,6 +1,5 @@
uniform float wireStepParam;
-uniform float ofs;
in vec3 pos;
in vec3 nor;
@@ -31,7 +30,6 @@ flat out float edgeSharpness;
void main()
{
mat4 projmat = ProjectionMatrix;
- projmat[3][2] -= ofs;
vec4 wpos = ModelMatrix * vec4(pos, 1.0);
gl_Position = projmat * (ViewMatrix * wpos);
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index e5846e270f0..718e85c0e27 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -515,7 +515,7 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
* 2A) nla tracks: include animdata block's data as there are NLA tracks+strips there
* 2B) actions to convert to nla: include animdata block's data as there is an action that can be
* converted to a new NLA strip, and the filtering options allow this
- * 2C) allow non-animated datablocks to be included so that datablocks can be added
+ * 2C) allow non-animated data-blocks to be included so that data-blocks can be added
* 3) drivers: include drivers from animdata block (for Drivers mode in Graph Editor)
* 4A) nla strip keyframes: these are the per-strip controls for time and influence
* 4B) normal keyframes: only when there is an active action
@@ -1618,7 +1618,7 @@ static size_t animfilter_block_data(
AnimData *adt = BKE_animdata_from_id(id);
size_t items = 0;
- /* image object datablocks have no anim-data so check for NULL */
+ /* image object data-blocks have no anim-data so check for NULL */
if (adt) {
IdAdtTemplate *iat = (IdAdtTemplate *)id;
@@ -1704,7 +1704,7 @@ static size_t animdata_filter_shapekey(bAnimContext *ac,
return items;
}
-/* Helper for Grease Pencil - layers within a datablock */
+/* Helper for Grease Pencil - layers within a data-block. */
static size_t animdata_filter_gpencil_layers_data(ListBase *anim_data,
bDopeSheet *ads,
bGPdata *gpd,
@@ -1737,7 +1737,7 @@ static size_t animdata_filter_gpencil_layers_data(ListBase *anim_data,
return items;
}
-/* Helper for Grease Pencil - Grease Pencil datablock - GP Frames */
+/* Helper for Grease Pencil - Grease Pencil data-block - GP Frames. */
static size_t animdata_filter_gpencil_data(ListBase *anim_data,
bDopeSheet *ads,
bGPdata *gpd,
@@ -1746,8 +1746,8 @@ static size_t animdata_filter_gpencil_data(ListBase *anim_data,
size_t items = 0;
/* When asked from "AnimData" blocks (i.e. the top-level containers for normal animation),
- * for convenience, this will return GP Datablocks instead. This may cause issues down
- * the track, but for now, this will do...
+ * for convenience, this will return GP Data-blocks instead.
+ * This may cause issues down the track, but for now, this will do.
*/
if (filter_mode & ANIMFILTER_ANIMDATA) {
/* just add GPD as a channel - this will add everything needed */
@@ -1781,7 +1781,7 @@ static size_t animdata_filter_gpencil_data(ListBase *anim_data,
return items;
}
-/* Grab all Grease Pencil datablocks in file */
+/* Grab all Grease Pencil data-blocks in file. */
// TODO: should this be amalgamated with the dopesheet filtering code?
static size_t animdata_filter_gpencil(bAnimContext *ac,
ListBase *anim_data,
@@ -1847,7 +1847,7 @@ static size_t animdata_filter_gpencil(bAnimContext *ac,
}
}
- /* finally, include this object's grease pencil datablock */
+ /* finally, include this object's grease pencil data-block. */
/* XXX: Should we store these under expanders per item? */
items += animdata_filter_gpencil_data(anim_data, ads, ob->data, filter_mode);
}
@@ -1856,7 +1856,7 @@ static size_t animdata_filter_gpencil(bAnimContext *ac,
else {
bGPdata *gpd;
- /* Grab all Grease Pencil datablocks directly from main,
+ /* Grab all Grease Pencil data-blocks directly from main,
* but only those that seem to be useful somewhere */
for (gpd = ac->bmain->gpencils.first; gpd; gpd = gpd->id.next) {
/* only show if gpd is used by something... */
@@ -1864,7 +1864,7 @@ static size_t animdata_filter_gpencil(bAnimContext *ac,
continue;
}
- /* add GP frames from this datablock */
+ /* add GP frames from this data-block. */
items += animdata_filter_gpencil_data(anim_data, ads, gpd, filter_mode);
}
}
@@ -1983,7 +1983,7 @@ static size_t animdata_filter_mask(Main *bmain,
Mask *mask;
size_t items = 0;
- /* for now, grab mask datablocks directly from main */
+ /* For now, grab mask data-blocks directly from main. */
// XXX: this is not good...
for (mask = bmain->masks.first; mask; mask = mask->id.next) {
ListBase tmp_data = {NULL, NULL};
@@ -2004,7 +2004,7 @@ static size_t animdata_filter_mask(Main *bmain,
if (tmp_items) {
/* include data-expand widget first */
if (filter_mode & ANIMFILTER_LIST_CHANNELS) {
- /* add mask datablock as channel too (if for drawing, and it has layers) */
+ /* add mask data-block as channel too (if for drawing, and it has layers) */
ANIMCHANNEL_NEW_CHANNEL(mask, ANIMTYPE_MASKDATABLOCK, NULL, NULL);
}
@@ -3030,7 +3030,7 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, Base *base, int filter_m
}
/* if only F-Curves with visible flags set can be shown, check that
- * datablock hasn't been set to invisible
+ * data-block hasn't been set to invisible.
*/
if (filter_mode & ANIMFILTER_CURVE_VISIBLE) {
if ((ob->adt) && (ob->adt->flag & ADT_CURVES_NOT_VISIBLE)) {
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 19fd521d7d9..f5bd7a47248 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -61,10 +61,10 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
}
else if (ELEM(NULL, id, fcu, fcu->rna_path)) {
if (fcu == NULL) {
- strcpy(name, IFACE_("<invalid>"));
+ strcpy(name, TIP_("<invalid>"));
}
else if (fcu->rna_path == NULL) {
- strcpy(name, IFACE_("<no path>"));
+ strcpy(name, TIP_("<no path>"));
}
else { /* id == NULL */
BLI_snprintf(name, 256, "%s[%d]", fcu->rna_path, fcu->array_index);
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index dec34eb04ac..2bbb8e5888c 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -772,14 +772,14 @@ static void ed_marker_move_update_header(bContext *C, wmOperator *op)
/* we print current marker value */
if (use_time) {
BLI_snprintf(
- str, sizeof(str), IFACE_("Marker %.2f offset %s"), FRA2TIME(selmarker->frame), str_offs);
+ str, sizeof(str), TIP_("Marker %.2f offset %s"), FRA2TIME(selmarker->frame), str_offs);
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Marker %d offset %s"), selmarker->frame, str_offs);
+ BLI_snprintf(str, sizeof(str), TIP_("Marker %d offset %s"), selmarker->frame, str_offs);
}
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Marker offset %s"), str_offs);
+ BLI_snprintf(str, sizeof(str), TIP_("Marker offset %s"), str_offs);
}
ED_area_status_text(CTX_wm_area(C), str);
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index fe079eb59a0..7ca0f95d6c4 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -182,7 +182,7 @@ static int add_driver_with_target(ReportList *UNUSED(reports),
/* Set driver expression, so that the driver works out of the box
*
- * The following checks define a bit of "autodetection magic" we use
+ * The following checks define a bit of "auto-detection magic" we use
* to ensure that the drivers will behave as expected out of the box
* when faced with properties with different units.
*/
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index 884a8c20b19..f8328e9f07f 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -334,7 +334,7 @@ static short summary_keyframes_loop(KeyframeEditData *ked,
case ALE_FCURVE:
default: {
if (ked && ked->iterflags) {
- /* make backups of the current values, so that a localised fix
+ /* make backups of the current values, so that a localized fix
* (e.g. NLA time remapping) can be applied to these values
*/
float f1 = ked->f1;
diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c
index 27076f84c7f..5d424594229 100644
--- a/source/blender/editors/armature/armature_utils.c
+++ b/source/blender/editors/armature/armature_utils.c
@@ -367,71 +367,73 @@ void armature_tag_unselect(bArmature *arm)
/* ------------------------------------- */
-/* if editbone (partial) selected, copy data */
-/* context; editmode armature, with mirror editing enabled */
-void ED_armature_edit_transform_mirror_update(Object *obedit)
-{
- bArmature *arm = obedit->data;
- EditBone *ebo, *eboflip;
-
- for (ebo = arm->edbo->first; ebo; ebo = ebo->next) {
- /* no layer check, correct mirror is more important */
- if (ebo->flag & (BONE_TIPSEL | BONE_ROOTSEL)) {
- eboflip = ED_armature_ebone_get_mirrored(arm->edbo, ebo);
-
- if (eboflip) {
- /* we assume X-axis flipping for now */
- if (ebo->flag & BONE_TIPSEL) {
- EditBone *children;
-
- eboflip->tail[0] = -ebo->tail[0];
- eboflip->tail[1] = ebo->tail[1];
- eboflip->tail[2] = ebo->tail[2];
- eboflip->rad_tail = ebo->rad_tail;
- eboflip->roll = -ebo->roll;
- eboflip->curve_out_x = -ebo->curve_out_x;
- eboflip->roll2 = -ebo->roll2;
-
- /* Also move connected children, in case children's name aren't mirrored properly */
- for (children = arm->edbo->first; children; children = children->next) {
- if (children->parent == eboflip && children->flag & BONE_CONNECTED) {
- copy_v3_v3(children->head, eboflip->tail);
- children->rad_head = ebo->rad_tail;
- }
+void ED_armature_ebone_transform_mirror_update(bArmature *arm, EditBone *ebo, bool check_select)
+{
+ /* no layer check, correct mirror is more important */
+ if (!check_select || ebo->flag & (BONE_TIPSEL | BONE_ROOTSEL)) {
+ EditBone *eboflip = ED_armature_ebone_get_mirrored(arm->edbo, ebo);
+ if (eboflip) {
+ /* we assume X-axis flipping for now */
+ if (check_select && ebo->flag & BONE_TIPSEL) {
+ EditBone *children;
+
+ eboflip->tail[0] = -ebo->tail[0];
+ eboflip->tail[1] = ebo->tail[1];
+ eboflip->tail[2] = ebo->tail[2];
+ eboflip->rad_tail = ebo->rad_tail;
+ eboflip->roll = -ebo->roll;
+ eboflip->curve_out_x = -ebo->curve_out_x;
+ eboflip->roll2 = -ebo->roll2;
+
+ /* Also move connected children, in case children's name aren't mirrored properly */
+ for (children = arm->edbo->first; children; children = children->next) {
+ if (children->parent == eboflip && children->flag & BONE_CONNECTED) {
+ copy_v3_v3(children->head, eboflip->tail);
+ children->rad_head = ebo->rad_tail;
}
}
- if (ebo->flag & BONE_ROOTSEL) {
- eboflip->head[0] = -ebo->head[0];
- eboflip->head[1] = ebo->head[1];
- eboflip->head[2] = ebo->head[2];
- eboflip->rad_head = ebo->rad_head;
- eboflip->roll = -ebo->roll;
- eboflip->curve_in_x = -ebo->curve_in_x;
- eboflip->roll1 = -ebo->roll1;
-
- /* Also move connected parent, in case parent's name isn't mirrored properly */
- if (eboflip->parent && eboflip->flag & BONE_CONNECTED) {
- EditBone *parent = eboflip->parent;
- copy_v3_v3(parent->tail, eboflip->head);
- parent->rad_tail = ebo->rad_head;
- }
- }
- if (ebo->flag & BONE_SELECTED) {
- eboflip->dist = ebo->dist;
- eboflip->roll = -ebo->roll;
- eboflip->xwidth = ebo->xwidth;
- eboflip->zwidth = ebo->zwidth;
-
- eboflip->curve_in_x = -ebo->curve_in_x;
- eboflip->curve_out_x = -ebo->curve_out_x;
- eboflip->roll1 = -ebo->roll1;
- eboflip->roll2 = -ebo->roll2;
+ }
+ if (!check_select || ebo->flag & BONE_ROOTSEL) {
+ eboflip->head[0] = -ebo->head[0];
+ eboflip->head[1] = ebo->head[1];
+ eboflip->head[2] = ebo->head[2];
+ eboflip->rad_head = ebo->rad_head;
+ eboflip->roll = -ebo->roll;
+ eboflip->curve_in_x = -ebo->curve_in_x;
+ eboflip->roll1 = -ebo->roll1;
+
+ /* Also move connected parent, in case parent's name isn't mirrored properly */
+ if (eboflip->parent && eboflip->flag & BONE_CONNECTED) {
+ EditBone *parent = eboflip->parent;
+ copy_v3_v3(parent->tail, eboflip->head);
+ parent->rad_tail = ebo->rad_head;
}
}
+ if (!check_select || ebo->flag & BONE_SELECTED) {
+ eboflip->dist = ebo->dist;
+ eboflip->roll = -ebo->roll;
+ eboflip->xwidth = ebo->xwidth;
+ eboflip->zwidth = ebo->zwidth;
+
+ eboflip->curve_in_x = -ebo->curve_in_x;
+ eboflip->curve_out_x = -ebo->curve_out_x;
+ eboflip->roll1 = -ebo->roll1;
+ eboflip->roll2 = -ebo->roll2;
+ }
}
}
}
+/* if editbone (partial) selected, copy data */
+/* context; editmode armature, with mirror editing enabled */
+void ED_armature_edit_transform_mirror_update(Object *obedit)
+{
+ bArmature *arm = obedit->data;
+ for (EditBone *ebo = arm->edbo->first; ebo; ebo = ebo->next) {
+ ED_armature_ebone_transform_mirror_update(arm, ebo, true);
+ }
+}
+
/* *************************************************************** */
/* Armature EditMode Conversions */
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c
index 96ba6212992..3407b3e6b7f 100644
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@ -1171,8 +1171,8 @@ static void poselib_preview_apply(bContext *C, wmOperator *op)
/* do header print - if interactively previewing */
if (pld->state == PL_PREVIEW_RUNNING) {
if (pld->flag & PL_PREVIEW_SHOWORIGINAL) {
- ED_area_status_text(pld->sa, IFACE_("PoseLib Previewing Pose: [Showing Original Pose]"));
- ED_workspace_status_text(C, IFACE_("Use Tab to start previewing poses again"));
+ ED_area_status_text(pld->sa, TIP_("PoseLib Previewing Pose: [Showing Original Pose]"));
+ ED_workspace_status_text(C, TIP_("Use Tab to start previewing poses again"));
}
else if (pld->searchstr[0]) {
char tempstr[65];
@@ -1196,17 +1196,17 @@ static void poselib_preview_apply(bContext *C, wmOperator *op)
BLI_snprintf(pld->headerstr,
sizeof(pld->headerstr),
- IFACE_("PoseLib Previewing Pose: Filter - [%s] | "
- "Current Pose - \"%s\""),
+ TIP_("PoseLib Previewing Pose: Filter - [%s] | "
+ "Current Pose - \"%s\""),
tempstr,
markern);
ED_area_status_text(pld->sa, pld->headerstr);
- ED_workspace_status_text(C, IFACE_("Use ScrollWheel or PageUp/Down to change pose"));
+ ED_workspace_status_text(C, TIP_("Use ScrollWheel or PageUp/Down to change pose"));
}
else {
BLI_snprintf(pld->headerstr,
sizeof(pld->headerstr),
- IFACE_("PoseLib Previewing Pose: \"%s\""),
+ TIP_("PoseLib Previewing Pose: \"%s\""),
pld->marker->name);
ED_area_status_text(pld->sa, pld->headerstr);
ED_workspace_status_text(C, NULL);
diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c
index 9bc204c9e3b..97317a86104 100644
--- a/source/blender/editors/armature/pose_slide.c
+++ b/source/blender/editors/armature/pose_slide.c
@@ -27,6 +27,8 @@
#include "BLI_blenlib.h"
#include "BLI_dlrbTree.h"
+#include "BLT_translation.h"
+
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_object_types.h"
@@ -829,35 +831,35 @@ static void pose_slide_draw_status(tPoseSlideOp *pso)
switch (pso->mode) {
case POSESLIDE_PUSH:
- strcpy(mode_str, "Push Pose");
+ strcpy(mode_str, TIP_("Push Pose"));
break;
case POSESLIDE_RELAX:
- strcpy(mode_str, "Relax Pose");
+ strcpy(mode_str, TIP_("Relax Pose"));
break;
case POSESLIDE_BREAKDOWN:
- strcpy(mode_str, "Breakdown");
+ strcpy(mode_str, TIP_("Breakdown"));
break;
default:
/* unknown */
- strcpy(mode_str, "Sliding-Tool");
+ strcpy(mode_str, TIP_("Sliding-Tool"));
break;
}
switch (pso->axislock) {
case PS_LOCK_X:
- BLI_strncpy(axis_str, "[X]/Y/Z axis only (X to clear)", sizeof(axis_str));
+ BLI_strncpy(axis_str, TIP_("[X]/Y/Z axis only (X to clear)"), sizeof(axis_str));
break;
case PS_LOCK_Y:
- BLI_strncpy(axis_str, "X/[Y]/Z axis only (Y to clear)", sizeof(axis_str));
+ BLI_strncpy(axis_str, TIP_("X/[Y]/Z axis only (Y to clear)"), sizeof(axis_str));
break;
case PS_LOCK_Z:
- BLI_strncpy(axis_str, "X/Y/[Z] axis only (Z to clear)", sizeof(axis_str));
+ BLI_strncpy(axis_str, TIP_("X/Y/[Z] axis only (Z to clear)"), sizeof(axis_str));
break;
default:
if (ELEM(pso->channels, PS_TFM_LOC, PS_TFM_ROT, PS_TFM_SIZE)) {
- BLI_strncpy(axis_str, "X/Y/Z = Axis Constraint", sizeof(axis_str));
+ BLI_strncpy(axis_str, TIP_("X/Y/Z = Axis Constraint"), sizeof(axis_str));
}
else {
axis_str[0] = '\0';
@@ -869,31 +871,34 @@ static void pose_slide_draw_status(tPoseSlideOp *pso)
case PS_TFM_LOC:
BLI_snprintf(limits_str,
sizeof(limits_str),
- "[G]/R/S/B/C - Location only (G to clear) | %s",
+ TIP_("[G]/R/S/B/C - Location only (G to clear) | %s"),
axis_str);
break;
case PS_TFM_ROT:
BLI_snprintf(limits_str,
sizeof(limits_str),
- "G/[R]/S/B/C - Rotation only (R to clear) | %s",
+ TIP_("G/[R]/S/B/C - Rotation only (R to clear) | %s"),
axis_str);
break;
case PS_TFM_SIZE:
- BLI_snprintf(
- limits_str, sizeof(limits_str), "G/R/[S]/B/C - Scale only (S to clear) | %s", axis_str);
+ BLI_snprintf(limits_str,
+ sizeof(limits_str),
+ TIP_("G/R/[S]/B/C - Scale only (S to clear) | %s"),
+ axis_str);
break;
case PS_TFM_BBONE_SHAPE:
BLI_strncpy(limits_str,
- "G/R/S/[B]/C - Bendy Bone properties only (B to clear) | %s",
+ TIP_("G/R/S/[B]/C - Bendy Bone properties only (B to clear) | %s"),
sizeof(limits_str));
break;
case PS_TFM_PROPS:
BLI_strncpy(limits_str,
- "G/R/S/B/[C] - Custom Properties only (C to clear) | %s",
+ TIP_("G/R/S/B/[C] - Custom Properties only (C to clear) | %s"),
sizeof(limits_str));
break;
default:
- BLI_strncpy(limits_str, "G/R/S/B/C - Limit to Transform/Property Set", sizeof(limits_str));
+ BLI_strncpy(
+ limits_str, TIP_("G/R/S/B/C - Limit to Transform/Property Set"), sizeof(limits_str));
break;
}
diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c
index 73230e5fb0e..5962d95c5af 100644
--- a/source/blender/editors/gpencil/annotate_paint.c
+++ b/source/blender/editors/gpencil/annotate_paint.c
@@ -1688,8 +1688,8 @@ static void gpencil_draw_status_indicators(bContext *C, tGPsdata *p)
/* Provide usage tips, since this is modal, and unintuitive without hints */
ED_workspace_status_text(
C,
- IFACE_("Annotation Create Poly: LMB click to place next stroke vertex | "
- "ESC/Enter to end (or click outside this area)"));
+ TIP_("Annotation Create Poly: LMB click to place next stroke vertex | "
+ "ESC/Enter to end (or click outside this area)"));
break;
default:
/* Do nothing - the others are self explanatory, exit quickly once the mouse is released
@@ -1704,29 +1704,29 @@ static void gpencil_draw_status_indicators(bContext *C, tGPsdata *p)
switch (p->paintmode) {
case GP_PAINTMODE_ERASER:
ED_workspace_status_text(C,
- IFACE_("Annotation Eraser: Hold and drag LMB or RMB to erase | "
- "ESC/Enter to end (or click outside this area)"));
+ TIP_("Annotation Eraser: Hold and drag LMB or RMB to erase | "
+ "ESC/Enter to end (or click outside this area)"));
break;
case GP_PAINTMODE_DRAW_STRAIGHT:
ED_workspace_status_text(C,
- IFACE_("Annotation Line Draw: Hold and drag LMB to draw | "
- "ESC/Enter to end (or click outside this area)"));
+ TIP_("Annotation Line Draw: Hold and drag LMB to draw | "
+ "ESC/Enter to end (or click outside this area)"));
break;
case GP_PAINTMODE_DRAW:
ED_workspace_status_text(C,
- IFACE_("Annotation Freehand Draw: Hold and drag LMB to draw | "
- "E/ESC/Enter to end (or click outside this area)"));
+ TIP_("Annotation Freehand Draw: Hold and drag LMB to draw | "
+ "E/ESC/Enter to end (or click outside this area)"));
break;
case GP_PAINTMODE_DRAW_POLY:
ED_workspace_status_text(
C,
- IFACE_("Annotation Create Poly: LMB click to place next stroke vertex | "
- "ESC/Enter to end (or click outside this area)"));
+ TIP_("Annotation Create Poly: LMB click to place next stroke vertex | "
+ "ESC/Enter to end (or click outside this area)"));
break;
default: /* unhandled future cases */
ED_workspace_status_text(
- C, IFACE_("Annotation Session: ESC/Enter to end (or click outside this area)"));
+ C, TIP_("Annotation Session: ESC/Enter to end (or click outside this area)"));
break;
}
break;
diff --git a/source/blender/editors/gpencil/gpencil_armature.c b/source/blender/editors/gpencil/gpencil_armature.c
index 068a77b769c..08f752bb72e 100644
--- a/source/blender/editors/gpencil/gpencil_armature.c
+++ b/source/blender/editors/gpencil/gpencil_armature.c
@@ -15,11 +15,12 @@
*
* The Original Code is Copyright (C) 2018, Blender Foundation
* This is a new part of Blender
- * Operators for dealing with armatures and GP datablocks
*/
/** \file
* \ingroup edgpencil
+ *
+ * Operators for dealing with armatures and GP data-blocks.
*/
#include <stdio.h>
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index 3274f9657db..f5b27d8268d 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -1182,9 +1182,9 @@ static void gpsculpt_brush_header_set(bContext *C, tGP_BrushEditData *gso)
BLI_snprintf(str,
sizeof(str),
- IFACE_("GPencil Sculpt: %s Stroke | LMB to paint | RMB/Escape to Exit"
- " | Ctrl to Invert Action | Wheel Up/Down for Size "
- " | Shift-Wheel Up/Down for Strength"),
+ TIP_("GPencil Sculpt: %s Stroke | LMB to paint | RMB/Escape to Exit"
+ " | Ctrl to Invert Action | Wheel Up/Down for Size "
+ " | Shift-Wheel Up/Down for Strength"),
(brush_name) ? brush_name : "<?>");
ED_workspace_status_text(C, str);
@@ -2130,6 +2130,7 @@ static int gpsculpt_brush_modal(bContext *C, wmOperator *op, const wmEvent *even
return OPERATOR_RUNNING_MODAL;
}
+/* Also used for weight paint. */
void GPENCIL_OT_sculpt_paint(wmOperatorType *ot)
{
/* identifiers */
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index ca5c8ae70e4..a7072facf36 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -15,11 +15,12 @@
*
* The Original Code is Copyright (C) 2008, Blender Foundation
* This is a new part of Blender
- * Operators for dealing with GP datablocks and layers
*/
/** \file
* \ingroup edgpencil
+ *
+ * Operators for dealing with GP data-blocks and layers.
*/
#include <stdio.h>
@@ -539,7 +540,7 @@ static int gp_layer_duplicate_object_exec(bContext *C, wmOperator *op)
Material *ma_src = give_current_material(ob_src, gps_src->mat_nr + 1);
int idx = BKE_gpencil_object_material_ensure(bmain, ob_dst, ma_src);
- /* reasign the stroke material to the right slot in destination object */
+ /* Reassign the stroke material to the right slot in destination object. */
gps_dst->mat_nr = idx;
/* add new stroke to frame */
@@ -1077,7 +1078,7 @@ static int gp_isolate_layer_exec(bContext *C, wmOperator *op)
}
/* Set/Clear flags as appropriate */
- /* TODO: Include onionskinning on this list? */
+ /* TODO: Include onion-skinning on this list? */
if (isolate) {
/* Set flags on all "other" layers */
for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
@@ -2322,7 +2323,7 @@ int ED_gpencil_join_objects_exec(bContext *C, wmOperator *op)
for (bGPDframe *gpf = gpl_new->frames.first; gpf; gpf = gpf->next) {
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
- /* reasign material. Look old material and try to find in dst */
+ /* Reassign material. Look old material and try to find in destination. */
ma_src = give_current_material(ob_src, gps->mat_nr + 1);
gps->mat_nr = BKE_gpencil_object_material_ensure(bmain, ob_dst, ma_src);
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 9366eb6bc2b..9588d4bb570 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -994,7 +994,7 @@ ListBase gp_strokes_copypastebuf = {NULL, NULL};
/* Hash for hanging on to all the colors used by strokes in the buffer
*
- * This is needed to prevent dangling and unsafe pointers when pasting across datablocks,
+ * This is needed to prevent dangling and unsafe pointers when pasting across data-blocks,
* or after a color used by a stroke in the buffer gets deleted (via user action or undo).
*/
static GHash *gp_strokes_copypastebuf_colors = NULL;
@@ -4026,7 +4026,7 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op)
/* make copy of source stroke */
bGPDstroke *gps_dst = BKE_gpencil_stroke_duplicate(gps);
- /* reasign material */
+ /* Reassign material. */
gps_dst->mat_nr = idx;
/* link to destination frame */
@@ -4052,7 +4052,7 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op)
gps->prev = gps->next = NULL;
/* relink to destination frame */
BLI_addtail(&gpf_dst->strokes, gps);
- /* reasign material */
+ /* Reassign material. */
gps->mat_nr = idx;
}
}
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index bf15b846bb6..df27198922c 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -1141,7 +1141,7 @@ static void gpencil_stroke_from_buffer(tGPDfill *tgpf)
/* Helper: Draw status message while the user is running the operator */
static void gpencil_fill_status_indicators(bContext *C, tGPDfill *UNUSED(tgpf))
{
- const char *status_str = IFACE_("Fill: ESC/RMB cancel, LMB Fill, Shift Draw on Back");
+ const char *status_str = TIP_("Fill: ESC/RMB cancel, LMB Fill, Shift Draw on Back");
ED_workspace_status_text(C, status_str);
}
diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c
index d83cc7858bd..8a9f7c1224a 100644
--- a/source/blender/editors/gpencil/gpencil_interpolate.c
+++ b/source/blender/editors/gpencil/gpencil_interpolate.c
@@ -377,7 +377,7 @@ static void gpencil_interpolate_status_indicators(bContext *C, tGPDinterpolate *
char status_str[UI_MAX_DRAW_STR];
char msg_str[UI_MAX_DRAW_STR];
- BLI_strncpy(msg_str, IFACE_("GPencil Interpolation: "), UI_MAX_DRAW_STR);
+ BLI_strncpy(msg_str, TIP_("GPencil Interpolation: "), UI_MAX_DRAW_STR);
if (hasNumInput(&p->num)) {
char str_offs[NUM_STR_REP_LEN];
@@ -395,7 +395,7 @@ static void gpencil_interpolate_status_indicators(bContext *C, tGPDinterpolate *
ED_area_status_text(p->sa, status_str);
ED_workspace_status_text(
- C, IFACE_("ESC/RMB to cancel, Enter/LMB to confirm, WHEEL/MOVE to adjust factor"));
+ C, TIP_("ESC/RMB to cancel, Enter/LMB to confirm, WHEEL/MOVE to adjust factor"));
}
/* Update screen and stroke */
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 14bb955cf84..041704d8473 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -2480,22 +2480,21 @@ static void gpencil_draw_status_indicators(bContext *C, tGPsdata *p)
case GP_PAINTMODE_ERASER: {
ED_workspace_status_text(
C,
- IFACE_("Grease Pencil Erase Session: Hold and drag LMB or RMB to erase | "
- "ESC/Enter to end (or click outside this area)"));
+ TIP_("Grease Pencil Erase Session: Hold and drag LMB or RMB to erase | "
+ "ESC/Enter to end (or click outside this area)"));
break;
}
case GP_PAINTMODE_DRAW_STRAIGHT: {
- ED_workspace_status_text(
- C,
- IFACE_("Grease Pencil Line Session: Hold and drag LMB to draw | "
- "ESC/Enter to end (or click outside this area)"));
+ ED_workspace_status_text(C,
+ TIP_("Grease Pencil Line Session: Hold and drag LMB to draw | "
+ "ESC/Enter to end (or click outside this area)"));
break;
}
case GP_PAINTMODE_SET_CP: {
ED_workspace_status_text(
C,
- IFACE_("Grease Pencil Guides: LMB click and release to place reference point | "
- "Esc/RMB to cancel"));
+ TIP_("Grease Pencil Guides: LMB click and release to place reference point | "
+ "Esc/RMB to cancel"));
break;
}
case GP_PAINTMODE_DRAW: {
@@ -2503,26 +2502,26 @@ static void gpencil_draw_status_indicators(bContext *C, tGPsdata *p)
if (guide->use_guide) {
ED_workspace_status_text(
C,
- IFACE_("Grease Pencil Freehand Session: Hold and drag LMB to draw | "
- "M key to flip guide | O key to move reference point"));
+ TIP_("Grease Pencil Freehand Session: Hold and drag LMB to draw | "
+ "M key to flip guide | O key to move reference point"));
}
else {
ED_workspace_status_text(
- C, IFACE_("Grease Pencil Freehand Session: Hold and drag LMB to draw"));
+ C, TIP_("Grease Pencil Freehand Session: Hold and drag LMB to draw"));
}
break;
}
case GP_PAINTMODE_DRAW_POLY: {
ED_workspace_status_text(
C,
- IFACE_("Grease Pencil Poly Session: LMB click to place next stroke vertex | "
- "Release Shift/ESC/Enter to end (or click outside this area)"));
+ TIP_("Grease Pencil Poly Session: LMB click to place next stroke vertex | "
+ "Release Shift/ESC/Enter to end (or click outside this area)"));
break;
}
default: /* unhandled future cases */
{
ED_workspace_status_text(
- C, IFACE_("Grease Pencil Session: ESC/Enter to end (or click outside this area)"));
+ C, TIP_("Grease Pencil Session: ESC/Enter to end (or click outside this area)"));
break;
}
}
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c
index d6497e6e58e..b10801fc87f 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -400,32 +400,32 @@ static void gpencil_primitive_status_indicators(bContext *C, tGPDprimitive *tgpi
if (tgpi->type == GP_STROKE_LINE) {
BLI_strncpy(msg_str,
- IFACE_("Line: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- to "
- "adjust subdivision number, Shift to align, Alt to center, E: extrude"),
+ TIP_("Line: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- to "
+ "adjust subdivision number, Shift to align, Alt to center, E: extrude"),
UI_MAX_DRAW_STR);
}
else if (tgpi->type == GP_STROKE_BOX) {
BLI_strncpy(msg_str,
- IFACE_("Rectangle: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- "
- "to adjust subdivision number, Shift to square, Alt to center"),
+ TIP_("Rectangle: ESC to cancel, LMB set origin, Enter/MMB to confirm, WHEEL/+- "
+ "to adjust subdivision number, Shift to square, Alt to center"),
UI_MAX_DRAW_STR);
}
else if (tgpi->type == GP_STROKE_CIRCLE) {
BLI_strncpy(msg_str,
- IFACE_("Circle: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust edge "
- "number, Shift to square, Alt to center"),
+ TIP_("Circle: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust edge "
+ "number, Shift to square, Alt to center"),
UI_MAX_DRAW_STR);
}
else if (tgpi->type == GP_STROKE_ARC) {
BLI_strncpy(msg_str,
- IFACE_("Arc: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust edge number, "
- "Shift to square, Alt to center, M: Flip, E: extrude"),
+ TIP_("Arc: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust edge number, "
+ "Shift to square, Alt to center, M: Flip, E: extrude"),
UI_MAX_DRAW_STR);
}
else if (tgpi->type == GP_STROKE_CURVE) {
BLI_strncpy(msg_str,
- IFACE_("Curve: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust edge "
- "number, Shift to square, Alt to center, E: extrude"),
+ TIP_("Curve: ESC to cancel, Enter/MMB to confirm, WHEEL/+- to adjust edge "
+ "number, Shift to square, Alt to center, E: extrude"),
UI_MAX_DRAW_STR);
}
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index 3eb277ad776..aca59e2868f 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -216,6 +216,9 @@ void ED_armature_ebone_to_mat4(EditBone *ebone, float mat[4][4]);
void ED_armature_ebone_from_mat3(EditBone *ebone, float mat[3][3]);
void ED_armature_ebone_from_mat4(EditBone *ebone, float mat[4][4]);
+void ED_armature_ebone_transform_mirror_update(struct bArmature *arm,
+ EditBone *ebo,
+ bool check_select);
void ED_armature_edit_transform_mirror_update(struct Object *obedit);
void ED_armature_origin_set(
struct Main *bmain, struct Object *ob, const float cursor[3], int centermode, int around);
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 85e5ea1aee4..e59431d265d 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -7182,8 +7182,10 @@ void UI_but_tooltip_refresh(bContext *C, uiBut *but)
}
}
-/* removes tooltip timer from active but
- * (meaning tooltip is disabled until it's reenabled again) */
+/**
+ * Removes tool-tip timer from active but
+ * (meaning tool-tip is disabled until it's re-enabled again).
+ */
void UI_but_tooltip_timer_remove(bContext *C, uiBut *but)
{
uiHandleButtonData *data;
@@ -8511,7 +8513,7 @@ static void ui_handle_button_return_submenu(bContext *C, const wmEvent *event, u
/**
* Function used to prevent losing the open menu when using nested pull-downs,
- * when moving mouse towards the pulldown menu over other buttons that could
+ * when moving mouse towards the pull-down menu over other buttons that could
* steal the highlight from the current button, only checks:
*
* - while mouse moves in triangular area defined old mouse position and
diff --git a/source/blender/editors/interface/interface_query.c b/source/blender/editors/interface/interface_query.c
index b0fd0cdc35f..462183b4245 100644
--- a/source/blender/editors/interface/interface_query.c
+++ b/source/blender/editors/interface/interface_query.c
@@ -528,8 +528,8 @@ bool ui_region_contains_point_px(const ARegion *ar, int x, int y)
return false;
}
- /* also, check that with view2d, that the mouse is not over the scrollbars
- * NOTE: care is needed here, since the mask rect may include the scrollbars
+ /* also, check that with view2d, that the mouse is not over the scroll-bars
+ * NOTE: care is needed here, since the mask rect may include the scroll-bars
* even when they are not visible, so we need to make a copy of the mask to
* use to check
*/
diff --git a/source/blender/editors/interface/interface_region_tooltip.c b/source/blender/editors/interface/interface_region_tooltip.c
index 6c780482777..9d1b6fc92fc 100644
--- a/source/blender/editors/interface/interface_region_tooltip.c
+++ b/source/blender/editors/interface/interface_region_tooltip.c
@@ -657,7 +657,7 @@ static uiTooltipData *ui_tooltip_data_from_button(bContext *C, uiBut *but)
.style = UI_TIP_STYLE_NORMAL,
.color_id = UI_TIP_LC_NORMAL,
});
- field->text = BLI_strdup(IFACE_("(Shift-Click/Drag to select multiple)"));
+ field->text = BLI_strdup(TIP_("(Shift-Click/Drag to select multiple)"));
}
}
/* Enum field label & tip */
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index e1d3bd736e7..4efa024ac77 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -1723,7 +1723,7 @@ void uiTemplatePathBuilder(uiLayout *layout,
/************************ Modifier Template *************************/
-#define ERROR_LIBDATA_MESSAGE IFACE_("Can't edit external library data")
+#define ERROR_LIBDATA_MESSAGE TIP_("Can't edit external library data")
static void modifiers_convertToReal(bContext *C, void *ob_v, void *md_v)
{
@@ -2550,7 +2550,7 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
/* Set but-locks for protected settings (magic numbers are used here!) */
if (proxy_protected) {
- UI_block_lock_set(block, true, IFACE_("Cannot edit Proxy-Protected Constraint"));
+ UI_block_lock_set(block, true, TIP_("Cannot edit Proxy-Protected Constraint"));
}
/* Draw constraint data */
@@ -3079,7 +3079,7 @@ static void colorband_update_cb(bContext *UNUSED(C), void *bt_v, void *coba_v)
uiBut *bt = bt_v;
ColorBand *coba = coba_v;
- /* sneaky update here, we need to sort the colorband points to be in order,
+ /* Sneaky update here, we need to sort the color-band points to be in order,
* however the RNA pointer then is wrong, so we update it */
BKE_colorband_update_sort(coba);
bt->rnapoin.data = coba->data + coba->cur;
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index f654fbcdc1e..6c9c36c0d7f 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -1654,7 +1654,7 @@ float UI_text_clip_middle_ex(const uiFontStyle *fstyle,
if ((okwidth > 0.0f) && (strwidth > okwidth)) {
/* utf8 two-dots leader '..' (shorter than ellipsis '...'),
- * some compilers complain with real litteral string. */
+ * some compilers complain with real literal string. */
const char sep[] = {0xe2, 0x80, 0xA5, 0x0};
const int sep_len = sizeof(sep) - 1;
const float sep_strwidth = BLF_width(fstyle->uifont_id, sep, sep_len + 1);
@@ -3800,7 +3800,7 @@ static void widget_swatch(
if (state & (UI_BUT_DISABLED | UI_BUT_INACTIVE)) {
/* Now we reduce alpha of the inner color (i.e. the color shown)
* so that this setting can look grayed out, while retaining
- * the checkboard (for transparent values). This is needed
+ * the checkerboard (for transparent values). This is needed
* here as the effects of ui_widget_color_disabled() are overwritten.
*/
wcol->inner[3] /= 2;
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 26beb08dd28..cbda4767722 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -247,8 +247,7 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
cp = ts->header;
break;
case TH_HEADERDESEL:
- /* we calculate a dynamic builtin header deselect color,
- * also for pulldowns... */
+ /* We calculate a dynamic builtin header deselect color, also for pull-downs. */
cp = ts->header;
headerdesel[0] = cp[0] > 10 ? cp[0] - 10 : 0;
headerdesel[1] = cp[1] > 10 ? cp[1] - 10 : 0;
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 8931060abee..7d9b722fcc0 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -2031,7 +2031,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, const wmEvent *
const char in_scroller = UI_view2d_mouse_in_scrollers(ar, v2d, event->x, event->y);
/* if in a scroller, init customdata then set modal handler which will
- * catch mousedown to start doing useful stuff */
+ * catch mouse-down to start doing useful stuff */
if (in_scroller) {
v2dScrollerMove *vsm;
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index 5a7a84dbbc8..a205f6878e3 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -288,7 +288,7 @@ bool ED_mask_feather_find_nearest(const bContext *C,
uw = NULL;
}
else {
- uw = &cur_point_eval->uw[j - 1];
+ uw = &cur_point_orig->uw[j - 1];
}
point_masklay = masklay_orig;
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c
index 28153dc7716..78b4cfe38d4 100644
--- a/source/blender/editors/mesh/editmesh_bevel.c
+++ b/source/blender/editors/mesh/editmesh_bevel.c
@@ -169,19 +169,19 @@ static void edbm_bevel_update_header(bContext *C, wmOperator *op)
BLI_snprintf(header,
sizeof(header),
- IFACE_("%s: confirm, "
- "%s: cancel, "
- "%s: mode (%s), "
- "%s: width (%s), "
- "%s: segments (%d), "
- "%s: profile (%.3f), "
- "%s: clamp overlap (%s), "
- "%s: vertex only (%s), "
- "%s: outer miter (%s), "
- "%s: inner miter (%s), "
- "%s: harden normals (%s), "
- "%s: mark seam (%s), "
- "%s: mark sharp (%s)"),
+ TIP_("%s: confirm, "
+ "%s: cancel, "
+ "%s: mode (%s), "
+ "%s: width (%s), "
+ "%s: segments (%d), "
+ "%s: profile (%.3f), "
+ "%s: clamp overlap (%s), "
+ "%s: vertex only (%s), "
+ "%s: outer miter (%s), "
+ "%s: inner miter (%s), "
+ "%s: harden normals (%s), "
+ "%s: mark seam (%s), "
+ "%s: mark sharp (%s)"),
WM_MODALKEY(BEV_MODAL_CONFIRM),
WM_MODALKEY(BEV_MODAL_CANCEL),
WM_MODALKEY(BEV_MODAL_OFFSET_MODE_CHANGE),
diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c
index 1d173d8e396..283e147b77b 100644
--- a/source/blender/editors/mesh/editmesh_bisect.c
+++ b/source/blender/editors/mesh/editmesh_bisect.c
@@ -170,7 +170,7 @@ static int mesh_bisect_invoke(bContext *C, wmOperator *op, const wmEvent *event)
v3d->gizmo_flag = V3D_GIZMO_HIDE;
/* Initialize modal callout. */
- ED_workspace_status_text(C, IFACE_("LMB: Click and drag to draw cut line"));
+ ED_workspace_status_text(C, TIP_("LMB: Click and drag to draw cut line"));
}
MEM_freeN(objects);
return ret;
@@ -202,7 +202,7 @@ static int mesh_bisect_modal(bContext *C, wmOperator *op, const wmEvent *event)
/* update or clear modal callout */
if (event->type == EVT_MODAL_MAP) {
if (event->val == GESTURE_MODAL_BEGIN) {
- ED_workspace_status_text(C, IFACE_("LMB: Release to confirm cut line"));
+ ED_workspace_status_text(C, TIP_("LMB: Release to confirm cut line"));
}
else {
ED_workspace_status_text(C, NULL);
diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c
index 9c7b234028c..1413e0db41d 100644
--- a/source/blender/editors/mesh/editmesh_inset.c
+++ b/source/blender/editors/mesh/editmesh_inset.c
@@ -80,7 +80,7 @@ static void edbm_inset_update_header(wmOperator *op, bContext *C)
{
InsetData *opdata = op->customdata;
- const char *str = IFACE_(
+ const char *str = TIP_(
"Confirm: Enter/LClick, Cancel: (Esc/RClick), Thickness: %s, "
"Depth (Ctrl to tweak): %s (%s), Outset (O): (%s), Boundary (B): (%s), Individual (I): "
"(%s)");
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 976dbe01a22..bb584094580 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -280,11 +280,11 @@ static void knife_update_header(bContext *C, wmOperator *op, KnifeTool_OpData *k
BLI_snprintf(header,
sizeof(header),
- IFACE_("%s: confirm, %s: cancel, "
- "%s: start/define cut, %s: close cut, %s: new cut, "
- "%s: midpoint snap (%s), %s: ignore snap (%s), "
- "%s: angle constraint (%s), %s: cut through (%s), "
- "%s: panning"),
+ TIP_("%s: confirm, %s: cancel, "
+ "%s: start/define cut, %s: close cut, %s: new cut, "
+ "%s: midpoint snap (%s), %s: ignore snap (%s), "
+ "%s: angle constraint (%s), %s: cut through (%s), "
+ "%s: panning"),
WM_MODALKEY(KNF_MODAL_CONFIRM),
WM_MODALKEY(KNF_MODAL_CANCEL),
WM_MODALKEY(KNF_MODAL_ADD_CUT),
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index 59355890428..c7606758b63 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -451,8 +451,8 @@ static int loopcut_init(bContext *C, wmOperator *op, const wmEvent *event)
if (is_interactive) {
ED_workspace_status_text(
C,
- IFACE_("Select a ring to be cut, use mouse-wheel or page-up/down for number of cuts, "
- "hold Alt for smooth"));
+ TIP_("Select a ring to be cut, use mouse-wheel or page-up/down for number of cuts, "
+ "hold Alt for smooth"));
return OPERATOR_RUNNING_MODAL;
}
else {
@@ -668,7 +668,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event)
}
BLI_snprintf(buf,
sizeof(buf),
- IFACE_("Number of Cuts: %s, Smooth: %s (Alt)"),
+ TIP_("Number of Cuts: %s, Smooth: %s (Alt)"),
str_rep,
str_rep + NUM_STR_REP_LEN);
ED_workspace_status_text(C, buf);
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 60c6994eb2e..97bdb3a7a5d 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -7719,11 +7719,11 @@ static void point_normals_update_header(bContext *C, wmOperator *op)
BLI_snprintf(header,
sizeof(header),
- IFACE_("%s: confirm, %s: cancel, "
- "%s: point to mouse (%s), %s: point to Pivot, "
- "%s: point to object origin, %s: reset normals, "
- "%s: set & point to 3D cursor, %s: select & point to mesh item, "
- "%s: invert normals (%s), %s: spherize (%s), %s: align (%s)"),
+ TIP_("%s: confirm, %s: cancel, "
+ "%s: point to mouse (%s), %s: point to Pivot, "
+ "%s: point to object origin, %s: reset normals, "
+ "%s: set & point to 3D cursor, %s: select & point to mesh item, "
+ "%s: invert normals (%s), %s: spherize (%s), %s: align (%s)"),
WM_MODALKEY(EDBM_CLNOR_MODAL_CONFIRM),
WM_MODALKEY(EDBM_CLNOR_MODAL_CANCEL),
WM_MODALKEY(EDBM_CLNOR_MODAL_POINTTO_USE_MOUSE),
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 0b9ced84a59..99c3d7da2a2 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1417,6 +1417,7 @@ void OBJECT_OT_collection_instance_add(wmOperatorType *ot)
static int object_speaker_add_exec(bContext *C, wmOperator *op)
{
+ Main *bmain = CTX_data_main(C);
Object *ob;
ushort local_view_bits;
float loc[3], rot[3];
@@ -1434,7 +1435,7 @@ static int object_speaker_add_exec(bContext *C, wmOperator *op)
/* create new data for NLA hierarchy */
AnimData *adt = BKE_animdata_add_id(&ob->id);
NlaTrack *nlt = BKE_nlatrack_add(adt, NULL);
- NlaStrip *strip = BKE_nla_add_soundstrip(scene, ob->data);
+ NlaStrip *strip = BKE_nla_add_soundstrip(bmain, scene, ob->data);
strip->start = CFRA;
strip->end += strip->start;
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index f748fd247ee..1446ea23bb8 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -29,19 +29,20 @@
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
-#include "DNA_mesh_types.h"
+#include "DNA_camera_types.h"
#include "DNA_collection_types.h"
#include "DNA_constraint_types.h"
+#include "DNA_gpencil_types.h"
#include "DNA_light_types.h"
#include "DNA_lattice_types.h"
#include "DNA_material_types.h"
+#include "DNA_mesh_types.h"
#include "DNA_meta_types.h"
+#include "DNA_object_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
-#include "DNA_world_types.h"
-#include "DNA_object_types.h"
#include "DNA_vfont_types.h"
-#include "DNA_gpencil_types.h"
+#include "DNA_world_types.h"
#include "BLI_math.h"
#include "BLI_listbase.h"
@@ -1852,7 +1853,7 @@ static void single_obdata_users(
{
Light *la;
Curve *cu;
- /* Camera *cam; */
+ Camera *cam;
Mesh *me;
Lattice *lat;
ID *id;
@@ -1869,7 +1870,8 @@ static void single_obdata_users(
ob->data = la = ID_NEW_SET(ob->data, BKE_light_copy(bmain, ob->data));
break;
case OB_CAMERA:
- ob->data = ID_NEW_SET(ob->data, BKE_camera_copy(bmain, ob->data));
+ cam = ob->data = ID_NEW_SET(ob->data, BKE_camera_copy(bmain, ob->data));
+ ID_NEW_REMAP(cam->dof.focus_object);
break;
case OB_MESH:
/* Needed to remap texcomesh below. */
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 1e85c895f71..0d92e1ae378 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -418,21 +418,21 @@ static void make_renderinfo_string(const RenderStats *rs,
/* local view */
if (rs->localview) {
- spos += sprintf(spos, "%s | ", IFACE_("3D Local View"));
+ spos += sprintf(spos, "%s | ", TIP_("3D Local View"));
}
else if (v3d_override) {
- spos += sprintf(spos, "%s | ", IFACE_("3D View"));
+ spos += sprintf(spos, "%s | ", TIP_("3D View"));
}
/* frame number */
- spos += sprintf(spos, IFACE_("Frame:%d "), (scene->r.cfra));
+ spos += sprintf(spos, TIP_("Frame:%d "), (scene->r.cfra));
/* previous and elapsed time */
BLI_timecode_string_from_time_simple(info_time_str, sizeof(info_time_str), rs->lastframetime);
if (rs->infostr && rs->infostr[0]) {
if (rs->lastframetime != 0.0) {
- spos += sprintf(spos, IFACE_("| Last:%s "), info_time_str);
+ spos += sprintf(spos, TIP_("| Last:%s "), info_time_str);
}
else {
spos += sprintf(spos, "| ");
@@ -445,7 +445,7 @@ static void make_renderinfo_string(const RenderStats *rs,
spos += sprintf(spos, "| ");
}
- spos += sprintf(spos, IFACE_("Time:%s "), info_time_str);
+ spos += sprintf(spos, TIP_("Time:%s "), info_time_str);
/* statistics */
if (rs->statstr) {
@@ -459,43 +459,43 @@ static void make_renderinfo_string(const RenderStats *rs,
}
if (rs->totvert) {
- spos += sprintf(spos, IFACE_("Ve:%d "), rs->totvert);
+ spos += sprintf(spos, TIP_("Ve:%d "), rs->totvert);
}
if (rs->totface) {
- spos += sprintf(spos, IFACE_("Fa:%d "), rs->totface);
+ spos += sprintf(spos, TIP_("Fa:%d "), rs->totface);
}
if (rs->tothalo) {
- spos += sprintf(spos, IFACE_("Ha:%d "), rs->tothalo);
+ spos += sprintf(spos, TIP_("Ha:%d "), rs->tothalo);
}
if (rs->totstrand) {
- spos += sprintf(spos, IFACE_("St:%d "), rs->totstrand);
+ spos += sprintf(spos, TIP_("St:%d "), rs->totstrand);
}
if (rs->totlamp) {
- spos += sprintf(spos, IFACE_("Li:%d "), rs->totlamp);
+ spos += sprintf(spos, TIP_("Li:%d "), rs->totlamp);
}
if (rs->mem_peak == 0.0f) {
spos += sprintf(spos,
- IFACE_("| Mem:%.2fM (%.2fM, Peak %.2fM) "),
+ TIP_("| Mem:%.2fM (%.2fM, Peak %.2fM) "),
megs_used_memory,
mmap_used_memory,
megs_peak_memory);
}
else {
- spos += sprintf(spos, IFACE_("| Mem:%.2fM, Peak: %.2fM "), rs->mem_used, rs->mem_peak);
+ spos += sprintf(spos, TIP_("| Mem:%.2fM, Peak: %.2fM "), rs->mem_used, rs->mem_peak);
}
if (rs->curfield) {
- spos += sprintf(spos, IFACE_("Field %d "), rs->curfield);
+ spos += sprintf(spos, TIP_("Field %d "), rs->curfield);
}
if (rs->curblur) {
- spos += sprintf(spos, IFACE_("Blur %d "), rs->curblur);
+ spos += sprintf(spos, TIP_("Blur %d "), rs->curblur);
}
}
/* full sample */
if (rs->curfsa) {
- spos += sprintf(spos, IFACE_("| Full Sample %d "), rs->curfsa);
+ spos += sprintf(spos, TIP_("| Full Sample %d "), rs->curfsa);
}
/* extra info */
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index 845f60e9ad1..110dc7aaaf1 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -51,6 +51,7 @@
#include "BKE_writeavi.h"
#include "DEG_depsgraph.h"
+#include "DEG_depsgraph_query.h"
#include "DRW_engine.h"
@@ -798,11 +799,12 @@ static bool screen_opengl_render_anim_initialize(bContext *C, wmOperator *op)
oglrender->movie_ctx_arr = MEM_mallocN(sizeof(void *) * oglrender->totvideos, "Movies");
for (i = 0; i < oglrender->totvideos; i++) {
+ Scene *scene_eval = DEG_get_evaluated_scene(oglrender->depsgraph);
const char *suffix = BKE_scene_multiview_view_id_suffix_get(&scene->r, i);
oglrender->movie_ctx_arr[i] = oglrender->mh->context_create();
if (!oglrender->mh->start_movie(oglrender->movie_ctx_arr[i],
- scene,
+ scene_eval,
&scene->r,
oglrender->sizex,
oglrender->sizey,
diff --git a/source/blender/editors/screen/screen_user_menu.c b/source/blender/editors/screen/screen_user_menu.c
index 08b9d010f79..86be939d41b 100644
--- a/source/blender/editors/screen/screen_user_menu.c
+++ b/source/blender/editors/screen/screen_user_menu.c
@@ -289,8 +289,8 @@ static void screen_user_menu_draw(const bContext *C, Menu *menu)
}
if (is_empty) {
- uiItemL(menu->layout, IFACE_("No menu items found"), ICON_NONE);
- uiItemL(menu->layout, IFACE_("Right click on buttons to add them to this menu"), ICON_NONE);
+ uiItemL(menu->layout, TIP_("No menu items found"), ICON_NONE);
+ uiItemL(menu->layout, TIP_("Right click on buttons to add them to this menu"), ICON_NONE);
}
}
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 2bbb99b2b67..41dfd6f68c3 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -952,10 +952,10 @@ static void sample_color_update_header(SampleColorData *data, bContext *C)
if (sa) {
BLI_snprintf(msg,
sizeof(msg),
- IFACE_("Sample color for %s"),
+ TIP_("Sample color for %s"),
!data->sample_palette ?
- IFACE_("Brush. Use Left Click to sample for palette instead") :
- IFACE_("Palette. Use Left Click to sample more colors"));
+ TIP_("Brush. Use Left Click to sample for palette instead") :
+ TIP_("Palette. Use Left Click to sample more colors"));
ED_workspace_status_text(C, msg);
}
}
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index bae79d5ea60..6f20b853881 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -3912,7 +3912,7 @@ static void proj_paint_state_thread_init(ProjPaintState *ps, const bool reset_th
/* Thread stuff
*
- * very small brushes run a lot slower multithreaded since the advantage with
+ * very small brushes run a lot slower multi-threaded since the advantage with
* threads is being able to fill in multiple buckets at once.
* Only use threads for bigger brushes. */
@@ -5104,7 +5104,7 @@ static void image_paint_partial_redraw_expand(ImagePaintPartialRedraw *cell,
cell->y2 = max_ii(cell->y2, (int)projPixel->y_px + 1);
}
-/* run this for single and multithreaded painting */
+/* Run this for single and multi-threaded painting. */
static void do_projectpaint_thread(TaskPool *__restrict UNUSED(pool),
void *ph_v,
int UNUSED(threadid))
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 0e18e5eb343..c902b6a0551 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -6398,7 +6398,7 @@ static int sculpt_sample_detail_size_exec(bContext *C, wmOperator *op)
static int sculpt_sample_detail_size_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(e))
{
- ED_workspace_status_text(C, "Click on the mesh to set the detail");
+ ED_workspace_status_text(C, TIP_("Click on the mesh to set the detail"));
WM_cursor_modal_set(CTX_wm_window(C), BC_EYEDROPPER_CURSOR);
WM_event_add_modal_handler(C, op);
return OPERATOR_RUNNING_MODAL;
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index fc2970f4c31..7cc222ea529 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -1739,7 +1739,7 @@ static void mouse_action_keys(bAnimContext *ac,
if (column) {
/* select all keyframes in the same frame as the one we hit on the active channel
* [T41077]: "frame" not "selx" here (i.e. no NLA corrections yet) as the code here
- * does that itself again as it needs to work on multiple datablocks
+ * does that itself again as it needs to work on multiple data-blocks.
*/
actkeys_mselect_column(ac, select_mode, frame);
}
diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c
index b9b83abf670..87ea011e0a7 100644
--- a/source/blender/editors/space_buttons/buttons_texture.c
+++ b/source/blender/editors/space_buttons/buttons_texture.c
@@ -483,7 +483,7 @@ void uiTemplateTextureUser(uiLayout *layout, bContext *C)
user = ct->user;
if (!user) {
- uiItemL(layout, IFACE_("No textures in context"), ICON_NONE);
+ uiItemL(layout, TIP_("No textures in context"), ICON_NONE);
return;
}
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c
index 2496b16ffae..45707d74d2e 100644
--- a/source/blender/editors/space_clip/clip_buttons.c
+++ b/source/blender/editors/space_clip/clip_buttons.c
@@ -814,27 +814,27 @@ void uiTemplateMovieclipInformation(uiLayout *layout,
/* Display frame dimensions, channels number and byffer type. */
BKE_movieclip_get_size(clip, user, &width, &height);
- ofs += BLI_snprintf(str + ofs, sizeof(str) - ofs, IFACE_("%d x %d"), width, height);
+ ofs += BLI_snprintf(str + ofs, sizeof(str) - ofs, TIP_("%d x %d"), width, height);
if (ibuf) {
if (ibuf->rect_float) {
if (ibuf->channels != 4) {
ofs += BLI_snprintf(
- str + ofs, sizeof(str) - ofs, IFACE_(", %d float channel(s)"), ibuf->channels);
+ str + ofs, sizeof(str) - ofs, TIP_(", %d float channel(s)"), ibuf->channels);
}
else if (ibuf->planes == R_IMF_PLANES_RGBA) {
- ofs += BLI_strncpy_rlen(str + ofs, IFACE_(", RGBA float"), sizeof(str) - ofs);
+ ofs += BLI_strncpy_rlen(str + ofs, TIP_(", RGBA float"), sizeof(str) - ofs);
}
else {
- ofs += BLI_strncpy_rlen(str + ofs, IFACE_(", RGB float"), sizeof(str) - ofs);
+ ofs += BLI_strncpy_rlen(str + ofs, TIP_(", RGB float"), sizeof(str) - ofs);
}
}
else {
if (ibuf->planes == R_IMF_PLANES_RGBA) {
- ofs += BLI_strncpy_rlen(str + ofs, IFACE_(", RGBA byte"), sizeof(str) - ofs);
+ ofs += BLI_strncpy_rlen(str + ofs, TIP_(", RGBA byte"), sizeof(str) - ofs);
}
else {
- ofs += BLI_strncpy_rlen(str + ofs, IFACE_(", RGB byte"), sizeof(str) - ofs);
+ ofs += BLI_strncpy_rlen(str + ofs, TIP_(", RGB byte"), sizeof(str) - ofs);
}
}
@@ -843,12 +843,12 @@ void uiTemplateMovieclipInformation(uiLayout *layout,
float frs_sec_base;
if (IMB_anim_get_fps(clip->anim, &frs_sec, &frs_sec_base, true)) {
ofs += BLI_snprintf(
- str + ofs, sizeof(str) - ofs, IFACE_(", %.2f fps"), (float)frs_sec / frs_sec_base);
+ str + ofs, sizeof(str) - ofs, TIP_(", %.2f fps"), (float)frs_sec / frs_sec_base);
}
}
}
else {
- ofs += BLI_strncpy_rlen(str + ofs, IFACE_(", failed to load"), sizeof(str) - ofs);
+ ofs += BLI_strncpy_rlen(str + ofs, TIP_(", failed to load"), sizeof(str) - ofs);
}
uiItemL(col, str, ICON_NONE);
@@ -856,10 +856,10 @@ void uiTemplateMovieclipInformation(uiLayout *layout,
/* Display current frame number. */
framenr = BKE_movieclip_remap_scene_to_clip_frame(clip, user->framenr);
if (framenr <= clip->len) {
- BLI_snprintf(str, sizeof(str), IFACE_("Frame: %d / %d"), framenr, clip->len);
+ BLI_snprintf(str, sizeof(str), TIP_("Frame: %d / %d"), framenr, clip->len);
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Frame: - / %d"), clip->len);
+ BLI_snprintf(str, sizeof(str), TIP_("Frame: - / %d"), clip->len);
}
uiItemL(col, str, ICON_NONE);
@@ -876,7 +876,7 @@ void uiTemplateMovieclipInformation(uiLayout *layout,
file = "-";
}
- BLI_snprintf(str, sizeof(str), IFACE_("File: %s"), file);
+ BLI_snprintf(str, sizeof(str), TIP_("File: %s"), file);
uiItemL(col, str, ICON_NONE);
}
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index 2de01e0b7ec..d8d50ba72b5 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -152,7 +152,7 @@ void CLIP_OT_add_marker(wmOperatorType *ot)
static int add_marker_at_click_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
- ED_workspace_status_text(C, IFACE_("Use LMB click to define location where place the marker"));
+ ED_workspace_status_text(C, TIP_("Use LMB click to define location where place the marker"));
/* Add modal handler for ESC. */
WM_event_add_modal_handler(C, op);
diff --git a/source/blender/editors/space_clip/tracking_ops_track.c b/source/blender/editors/space_clip/tracking_ops_track.c
index e7880331331..e9a685f9e21 100644
--- a/source/blender/editors/space_clip/tracking_ops_track.c
+++ b/source/blender/editors/space_clip/tracking_ops_track.c
@@ -44,6 +44,8 @@
#include "PIL_time.h"
+#include "DEG_depsgraph.h"
+
#include "clip_intern.h" // own include
#include "tracking_ops_intern.h"
@@ -271,6 +273,7 @@ static void track_markers_endjob(void *tmv)
BKE_autotrack_context_sync(tmj->context);
BKE_autotrack_context_finish(tmj->context);
+ DEG_id_tag_update(&tmj->clip->id, ID_RECALC_COPY_ON_WRITE);
WM_main_add_notifier(NC_SCENE | ND_FRAME, tmj->scene);
}
@@ -426,6 +429,7 @@ static int refine_marker_exec(bContext *C, wmOperator *op)
}
}
+ DEG_id_tag_update(&clip->id, ID_RECALC_COPY_ON_WRITE);
WM_event_add_notifier(C, NC_MOVIECLIP | NA_EVALUATED, clip);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index f2d1b6eab83..9004eaa7bf6 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -2094,7 +2094,7 @@ static bool file_is_blend_backup(const char *str)
}
/* TODO: Maybe we should move this to BLI?
- * On the other hand, it's using defines from spacefile area, so not sure... */
+ * On the other hand, it's using defines from space-file area, so not sure... */
int ED_path_extension_type(const char *path)
{
if (BLO_has_bfile_extension(path)) {
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index 3b1e70b8db7..cdb5e672f4a 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -952,29 +952,28 @@ static void graph_draw_driver_settings_panel(uiLayout *layout,
block = uiLayoutGetBlock(col);
if (driver->flag & DRIVER_FLAG_INVALID) {
- uiItemL(col, IFACE_("ERROR: Invalid Python expression"), ICON_CANCEL);
+ uiItemL(col, TIP_("ERROR: Invalid Python expression"), ICON_CANCEL);
}
else if (!BKE_driver_has_simple_expression(driver)) {
if ((G.f & G_FLAG_SCRIPT_AUTOEXEC) == 0) {
/* TODO: Add button to enable? */
- uiItemL(col, IFACE_("WARNING: Python expressions limited for security"), ICON_ERROR);
+ uiItemL(col, TIP_("WARNING: Python expressions limited for security"), ICON_ERROR);
}
else {
- uiItemL(col, IFACE_("Slow Python expression"), ICON_INFO);
+ uiItemL(col, TIP_("Slow Python expression"), ICON_INFO);
}
}
/* Explicit bpy-references are evil. Warn about these to prevent errors */
/* TODO: put these in a box? */
if (bpy_data_expr_error || bpy_ctx_expr_error) {
- uiItemL(col, IFACE_("WARNING: Driver expression may not work correctly"), ICON_HELP);
+ uiItemL(col, TIP_("WARNING: Driver expression may not work correctly"), ICON_HELP);
if (bpy_data_expr_error) {
- uiItemL(
- col, IFACE_("TIP: Use variables instead of bpy.data paths (see below)"), ICON_ERROR);
+ uiItemL(col, TIP_("TIP: Use variables instead of bpy.data paths (see below)"), ICON_ERROR);
}
if (bpy_ctx_expr_error) {
- uiItemL(col, IFACE_("TIP: bpy.context is not safe for renderfarm usage"), ICON_ERROR);
+ uiItemL(col, TIP_("TIP: bpy.context is not safe for renderfarm usage"), ICON_ERROR);
}
}
}
@@ -984,7 +983,7 @@ static void graph_draw_driver_settings_panel(uiLayout *layout,
block = uiLayoutGetBlock(col);
if (driver->flag & DRIVER_FLAG_INVALID) {
- uiItemL(col, IFACE_("ERROR: Invalid target channel(s)"), ICON_ERROR);
+ uiItemL(col, TIP_("ERROR: Invalid target channel(s)"), ICON_ERROR);
}
/* Warnings about a lack of variables
@@ -994,11 +993,11 @@ static void graph_draw_driver_settings_panel(uiLayout *layout,
* property animation
*/
if (BLI_listbase_is_empty(&driver->variables)) {
- uiItemL(col, IFACE_("ERROR: Driver is useless without any inputs"), ICON_ERROR);
+ uiItemL(col, TIP_("ERROR: Driver is useless without any inputs"), ICON_ERROR);
if (!BLI_listbase_is_empty(&fcu->modifiers)) {
- uiItemL(col, IFACE_("TIP: Use F-Curves for procedural animation instead"), ICON_INFO);
- uiItemL(col, IFACE_("F-Modifiers can generate curves for those too"), ICON_INFO);
+ uiItemL(col, TIP_("TIP: Use F-Curves for procedural animation instead"), ICON_INFO);
+ uiItemL(col, TIP_("F-Modifiers can generate curves for those too"), ICON_INFO);
}
}
}
@@ -1118,7 +1117,7 @@ static void graph_draw_driver_settings_panel(uiLayout *layout,
0.0,
0.0,
0.0,
- IFACE_("Invalid variable name, click here for details"));
+ TIP_("Invalid variable name, click here for details"));
UI_but_func_set(but, driver_dvar_invalid_name_query_cb, dvar, NULL); // XXX: reports?
}
@@ -1136,7 +1135,7 @@ static void graph_draw_driver_settings_panel(uiLayout *layout,
0.0,
0.0,
0.0,
- IFACE_("Delete target variable"));
+ TIP_("Delete target variable"));
UI_but_func_set(but, driver_delete_var_cb, driver, dvar);
UI_block_emboss_set(block, UI_EMBOSS);
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 17710734c80..fb4369f5113 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -1209,36 +1209,36 @@ void uiTemplateImageInfo(uiLayout *layout, bContext *C, Image *ima, ImageUser *i
uiLayoutSetAlignment(col, UI_LAYOUT_ALIGN_RIGHT);
if (ibuf == NULL) {
- uiItemL(col, IFACE_("Can't Load Image"), ICON_NONE);
+ uiItemL(col, TIP_("Can't Load Image"), ICON_NONE);
}
else {
char str[MAX_IMAGE_INFO_LEN] = {0};
const int len = MAX_IMAGE_INFO_LEN;
int ofs = 0;
- ofs += BLI_snprintf(str + ofs, len - ofs, IFACE_("%d x %d, "), ibuf->x, ibuf->y);
+ ofs += BLI_snprintf(str + ofs, len - ofs, TIP_("%d x %d, "), ibuf->x, ibuf->y);
if (ibuf->rect_float) {
if (ibuf->channels != 4) {
- ofs += BLI_snprintf(str + ofs, len - ofs, IFACE_("%d float channel(s)"), ibuf->channels);
+ ofs += BLI_snprintf(str + ofs, len - ofs, TIP_("%d float channel(s)"), ibuf->channels);
}
else if (ibuf->planes == R_IMF_PLANES_RGBA) {
- ofs += BLI_strncpy_rlen(str + ofs, IFACE_(" RGBA float"), len - ofs);
+ ofs += BLI_strncpy_rlen(str + ofs, TIP_(" RGBA float"), len - ofs);
}
else {
- ofs += BLI_strncpy_rlen(str + ofs, IFACE_(" RGB float"), len - ofs);
+ ofs += BLI_strncpy_rlen(str + ofs, TIP_(" RGB float"), len - ofs);
}
}
else {
if (ibuf->planes == R_IMF_PLANES_RGBA) {
- ofs += BLI_strncpy_rlen(str + ofs, IFACE_(" RGBA byte"), len - ofs);
+ ofs += BLI_strncpy_rlen(str + ofs, TIP_(" RGBA byte"), len - ofs);
}
else {
- ofs += BLI_strncpy_rlen(str + ofs, IFACE_(" RGB byte"), len - ofs);
+ ofs += BLI_strncpy_rlen(str + ofs, TIP_(" RGB byte"), len - ofs);
}
}
if (ibuf->zbuf || ibuf->zbuf_float) {
- ofs += BLI_strncpy_rlen(str + ofs, IFACE_(" + Z"), len - ofs);
+ ofs += BLI_strncpy_rlen(str + ofs, TIP_(" + Z"), len - ofs);
}
uiItemL(col, str, ICON_NONE);
@@ -1261,17 +1261,17 @@ void uiTemplateImageInfo(uiLayout *layout, bContext *C, Image *ima, ImageUser *i
if (duration > 0) {
/* Movie duration */
- BLI_snprintf(str, MAX_IMAGE_INFO_LEN, IFACE_("Frame %d / %d"), framenr, duration);
+ BLI_snprintf(str, MAX_IMAGE_INFO_LEN, TIP_("Frame %d / %d"), framenr, duration);
}
else if (ima->source == IMA_SRC_SEQUENCE && ibuf) {
/* Image sequence frame number + filename */
const char *filename = BLI_last_slash(ibuf->name);
filename = (filename == NULL) ? ibuf->name : filename + 1;
- BLI_snprintf(str, MAX_IMAGE_INFO_LEN, IFACE_("Frame %d: %s"), framenr, filename);
+ BLI_snprintf(str, MAX_IMAGE_INFO_LEN, TIP_("Frame %d: %s"), framenr, filename);
}
else {
/* Frame number */
- BLI_snprintf(str, MAX_IMAGE_INFO_LEN, IFACE_("Frame %d"), framenr);
+ BLI_snprintf(str, MAX_IMAGE_INFO_LEN, TIP_("Frame %d"), framenr);
}
uiItemL(col, str, ICON_NONE);
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index 604792e3254..1c9a7d3584c 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -442,11 +442,11 @@ static void stats_string(ViewLayer *view_layer)
/* get memory statistics */
BLI_str_format_byte_unit(formatted_mem, mem_in_use - mmap_in_use, true);
- ofs = BLI_snprintf(memstr, MAX_INFO_MEM_LEN, IFACE_(" | Mem: %s"), formatted_mem);
+ ofs = BLI_snprintf(memstr, MAX_INFO_MEM_LEN, TIP_(" | Mem: %s"), formatted_mem);
if (mmap_in_use) {
BLI_str_format_byte_unit(formatted_mem, mmap_in_use, true);
- BLI_snprintf(memstr + ofs, MAX_INFO_MEM_LEN - ofs, IFACE_(" (%s)"), formatted_mem);
+ BLI_snprintf(memstr + ofs, MAX_INFO_MEM_LEN - ofs, TIP_(" (%s)"), formatted_mem);
}
if (GPU_mem_stats_supported()) {
@@ -455,11 +455,11 @@ static void stats_string(ViewLayer *view_layer)
GPU_mem_stats_get(&gpu_tot_memory, &gpu_free_mem);
BLI_str_format_byte_unit(formatted_mem, gpu_free_mem, true);
- ofs = BLI_snprintf(gpumemstr, MAX_INFO_MEM_LEN, IFACE_(" | Free GPU Mem: %s"), formatted_mem);
+ ofs = BLI_snprintf(gpumemstr, MAX_INFO_MEM_LEN, TIP_(" | Free GPU Mem: %s"), formatted_mem);
if (gpu_tot_memory) {
BLI_str_format_byte_unit(formatted_mem, gpu_tot_memory, true);
- BLI_snprintf(gpumemstr + ofs, MAX_INFO_MEM_LEN - ofs, IFACE_("/%s"), formatted_mem);
+ BLI_snprintf(gpumemstr + ofs, MAX_INFO_MEM_LEN - ofs, TIP_("/%s"), formatted_mem);
}
}
@@ -479,13 +479,13 @@ static void stats_string(ViewLayer *view_layer)
if (obedit) {
if (BKE_keyblock_from_object(obedit)) {
- ofs += BLI_strncpy_rlen(s + ofs, IFACE_("(Key) "), MAX_INFO_LEN - ofs);
+ ofs += BLI_strncpy_rlen(s + ofs, TIP_("(Key) "), MAX_INFO_LEN - ofs);
}
if (obedit->type == OB_MESH) {
ofs += BLI_snprintf(s + ofs,
MAX_INFO_LEN - ofs,
- IFACE_("Verts:%s/%s | Edges:%s/%s | Faces:%s/%s | Tris:%s"),
+ TIP_("Verts:%s/%s | Edges:%s/%s | Faces:%s/%s | Tris:%s"),
stats_fmt.totvertsel,
stats_fmt.totvert,
stats_fmt.totedgesel,
@@ -497,7 +497,7 @@ static void stats_string(ViewLayer *view_layer)
else if (obedit->type == OB_ARMATURE) {
ofs += BLI_snprintf(s + ofs,
MAX_INFO_LEN - ofs,
- IFACE_("Verts:%s/%s | Bones:%s/%s"),
+ TIP_("Verts:%s/%s | Bones:%s/%s"),
stats_fmt.totvertsel,
stats_fmt.totvert,
stats_fmt.totbonesel,
@@ -506,7 +506,7 @@ static void stats_string(ViewLayer *view_layer)
else {
ofs += BLI_snprintf(s + ofs,
MAX_INFO_LEN - ofs,
- IFACE_("Verts:%s/%s"),
+ TIP_("Verts:%s/%s"),
stats_fmt.totvertsel,
stats_fmt.totvert);
}
@@ -517,7 +517,7 @@ static void stats_string(ViewLayer *view_layer)
else if (ob && (object_mode & OB_MODE_POSE)) {
ofs += BLI_snprintf(s + ofs,
MAX_INFO_LEN - ofs,
- IFACE_("Bones:%s/%s %s%s"),
+ TIP_("Bones:%s/%s %s%s"),
stats_fmt.totbonesel,
stats_fmt.totbone,
memstr,
@@ -526,7 +526,7 @@ static void stats_string(ViewLayer *view_layer)
else if ((ob) && (ob->type == OB_GPENCIL)) {
ofs += BLI_snprintf(s + ofs,
MAX_INFO_LEN - ofs,
- IFACE_("Layers:%s | Frames:%s | Strokes:%s | Points:%s | Objects:%s/%s"),
+ TIP_("Layers:%s | Frames:%s | Strokes:%s | Points:%s | Objects:%s/%s"),
stats_fmt.totgplayer,
stats_fmt.totgpframe,
stats_fmt.totgpstroke,
@@ -540,7 +540,7 @@ static void stats_string(ViewLayer *view_layer)
else if (stats_is_object_dynamic_topology_sculpt(ob, object_mode)) {
ofs += BLI_snprintf(s + ofs,
MAX_INFO_LEN - ofs,
- IFACE_("Verts:%s | Tris:%s%s"),
+ TIP_("Verts:%s | Tris:%s%s"),
stats_fmt.totvert,
stats_fmt.tottri,
gpumemstr);
@@ -548,7 +548,7 @@ static void stats_string(ViewLayer *view_layer)
else {
ofs += BLI_snprintf(s + ofs,
MAX_INFO_LEN - ofs,
- IFACE_("Verts:%s | Faces:%s | Tris:%s | Objects:%s/%s%s%s"),
+ TIP_("Verts:%s | Faces:%s | Tris:%s | Objects:%s/%s%s%s"),
stats_fmt.totvert,
stats_fmt.totface,
stats_fmt.tottri,
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index acb3d913114..052f653ca7f 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -857,6 +857,7 @@ void NLA_OT_transition_add(wmOperatorType *ot)
static int nlaedit_add_sound_exec(bContext *C, wmOperator *UNUSED(op))
{
+ Main *bmain = CTX_data_main(C);
bAnimContext ac;
ListBase anim_data = {NULL, NULL};
@@ -894,7 +895,7 @@ static int nlaedit_add_sound_exec(bContext *C, wmOperator *UNUSED(op))
}
/* create a new strip, and offset it to start on the current frame */
- strip = BKE_nla_add_soundstrip(ac.scene, ob->data);
+ strip = BKE_nla_add_soundstrip(bmain, ac.scene, ob->data);
strip->start += cfra;
strip->end += cfra;
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index d34ba14700a..cf52ca8489f 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -562,7 +562,7 @@ static void node_link_update_header(bContext *C, bNodeLinkDrag *UNUSED(nldrag))
{
char header[UI_MAX_DRAW_STR];
- BLI_strncpy(header, IFACE_("LMB: drag node link, RMB: cancel"), sizeof(header));
+ BLI_strncpy(header, TIP_("LMB: drag node link, RMB: cancel"), sizeof(header));
ED_workspace_status_text(C, header);
}
diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c
index 49ba397a108..d8276aa2bbc 100644
--- a/source/blender/editors/space_outliner/outliner_dragdrop.c
+++ b/source/blender/editors/space_outliner/outliner_dragdrop.c
@@ -802,7 +802,7 @@ static bool collection_drop_poll(bContext *C,
if (!data.from || event->ctrl) {
tselem->flag |= TSE_DRAG_INTO;
changed = true;
- *tooltip = IFACE_("Link inside Collection");
+ *tooltip = TIP_("Link inside Collection");
}
else {
switch (data.insert_type) {
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index d994152ba67..feff1dc5f4a 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -2574,7 +2574,7 @@ static void outliner_draw_iconrow_doit(uiBlock *block,
/**
* Return the index to use based on the TreeElement ID and object type
*
- * We use a continuum of indices until we get to the object datablocks
+ * We use a continuum of indices until we get to the object data-blocks
* and we then make room for the object types.
*/
static int tree_element_id_type_to_index(TreeElement *te)
@@ -3197,7 +3197,7 @@ static void outliner_draw_highlights_recursive(unsigned pos,
else {
if (is_searching && (tselem->flag & TSE_SEARCHMATCH)) {
/* search match highlights
- * we don't expand items when searching in the datablocks but we
+ * we don't expand items when searching in the data-blocks but we
* still want to highlight any filter matches. */
immUniformColor4fv(col_searchmatch);
immRecti(pos, start_x, start_y, end_x, start_y + UI_UNIT_Y);
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index ab9e29a9105..fa28d119244 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -179,7 +179,7 @@ typedef enum {
* - Flag options defined in DNA_outliner_types.h
* - SO_SEARCH_RECURSIVE defined in DNA_space_types.h
*
- * - NOT in datablocks view - searching all datablocks takes way too long
+ * - NOT in data-blocks view - searching all data-blocks takes way too long
* to be useful
* - not searching into RNA items helps but isn't the complete solution
*/
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 4e07be7d915..2a0bc470bcb 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -109,7 +109,7 @@ static void outliner_storage_cleanup(SpaceOutliner *soops)
}
/* cleanup only after reading file or undo step, and always for
- * RNA datablocks view in order to save memory */
+ * RNA data-blocks view in order to save memory */
if (soops->storeflag & SO_TREESTORE_CLEANUP) {
soops->storeflag &= ~SO_TREESTORE_CLEANUP;
@@ -835,7 +835,7 @@ static TreeElement *outliner_add_element(
if (type == 0) {
TreeStoreElem *tsepar = parent ? TREESTORE(parent) : NULL;
- /* ID datablock */
+ /* ID data-block. */
if (tsepar == NULL || tsepar->type != TSE_ID_BASE || soops->filter_id_type) {
outliner_add_id_contents(soops, te, tselem, id);
}
@@ -1277,7 +1277,7 @@ static TreeElement *outliner_add_library_contents(Main *mainvar,
if (id) {
if (!tenlib) {
- /* Create library tree element on demand, depending if there are any datablocks. */
+ /* Create library tree element on demand, depending if there are any data-blocks. */
if (lib) {
tenlib = outliner_add_element(soops, lb, lib, NULL, 0, 0);
}
@@ -1287,7 +1287,7 @@ static TreeElement *outliner_add_library_contents(Main *mainvar,
}
}
- /* Create datablock list parent element on demand. */
+ /* Create data-block list parent element on demand. */
if (filter_id_type) {
ten = tenlib;
}
@@ -1328,7 +1328,7 @@ static void outliner_add_orphaned_datablocks(Main *mainvar, SpaceOutliner *soops
if (lbarray[a] && lbarray[a]->first) {
ID *id = lbarray[a]->first;
- /* check if there are any datablocks of this type which are orphans */
+ /* check if there are any data-blocks of this type which are orphans */
for (; id; id = id->next) {
if (ID_REAL_USERS(id) <= 0) {
break;
@@ -1336,7 +1336,7 @@ static void outliner_add_orphaned_datablocks(Main *mainvar, SpaceOutliner *soops
}
if (id) {
- /* header for this type of datablock */
+ /* header for this type of data-block */
if (filter_id_type) {
ten = NULL;
}
@@ -1346,7 +1346,7 @@ static void outliner_add_orphaned_datablocks(Main *mainvar, SpaceOutliner *soops
ten->name = outliner_idcode_to_plural(GS(id->name));
}
- /* add the orphaned datablocks - these will not be added with any subtrees attached */
+ /* add the orphaned data-blocks - these will not be added with any subtrees attached */
for (id = lbarray[a]->first; id; id = id->next) {
if (ID_REAL_USERS(id) <= 0) {
outliner_add_element(soops, (ten) ? &ten->subtree : &soops->tree, id, ten, 0, 0);
@@ -2218,7 +2218,7 @@ void outliner_build_tree(
int show_opened = !soops->treestore || !BLI_mempool_len(soops->treestore);
/* Are we looking for something - we want to tag parents to filter child matches
- * - NOT in datablocks view - searching all datablocks takes way too long to be useful
+ * - NOT in data-blocks view - searching all data-blocks takes way too long to be useful
* - this variable is only set once per tree build */
if (soops->search_string[0] != 0 && soops->outlinevis != SO_DATA_API) {
soops->search_flags |= SO_SEARCH_RECURSIVE;
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 1b07a070505..5510b981899 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -726,7 +726,8 @@ static void recurs_del_seq_flag(Scene *scene, ListBase *lb, short flag, short de
}
}
-static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, ListBase *new_seq_list, int cutframe)
+static Sequence *cut_seq_hard(
+ Main *bmain, Scene *scene, Sequence *seq, ListBase *new_seq_list, int cutframe)
{
TransSeq ts;
Sequence *seqn = NULL;
@@ -755,7 +756,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, ListBase *new_seq_lis
* blend file, or our code may have minor differences reading file length between versions.
* This causes hard-cut to fail, see: T47862 */
if (seq->type != SEQ_TYPE_META) {
- BKE_sequence_reload_new_file(scene, seq, true);
+ BKE_sequence_reload_new_file(bmain, scene, seq, true);
BKE_sequence_calc(scene, seq);
}
@@ -790,7 +791,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, ListBase *new_seq_lis
}
}
- BKE_sequence_reload_new_file(scene, seq, false);
+ BKE_sequence_reload_new_file(bmain, scene, seq, false);
BKE_sequence_calc(scene, seq);
if (!skip_dup) {
@@ -837,13 +838,14 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, ListBase *new_seq_lis
seqn->startstill = 0;
}
- BKE_sequence_reload_new_file(scene, seqn, false);
+ BKE_sequence_reload_new_file(bmain, scene, seqn, false);
BKE_sequence_calc(scene, seqn);
}
return seqn;
}
-static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, ListBase *new_seq_list, int cutframe)
+static Sequence *cut_seq_soft(
+ Main *UNUSED(bmain), Scene *scene, Sequence *seq, ListBase *new_seq_list, int cutframe)
{
TransSeq ts;
Sequence *seqn = NULL;
@@ -949,10 +951,11 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, ListBase *new_seq_lis
* may generate strips with the same name (which will mess up animdata)
*/
-static bool cut_seq_list(Scene *scene,
+static bool cut_seq_list(Main *bmain,
+ Scene *scene,
ListBase *slist,
int cutframe,
- Sequence *(*cut_seq)(Scene *, Sequence *, ListBase *, int))
+ Sequence *(*cut_seq)(Main *bmain, Scene *, Sequence *, ListBase *, int))
{
Sequence *seq, *seq_next_iter;
Sequence *seq_first_new = NULL;
@@ -964,7 +967,7 @@ static bool cut_seq_list(Scene *scene,
seq->tmp = NULL;
if (seq->flag & SELECT) {
if (cutframe > seq->startdisp && cutframe < seq->enddisp) {
- Sequence *seqn = cut_seq(scene, seq, slist, cutframe);
+ Sequence *seqn = cut_seq(bmain, scene, seq, slist, cutframe);
if (seqn) {
if (seq_first_new == NULL) {
seq_first_new = seqn;
@@ -1040,7 +1043,7 @@ static void set_filter_seq(Scene *scene)
if (seq->flag & SELECT) {
if (seq->type == SEQ_TYPE_MOVIE) {
seq->flag |= SEQ_FILTERY;
- BKE_sequence_reload_new_file(scene, seq, false);
+ BKE_sequence_reload_new_file(bmain, scene, seq, false);
BKE_sequence_calc(scene, seq);
}
}
@@ -1610,10 +1613,10 @@ static void sequencer_slip_update_header(Scene *scene, ScrArea *sa, SlipData *da
if (hasNumInput(&data->num_input)) {
char num_str[NUM_STR_REP_LEN];
outputNumInput(&data->num_input, num_str, &scene->unit);
- BLI_snprintf(msg, sizeof(msg), IFACE_("Trim offset: %s"), num_str);
+ BLI_snprintf(msg, sizeof(msg), TIP_("Trim offset: %s"), num_str);
}
else {
- BLI_snprintf(msg, sizeof(msg), IFACE_("Trim offset: %d"), offset);
+ BLI_snprintf(msg, sizeof(msg), TIP_("Trim offset: %d"), offset);
}
}
@@ -1622,6 +1625,7 @@ static void sequencer_slip_update_header(Scene *scene, ScrArea *sa, SlipData *da
static int sequencer_slip_modal(bContext *C, wmOperator *op, const wmEvent *event)
{
+ Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
SlipData *data = (SlipData *)op->customdata;
ScrArea *sa = CTX_wm_area(C);
@@ -1702,7 +1706,7 @@ static int sequencer_slip_modal(bContext *C, wmOperator *op, const wmEvent *even
for (i = 0; i < data->num_seq; i++) {
Sequence *seq = data->seq_array[i];
- BKE_sequence_reload_new_file(scene, seq, false);
+ BKE_sequence_reload_new_file(bmain, scene, seq, false);
BKE_sequence_calc(scene, seq);
}
@@ -1956,6 +1960,7 @@ void SEQUENCER_OT_unlock(struct wmOperatorType *ot)
/* reload operator */
static int sequencer_reload_exec(bContext *C, wmOperator *op)
{
+ Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
Editing *ed = BKE_sequencer_editing_get(scene, false);
Sequence *seq;
@@ -1964,7 +1969,7 @@ static int sequencer_reload_exec(bContext *C, wmOperator *op)
for (seq = ed->seqbasep->first; seq; seq = seq->next) {
if (seq->flag & SELECT) {
BKE_sequencer_update_changed_seq_and_deps(scene, seq, 0, 1);
- BKE_sequence_reload_new_file(scene, seq, !adjust_length);
+ BKE_sequence_reload_new_file(bmain, scene, seq, !adjust_length);
if (adjust_length) {
if (BKE_sequence_test_overlap(ed->seqbasep, seq)) {
@@ -2139,6 +2144,7 @@ static const EnumPropertyItem prop_cut_types[] = {
static int sequencer_cut_exec(bContext *C, wmOperator *op)
{
+ Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
Editing *ed = BKE_sequencer_editing_get(scene, false);
int cut_side, cut_hard, cut_frame;
@@ -2150,10 +2156,10 @@ static int sequencer_cut_exec(bContext *C, wmOperator *op)
cut_side = RNA_enum_get(op->ptr, "side");
if (cut_hard == SEQ_CUT_HARD) {
- changed = cut_seq_list(scene, ed->seqbasep, cut_frame, cut_seq_hard);
+ changed = cut_seq_list(bmain, scene, ed->seqbasep, cut_frame, cut_seq_hard);
}
else {
- changed = cut_seq_list(scene, ed->seqbasep, cut_frame, cut_seq_soft);
+ changed = cut_seq_list(bmain, scene, ed->seqbasep, cut_frame, cut_seq_soft);
}
if (changed) { /* got new strips ? */
@@ -2695,7 +2701,7 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op)
DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS);
BKE_sequence_base_unique_name_recursive(&scene->ed->seqbase, seqm);
- BKE_sequence_invalidate_cache_composite(scene, seq);
+ BKE_sequence_invalidate_cache_composite(scene, seqm);
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
return OPERATOR_FINISHED;
@@ -3384,7 +3390,7 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op)
}
/* Replace datablock pointers with copies, to keep things working in case
- * datablocks get deleted or another .blend file is opened. */
+ * data-blocks get deleted or another .blend file is opened. */
BKE_sequencer_base_clipboard_pointers_store(bmain, &seqbase_clipboard);
return OPERATOR_FINISHED;
@@ -3418,9 +3424,9 @@ static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op))
ED_sequencer_deselect_all(scene);
ofs = scene->r.cfra - seqbase_clipboard_frame;
- /* Copy strips, temporarily restoring pointers to actual datablocks. This
+ /* Copy strips, temporarily restoring pointers to actual data-blocks. This
* must happen on the clipboard itself, so that copying does user counting
- * on the actual datablocks. */
+ * on the actual data-blocks. */
BKE_sequencer_base_clipboard_pointers_restore(&seqbase_clipboard, bmain);
BKE_sequence_base_dupli_recursive(
scene, scene, &nseqbase, &seqbase_clipboard, SEQ_DUPE_UNIQUE_NAME, 0);
@@ -3948,7 +3954,7 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op)
/* correct start/end frames so we don't move
* important not to set seq->len = len; allow the function to handle it */
- BKE_sequence_reload_new_file(scene, seq, true);
+ BKE_sequence_reload_new_file(bmain, scene, seq, true);
BKE_sequence_calc(scene, seq);
diff --git a/source/blender/editors/space_sequencer/sequencer_preview.c b/source/blender/editors/space_sequencer/sequencer_preview.c
index 8a4e8c007f7..81ddd0dd8cc 100644
--- a/source/blender/editors/space_sequencer/sequencer_preview.c
+++ b/source/blender/editors/space_sequencer/sequencer_preview.c
@@ -80,9 +80,7 @@ static void preview_startjob(void *data, short *stop, short *do_update, float *p
PreviewJobAudio *preview_next;
bSound *sound = previewjb->sound;
- BKE_sound_load_audio(previewjb->bmain, sound);
- BKE_sound_read_waveform(sound, stop);
- BKE_sound_free_audio(sound);
+ BKE_sound_read_waveform(previewjb->bmain, sound, stop);
if (*stop || G.is_break) {
BLI_mutex_lock(pj->mutex);
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index af4b53ee858..57f86059d9d 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -362,7 +362,9 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, const wmEvent *e
else if (left_right != SEQ_SELECT_LR_NONE) {
/* use different logic for this */
float x;
- ED_sequencer_deselect_all(scene);
+ if (extend == false) {
+ ED_sequencer_deselect_all(scene);
+ }
switch (left_right) {
case SEQ_SELECT_LR_MOUSE:
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index fb121aa716b..51dc14f3dff 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -428,9 +428,13 @@ static int snap_selected_to_location(bContext *C,
sub_v3_v3(cursor_parent, ob->obmat[3]);
if (ob->parent) {
- float originmat[3][3];
- BKE_object_where_is_calc_ex(depsgraph, scene, NULL, ob, originmat);
+ float originmat[3][3], parentmat[4][4];
+ /* Use the evaluated object here because sometimes
+ * `ob->parent->runtime.curve_cache` is required. */
+ Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
+ BKE_object_get_parent_matrix(ob_eval, ob_eval->parent, parentmat);
+ mul_m3_m4m4(originmat, parentmat, ob->parentinv);
invert_m3_m3(imat, originmat);
mul_m3_v3(imat, cursor_parent);
}
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 1170e2ea5a8..9019b21997f 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -971,23 +971,23 @@ static void transform_event_xyz_constraint(TransInfo *t, short key_type, char cm
/* Initialize */
switch (key_type) {
case XKEY:
- msg1 = IFACE_("along X");
- msg2 = IFACE_("along %s X");
- msg3 = IFACE_("locking %s X");
+ msg1 = TIP_("along X");
+ msg2 = TIP_("along %s X");
+ msg3 = TIP_("locking %s X");
axis = 'X';
constraint_axis = CON_AXIS0;
break;
case YKEY:
- msg1 = IFACE_("along Y");
- msg2 = IFACE_("along %s Y");
- msg3 = IFACE_("locking %s Y");
+ msg1 = TIP_("along Y");
+ msg2 = TIP_("along %s Y");
+ msg3 = TIP_("locking %s Y");
axis = 'Y';
constraint_axis = CON_AXIS1;
break;
case ZKEY:
- msg1 = IFACE_("along Z");
- msg2 = IFACE_("along %s Z");
- msg3 = IFACE_("locking %s Z");
+ msg1 = TIP_("along Z");
+ msg2 = TIP_("along %s Z");
+ msg3 = TIP_("locking %s Z");
axis = 'Z';
constraint_axis = CON_AXIS2;
break;
@@ -1046,6 +1046,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
char cmode = constraintModeToChar(t);
bool handled = false;
const int modifiers_prev = t->modifiers;
+ const int mode_prev = t->mode;
t->redraw |= handleMouseInput(t, &t->mouse, event);
@@ -1101,7 +1102,6 @@ int transformEvent(TransInfo *t, const wmEvent *event)
initTranslation(t);
initSnapping(t, NULL); // need to reinit after mode change
t->redraw |= TREDRAW_HARD;
- WM_event_add_mousemove(t->context);
handled = true;
}
else if (t->mode == TFM_SEQ_SLIDE) {
@@ -1136,7 +1136,6 @@ int transformEvent(TransInfo *t, const wmEvent *event)
initSnapping(t, NULL); // need to reinit after mode change
t->redraw |= TREDRAW_HARD;
handled = true;
- WM_event_add_mousemove(t->context);
}
}
else if (t->options & (CTX_MOVIECLIP | CTX_MASK)) {
@@ -1393,7 +1392,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
/* exception for switching to dolly, or trackball, in camera view */
if (t->flag & T_CAMERA) {
if (t->mode == TFM_TRANSLATION) {
- setLocalConstraint(t, (CON_AXIS2), IFACE_("along local Z"));
+ setLocalConstraint(t, (CON_AXIS2), TIP_("along local Z"));
}
else if (t->mode == TFM_ROTATION) {
restoreTransObjects(t);
@@ -1603,8 +1602,8 @@ int transformEvent(TransInfo *t, const wmEvent *event)
}
/* if we change snap options, get the unsnapped values back */
- if ((t->modifiers & (MOD_SNAP | MOD_SNAP_INVERT)) !=
- (modifiers_prev & (MOD_SNAP | MOD_SNAP_INVERT))) {
+ if ((mode_prev != t->mode) || ((t->modifiers & (MOD_SNAP | MOD_SNAP_INVERT)) !=
+ (modifiers_prev & (MOD_SNAP | MOD_SNAP_INVERT)))) {
applyMouseInput(t, &t->mouse, t->mval, t->values);
}
@@ -3384,7 +3383,7 @@ static void Bend(TransInfo *t, const int UNUSED(mval[2]))
BLI_snprintf(str,
sizeof(str),
- IFACE_("Bend Angle: %s Radius: %s Alt, Clamp %s"),
+ TIP_("Bend Angle: %s Radius: %s Alt, Clamp %s"),
&c[0],
&c[NUM_STR_REP_LEN],
WM_bool_as_string(is_clamp));
@@ -3393,7 +3392,7 @@ static void Bend(TransInfo *t, const int UNUSED(mval[2]))
/* default header print */
BLI_snprintf(str,
sizeof(str),
- IFACE_("Bend Angle: %.3f Radius: %.4f, Alt, Clamp %s"),
+ TIP_("Bend Angle: %.3f Radius: %.4f, Alt, Clamp %s"),
RAD2DEGF(values.angle),
values.scale * data->warp_init_dist,
WM_bool_as_string(is_clamp));
@@ -3623,13 +3622,13 @@ static void applyShear(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c, &t->scene->unit);
- BLI_snprintf(str, sizeof(str), IFACE_("Shear: %s %s"), c, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Shear: %s %s"), c, t->proptext);
}
else {
/* default header print */
BLI_snprintf(str,
sizeof(str),
- IFACE_("Shear: %.3f %s (Press X or Y to set shear axis)"),
+ TIP_("Shear: %.3f %s (Press X or Y to set shear axis)"),
value,
t->proptext);
}
@@ -3769,7 +3768,7 @@ static void headerResize(TransInfo *t, const float vec[3], char str[UI_MAX_DRAW_
case 0:
ofs += BLI_snprintf(str + ofs,
UI_MAX_DRAW_STR - ofs,
- IFACE_("Scale: %s%s %s"),
+ TIP_("Scale: %s%s %s"),
&tvec[0],
t->con.text,
t->proptext);
@@ -3777,7 +3776,7 @@ static void headerResize(TransInfo *t, const float vec[3], char str[UI_MAX_DRAW_
case 1:
ofs += BLI_snprintf(str + ofs,
UI_MAX_DRAW_STR - ofs,
- IFACE_("Scale: %s : %s%s %s"),
+ TIP_("Scale: %s : %s%s %s"),
&tvec[0],
&tvec[NUM_STR_REP_LEN],
t->con.text,
@@ -3786,7 +3785,7 @@ static void headerResize(TransInfo *t, const float vec[3], char str[UI_MAX_DRAW_
case 2:
ofs += BLI_snprintf(str + ofs,
UI_MAX_DRAW_STR - ofs,
- IFACE_("Scale: %s : %s : %s%s %s"),
+ TIP_("Scale: %s : %s : %s%s %s"),
&tvec[0],
&tvec[NUM_STR_REP_LEN],
&tvec[NUM_STR_REP_LEN * 2],
@@ -3799,7 +3798,7 @@ static void headerResize(TransInfo *t, const float vec[3], char str[UI_MAX_DRAW_
if (t->flag & T_2D_EDIT) {
ofs += BLI_snprintf(str + ofs,
UI_MAX_DRAW_STR - ofs,
- IFACE_("Scale X: %s Y: %s%s %s"),
+ TIP_("Scale X: %s Y: %s%s %s"),
&tvec[0],
&tvec[NUM_STR_REP_LEN],
t->con.text,
@@ -3808,7 +3807,7 @@ static void headerResize(TransInfo *t, const float vec[3], char str[UI_MAX_DRAW_
else {
ofs += BLI_snprintf(str + ofs,
UI_MAX_DRAW_STR - ofs,
- IFACE_("Scale X: %s Y: %s Z: %s%s %s"),
+ TIP_("Scale X: %s Y: %s Z: %s%s %s"),
&tvec[0],
&tvec[NUM_STR_REP_LEN],
&tvec[NUM_STR_REP_LEN * 2],
@@ -3819,7 +3818,7 @@ static void headerResize(TransInfo *t, const float vec[3], char str[UI_MAX_DRAW_
if (t->flag & T_PROP_EDIT_ALL) {
ofs += BLI_snprintf(
- str + ofs, UI_MAX_DRAW_STR - ofs, IFACE_(" Proportional size: %.2f"), t->prop_size);
+ str + ofs, UI_MAX_DRAW_STR - ofs, TIP_(" Proportional size: %.2f"), t->prop_size);
}
}
@@ -4227,11 +4226,11 @@ static void applyToSphere(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c, &t->scene->unit);
- BLI_snprintf(str, sizeof(str), IFACE_("To Sphere: %s %s"), c, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("To Sphere: %s %s"), c, t->proptext);
}
else {
/* default header print */
- BLI_snprintf(str, sizeof(str), IFACE_("To Sphere: %.4f %s"), ratio, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("To Sphere: %.4f %s"), ratio, t->proptext);
}
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
@@ -4313,17 +4312,13 @@ static void headerRotation(TransInfo *t, char str[UI_MAX_DRAW_STR], float final)
outputNumInput(&(t->num), c, &t->scene->unit);
- ofs += BLI_snprintf(str + ofs,
- UI_MAX_DRAW_STR - ofs,
- IFACE_("Rot: %s %s %s"),
- &c[0],
- t->con.text,
- t->proptext);
+ ofs += BLI_snprintf(
+ str + ofs, UI_MAX_DRAW_STR - ofs, TIP_("Rot: %s %s %s"), &c[0], t->con.text, t->proptext);
}
else {
ofs += BLI_snprintf(str + ofs,
UI_MAX_DRAW_STR - ofs,
- IFACE_("Rot: %.2f%s %s"),
+ TIP_("Rot: %.2f%s %s"),
RAD2DEGF(final),
t->con.text,
t->proptext);
@@ -4331,7 +4326,7 @@ static void headerRotation(TransInfo *t, char str[UI_MAX_DRAW_STR], float final)
if (t->flag & T_PROP_EDIT_ALL) {
ofs += BLI_snprintf(
- str + ofs, UI_MAX_DRAW_STR - ofs, IFACE_(" Proportional size: %.2f"), t->prop_size);
+ str + ofs, UI_MAX_DRAW_STR - ofs, TIP_(" Proportional size: %.2f"), t->prop_size);
}
}
@@ -4744,7 +4739,7 @@ static void applyTrackball(TransInfo *t, const int UNUSED(mval[2]))
ofs += BLI_snprintf(str + ofs,
sizeof(str) - ofs,
- IFACE_("Trackball: %s %s %s"),
+ TIP_("Trackball: %s %s %s"),
&c[0],
&c[NUM_STR_REP_LEN],
t->proptext);
@@ -4752,7 +4747,7 @@ static void applyTrackball(TransInfo *t, const int UNUSED(mval[2]))
else {
ofs += BLI_snprintf(str + ofs,
sizeof(str) - ofs,
- IFACE_("Trackball: %.2f %.2f %s"),
+ TIP_("Trackball: %.2f %.2f %s"),
RAD2DEGF(phi[0]),
RAD2DEGF(phi[1]),
t->proptext);
@@ -4760,7 +4755,7 @@ static void applyTrackball(TransInfo *t, const int UNUSED(mval[2]))
if (t->flag & T_PROP_EDIT_ALL) {
ofs += BLI_snprintf(
- str + ofs, sizeof(str) - ofs, IFACE_(" Proportional size: %.2f"), t->prop_size);
+ str + ofs, sizeof(str) - ofs, TIP_(" Proportional size: %.2f"), t->prop_size);
}
#if 0 /* UNUSED */
@@ -5038,7 +5033,7 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_
short chainlen = t->settings->autoik_chainlen;
if (chainlen) {
- BLI_snprintf(autoik, NUM_STR_REP_LEN, IFACE_("AutoIK-Len: %d"), chainlen);
+ BLI_snprintf(autoik, NUM_STR_REP_LEN, TIP_("AutoIK-Len: %d"), chainlen);
}
else {
autoik[0] = '\0';
@@ -5112,7 +5107,7 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_
if (t->flag & T_PROP_EDIT_ALL) {
ofs += BLI_snprintf(
- str + ofs, UI_MAX_DRAW_STR - ofs, IFACE_(" Proportional size: %.2f"), t->prop_size);
+ str + ofs, UI_MAX_DRAW_STR - ofs, TIP_(" Proportional size: %.2f"), t->prop_size);
}
if (t->spacetype == SPACE_NODE) {
@@ -5120,9 +5115,8 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_
if ((snode->flag & SNODE_SKIP_INSOFFSET) == 0) {
const char *str_old = BLI_strdup(str);
- const char *str_dir = (snode->insert_ofs_dir == SNODE_INSERTOFS_DIR_RIGHT) ?
- IFACE_("right") :
- IFACE_("left");
+ const char *str_dir = (snode->insert_ofs_dir == SNODE_INSERTOFS_DIR_RIGHT) ? TIP_("right") :
+ TIP_("left");
char str_km[64];
WM_modalkeymap_items_to_string(
@@ -5130,7 +5124,7 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_
ofs += BLI_snprintf(str,
UI_MAX_DRAW_STR,
- IFACE_("Auto-offset set to %s - press %s to toggle direction | %s"),
+ TIP_("Auto-offset set to %s - press %s to toggle direction | %s"),
str_dir,
str_km,
str_old);
@@ -5346,7 +5340,7 @@ static void applyShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
t->values[0] = -distance;
/* header print for NumInput */
- ofs += BLI_strncpy_rlen(str + ofs, IFACE_("Shrink/Fatten:"), sizeof(str) - ofs);
+ ofs += BLI_strncpy_rlen(str + ofs, TIP_("Shrink/Fatten:"), sizeof(str) - ofs);
if (hasNumInput(&t->num)) {
char c[NUM_STR_REP_LEN];
outputNumInput(&(t->num), c, &t->scene->unit);
@@ -5370,7 +5364,7 @@ static void applyShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
}
BLI_snprintf(str + ofs,
sizeof(str) - ofs,
- IFACE_(" or Alt) Even Thickness %s"),
+ TIP_(" or Alt) Even Thickness %s"),
WM_bool_as_string((t->flag & T_ALT_TRANSFORM) != 0));
/* done with header string */
@@ -5449,13 +5443,13 @@ static void applyTilt(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c, &t->scene->unit);
- BLI_snprintf(str, sizeof(str), IFACE_("Tilt: %s° %s"), &c[0], t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Tilt: %s° %s"), &c[0], t->proptext);
/* XXX For some reason, this seems needed for this op, else RNA prop is not updated... :/ */
t->values[0] = final;
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Tilt: %.2f° %s"), RAD2DEGF(final), t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Tilt: %.2f° %s"), RAD2DEGF(final), t->proptext);
}
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
@@ -5531,10 +5525,10 @@ static void applyCurveShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
char c[NUM_STR_REP_LEN];
outputNumInput(&(t->num), c, &t->scene->unit);
- BLI_snprintf(str, sizeof(str), IFACE_("Shrink/Fatten: %s"), c);
+ BLI_snprintf(str, sizeof(str), TIP_("Shrink/Fatten: %s"), c);
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Shrink/Fatten: %3f"), ratio);
+ BLI_snprintf(str, sizeof(str), TIP_("Shrink/Fatten: %3f"), ratio);
}
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
@@ -5616,10 +5610,10 @@ static void applyMaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
char c[NUM_STR_REP_LEN];
outputNumInput(&(t->num), c, &t->scene->unit);
- BLI_snprintf(str, sizeof(str), IFACE_("Feather Shrink/Fatten: %s"), c);
+ BLI_snprintf(str, sizeof(str), TIP_("Feather Shrink/Fatten: %s"), c);
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Feather Shrink/Fatten: %3f"), ratio);
+ BLI_snprintf(str, sizeof(str), TIP_("Feather Shrink/Fatten: %3f"), ratio);
}
/* detect if no points have feather yet */
@@ -5729,10 +5723,10 @@ static void applyGPShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
char c[NUM_STR_REP_LEN];
outputNumInput(&(t->num), c, &t->scene->unit);
- BLI_snprintf(str, sizeof(str), IFACE_("Shrink/Fatten: %s"), c);
+ BLI_snprintf(str, sizeof(str), TIP_("Shrink/Fatten: %s"), c);
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Shrink/Fatten: %3f"), ratio);
+ BLI_snprintf(str, sizeof(str), TIP_("Shrink/Fatten: %3f"), ratio);
}
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
@@ -5811,10 +5805,10 @@ static void applyGPOpacity(TransInfo *t, const int UNUSED(mval[2]))
char c[NUM_STR_REP_LEN];
outputNumInput(&(t->num), c, &t->scene->unit);
- BLI_snprintf(str, sizeof(str), IFACE_("Opacity: %s"), c);
+ BLI_snprintf(str, sizeof(str), TIP_("Opacity: %s"), c);
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Opacity: %3f"), ratio);
+ BLI_snprintf(str, sizeof(str), TIP_("Opacity: %3f"), ratio);
}
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
@@ -5886,12 +5880,12 @@ static void applyPushPull(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c, &t->scene->unit);
- BLI_snprintf(str, sizeof(str), IFACE_("Push/Pull: %s%s %s"), c, t->con.text, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Push/Pull: %s%s %s"), c, t->con.text, t->proptext);
}
else {
/* default header print */
BLI_snprintf(
- str, sizeof(str), IFACE_("Push/Pull: %.4f%s %s"), distance, t->con.text, t->proptext);
+ str, sizeof(str), TIP_("Push/Pull: %.4f%s %s"), distance, t->con.text, t->proptext);
}
if (t->con.applyRot && t->con.mode & CON_APPLY) {
@@ -5986,19 +5980,19 @@ static void applyBevelWeight(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c, &t->scene->unit);
if (weight >= 0.0f) {
- BLI_snprintf(str, sizeof(str), IFACE_("Bevel Weight: +%s %s"), c, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Bevel Weight: +%s %s"), c, t->proptext);
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Bevel Weight: %s %s"), c, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Bevel Weight: %s %s"), c, t->proptext);
}
}
else {
/* default header print */
if (weight >= 0.0f) {
- BLI_snprintf(str, sizeof(str), IFACE_("Bevel Weight: +%.3f %s"), weight, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Bevel Weight: +%.3f %s"), weight, t->proptext);
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Bevel Weight: %.3f %s"), weight, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Bevel Weight: %.3f %s"), weight, t->proptext);
}
}
@@ -6076,19 +6070,19 @@ static void applyCrease(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c, &t->scene->unit);
if (crease >= 0.0f) {
- BLI_snprintf(str, sizeof(str), IFACE_("Crease: +%s %s"), c, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Crease: +%s %s"), c, t->proptext);
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Crease: %s %s"), c, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Crease: %s %s"), c, t->proptext);
}
}
else {
/* default header print */
if (crease >= 0.0f) {
- BLI_snprintf(str, sizeof(str), IFACE_("Crease: +%.3f %s"), crease, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Crease: +%.3f %s"), crease, t->proptext);
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Crease: %.3f %s"), crease, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Crease: %.3f %s"), crease, t->proptext);
}
}
@@ -6167,12 +6161,12 @@ static void headerBoneSize(TransInfo *t, const float vec[3], char str[UI_MAX_DRA
if (t->con.mode & CON_APPLY) {
if (t->num.idx_max == 0) {
BLI_snprintf(
- str, UI_MAX_DRAW_STR, IFACE_("ScaleB: %s%s %s"), &tvec[0], t->con.text, t->proptext);
+ str, UI_MAX_DRAW_STR, TIP_("ScaleB: %s%s %s"), &tvec[0], t->con.text, t->proptext);
}
else {
BLI_snprintf(str,
UI_MAX_DRAW_STR,
- IFACE_("ScaleB: %s : %s : %s%s %s"),
+ TIP_("ScaleB: %s : %s : %s%s %s"),
&tvec[0],
&tvec[NUM_STR_REP_LEN],
&tvec[NUM_STR_REP_LEN * 2],
@@ -6183,7 +6177,7 @@ static void headerBoneSize(TransInfo *t, const float vec[3], char str[UI_MAX_DRA
else {
BLI_snprintf(str,
UI_MAX_DRAW_STR,
- IFACE_("ScaleB X: %s Y: %s Z: %s%s %s"),
+ TIP_("ScaleB X: %s Y: %s Z: %s%s %s"),
&tvec[0],
&tvec[NUM_STR_REP_LEN],
&tvec[NUM_STR_REP_LEN * 2],
@@ -6305,10 +6299,10 @@ static void applyBoneEnvelope(TransInfo *t, const int UNUSED(mval[2]))
char c[NUM_STR_REP_LEN];
outputNumInput(&(t->num), c, &t->scene->unit);
- BLI_snprintf(str, sizeof(str), IFACE_("Envelope: %s"), c);
+ BLI_snprintf(str, sizeof(str), TIP_("Envelope: %s"), c);
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Envelope: %3f"), ratio);
+ BLI_snprintf(str, sizeof(str), TIP_("Envelope: %3f"), ratio);
}
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
@@ -8075,7 +8069,7 @@ static void applyEdgeSlide(TransInfo *t, const int UNUSED(mval[2]))
t->values[0] = final;
/* header string */
- ofs += BLI_strncpy_rlen(str + ofs, IFACE_("Edge Slide: "), sizeof(str) - ofs);
+ ofs += BLI_strncpy_rlen(str + ofs, TIP_("Edge Slide: "), sizeof(str) - ofs);
if (hasNumInput(&t->num)) {
char c[NUM_STR_REP_LEN];
outputNumInput(&(t->num), c, &t->scene->unit);
@@ -8085,13 +8079,13 @@ static void applyEdgeSlide(TransInfo *t, const int UNUSED(mval[2]))
ofs += BLI_snprintf(str + ofs, sizeof(str) - ofs, "%.4f ", final);
}
ofs += BLI_snprintf(
- str + ofs, sizeof(str) - ofs, IFACE_("(E)ven: %s, "), WM_bool_as_string(use_even));
+ str + ofs, sizeof(str) - ofs, TIP_("(E)ven: %s, "), WM_bool_as_string(use_even));
if (use_even) {
ofs += BLI_snprintf(
- str + ofs, sizeof(str) - ofs, IFACE_("(F)lipped: %s, "), WM_bool_as_string(flipped));
+ str + ofs, sizeof(str) - ofs, TIP_("(F)lipped: %s, "), WM_bool_as_string(flipped));
}
ofs += BLI_snprintf(
- str + ofs, sizeof(str) - ofs, IFACE_("Alt or (C)lamp: %s"), WM_bool_as_string(is_clamp));
+ str + ofs, sizeof(str) - ofs, TIP_("Alt or (C)lamp: %s"), WM_bool_as_string(is_clamp));
/* done with header string */
/* do stuff here */
@@ -8686,7 +8680,7 @@ static void applyVertSlide(TransInfo *t, const int UNUSED(mval[2]))
t->values[0] = final;
/* header string */
- ofs += BLI_strncpy_rlen(str + ofs, IFACE_("Vert Slide: "), sizeof(str) - ofs);
+ ofs += BLI_strncpy_rlen(str + ofs, TIP_("Vert Slide: "), sizeof(str) - ofs);
if (hasNumInput(&t->num)) {
char c[NUM_STR_REP_LEN];
outputNumInput(&(t->num), c, &t->scene->unit);
@@ -8696,13 +8690,13 @@ static void applyVertSlide(TransInfo *t, const int UNUSED(mval[2]))
ofs += BLI_snprintf(str + ofs, sizeof(str) - ofs, "%.4f ", final);
}
ofs += BLI_snprintf(
- str + ofs, sizeof(str) - ofs, IFACE_("(E)ven: %s, "), WM_bool_as_string(use_even));
+ str + ofs, sizeof(str) - ofs, TIP_("(E)ven: %s, "), WM_bool_as_string(use_even));
if (use_even) {
ofs += BLI_snprintf(
- str + ofs, sizeof(str) - ofs, IFACE_("(F)lipped: %s, "), WM_bool_as_string(flipped));
+ str + ofs, sizeof(str) - ofs, TIP_("(F)lipped: %s, "), WM_bool_as_string(flipped));
}
ofs += BLI_snprintf(
- str + ofs, sizeof(str) - ofs, IFACE_("Alt or (C)lamp: %s"), WM_bool_as_string(is_clamp));
+ str + ofs, sizeof(str) - ofs, TIP_("Alt or (C)lamp: %s"), WM_bool_as_string(is_clamp));
/* done with header string */
/* do stuff here */
@@ -8761,10 +8755,10 @@ static void applyBoneRoll(TransInfo *t, const int UNUSED(mval[2]))
outputNumInput(&(t->num), c, &t->scene->unit);
- BLI_snprintf(str, sizeof(str), IFACE_("Roll: %s"), &c[0]);
+ BLI_snprintf(str, sizeof(str), TIP_("Roll: %s"), &c[0]);
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Roll: %.2f"), RAD2DEGF(final));
+ BLI_snprintf(str, sizeof(str), TIP_("Roll: %.2f"), RAD2DEGF(final));
}
/* set roll values */
@@ -8844,19 +8838,19 @@ static void applyBakeTime(TransInfo *t, const int mval[2])
outputNumInput(&(t->num), c, &t->scene->unit);
if (time >= 0.0f) {
- BLI_snprintf(str, sizeof(str), IFACE_("Time: +%s %s"), c, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Time: +%s %s"), c, t->proptext);
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Time: %s %s"), c, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Time: %s %s"), c, t->proptext);
}
}
else {
/* default header print */
if (time >= 0.0f) {
- BLI_snprintf(str, sizeof(str), IFACE_("Time: +%.3f %s"), time, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Time: +%.3f %s"), time, t->proptext);
}
else {
- BLI_snprintf(str, sizeof(str), IFACE_("Time: %.3f %s"), time, t->proptext);
+ BLI_snprintf(str, sizeof(str), TIP_("Time: %.3f %s"), time, t->proptext);
}
}
@@ -8928,7 +8922,7 @@ static void applyMirror(TransInfo *t, const int UNUSED(mval[2]))
t->con.applySize(t, NULL, NULL, mat);
}
- BLI_snprintf(str, sizeof(str), IFACE_("Mirror%s"), t->con.text);
+ BLI_snprintf(str, sizeof(str), TIP_("Mirror%s"), t->con.text);
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
@@ -8972,10 +8966,10 @@ static void applyMirror(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
if (t->flag & T_2D_EDIT) {
- ED_area_status_text(t->sa, IFACE_("Select a mirror axis (X, Y)"));
+ ED_area_status_text(t->sa, TIP_("Select a mirror axis (X, Y)"));
}
else {
- ED_area_status_text(t->sa, IFACE_("Select a mirror axis (X, Y, Z)"));
+ ED_area_status_text(t->sa, TIP_("Select a mirror axis (X, Y, Z)"));
}
}
}
@@ -9038,7 +9032,7 @@ static void applyAlign(TransInfo *t, const int UNUSED(mval[2]))
recalcData(t);
- ED_area_status_text(t->sa, IFACE_("Align"));
+ ED_area_status_text(t->sa, TIP_("Align"));
}
/** \} */
@@ -9083,7 +9077,7 @@ static void headerSeqSlide(TransInfo *t, const float val[2], char str[UI_MAX_DRA
}
ofs += BLI_snprintf(
- str + ofs, UI_MAX_DRAW_STR - ofs, IFACE_("Sequence Slide: %s%s, ("), &tvec[0], t->con.text);
+ str + ofs, UI_MAX_DRAW_STR - ofs, TIP_("Sequence Slide: %s%s, ("), &tvec[0], t->con.text);
if (t->keymap) {
wmKeyMapItem *kmi = WM_modalkeymap_find_propvalue(t->keymap, TFM_MODAL_TRANSLATE);
@@ -9093,7 +9087,7 @@ static void headerSeqSlide(TransInfo *t, const float val[2], char str[UI_MAX_DRA
}
ofs += BLI_snprintf(str + ofs,
UI_MAX_DRAW_STR - ofs,
- IFACE_(" or Alt) Expand to fit %s"),
+ TIP_(" or Alt) Expand to fit %s"),
WM_bool_as_string((t->flag & T_ALT_TRANSFORM) != 0));
}
@@ -9354,11 +9348,11 @@ static void headerTimeTranslate(TransInfo *t, char str[UI_MAX_DRAW_STR])
}
}
- ofs += BLI_snprintf(str, UI_MAX_DRAW_STR, IFACE_("DeltaX: %s"), &tvec[0]);
+ ofs += BLI_snprintf(str, UI_MAX_DRAW_STR, TIP_("DeltaX: %s"), &tvec[0]);
if (t->flag & T_PROP_EDIT_ALL) {
ofs += BLI_snprintf(
- str + ofs, UI_MAX_DRAW_STR - ofs, IFACE_(" Proportional size: %.2f"), t->prop_size);
+ str + ofs, UI_MAX_DRAW_STR - ofs, TIP_(" Proportional size: %.2f"), t->prop_size);
}
}
@@ -9546,7 +9540,7 @@ static void headerTimeSlide(TransInfo *t, const float sval, char str[UI_MAX_DRAW
BLI_snprintf(&tvec[0], NUM_STR_REP_LEN, "%.4f", val);
}
- BLI_snprintf(str, UI_MAX_DRAW_STR, IFACE_("TimeSlide: %s"), &tvec[0]);
+ BLI_snprintf(str, UI_MAX_DRAW_STR, TIP_("TimeSlide: %s"), &tvec[0]);
}
static void applyTimeSlideValue(TransInfo *t, float sval)
@@ -9704,7 +9698,7 @@ static void headerTimeScale(TransInfo *t, char str[UI_MAX_DRAW_STR])
BLI_snprintf(&tvec[0], NUM_STR_REP_LEN, "%.4f", t->values[0]);
}
- BLI_snprintf(str, UI_MAX_DRAW_STR, IFACE_("ScaleX: %s"), &tvec[0]);
+ BLI_snprintf(str, UI_MAX_DRAW_STR, TIP_("ScaleX: %s"), &tvec[0]);
}
static void applyTimeScaleValue(TransInfo *t)
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index ee08eb20ea3..06851451461 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -691,17 +691,17 @@ void setUserConstraint(TransInfo *t, short orientation, int mode, const char fte
switch (orientation) {
case V3D_ORIENT_GLOBAL: {
float mtx[3][3];
- BLI_snprintf(text, sizeof(text), ftext, IFACE_("global"));
+ BLI_snprintf(text, sizeof(text), ftext, TIP_("global"));
unit_m3(mtx);
setConstraint(t, mtx, mode, text);
break;
}
case V3D_ORIENT_LOCAL:
- BLI_snprintf(text, sizeof(text), ftext, IFACE_("local"));
+ BLI_snprintf(text, sizeof(text), ftext, TIP_("local"));
setLocalConstraint(t, mode, text);
break;
case V3D_ORIENT_NORMAL:
- BLI_snprintf(text, sizeof(text), ftext, IFACE_("normal"));
+ BLI_snprintf(text, sizeof(text), ftext, TIP_("normal"));
if (checkUseAxisMatrix(t)) {
setAxisMatrixConstraint(t, mode, text);
}
@@ -710,19 +710,19 @@ void setUserConstraint(TransInfo *t, short orientation, int mode, const char fte
}
break;
case V3D_ORIENT_VIEW:
- BLI_snprintf(text, sizeof(text), ftext, IFACE_("view"));
+ BLI_snprintf(text, sizeof(text), ftext, TIP_("view"));
setConstraint(t, t->spacemtx, mode, text);
break;
case V3D_ORIENT_CURSOR:
- BLI_snprintf(text, sizeof(text), ftext, IFACE_("cursor"));
+ BLI_snprintf(text, sizeof(text), ftext, TIP_("cursor"));
setConstraint(t, t->spacemtx, mode, text);
break;
case V3D_ORIENT_GIMBAL:
- BLI_snprintf(text, sizeof(text), ftext, IFACE_("gimbal"));
+ BLI_snprintf(text, sizeof(text), ftext, TIP_("gimbal"));
setConstraint(t, t->spacemtx, mode, text);
break;
case V3D_ORIENT_CUSTOM_MATRIX:
- BLI_snprintf(text, sizeof(text), ftext, IFACE_("custom matrix"));
+ BLI_snprintf(text, sizeof(text), ftext, TIP_("custom matrix"));
setConstraint(t, t->spacemtx, mode, text);
break;
case V3D_ORIENT_CUSTOM: {
@@ -730,7 +730,7 @@ void setUserConstraint(TransInfo *t, short orientation, int mode, const char fte
BLI_snprintf(orientation_str,
sizeof(orientation_str),
"%s \"%s\"",
- IFACE_("custom orientation"),
+ TIP_("custom orientation"),
t->orientation.custom->name);
BLI_snprintf(text, sizeof(text), ftext, orientation_str);
setConstraint(t, t->spacemtx, mode, text);
@@ -1025,11 +1025,11 @@ static void setNearestAxis2d(TransInfo *t)
/* no correction needed... just use whichever one is lower */
if (abs(t->mval[0] - t->con.imval[0]) < abs(t->mval[1] - t->con.imval[1])) {
t->con.mode |= CON_AXIS1;
- BLI_strncpy(t->con.text, IFACE_(" along Y axis"), sizeof(t->con.text));
+ BLI_strncpy(t->con.text, TIP_(" along Y axis"), sizeof(t->con.text));
}
else {
t->con.mode |= CON_AXIS0;
- BLI_strncpy(t->con.text, IFACE_(" along X axis"), sizeof(t->con.text));
+ BLI_strncpy(t->con.text, TIP_(" along X axis"), sizeof(t->con.text));
}
}
@@ -1081,31 +1081,31 @@ static void setNearestAxis3d(TransInfo *t)
if (len[0] <= len[1] && len[0] <= len[2]) {
if (t->modifiers & MOD_CONSTRAINT_PLANE) {
t->con.mode |= (CON_AXIS1 | CON_AXIS2);
- BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" locking %s X axis"), t->spacename);
+ BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" locking %s X axis"), t->spacename);
}
else {
t->con.mode |= CON_AXIS0;
- BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" along %s X axis"), t->spacename);
+ BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" along %s X axis"), t->spacename);
}
}
else if (len[1] <= len[0] && len[1] <= len[2]) {
if (t->modifiers & MOD_CONSTRAINT_PLANE) {
t->con.mode |= (CON_AXIS0 | CON_AXIS2);
- BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" locking %s Y axis"), t->spacename);
+ BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" locking %s Y axis"), t->spacename);
}
else {
t->con.mode |= CON_AXIS1;
- BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" along %s Y axis"), t->spacename);
+ BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" along %s Y axis"), t->spacename);
}
}
else if (len[2] <= len[1] && len[2] <= len[0]) {
if (t->modifiers & MOD_CONSTRAINT_PLANE) {
t->con.mode |= (CON_AXIS0 | CON_AXIS1);
- BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" locking %s Z axis"), t->spacename);
+ BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" locking %s Z axis"), t->spacename);
}
else {
t->con.mode |= CON_AXIS2;
- BLI_snprintf(t->con.text, sizeof(t->con.text), IFACE_(" along %s Z axis"), t->spacename);
+ BLI_snprintf(t->con.text, sizeof(t->con.text), TIP_(" along %s Z axis"), t->spacename);
}
}
}
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 70bb2bf98a6..cbe9505d3f2 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -439,25 +439,25 @@ void initTransformOrientation(bContext *C, TransInfo *t)
switch (t->orientation.user) {
case V3D_ORIENT_GLOBAL:
unit_m3(t->spacemtx);
- BLI_strncpy(t->spacename, IFACE_("global"), sizeof(t->spacename));
+ BLI_strncpy(t->spacename, TIP_("global"), sizeof(t->spacename));
break;
case V3D_ORIENT_GIMBAL:
unit_m3(t->spacemtx);
if (ob && gimbal_axis(ob, t->spacemtx)) {
- BLI_strncpy(t->spacename, IFACE_("gimbal"), sizeof(t->spacename));
+ BLI_strncpy(t->spacename, TIP_("gimbal"), sizeof(t->spacename));
break;
}
ATTR_FALLTHROUGH; /* no gimbal fallthrough to normal */
case V3D_ORIENT_NORMAL:
if (obedit || (ob && ob->mode & OB_MODE_POSE)) {
- BLI_strncpy(t->spacename, IFACE_("normal"), sizeof(t->spacename));
+ BLI_strncpy(t->spacename, TIP_("normal"), sizeof(t->spacename));
ED_getTransformOrientationMatrix(C, t->spacemtx, t->around);
break;
}
ATTR_FALLTHROUGH; /* we define 'normal' as 'local' in Object mode */
case V3D_ORIENT_LOCAL:
- BLI_strncpy(t->spacename, IFACE_("local"), sizeof(t->spacename));
+ BLI_strncpy(t->spacename, TIP_("local"), sizeof(t->spacename));
if (ob) {
copy_m3_m4(t->spacemtx, ob->obmat);
@@ -474,7 +474,7 @@ void initTransformOrientation(bContext *C, TransInfo *t)
RegionView3D *rv3d = t->ar->regiondata;
float mat[3][3];
- BLI_strncpy(t->spacename, IFACE_("view"), sizeof(t->spacename));
+ BLI_strncpy(t->spacename, TIP_("view"), sizeof(t->spacename));
copy_m3_m4(mat, rv3d->viewinv);
normalize_m3(mat);
copy_m3_m3(t->spacemtx, mat);
@@ -484,13 +484,13 @@ void initTransformOrientation(bContext *C, TransInfo *t)
}
break;
case V3D_ORIENT_CURSOR: {
- BLI_strncpy(t->spacename, IFACE_("cursor"), sizeof(t->spacename));
+ BLI_strncpy(t->spacename, TIP_("cursor"), sizeof(t->spacename));
BKE_scene_cursor_rot_to_mat3(&t->scene->cursor, t->spacemtx);
break;
}
case V3D_ORIENT_CUSTOM_MATRIX:
/* Already set. */
- BLI_strncpy(t->spacename, IFACE_("custom"), sizeof(t->spacename));
+ BLI_strncpy(t->spacename, TIP_("custom"), sizeof(t->spacename));
break;
case V3D_ORIENT_CUSTOM:
BLI_strncpy(t->spacename, t->orientation.custom->name, sizeof(t->spacename));
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c
index ace60295148..03c43c8d16d 100644
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@ -1609,7 +1609,7 @@ static short snapCurve(SnapData *snapdata,
bool has_snap = false;
/* only vertex snapping mode (eg control points and handles) supported for now) */
- if (snapdata->snap_to_flag != SCE_SNAP_MODE_VERTEX) {
+ if ((snapdata->snap_to_flag & SCE_SNAP_MODE_VERTEX) == 0) {
return 0;
}
@@ -1640,8 +1640,8 @@ static short snapCurve(SnapData *snapdata,
float(*clip_planes)[4] = snapdata->clip_plane;
int clip_plane_len = snapdata->clip_plane_len;
- if (use_obedit && snapdata->has_occlusion_plane) {
- /* In editing mode nurbs are not occluded. */
+ if (snapdata->has_occlusion_plane) {
+ /* We snap to vertices even if coccluded. */
clip_planes++;
clip_plane_len--;
}
@@ -2384,7 +2384,7 @@ static short snapObject(SnapObjectContext *sctx,
break;
case OB_CURVE:
retval = snapCurve(snapdata, ob, obmat, use_obedit, dist_px, r_loc, r_no, r_index);
- ATTR_FALLTHROUGH;
+ break; /* Use ATTR_FALLTHROUGH if we want to snap to the generated mesh. */
case OB_SURF:
case OB_FONT: {
if (ob->runtime.mesh_eval) {
@@ -2757,7 +2757,8 @@ static short transform_snap_context_project_view3d_mixed_impl(
snapdata.clip_plane_len = 2;
snapdata.has_occlusion_plane = false;
- if (has_hit) {
+ /* By convention we only snap to the original elements of a curve. */
+ if (has_hit && ob->type != OB_CURVE) {
/* Compute the new clip_pane but do not add it yet. */
float new_clipplane[4];
plane_from_point_normal_v3(new_clipplane, loc, no);
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index c23e004b306..e751c7263cb 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -324,14 +324,14 @@ void unpack_menu(bContext *C,
if (!STREQ(abs_name, local_name)) {
switch (checkPackedFile(BKE_main_blendfile_path(bmain), local_name, pf)) {
case PF_NOFILE:
- BLI_snprintf(line, sizeof(line), IFACE_("Create %s"), local_name);
+ BLI_snprintf(line, sizeof(line), TIP_("Create %s"), local_name);
uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr);
RNA_enum_set(&props_ptr, "method", PF_WRITE_LOCAL);
RNA_string_set(&props_ptr, "id", id_name);
break;
case PF_EQUAL:
- BLI_snprintf(line, sizeof(line), IFACE_("Use %s (identical)"), local_name);
+ BLI_snprintf(line, sizeof(line), TIP_("Use %s (identical)"), local_name);
// uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_LOCAL);
uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr);
RNA_enum_set(&props_ptr, "method", PF_USE_LOCAL);
@@ -339,13 +339,13 @@ void unpack_menu(bContext *C,
break;
case PF_DIFFERS:
- BLI_snprintf(line, sizeof(line), IFACE_("Use %s (differs)"), local_name);
+ BLI_snprintf(line, sizeof(line), TIP_("Use %s (differs)"), local_name);
// uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_LOCAL);
uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr);
RNA_enum_set(&props_ptr, "method", PF_USE_LOCAL);
RNA_string_set(&props_ptr, "id", id_name);
- BLI_snprintf(line, sizeof(line), IFACE_("Overwrite %s"), local_name);
+ BLI_snprintf(line, sizeof(line), TIP_("Overwrite %s"), local_name);
// uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_WRITE_LOCAL);
uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr);
RNA_enum_set(&props_ptr, "method", PF_WRITE_LOCAL);
@@ -357,27 +357,27 @@ void unpack_menu(bContext *C,
switch (checkPackedFile(BKE_main_blendfile_path(bmain), abs_name, pf)) {
case PF_NOFILE:
- BLI_snprintf(line, sizeof(line), IFACE_("Create %s"), abs_name);
+ BLI_snprintf(line, sizeof(line), TIP_("Create %s"), abs_name);
// uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_WRITE_ORIGINAL);
uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr);
RNA_enum_set(&props_ptr, "method", PF_WRITE_ORIGINAL);
RNA_string_set(&props_ptr, "id", id_name);
break;
case PF_EQUAL:
- BLI_snprintf(line, sizeof(line), IFACE_("Use %s (identical)"), abs_name);
+ BLI_snprintf(line, sizeof(line), TIP_("Use %s (identical)"), abs_name);
// uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_ORIGINAL);
uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr);
RNA_enum_set(&props_ptr, "method", PF_USE_ORIGINAL);
RNA_string_set(&props_ptr, "id", id_name);
break;
case PF_DIFFERS:
- BLI_snprintf(line, sizeof(line), IFACE_("Use %s (differs)"), abs_name);
+ BLI_snprintf(line, sizeof(line), TIP_("Use %s (differs)"), abs_name);
// uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_ORIGINAL);
uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr);
RNA_enum_set(&props_ptr, "method", PF_USE_ORIGINAL);
RNA_string_set(&props_ptr, "id", id_name);
- BLI_snprintf(line, sizeof(line), IFACE_("Overwrite %s"), abs_name);
+ BLI_snprintf(line, sizeof(line), TIP_("Overwrite %s"), abs_name);
// uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_WRITE_ORIGINAL);
uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &props_ptr);
RNA_enum_set(&props_ptr, "method", PF_WRITE_ORIGINAL);
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index b938f963d9a..76c3a6d6c4a 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -290,7 +290,7 @@ static void stitch_preview_delete(StitchPreviewer *stitch_preview)
/* This function updates the header of the UV editor when the stitch tool updates its settings */
static void stitch_update_header(StitchStateContainer *ssc, bContext *C)
{
- const char *str = IFACE_(
+ const char *str = TIP_(
"Mode(TAB) %s, "
"(S)nap %s, "
"(M)idpoints %s, "
@@ -305,7 +305,7 @@ static void stitch_update_header(StitchStateContainer *ssc, bContext *C)
BLI_snprintf(msg,
sizeof(msg),
str,
- ssc->mode == STITCH_VERT ? IFACE_("Vertex") : IFACE_("Edge"),
+ ssc->mode == STITCH_VERT ? TIP_("Vertex") : TIP_("Edge"),
WM_bool_as_string(ssc->snap_islands),
WM_bool_as_string(ssc->midpoints),
ssc->limit_dist,
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 796594802c4..bb73d61a139 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -727,9 +727,9 @@ static void minimize_stretch_iteration(bContext *C, wmOperator *op, bool interac
param_flush(ms->handle);
if (sa) {
- BLI_snprintf(str, sizeof(str), IFACE_("Minimize Stretch. Blend %.2f"), ms->blend);
+ BLI_snprintf(str, sizeof(str), TIP_("Minimize Stretch. Blend %.2f"), ms->blend);
ED_area_status_text(sa, str);
- ED_workspace_status_text(C, IFACE_("Press + and -, or scroll wheel to set blending"));
+ ED_workspace_status_text(C, TIP_("Press + and -, or scroll wheel to set blending"));
}
ms->lasttime = PIL_check_seconds_timer();
diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
index bcf87f81c71..4552ce849f2 100644
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@ -307,7 +307,7 @@ static bool test_edge_type_conditions(struct edge_type_condition *conditions,
static void prepare(Render *re, ViewLayer *view_layer, Depsgraph *depsgraph)
{
// load mesh
- re->i.infostr = IFACE_("Freestyle: Mesh loading");
+ re->i.infostr = TIP_("Freestyle: Mesh loading");
re->stats_draw(re->sdh, &re->i);
re->i.infostr = NULL;
if (controller->LoadMesh(
@@ -502,7 +502,7 @@ static void prepare(Render *re, ViewLayer *view_layer, Depsgraph *depsgraph)
}
// compute view map
- re->i.infostr = IFACE_("Freestyle: View map creation");
+ re->i.infostr = TIP_("Freestyle: View map creation");
re->stats_draw(re->sdh, &re->i);
re->i.infostr = NULL;
controller->ComputeViewMap();
@@ -669,7 +669,7 @@ Render *FRS_do_stroke_rendering(Render *re, ViewLayer *view_layer, int render)
// render and composite Freestyle result
if (controller->_ViewMap) {
// render strokes
- re->i.infostr = IFACE_("Freestyle: Stroke rendering");
+ re->i.infostr = TIP_("Freestyle: Stroke rendering");
re->stats_draw(re->sdh, &re->i);
re->i.infostr = NULL;
g_freestyle.scene = DEG_get_evaluated_scene(depsgraph);
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
index 36087f232e2..f829085d13c 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
@@ -195,7 +195,7 @@ void gpencil_apply_modifier_material(
BLI_ghash_insert(gh_color, mat->id.name, newmat);
DEG_id_tag_update(&newmat->id, ID_RECALC_COPY_ON_WRITE);
}
- /* reasign color index */
+ /* Reaasign color index. */
int idx = BKE_gpencil_object_material_get_index(ob, newmat);
gps->mat_nr = idx - 1;
}
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c
index 98ab6d96c0a..e4d083947b4 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.c
+++ b/source/blender/gpu/intern/gpu_framebuffer.c
@@ -724,7 +724,7 @@ void GPU_framebuffer_blit(GPUFrameBuffer *fb_read,
}
/**
- * Use this if you need to custom downsample your texture and use the previous mip level as input.
+ * Use this if you need to custom down-sample your texture and use the previous mip level as input.
* This function only takes care of the correct texture handling.
* It execute the callback for each texture level.
*/
diff --git a/source/blender/imbuf/intern/cineon/logImageCore.h b/source/blender/imbuf/intern/cineon/logImageCore.h
index 80e32ffe77e..3d49da7eb42 100644
--- a/source/blender/imbuf/intern/cineon/logImageCore.h
+++ b/source/blender/imbuf/intern/cineon/logImageCore.h
@@ -44,7 +44,7 @@ extern "C" {
*/
/* There are some differences between DPX and Cineon
- * so we need to know from what type of file the datas come from. */
+ * so we need to know from what type of file the data came from. */
enum format {
format_DPX,
format_Cineon,
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index bec29252b6f..02277a7953c 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -2196,7 +2196,7 @@ void IMB_colormanagement_imbuf_to_byte_texture(unsigned char *out_buffer,
processor = colorspace_to_scene_linear_processor(ibuf->rect_colorspace);
}
- /* TODO(brecht): make this multithreaded, or at least process in batches. */
+ /* TODO(brecht): make this multi-threaded, or at least process in batches. */
const unsigned char *in_buffer = (unsigned char *)ibuf->rect;
const bool use_premultiply = IMB_alpha_affects_rgb(ibuf) && store_premultiplied;
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index a98ec2b0f15..7b3de4167a2 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -1254,14 +1254,14 @@ void IMB_exr_read_channels(void *handle)
size_t ystride = echan->ystride * sizeof(float);
if (!flip) {
- /* inverse correct first pixel for datawindow coordinates */
+ /* Inverse correct first pixel for data-window coordinates. */
rect -= echan->xstride * (dw.min.x - dw.min.y * data->width);
/* move to last scanline to flip to Blender convention */
rect += echan->xstride * (data->height - 1) * data->width;
ystride = -ystride;
}
else {
- /* inverse correct first pixel for datawindow coordinates */
+ /* Inverse correct first pixel for data-window coordinates. */
rect -= echan->xstride * (dw.min.x + dw.min.y * data->width);
}
@@ -1774,7 +1774,7 @@ static bool imb_exr_is_multilayer_file(MultiPartInputFile &file)
* but it also could be layers without names in the file and such case
* shall be considered a multilayer exr
*
- * that's what we do here: test whether there're empty layer names together
+ * that's what we do here: test whether they're empty layer names together
* with non-empty ones in the file
*/
for (ChannelList::ConstIterator i = channels.begin(); i != channels.end(); i++) {
@@ -1976,7 +1976,7 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem,
imb_addrectfloatImBuf(ibuf);
- /* Inverse correct first pixel for datawindow
+ /* Inverse correct first pixel for data-window
* coordinates (- dw.min.y because of y flip). */
first = ibuf->rect_float - 4 * (dw.min.x - dw.min.y * width);
/* but, since we read y-flipped (negative y stride) we move to last scanline */
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 139cb298710..f06fcd7a727 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -244,7 +244,7 @@ typedef struct ID {
/** MAX_ID_NAME. */
char name[66];
/**
- * LIB_... flags report on status of the datablock this ID belongs to
+ * LIB_... flags report on status of the data-block this ID belongs to
* (persistent, saved to and read from .blend).
*/
short flag;
@@ -262,7 +262,7 @@ typedef struct ID {
IDOverrideStatic *override_static;
/**
- * Only set for datablocks which are coming from copy-on-write, points to
+ * Only set for data-blocks which are coming from copy-on-write, points to
* the original version of it.
*/
struct ID *orig_id;
@@ -403,7 +403,7 @@ typedef enum ID_Type {
ID_LP = MAKE_ID2('L', 'P'), /* LightProbe */
} ID_Type;
-/* Only used as 'placeholder' in .blend files for directly linked datablocks. */
+/* Only used as 'placeholder' in .blend files for directly linked data-blocks. */
#define ID_LINK_PLACEHOLDER MAKE_ID2('I', 'D') /* (internal use only) */
/* Deprecated. */
@@ -499,27 +499,27 @@ enum {
* to mark IDs needing to be expanded (only done once). */
LIB_TAG_NEED_EXPAND = 1 << 3,
/* RESET_AFTER_USE Flag used internally in readfile.c to mark ID
- * placeholders for linked datablocks needing to be read. */
+ * placeholders for linked data-blocks needing to be read. */
LIB_TAG_ID_LINK_PLACEHOLDER = 1 << 4,
/* RESET_AFTER_USE */
LIB_TAG_NEED_LINK = 1 << 5,
- /* RESET_NEVER tag datablock as a place-holder
+ /* RESET_NEVER tag data-block as a place-holder
* (because the real one could not be linked from its library e.g.). */
LIB_TAG_MISSING = 1 << 6,
- /* RESET_NEVER tag datablock as being up-to-date regarding its reference. */
+ /* RESET_NEVER tag data-block as being up-to-date regarding its reference. */
LIB_TAG_OVERRIDESTATIC_REFOK = 1 << 9,
- /* RESET_NEVER tag datablock as needing an auto-override execution, if enabled. */
+ /* RESET_NEVER tag data-block as needing an auto-override execution, if enabled. */
LIB_TAG_OVERRIDESTATIC_AUTOREFRESH = 1 << 17,
- /* tag datablock has having an extra user. */
+ /* tag data-block has having an extra user. */
LIB_TAG_EXTRAUSER = 1 << 2,
- /* tag datablock has having actually increased usercount for the extra virtual user. */
+ /* tag data-block has having actually increased usercount for the extra virtual user. */
LIB_TAG_EXTRAUSER_SET = 1 << 7,
/* RESET_AFTER_USE tag newly duplicated/copied IDs.
- * Also used internally in readfile.c to mark datablocks needing do_versions. */
+ * Also used internally in readfile.c to mark data-blocks needing do_versions. */
LIB_TAG_NEW = 1 << 8,
/* RESET_BEFORE_USE free test flag.
* TODO make it a RESET_AFTER_USE too. */
@@ -527,12 +527,12 @@ enum {
/* RESET_AFTER_USE tag existing data before linking so we know what is new. */
LIB_TAG_PRE_EXISTING = 1 << 11,
- /* The datablock is a copy-on-write/localized version. */
+ /* The data-block is a copy-on-write/localized version. */
LIB_TAG_COPIED_ON_WRITE = 1 << 12,
LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT = 1 << 13,
LIB_TAG_LOCALIZED = 1 << 14,
- /* RESET_NEVER tag datablock for freeing etc. behavior
+ /* RESET_NEVER tag data-block for freeing etc. behavior
* (usually set when copying real one into temp/runtime one). */
LIB_TAG_NO_MAIN = 1 << 15, /* Datablock is not listed in Main database. */
LIB_TAG_NO_USER_REFCOUNT = 1 << 16, /* Datablock does not refcount usages of other IDs. */
@@ -556,7 +556,7 @@ typedef enum IDRecalcFlag {
* When object of other type is tagged with this flag it makes the modifier
* stack to be re-evaluated.
* When object data type (mesh, curve, ...) gets tagged with this flag it
- * makes all objects which shares this datablock to be updated. */
+ * makes all objects which shares this data-block to be updated. */
ID_RECALC_GEOMETRY = (1 << 1),
/* ** Animation or time changed and animation is to be re-evaluated. ** */
@@ -590,7 +590,7 @@ typedef enum IDRecalcFlag {
ID_RECALC_BASE_FLAGS = (1 << 10),
ID_RECALC_POINT_CACHE = (1 << 11),
/* Only inform editors about the change. Is used to force update of editors
- * when datablock which is not a part of dependency graph did change.
+ * when data-block which is not a part of dependency graph did change.
*
* For example, brush texture did change and the preview is to be
* re-rendered. */
@@ -616,7 +616,7 @@ typedef enum IDRecalcFlag {
* Pseudonyms, to have more semantic meaning in the actual code without
* using too much low-level and implementation specific tags. */
- /* Update animation datablock itself, without doing full re-evaluation of
+ /* Update animation data-block itself, without doing full re-evaluation of
* all dependent objects. */
ID_RECALC_ANIMATION_NO_FLUSH = ID_RECALC_COPY_ON_WRITE,
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index ecf587301c7..1718aabc51d 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -1006,14 +1006,14 @@ typedef struct AnimOverride {
/**
* Animation data for some ID block (adt)
*
- * This block of data is used to provide all of the necessary animation data for a datablock.
+ * This block of data is used to provide all of the necessary animation data for a data-block.
* Currently, this data will not be reusable, as there shouldn't be any need to do so.
*
* This information should be made available for most if not all ID-blocks, which should
* enable all of its settings to be animatable locally. Animation from 'higher-up' ID-AnimData
* blocks may override local settings.
*
- * This datablock should be placed immediately after the ID block where it is used, so that
+ * This data-block should be placed immediately after the ID block where it is used, so that
* the code which retrieves this data can do so in an easier manner.
* See blenkernel/intern/anim_sys.c for details.
*/
@@ -1098,7 +1098,7 @@ typedef enum eAnimData_Flag {
/**
* Used for #BKE_animdata_from_id()
- * All ID-datablocks which have their own 'local' AnimData
+ * All ID-data-blocks which have their own 'local' AnimData
* should have the same arrangement in their structs.
*/
typedef struct IdAdtTemplate {
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index d5ab6e0412a..dbcacbcdcfe 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -172,7 +172,7 @@ typedef struct bGPDstroke_Runtime {
/* Grease-Pencil Annotations - 'Stroke'
* -> A stroke represents a (simplified version) of the curve
- * drawn by the user in one 'mousedown'->'mouseup' operation
+ * drawn by the user in one 'mouse-down'->'mouse-up' operation
*/
typedef struct bGPDstroke {
struct bGPDstroke *next, *prev;
@@ -459,7 +459,7 @@ typedef struct bGPgrid {
/* Grease-Pencil Annotations - 'DataBlock' */
typedef struct bGPdata {
- /** Grease Pencil data is a datablock. */
+ /** Grease Pencil data is a data-block. */
ID id;
/** Animation data - for animating draw settings. */
struct AnimData *adt;
@@ -467,7 +467,7 @@ typedef struct bGPdata {
/* Grease-Pencil data */
/** BGPDlayers. */
ListBase layers;
- /** Settings for this datablock. */
+ /** Settings for this data-block. */
int flag;
char _pad1[4];
@@ -533,9 +533,9 @@ typedef struct bGPdata {
* changes made during the porting process.
*/
typedef enum eGPdata_Flag {
- /* datablock is used for "annotations"
+ /* data-block is used for "annotations"
* NOTE: This flag used to be used in 2.4x, but should hardly ever have been set.
- * We can use this freely now, as all GP datablocks from pre-2.8 will get
+ * We can use this freely now, as all GP data-blocks from pre-2.8 will get
* set on file load (as many old use cases are for "annotations" only)
*/
GP_DATA_ANNOTATIONS = (1 << 0),
diff --git a/source/blender/makesdna/DNA_lightprobe_types.h b/source/blender/makesdna/DNA_lightprobe_types.h
index c5121481f88..5cae3c0b1e9 100644
--- a/source/blender/makesdna/DNA_lightprobe_types.h
+++ b/source/blender/makesdna/DNA_lightprobe_types.h
@@ -114,8 +114,7 @@ enum {
};
/* ------- Eevee LightProbes ------- */
-/* Needs to be there because written to file
- * with the lightcache. */
+/* Needs to be there because written to file with the light-cache. */
/* IMPORTANT Padding in these structs is essential. It must match
* GLSL struct definition in lightprobe_lib.glsl. */
diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h
index 3f73270493a..1c1bb9b9ce1 100644
--- a/source/blender/makesdna/DNA_sound_types.h
+++ b/source/blender/makesdna/DNA_sound_types.h
@@ -88,7 +88,7 @@ typedef struct bSound {
*/
void *playback_handle;
- /** Spinlock for asynchronous loading of sounds. */
+ /** Spin-lock for asynchronous loading of sounds. */
void *spinlock;
/* XXX unused currently (SOUND_TYPE_LIMITER) */
/* float start, end; */
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index c470cbeb090..99b2c423b44 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -550,7 +550,7 @@ static void rna_Armature_editbone_transform_update(Main *bmain, Scene *scene, Po
{
bArmature *arm = (bArmature *)ptr->id.data;
EditBone *ebone = (EditBone *)ptr->data;
- EditBone *child, *eboflip;
+ EditBone *child;
/* update our parent */
if (ebone->parent && ebone->flag & BONE_CONNECTED) {
@@ -565,26 +565,7 @@ static void rna_Armature_editbone_transform_update(Main *bmain, Scene *scene, Po
}
if (arm->flag & ARM_MIRROR_EDIT) {
- eboflip = ED_armature_ebone_get_mirrored(arm->edbo, ebone);
-
- if (eboflip) {
- eboflip->roll = -ebone->roll;
-
- eboflip->head[0] = -ebone->head[0];
- eboflip->tail[0] = -ebone->tail[0];
-
- /* update our parent */
- if (eboflip->parent && eboflip->flag & BONE_CONNECTED) {
- copy_v3_v3(eboflip->parent->tail, eboflip->head);
- }
-
- /* update our children if necessary */
- for (child = arm->edbo->first; child; child = child->next) {
- if (child->parent == eboflip && (child->flag & BONE_CONNECTED)) {
- copy_v3_v3(child->head, eboflip->tail);
- }
- }
- }
+ ED_armature_ebone_transform_mirror_update(arm, ebone, false);
}
rna_Armature_update_data(bmain, scene, ptr);
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index f2560527f39..2e2cb9c1054 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -198,7 +198,7 @@ static void UNUSED_FUNCTION(rna_GPencil_onion_skinning_update)(Main *bmain,
bGPDlayer *gpl;
bool enabled = false;
- /* Ensure that the datablock's onionskinning toggle flag
+ /* Ensure that the data-block's onion-skinning toggle flag
* stays in sync with the status of the actual layers
*/
for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 10d573b6f48..a126b880ea4 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -818,9 +818,13 @@ static void rna_Scene_camera_update(Main *bmain, Scene *UNUSED(scene_unused), Po
DEG_relations_tag_update(bmain);
}
-static void rna_Scene_fps_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
+static void rna_Scene_fps_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr))
{
DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_FPS | ID_RECALC_SEQUENCER_STRIPS);
+ /* NOTE: Tag via dependency graph will take care of all the updates ion the evaluated domain,
+ * however, changes in FPS actually modifies an original stip length, so this we take care about
+ * here. */
+ BKE_sequencer_refresh_sound_length(bmain, scene);
}
static void rna_Scene_listener_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
@@ -1146,13 +1150,13 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
{
ImageFormatData *imf = (ImageFormatData *)ptr->data;
ID *id = ptr->id.data;
+ imf->imtype = value;
+
const bool is_render = (id && GS(id->name) == ID_SCE);
/* see note below on why this is */
const char chan_flag = BKE_imtype_valid_channels(imf->imtype, true) |
(is_render ? IMA_CHAN_FLAG_BW : 0);
- imf->imtype = value;
-
/* ensure depth and color settings match */
if (((imf->planes == R_IMF_PLANES_BW) && !(chan_flag & IMA_CHAN_FLAG_BW)) ||
((imf->planes == R_IMF_PLANES_RGBA) && !(chan_flag & IMA_CHAN_FLAG_ALPHA))) {
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 4d7bc45308a..f5e4259c471 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -69,6 +69,7 @@ const EnumPropertyItem rna_enum_sequence_modifier_type_items[] = {
#ifdef RNA_RUNTIME
+# include "BKE_global.h"
# include "BKE_report.h"
# include "BKE_idprop.h"
# include "BKE_movieclip.h"
@@ -321,7 +322,7 @@ static void rna_Sequence_anim_startofs_final_set(PointerRNA *ptr, int value)
seq->anim_startofs = MIN2(value, seq->len + seq->anim_startofs);
- BKE_sequence_reload_new_file(scene, seq, false);
+ BKE_sequence_reload_new_file(G.main, scene, seq, false);
do_sequence_frame_change_update(scene, seq);
}
@@ -332,7 +333,7 @@ static void rna_Sequence_anim_endofs_final_set(PointerRNA *ptr, int value)
seq->anim_endofs = MIN2(value, seq->len + seq->anim_endofs);
- BKE_sequence_reload_new_file(scene, seq, false);
+ BKE_sequence_reload_new_file(G.main, scene, seq, false);
do_sequence_frame_change_update(scene, seq);
}
@@ -803,7 +804,7 @@ static void rna_Sequence_filepath_update(Main *bmain, Scene *UNUSED(scene), Poin
{
Scene *scene = (Scene *)ptr->id.data;
Sequence *seq = (Sequence *)(ptr->data);
- BKE_sequence_reload_new_file(scene, seq, true);
+ BKE_sequence_reload_new_file(bmain, scene, seq, true);
BKE_sequence_calc(scene, seq);
rna_Sequence_invalidate_raw_update(bmain, scene, ptr);
}
@@ -838,13 +839,13 @@ static Sequence *sequence_get_by_proxy(Editing *ed, StripProxy *proxy)
return data.seq;
}
-static void rna_Sequence_tcindex_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+static void rna_Sequence_tcindex_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
Scene *scene = (Scene *)ptr->id.data;
Editing *ed = BKE_sequencer_editing_get(scene, false);
Sequence *seq = sequence_get_by_proxy(ed, ptr->data);
- BKE_sequence_reload_new_file(scene, seq, false);
+ BKE_sequence_reload_new_file(bmain, scene, seq, false);
do_sequence_frame_change_update(scene, seq);
}
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c
index 37ebb76daa5..38bf1241b9c 100644
--- a/source/blender/makesrna/intern/rna_sequencer_api.c
+++ b/source/blender/makesrna/intern/rna_sequencer_api.c
@@ -103,8 +103,13 @@ static Sequence *alloc_generic_sequence(
return seq;
}
-static Sequence *rna_Sequences_new_clip(
- ID *id, Editing *ed, const char *name, MovieClip *clip, int channel, int frame_start)
+static Sequence *rna_Sequences_new_clip(ID *id,
+ Editing *ed,
+ Main *bmain,
+ const char *name,
+ MovieClip *clip,
+ int channel,
+ int frame_start)
{
Scene *scene = (Scene *)id;
Sequence *seq;
@@ -116,13 +121,15 @@ static Sequence *rna_Sequences_new_clip(
BKE_sequence_calc_disp(scene, seq);
+ DEG_relations_tag_update(bmain);
+ DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS);
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
return seq;
}
static Sequence *rna_Sequences_new_mask(
- ID *id, Editing *ed, const char *name, Mask *mask, int channel, int frame_start)
+ ID *id, Editing *ed, Main *bmain, const char *name, Mask *mask, int channel, int frame_start)
{
Scene *scene = (Scene *)id;
Sequence *seq;
@@ -135,13 +142,20 @@ static Sequence *rna_Sequences_new_mask(
BKE_sequence_calc_disp(scene, seq);
BKE_sequence_invalidate_cache_composite(scene, seq);
+ DEG_relations_tag_update(bmain);
+ DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS);
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
return seq;
}
-static Sequence *rna_Sequences_new_scene(
- ID *id, Editing *ed, const char *name, Scene *sce_seq, int channel, int frame_start)
+static Sequence *rna_Sequences_new_scene(ID *id,
+ Editing *ed,
+ Main *bmain,
+ const char *name,
+ Scene *sce_seq,
+ int channel,
+ int frame_start)
{
Scene *scene = (Scene *)id;
Sequence *seq;
@@ -149,13 +163,13 @@ static Sequence *rna_Sequences_new_scene(
seq = alloc_generic_sequence(ed, name, frame_start, channel, SEQ_TYPE_SCENE, NULL);
seq->scene = sce_seq;
seq->len = sce_seq->r.efra - sce_seq->r.sfra + 1;
- seq->scene_sound = BKE_sound_scene_add_scene_sound(
- scene, seq, frame_start, frame_start + seq->len, 0);
id_us_plus((ID *)sce_seq);
BKE_sequence_calc_disp(scene, seq);
BKE_sequence_invalidate_cache_composite(scene, seq);
+ DEG_relations_tag_update(bmain);
+ DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS);
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
return seq;
@@ -163,6 +177,7 @@ static Sequence *rna_Sequences_new_scene(
static Sequence *rna_Sequences_new_image(ID *id,
Editing *ed,
+ Main *bmain,
ReportList *reports,
const char *name,
const char *file,
@@ -185,6 +200,8 @@ static Sequence *rna_Sequences_new_image(ID *id,
BKE_sequence_calc_disp(scene, seq);
BKE_sequence_invalidate_cache_composite(scene, seq);
+ DEG_relations_tag_update(bmain);
+ DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS);
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
return seq;
@@ -221,6 +238,7 @@ static Sequence *rna_Sequences_new_movie(ID *id,
BKE_sequence_calc_disp(scene, seq);
BKE_sequence_invalidate_cache_composite(scene, seq);
+ DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS);
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
return seq;
@@ -241,20 +259,20 @@ static Sequence *rna_Sequences_new_sound(ID *id,
bSound *sound = BKE_sound_new_file(bmain, file);
- if (sound->playback_handle == NULL) {
+ SoundInfo info;
+ if (!BKE_sound_info_get(bmain, sound, &info)) {
BKE_id_free(bmain, sound);
BKE_report(reports, RPT_ERROR, "Sequences.new_sound: unable to open sound file");
return NULL;
}
-
seq = alloc_generic_sequence(ed, name, frame_start, channel, SEQ_TYPE_SOUND_RAM, sound->name);
seq->sound = sound;
- seq->len = ceil((double)BKE_sound_get_length(sound) * FPS);
-
- seq->scene_sound = BKE_sound_add_scene_sound(scene, seq, frame_start, frame_start + seq->len, 0);
+ seq->len = ceil((double)info.length * FPS);
BKE_sequence_calc_disp(scene, seq);
+ DEG_relations_tag_update(bmain);
+ DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS);
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
return seq;
@@ -346,12 +364,14 @@ static Sequence *rna_Sequences_new_effect(ID *id,
BKE_sequence_calc_disp(scene, seq);
BKE_sequence_invalidate_cache_composite(scene, seq);
+ DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS);
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
return seq;
}
-static void rna_Sequences_remove(ID *id, Editing *ed, ReportList *reports, PointerRNA *seq_ptr)
+static void rna_Sequences_remove(
+ ID *id, Editing *ed, Main *bmain, ReportList *reports, PointerRNA *seq_ptr)
{
Sequence *seq = seq_ptr->data;
Scene *scene = (Scene *)id;
@@ -365,6 +385,8 @@ static void rna_Sequences_remove(ID *id, Editing *ed, ReportList *reports, Point
BKE_sequence_free(scene, seq);
RNA_POINTER_INVALIDATE(seq_ptr);
+ DEG_relations_tag_update(bmain);
+ DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS);
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
}
@@ -521,7 +543,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Sequences", "Collection of Sequences");
func = RNA_def_function(srna, "new_clip", "rna_Sequences_new_clip");
- RNA_def_function_flag(func, FUNC_USE_SELF_ID);
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN);
RNA_def_function_ui_description(func, "Add a new movie clip sequence");
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
@@ -545,7 +567,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "new_mask", "rna_Sequences_new_mask");
- RNA_def_function_flag(func, FUNC_USE_SELF_ID);
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN);
RNA_def_function_ui_description(func, "Add a new mask sequence");
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
@@ -569,7 +591,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "new_scene", "rna_Sequences_new_scene");
- RNA_def_function_flag(func, FUNC_USE_SELF_ID);
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN);
RNA_def_function_ui_description(func, "Add a new scene sequence");
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
@@ -593,7 +615,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "new_image", "rna_Sequences_new_image");
- RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
+ RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID | FUNC_USE_MAIN);
RNA_def_function_ui_description(func, "Add a new image sequence");
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
@@ -702,7 +724,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "remove", "rna_Sequences_remove");
- RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS);
+ RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS | FUNC_USE_MAIN);
RNA_def_function_ui_description(func, "Remove a Sequence");
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "Sequence to remove");
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR);
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 911035c5521..84955c69ee0 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -3239,23 +3239,22 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_floor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_FLOOR);
- RNA_def_property_ui_text(
- prop, "Display Grid Floor", "Show the ground plane grid in perspective view");
+ RNA_def_property_ui_text(prop, "Display Grid Floor", "Show the ground plane grid");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "show_axis_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_X);
- RNA_def_property_ui_text(prop, "Display X Axis", "Show the X axis line in perspective view");
+ RNA_def_property_ui_text(prop, "Display X Axis", "Show the X axis line");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "show_axis_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Y);
- RNA_def_property_ui_text(prop, "Display Y Axis", "Show the Y axis line in perspective view");
+ RNA_def_property_ui_text(prop, "Display Y Axis", "Show the Y axis line");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "show_axis_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Z);
- RNA_def_property_ui_text(prop, "Display Z Axis", "Show the Z axis line in perspective view");
+ RNA_def_property_ui_text(prop, "Display Z Axis", "Show the Z axis line");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "grid_scale", PROP_FLOAT, PROP_NONE);
@@ -3290,9 +3289,7 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_outline_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_SELECT_OUTLINE);
RNA_def_property_ui_text(
- prop,
- "Outline Selected",
- "Show an outline highlight around selected objects in non-wireframe views");
+ prop, "Outline Selected", "Show an outline highlight around selected objects");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "show_object_origins", PROP_BOOLEAN, PROP_NONE);
@@ -3434,20 +3431,17 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_EDGES);
- RNA_def_property_ui_text(prop, "Draw Edges", "Display selected edges using highlights");
+ RNA_def_property_ui_text(prop, "Draw Edges", "Highlight selected edges");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "show_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_FACES);
- RNA_def_property_ui_text(prop, "Draw Faces", "Display shading over all faces");
+ RNA_def_property_ui_text(prop, "Draw Faces", "Highlight selected faces");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "show_face_center", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_FACE_DOT);
- RNA_def_property_ui_text(prop,
- "Draw Face Center",
- "Display face center "
- "(when disabled, edges display wider in edge mode)");
+ RNA_def_property_ui_text(prop, "Draw Face Center", "Display face center");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "show_edge_crease", PROP_BOOLEAN, PROP_NONE);
@@ -3843,7 +3837,8 @@ static void rna_def_space_view3d(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_gizmo_light_look_at", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gizmo_show_light", V3D_GIZMO_SHOW_LIGHT_LOOK_AT);
- RNA_def_property_ui_text(prop, "Show Light Look-At", "Gizmo to adjust spot and area size");
+ RNA_def_property_ui_text(
+ prop, "Show Light Look-At", "Gizmo to adjust the direction of the light");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
/* Camera Object Data. */
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 82315605ee5..1e5f1dc20ec 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -279,12 +279,24 @@ static StructRNA *rna_Panel_register(Main *bmain,
/* check if we have registered this panel type before, and remove it */
for (pt = art->paneltypes.first; pt; pt = pt->next) {
if (STREQ(pt->idname, dummypt.idname)) {
+ PanelType *pt_next = pt->next;
if (pt->ext.srna) {
rna_Panel_unregister(bmain, pt->ext.srna);
}
else {
BLI_freelinkN(&art->paneltypes, pt);
}
+
+ /* The order of panel types will be altered on re-registration. */
+ if (dummypt.parent_id[0] && (parent == NULL)) {
+ for (pt = pt_next; pt; pt = pt->next) {
+ if (STREQ(pt->idname, dummypt.parent_id)) {
+ parent = pt;
+ break;
+ }
+ }
+ }
+
break;
}
@@ -292,6 +304,7 @@ static StructRNA *rna_Panel_register(Main *bmain,
parent = pt;
}
}
+
if (!RNA_struct_available_or_report(reports, dummypt.idname)) {
return NULL;
}
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c
index 25549c95896..ca9f15ed01a 100644
--- a/source/blender/python/generic/py_capi_utils.c
+++ b/source/blender/python/generic/py_capi_utils.c
@@ -663,7 +663,7 @@ const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce)
if (result) {
/* 99% of the time this is enough but we better support non unicode
- * chars since blender doesnt limit this */
+ * chars since blender doesn't limit this. */
return result;
}
else {
diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c
index f0a3c7f4d5f..9ffb4cb4821 100644
--- a/source/blender/python/intern/bpy_app.c
+++ b/source/blender/python/intern/bpy_app.c
@@ -508,6 +508,12 @@ static PyGetSetDef bpy_app_getsets[] = {
(char *)bpy_app_global_flag_doc,
(void *)G_FLAG_EVENT_SIMULATE},
+ {(char *)"use_userpref_skip_save_on_exit",
+ bpy_app_global_flag_get,
+ bpy_app_global_flag_set,
+ (char *)bpy_app_global_flag_doc,
+ (void *)G_FLAG_USERPREF_NO_SAVE_ON_EXIT},
+
{(char *)"binary_path_python",
bpy_app_binary_path_python_get,
NULL,
diff --git a/source/blender/python/intern/bpy_rna_id_collection.c b/source/blender/python/intern/bpy_rna_id_collection.c
index dfd7624bd3d..6ff1849f646 100644
--- a/source/blender/python/intern/bpy_rna_id_collection.c
+++ b/source/blender/python/intern/bpy_rna_id_collection.c
@@ -34,7 +34,7 @@
#include "BKE_main.h"
#include "DNA_ID.h"
-/* Those folowing are only to support hack of not listing some internal
+/* Those following are only to support hack of not listing some internal
* 'backward' pointers in generated user_map. */
#include "DNA_object_types.h"
#include "DNA_key_types.h"
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index d0fa9f5c565..befa6532e97 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -666,7 +666,7 @@ PyMODINIT_FUNC PyInit_mathutils(void)
PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule);
PyModule_AddObject(mod, "interpolate", (submodule = PyInit_mathutils_interpolate()));
- /* XXX, python doesnt do imports with this usefully yet
+ /* XXX, python doesn't do imports with this usefully yet
* 'from mathutils.geometry import PolyFill'
* ...fails without this. */
PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule);
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index 8841519de8a..0885e024251 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -911,7 +911,7 @@ static PyObject *Quaternion_mul(PyObject *q1, PyObject *q2)
return NULL;
}
/*------------------------obj *= obj------------------------------
- * inplace multiplication */
+ * in-place multiplication */
static PyObject *Quaternion_imul(PyObject *q1, PyObject *q2)
{
float scalar;
diff --git a/source/blender/python/mathutils/mathutils_bvhtree.c b/source/blender/python/mathutils/mathutils_bvhtree.c
index cdb3035c0ca..254177b14fe 100644
--- a/source/blender/python/mathutils/mathutils_bvhtree.c
+++ b/source/blender/python/mathutils/mathutils_bvhtree.c
@@ -61,7 +61,7 @@
#include "BLI_strict_flags.h"
/* -------------------------------------------------------------------- */
-/** \name Docstring (snippets)
+/** \name Documentation String (snippets)
* \{ */
#define PYBVH_FIND_GENERIC_DISTANCE_DOC \
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c
index c39954713b1..d4f56490627 100644
--- a/source/blender/python/mathutils/mathutils_geometry.c
+++ b/source/blender/python/mathutils/mathutils_geometry.c
@@ -193,7 +193,7 @@ static PyObject *M_Geometry_intersect_line_line(PyObject *UNUSED(self), PyObject
}
result = isect_line_line_v3(UNPACK4(lines), i1, i2);
- /* The return-code isnt exposed,
+ /* The return-code isn't exposed,
* this way we can check know how close the lines are. */
if (result == 1) {
closest_to_line_v3(i2, i1, lines[2], lines[3]);
diff --git a/source/blender/render/intern/source/bake_api.c b/source/blender/render/intern/source/bake_api.c
index d7080906d5c..0124a24333e 100644
--- a/source/blender/render/intern/source/bake_api.c
+++ b/source/blender/render/intern/source/bake_api.c
@@ -125,7 +125,7 @@ static void store_bake_pixel(void *handle, int x, int y, float u, float v)
pixel->primitive_id = bd->primitive_id;
/* At this point object_id is always 0, since this function runs for the
- * lowpoly mesh only. The object_id lookup indices are set afterwards. */
+ * low-poly mesh only. The object_id lookup indices are set afterwards. */
copy_v2_fl2(pixel->uv, u, v);
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 2e27ec81bd0..e0576d6b253 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -181,22 +181,22 @@ static void stats_background(void *UNUSED(arg), RenderStats *rs)
megs_peak_memory = (peak_memory) / (1024.0 * 1024.0);
fprintf(stdout,
- IFACE_("Fra:%d Mem:%.2fM (%.2fM, Peak %.2fM) "),
+ TIP_("Fra:%d Mem:%.2fM (%.2fM, Peak %.2fM) "),
rs->cfra,
megs_used_memory,
mmap_used_memory,
megs_peak_memory);
if (rs->curfield) {
- fprintf(stdout, IFACE_("Field %d "), rs->curfield);
+ fprintf(stdout, TIP_("Field %d "), rs->curfield);
}
if (rs->curblur) {
- fprintf(stdout, IFACE_("Blur %d "), rs->curblur);
+ fprintf(stdout, TIP_("Blur %d "), rs->curblur);
}
BLI_timecode_string_from_time_simple(
info_time_str, sizeof(info_time_str), PIL_check_seconds_timer() - rs->starttime);
- fprintf(stdout, IFACE_("| Time:%s | "), info_time_str);
+ fprintf(stdout, TIP_("| Time:%s | "), info_time_str);
if (rs->infostr) {
fprintf(stdout, "%s", rs->infostr);
@@ -204,7 +204,7 @@ static void stats_background(void *UNUSED(arg), RenderStats *rs)
else {
if (rs->tothalo) {
fprintf(stdout,
- IFACE_("Sce: %s Ve:%d Fa:%d Ha:%d La:%d"),
+ TIP_("Sce: %s Ve:%d Fa:%d Ha:%d La:%d"),
rs->scene_name,
rs->totvert,
rs->totface,
@@ -213,7 +213,7 @@ static void stats_background(void *UNUSED(arg), RenderStats *rs)
}
else {
fprintf(stdout,
- IFACE_("Sce: %s Ve:%d Fa:%d La:%d"),
+ TIP_("Sce: %s Ve:%d Fa:%d La:%d"),
rs->scene_name,
rs->totvert,
rs->totface,
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index dfea0cf25fa..5ed1be81bff 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -675,7 +675,7 @@ enum {
WM_JOB_TYPE_STUDIOLIGHT,
WM_JOB_TYPE_LIGHT_BAKE,
WM_JOB_TYPE_FSMENU_BOOKMARK_VALIDATE,
- /* add as needed, screencast, seq proxy build
+ /* add as needed, bake, seq proxy build
* if having hard coded values is a problem */
};
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index c725b9f51c9..9f46fdaf74a 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -533,7 +533,7 @@ int WM_event_cursor_click_drag_threshold_from_event_(const wmEvent *event);
bool WM_event_cursor_click_drag_threshold_met(const wmEvent *event);
/**
- * Values below are ignored when detecting if the user interntionally moved the cursor.
+ * Values below are ignored when detecting if the user intentionally moved the cursor.
* Keep this very small since it's used for selection cycling for eg,
* where we want intended adjustments to pass this threshold and select new items.
*
@@ -787,6 +787,8 @@ typedef struct wmTooltipState {
bool *r_exit_on_event);
/** Exit on any event, not needed for buttons since their highlight state is used. */
bool exit_on_event;
+ /** Cursor location at the point of tooltip creation. */
+ int event_xy[2];
/** Pass, use when we want multiple tips, count down to zero. */
int pass;
} wmTooltipState;
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
index 73fae5fd46a..6915ea91c8e 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
@@ -1144,10 +1144,15 @@ struct ARegion *WM_gizmomap_tooltip_init(struct bContext *C,
bool *r_exit_on_event)
{
wmGizmoMap *gzmap = ar->gizmo_map;
- *r_exit_on_event = true;
+ *r_exit_on_event = false;
if (gzmap) {
wmGizmo *gz = gzmap->gzmap_context.highlight;
if (gz) {
+ wmGizmoGroup *gzgroup = gz->parent_gzgroup;
+ if ((gzgroup->type->flag & WM_GIZMOGROUPTYPE_3D) != 0) {
+ /* On screen area of 3D gizmos may be large, exit on cursor motion. */
+ *r_exit_on_event = true;
+ }
return UI_tooltip_create_from_gizmo(C, gz);
}
}
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 632b0131191..005e05c4003 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -2784,11 +2784,28 @@ static int wm_handlers_do_intern(bContext *C, wmEvent *event, ListBase *handlers
}
if (handle_highlight) {
- int part;
+ struct {
+ wmGizmo *gz;
+ int part;
+ } prev = {
+ .gz = gz,
+ .part = gz ? gz->highlight_part : 0,
+ };
+ int part = -1;
gz = wm_gizmomap_highlight_find(gzmap, C, event, &part);
- if (wm_gizmomap_highlight_set(gzmap, C, gz, part) && gz != NULL) {
- if (U.flag & USER_TOOLTIPS) {
- WM_tooltip_timer_init(C, CTX_wm_window(C), region, WM_gizmomap_tooltip_init);
+
+ /* If no gizmos are/were active, don't clear tool-tips. */
+ if (gz || prev.gz) {
+ if ((prev.gz != gz) || (prev.part != part)) {
+ WM_tooltip_clear(C, CTX_wm_window(C));
+ }
+ }
+
+ if (wm_gizmomap_highlight_set(gzmap, C, gz, part)) {
+ if (gz != NULL) {
+ if (U.flag & USER_TOOLTIPS) {
+ WM_tooltip_timer_init(C, CTX_wm_window(C), region, WM_gizmomap_tooltip_init);
+ }
}
}
}
@@ -3278,8 +3295,10 @@ void wm_event_do_handlers(bContext *C)
/* Clear tool-tip on mouse move. */
if (screen->tool_tip && screen->tool_tip->exit_on_event) {
- if (ISMOUSE(event->type)) {
- WM_tooltip_clear(C, win);
+ if (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)) {
+ if (len_manhattan_v2v2_int(screen->tool_tip->event_xy, &event->x) > U.move_threshold) {
+ WM_tooltip_clear(C, win);
+ }
}
}
@@ -3469,7 +3488,7 @@ void WM_event_fileselect_event(wmWindowManager *wm, void *ophandle, int eventval
/**
* The idea here is to keep a handler alive on window queue, owning the operator.
- * The filewindow can send event to make it execute, thus ensuring
+ * The file window can send event to make it execute, thus ensuring
* executing happens outside of lower level queues, with UI refreshed.
* Should also allow multiwin solutions
*/
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index f3aa5a1b6ca..0c525d6946c 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -1739,6 +1739,23 @@ void WM_OT_save_userpref(wmOperatorType *ot)
ot->exec = wm_userpref_write_exec;
}
+/**
+ * When reading preferences, there are some exceptions for values which are reset.
+ */
+static void wm_userpref_read_exceptions(UserDef *userdef_curr, const UserDef *userdef_prev)
+{
+#define USERDEF_RESTORE(member) \
+ { \
+ userdef_curr->member = userdef_prev->member; \
+ } \
+ ((void)0)
+
+ /* Current visible preferences category. */
+ USERDEF_RESTORE(userpref);
+
+#undef USERDEF_RESTORE
+}
+
static void rna_struct_update_when_changed(bContext *C,
Main *bmain,
PointerRNA *ptr_a,
@@ -1811,15 +1828,8 @@ static int wm_userpref_read_exec(bContext *C, wmOperator *op)
WM_init_state_app_template_get(),
NULL);
-#define USERDEF_RESTORE(member) \
- { \
- U.member = U_backup.member; \
- } \
- ((void)0)
-
- USERDEF_RESTORE(userpref);
-
-#undef USERDEF_RESTORE
+ wm_userpref_read_exceptions(&U, &U_backup);
+ SET_FLAG_FROM_TEST(G.f, use_factory_settings, G_FLAG_USERPREF_NO_SAVE_ON_EXIT);
Main *bmain = CTX_data_main(C);
@@ -1883,6 +1893,7 @@ static int wm_homefile_read_exec(bContext *C, wmOperator *op)
bool use_userdef = false;
char filepath_buf[FILE_MAX];
const char *filepath = NULL;
+ UserDef U_backup = U;
if (!use_factory_settings) {
PropertyRNA *prop = RNA_struct_find_property(op->ptr, "filepath");
@@ -1914,7 +1925,6 @@ static int wm_homefile_read_exec(bContext *C, wmOperator *op)
PropertyRNA *prop_app_template = RNA_struct_find_property(op->ptr, "app_template");
const bool use_splash = !use_factory_settings && RNA_boolean_get(op->ptr, "use_splash");
const bool use_empty_data = RNA_boolean_get(op->ptr, "use_empty");
- const bool use_temporary_preferences = RNA_boolean_get(op->ptr, "use_temporary_preferences");
if (prop_app_template && RNA_property_is_set(op->ptr, prop_app_template)) {
RNA_property_string_get(op->ptr, prop_app_template, app_template_buf);
@@ -1945,7 +1955,11 @@ static int wm_homefile_read_exec(bContext *C, wmOperator *op)
if (use_splash) {
WM_init_splash(C);
}
- SET_FLAG_FROM_TEST(G.f, use_temporary_preferences, G_FLAG_USERPREF_NO_SAVE_ON_EXIT);
+
+ if (use_userdef) {
+ wm_userpref_read_exceptions(&U, &U_backup);
+ SET_FLAG_FROM_TEST(G.f, use_factory_settings, G_FLAG_USERPREF_NO_SAVE_ON_EXIT);
+ }
return OPERATOR_FINISHED;
}
@@ -1986,13 +2000,6 @@ static void read_homefile_props(wmOperatorType *ot)
prop = RNA_def_boolean(ot->srna, "use_empty", false, "Empty", "");
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
-
- prop = RNA_def_boolean(ot->srna,
- "use_temporary_preferences",
- false,
- "Temporary Preferences",
- "Don't save preferences on exit");
- RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
}
void WM_OT_read_homefile(wmOperatorType *ot)
@@ -2791,13 +2798,13 @@ static uiBlock *block_create_autorun_warning(struct bContext *C,
/* Text and some vertical space */
uiLayout *col = uiLayoutColumn(layout, true);
uiItemL(col,
- IFACE_("For security reasons, automatic execution of Python scripts in this file was "
- "disabled:"),
+ TIP_("For security reasons, automatic execution of Python scripts in this file was "
+ "disabled:"),
ICON_ERROR);
uiLayout *sub = uiLayoutRow(col, true);
uiLayoutSetRedAlert(sub, true);
uiItemL(sub, G.autoexec_fail, ICON_BLANK1);
- uiItemL(col, IFACE_("This may lead to unexpected behavior"), ICON_BLANK1);
+ uiItemL(col, TIP_("This may lead to unexpected behavior"), ICON_BLANK1);
uiItemS(layout);
@@ -2807,7 +2814,7 @@ static uiBlock *block_create_autorun_warning(struct bContext *C,
&pref_ptr,
"use_scripts_auto_execute",
0,
- IFACE_("Permanently allow execution of scripts"),
+ TIP_("Permanently allow execution of scripts"),
ICON_NONE);
uiItemS(layout);
diff --git a/source/blender/windowmanager/intern/wm_gesture_ops.c b/source/blender/windowmanager/intern/wm_gesture_ops.c
index 8273f7059cc..5dd67355f54 100644
--- a/source/blender/windowmanager/intern/wm_gesture_ops.c
+++ b/source/blender/windowmanager/intern/wm_gesture_ops.c
@@ -423,7 +423,7 @@ int WM_gesture_circle_modal(bContext *C, wmOperator *op, const wmEvent *event)
/* Allow view navigation??? */
/* note, this gives issues:
* 1) other modal ops run on top (box select),
- * 2) middlemouse is used now 3) tablet/trackpad? */
+ * 2) middle-mouse is used now 3) tablet/trackpad? */
else {
return OPERATOR_PASS_THROUGH;
}
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 7e54afcb9aa..e74b3c1ef07 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -267,7 +267,7 @@ void WM_init(bContext *C, int argc, const char **argv)
BLT_lang_init();
/* Must call first before doing any '.blend' file reading,
- * since versionning code may create new IDs... See T57066. */
+ * since versioning code may create new IDs... See T57066. */
BLT_lang_set(NULL);
/* Init icons before reading .blend files for preview icons, which can
diff --git a/source/blender/windowmanager/intern/wm_operator_type.c b/source/blender/windowmanager/intern/wm_operator_type.c
index 5c9093168bd..8f3052ace5e 100644
--- a/source/blender/windowmanager/intern/wm_operator_type.c
+++ b/source/blender/windowmanager/intern/wm_operator_type.c
@@ -219,7 +219,7 @@ void wm_operatortype_free(void)
* #OP_PROP_TAG_ADVANCED. Previously defined ones properties not touched.
*
* Calling this multiple times without a call to #WM_operatortype_props_advanced_end,
- * all calls after the first one are ignored. Meaning all propereties defined after the
+ * all calls after the first one are ignored. Meaning all proprieties defined after the
* first call are tagged as advanced.
*
* This doesn't do the actual tagging, #WM_operatortype_props_advanced_end does which is
diff --git a/source/blender/windowmanager/intern/wm_toolsystem.c b/source/blender/windowmanager/intern/wm_toolsystem.c
index 3ea58d8c4e5..0c916896560 100644
--- a/source/blender/windowmanager/intern/wm_toolsystem.c
+++ b/source/blender/windowmanager/intern/wm_toolsystem.c
@@ -709,12 +709,13 @@ static const char *toolsystem_default_tool(const bToolKey *tkey)
case CTX_MODE_SCULPT:
case CTX_MODE_PAINT_VERTEX:
case CTX_MODE_PAINT_WEIGHT:
- case CTX_MODE_WEIGHT_GPENCIL:
case CTX_MODE_PAINT_TEXTURE:
case CTX_MODE_PAINT_GPENCIL:
return "builtin_brush.Draw";
case CTX_MODE_SCULPT_GPENCIL:
return "builtin_brush.Push";
+ case CTX_MODE_WEIGHT_GPENCIL:
+ return "builtin_brush.Weight";
/* end temporary hack. */
case CTX_MODE_PARTICLE:
diff --git a/source/blender/windowmanager/intern/wm_tooltip.c b/source/blender/windowmanager/intern/wm_tooltip.c
index fb56b2ef23f..3a219d7a573 100644
--- a/source/blender/windowmanager/intern/wm_tooltip.c
+++ b/source/blender/windowmanager/intern/wm_tooltip.c
@@ -22,6 +22,7 @@
#include "MEM_guardedalloc.h"
+#include "BLI_math_vector.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
@@ -116,6 +117,7 @@ void WM_tooltip_init(bContext *C, wmWindow *win)
&screen->tool_tip->pass,
&pass_delay,
&screen->tool_tip->exit_on_event);
+ copy_v2_v2_int(screen->tool_tip->event_xy, &win->eventstate->x);
if (pass_prev != screen->tool_tip->pass) {
/* The pass changed, add timer for next pass. */
wmWindowManager *wm = CTX_wm_manager(C);
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index fe7f9c52f4d..3cd02fde8ac 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -493,7 +493,9 @@ static void print_version_short(void)
# endif
}
-static const char arg_handle_print_version_doc[] = "\n\tPrint Blender version and exit.";
+static const char arg_handle_print_version_doc[] =
+ "\n\t"
+ "Print Blender version and exit.";
static int arg_handle_print_version(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -503,9 +505,12 @@ static int arg_handle_print_version(int UNUSED(argc),
return 0;
}
-static const char arg_handle_print_help_doc[] = "\n\tPrint this help text and exit.";
+static const char arg_handle_print_help_doc[] =
+ "\n\t"
+ "Print this help text and exit.";
static const char arg_handle_print_help_doc_win32[] =
- "\n\tPrint this help text and exit (windows only).";
+ "\n\t"
+ "Print this help text and exit (windows only).";
static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), void *data)
{
bArgs *ba = (bArgs *)data;
@@ -686,7 +691,8 @@ static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), vo
}
static const char arg_handle_arguments_end_doc[] =
- "\n\tEnd option processing, following arguments passed unchanged. Access via Python's "
+ "\n\t"
+ "End option processing, following arguments passed unchanged. Access via Python's "
"'sys.argv'.";
static int arg_handle_arguments_end(int UNUSED(argc),
const char **UNUSED(argv),
@@ -705,10 +711,11 @@ static int arg_handle_arguments_end(int UNUSED(argc),
# endif
static const char arg_handle_python_set_doc_enable[] =
- "\n\tEnable automatic Python script execution" PY_ENABLE_AUTO ".";
+ "\n\t"
+ "Enable automatic Python script execution" PY_ENABLE_AUTO ".";
static const char arg_handle_python_set_doc_disable[] =
- "\n\tDisable automatic Python script execution (pydrivers & startup scripts)" PY_DISABLE_AUTO
- ".";
+ "\n\t"
+ "Disable automatic Python script execution (pydrivers & startup scripts)" PY_DISABLE_AUTO ".";
# undef PY_ENABLE_AUTO
# undef PY_DISABLE_AUTO
@@ -724,7 +731,9 @@ static int arg_handle_python_set(int UNUSED(argc), const char **UNUSED(argv), vo
return 0;
}
-static const char arg_handle_crash_handler_disable_doc[] = "\n\tDisable the crash handler.";
+static const char arg_handle_crash_handler_disable_doc[] =
+ "\n\t"
+ "Disable the crash handler.";
static int arg_handle_crash_handler_disable(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -733,7 +742,9 @@ static int arg_handle_crash_handler_disable(int UNUSED(argc),
return 0;
}
-static const char arg_handle_abort_handler_disable_doc[] = "\n\tDisable the abort handler.";
+static const char arg_handle_abort_handler_disable_doc[] =
+ "\n\t"
+ "Disable the abort handler.";
static int arg_handle_abort_handler_disable(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -743,7 +754,8 @@ static int arg_handle_abort_handler_disable(int UNUSED(argc),
}
static const char arg_handle_background_mode_set_doc[] =
- "\n\tRun in background (often used for UI-less rendering).";
+ "\n\t"
+ "Run in background (often used for UI-less rendering).";
static int arg_handle_background_mode_set(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -755,9 +767,8 @@ static int arg_handle_background_mode_set(int UNUSED(argc),
static const char arg_handle_log_level_set_doc[] =
"<level>\n"
- "\n"
- "\tSet the logging verbosity level (higher for more details) defaults to 1, use -1 to log all "
- "levels.";
+ "\tSet the logging verbosity level (higher for more details) defaults to 1,\n"
+ "\tuse -1 to log all levels.";
static int arg_handle_log_level_set(int argc, const char **argv, void *UNUSED(data))
{
const char *arg_id = "--log-level";
@@ -781,7 +792,8 @@ static int arg_handle_log_level_set(int argc, const char **argv, void *UNUSED(da
}
static const char arg_handle_log_show_basename_set_doc[] =
- "\n\tOnly show file name in output (not the leading path).";
+ "\n\t"
+ "Only show file name in output (not the leading path).";
static int arg_handle_log_show_basename_set(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -791,7 +803,8 @@ static int arg_handle_log_show_basename_set(int UNUSED(argc),
}
static const char arg_handle_log_show_backtrace_set_doc[] =
- "\n\tShow a back trace for each log message (debug builds only).";
+ "\n\t"
+ "Show a back trace for each log message (debug builds only).";
static int arg_handle_log_show_backtrace_set(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -803,7 +816,8 @@ static int arg_handle_log_show_backtrace_set(int UNUSED(argc),
}
static const char arg_handle_log_show_timestamp_set_doc[] =
- "\n\tShow a timestamp for each log message in seconds since start.";
+ "\n\t"
+ "Show a timestamp for each log message in seconds since start.";
static int arg_handle_log_show_timestamp_set(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -814,7 +828,6 @@ static int arg_handle_log_show_timestamp_set(int UNUSED(argc),
static const char arg_handle_log_file_set_doc[] =
"<filename>\n"
- "\n"
"\tSet a file to output the log to.";
static int arg_handle_log_file_set(int argc, const char **argv, void *UNUSED(data))
{
@@ -910,41 +923,57 @@ static int arg_handle_debug_mode_set(int UNUSED(argc), const char **UNUSED(argv)
# ifdef WITH_FFMPEG
static const char arg_handle_debug_mode_generic_set_doc_ffmpeg[] =
- "\n\tEnable debug messages from FFmpeg library.";
+ "\n\t"
+ "Enable debug messages from FFmpeg library.";
# endif
# ifdef WITH_FREESTYLE
static const char arg_handle_debug_mode_generic_set_doc_freestyle[] =
- "\n\tEnable debug messages for FreeStyle.";
+ "\n\t"
+ "Enable debug messages for FreeStyle.";
# endif
static const char arg_handle_debug_mode_generic_set_doc_python[] =
- "\n\tEnable debug messages for Python.";
+ "\n\t"
+ "Enable debug messages for Python.";
static const char arg_handle_debug_mode_generic_set_doc_events[] =
- "\n\tEnable debug messages for the event system.";
+ "\n\t"
+ "Enable debug messages for the event system.";
static const char arg_handle_debug_mode_generic_set_doc_handlers[] =
- "\n\tEnable debug messages for event handling.";
+ "\n\t"
+ "Enable debug messages for event handling.";
static const char arg_handle_debug_mode_generic_set_doc_wm[] =
- "\n\tEnable debug messages for the window manager, shows all operators in search, shows "
+ "\n\t"
+ "Enable debug messages for the window manager, shows all operators in search, shows "
"keymap errors.";
static const char arg_handle_debug_mode_generic_set_doc_jobs[] =
- "\n\tEnable time profiling for background jobs.";
+ "\n\t"
+ "Enable time profiling for background jobs.";
static const char arg_handle_debug_mode_generic_set_doc_gpu[] =
- "\n\tEnable gpu debug context and information for OpenGL 4.3+.";
+ "\n\t"
+ "Enable gpu debug context and information for OpenGL 4.3+.";
static const char arg_handle_debug_mode_generic_set_doc_depsgraph[] =
- "\n\tEnable all debug messages from dependency graph.";
+ "\n\t"
+ "Enable all debug messages from dependency graph.";
static const char arg_handle_debug_mode_generic_set_doc_depsgraph_build[] =
- "\n\tEnable debug messages from dependency graph related on graph construction.";
+ "\n\t"
+ "Enable debug messages from dependency graph related on graph construction.";
static const char arg_handle_debug_mode_generic_set_doc_depsgraph_tag[] =
- "\n\tEnable debug messages from dependency graph related on tagging.";
+ "\n\t"
+ "Enable debug messages from dependency graph related on tagging.";
static const char arg_handle_debug_mode_generic_set_doc_depsgraph_time[] =
- "\n\tEnable debug messages from dependency graph related on timing.";
+ "\n\t"
+ "Enable debug messages from dependency graph related on timing.";
static const char arg_handle_debug_mode_generic_set_doc_depsgraph_eval[] =
- "\n\tEnable debug messages from dependency graph related on evaluation.";
+ "\n\t"
+ "Enable debug messages from dependency graph related on evaluation.";
static const char arg_handle_debug_mode_generic_set_doc_depsgraph_no_threads[] =
- "\n\tSwitch dependency graph to a single threaded evaluation.";
+ "\n\t"
+ "Switch dependency graph to a single threaded evaluation.";
static const char arg_handle_debug_mode_generic_set_doc_depsgraph_pretty[] =
- "\n\tEnable colors for dependency graph debug messages.";
+ "\n\t"
+ "Enable colors for dependency graph debug messages.";
static const char arg_handle_debug_mode_generic_set_doc_gpumem[] =
- "\n\tEnable GPU memory stats in status bar.";
+ "\n\t"
+ "Enable GPU memory stats in status bar.";
static int arg_handle_debug_mode_generic_set(int UNUSED(argc),
const char **UNUSED(argv),
@@ -955,7 +984,8 @@ static int arg_handle_debug_mode_generic_set(int UNUSED(argc),
}
static const char arg_handle_debug_mode_io_doc[] =
- "\n\tEnable debug messages for I/O (collada, ...).";
+ "\n\t"
+ "Enable debug messages for I/O (collada, ...).";
static int arg_handle_debug_mode_io(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -964,7 +994,9 @@ static int arg_handle_debug_mode_io(int UNUSED(argc),
return 0;
}
-static const char arg_handle_debug_mode_all_doc[] = "\n\tEnable all debug messages.";
+static const char arg_handle_debug_mode_all_doc[] =
+ "\n\t"
+ "Enable all debug messages.";
static int arg_handle_debug_mode_all(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -981,7 +1013,8 @@ static int arg_handle_debug_mode_all(int UNUSED(argc),
# ifdef WITH_LIBMV
static const char arg_handle_debug_mode_libmv_doc[] =
- "\n\tEnable debug messages from libmv library.";
+ "\n\t"
+ "Enable debug messages from libmv library.";
static int arg_handle_debug_mode_libmv(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -993,7 +1026,9 @@ static int arg_handle_debug_mode_libmv(int UNUSED(argc),
# endif
# ifdef WITH_CYCLES_LOGGING
-static const char arg_handle_debug_mode_cycles_doc[] = "\n\tEnable debug messages from Cycles.";
+static const char arg_handle_debug_mode_cycles_doc[] =
+ "\n\t"
+ "Enable debug messages from Cycles.";
static int arg_handle_debug_mode_cycles(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -1004,7 +1039,8 @@ static int arg_handle_debug_mode_cycles(int UNUSED(argc),
# endif
static const char arg_handle_debug_mode_memory_set_doc[] =
- "\n\tEnable fully guarded memory allocation and debugging.";
+ "\n\t"
+ "Enable fully guarded memory allocation and debugging.";
static int arg_handle_debug_mode_memory_set(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -1037,7 +1073,9 @@ static int arg_handle_debug_value_set(int argc, const char **argv, void *UNUSED(
}
}
-static const char arg_handle_debug_fpe_set_doc[] = "\n\tEnable floating point exceptions.";
+static const char arg_handle_debug_fpe_set_doc[] =
+ "\n\t"
+ "Enable floating point exceptions.";
static int arg_handle_debug_fpe_set(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -1047,7 +1085,8 @@ static int arg_handle_debug_fpe_set(int UNUSED(argc),
}
static const char arg_handle_app_template_doc[] =
- "\n\tSet the application template, use 'default' for none.";
+ "\n\t"
+ "Set the application template, use 'default' for none.";
static int arg_handle_app_template(int argc, const char **argv, void *UNUSED(data))
{
if (argc > 1) {
@@ -1061,8 +1100,9 @@ static int arg_handle_app_template(int argc, const char **argv, void *UNUSED(dat
}
}
-static const char arg_handle_factory_startup_set_doc[] = "\n\tSkip reading the " STRINGIFY(
- BLENDER_STARTUP_FILE) " in the users home directory.";
+static const char arg_handle_factory_startup_set_doc[] =
+ "\n\t"
+ "Skip reading the " STRINGIFY(BLENDER_STARTUP_FILE) " in the users home directory.";
static int arg_handle_factory_startup_set(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -1073,7 +1113,8 @@ static int arg_handle_factory_startup_set(int UNUSED(argc),
}
static const char arg_handle_enable_static_override_doc[] =
- "\n\tEnable Static Override features in the UI.";
+ "\n\t"
+ "Enable Static Override features in the UI.";
static int arg_handle_enable_static_override(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -1083,7 +1124,8 @@ static int arg_handle_enable_static_override(int UNUSED(argc),
}
static const char arg_handle_enable_event_simulate_doc[] =
- "\n\tEnable event simulation testing feature 'bpy.types.Window.event_simulate'.";
+ "\n\t"
+ "Enable event simulation testing feature 'bpy.types.Window.event_simulate'.";
static int arg_handle_enable_event_simulate(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -1092,12 +1134,15 @@ static int arg_handle_enable_event_simulate(int UNUSED(argc),
return 0;
}
-static const char arg_handle_env_system_set_doc_datafiles[] = "\n\tSet the " STRINGIFY_ARG(
- BLENDER_SYSTEM_DATAFILES) " environment variable.";
-static const char arg_handle_env_system_set_doc_scripts[] = "\n\tSet the " STRINGIFY_ARG(
- BLENDER_SYSTEM_SCRIPTS) " environment variable.";
-static const char arg_handle_env_system_set_doc_python[] = "\n\tSet the " STRINGIFY_ARG(
- BLENDER_SYSTEM_PYTHON) " environment variable.";
+static const char arg_handle_env_system_set_doc_datafiles[] =
+ "\n\t"
+ "Set the " STRINGIFY_ARG(BLENDER_SYSTEM_DATAFILES) " environment variable.";
+static const char arg_handle_env_system_set_doc_scripts[] =
+ "\n\t"
+ "Set the " STRINGIFY_ARG(BLENDER_SYSTEM_SCRIPTS) " environment variable.";
+static const char arg_handle_env_system_set_doc_python[] =
+ "\n\t"
+ "Set the " STRINGIFY_ARG(BLENDER_SYSTEM_PYTHON) " environment variable.";
static int arg_handle_env_system_set(int argc, const char **argv, void *UNUSED(data))
{
@@ -1179,7 +1224,8 @@ static int arg_handle_window_geometry(int argc, const char **argv, void *UNUSED(
}
static const char arg_handle_native_pixels_set_doc[] =
- "\n\tDo not use native pixel size, for high resolution displays (MacBook 'Retina').";
+ "\n\t"
+ "Do not use native pixel size, for high resolution displays (MacBook 'Retina').";
static int arg_handle_native_pixels_set(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -1188,14 +1234,18 @@ static int arg_handle_native_pixels_set(int UNUSED(argc),
return 0;
}
-static const char arg_handle_with_borders_doc[] = "\n\tForce opening with borders.";
+static const char arg_handle_with_borders_doc[] =
+ "\n\t"
+ "Force opening with borders.";
static int arg_handle_with_borders(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
{
WM_init_state_normal_set();
return 0;
}
-static const char arg_handle_without_borders_doc[] = "\n\tForce opening in fullscreen mode.";
+static const char arg_handle_without_borders_doc[] =
+ "\n\t"
+ "Force opening in fullscreen mode.";
static int arg_handle_without_borders(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -1204,7 +1254,9 @@ static int arg_handle_without_borders(int UNUSED(argc),
return 0;
}
-static const char arg_handle_window_maximized_doc[] = "\n\tForce opening maximized.";
+static const char arg_handle_window_maximized_doc[] =
+ "\n\t"
+ "Force opening maximized.";
static int arg_handle_window_maximized(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -1214,7 +1266,8 @@ static int arg_handle_window_maximized(int UNUSED(argc),
}
static const char arg_handle_no_window_focus_doc[] =
- "\n\tOpen behind other windows and without taking focus.";
+ "\n\t"
+ "Open behind other windows and without taking focus.";
static int arg_handle_no_window_focus(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -1224,7 +1277,8 @@ static int arg_handle_no_window_focus(int UNUSED(argc),
}
static const char arg_handle_start_with_console_doc[] =
- "\n\tStart with the console window open (ignored if -b is set), (Windows only).";
+ "\n\t"
+ "Start with the console window open (ignored if -b is set), (Windows only).";
static int arg_handle_start_with_console(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -1234,9 +1288,11 @@ static int arg_handle_start_with_console(int UNUSED(argc),
}
static const char arg_handle_register_extension_doc[] =
- "\n\tRegister blend-file extension, then exit (Windows only).";
+ "\n\t"
+ "Register blend-file extension, then exit (Windows only).";
static const char arg_handle_register_extension_doc_silent[] =
- "\n\tSilently register blend-file extension, then exit (Windows only).";
+ "\n\t"
+ "Silently register blend-file extension, then exit (Windows only).";
static int arg_handle_register_extension(int UNUSED(argc), const char **UNUSED(argv), void *data)
{
# ifdef WIN32
@@ -1250,7 +1306,9 @@ static int arg_handle_register_extension(int UNUSED(argc), const char **UNUSED(a
return 0;
}
-static const char arg_handle_audio_disable_doc[] = "\n\tForce sound system to None.";
+static const char arg_handle_audio_disable_doc[] =
+ "\n\t"
+ "Force sound system to None.";
static int arg_handle_audio_disable(int UNUSED(argc),
const char **UNUSED(argv),
void *UNUSED(data))
@@ -1260,7 +1318,10 @@ static int arg_handle_audio_disable(int UNUSED(argc),
}
static const char arg_handle_audio_set_doc[] =
- "\n\tForce sound system to a specific device.\n\t'NULL' 'SDL' 'OPENAL' 'JACK'.";
+ "\n\t"
+ "Force sound system to a specific device."
+ "\n\t"
+ "'NULL' 'SDL' 'OPENAL' 'JACK'.";
static int arg_handle_audio_set(int argc, const char **argv, void *UNUSED(data))
{
if (argc < 1) {
@@ -1308,7 +1369,8 @@ static int arg_handle_output_set(int argc, const char **argv, void *data)
static const char arg_handle_engine_set_doc[] =
"<engine>\n"
- "\tSpecify the render engine.\n\tUse -E help to list available engines.";
+ "\tSpecify the render engine.\n"
+ "\tUse -E help to list available engines.";
static int arg_handle_engine_set(int argc, const char **argv, void *data)
{
bContext *C = data;
@@ -1543,7 +1605,8 @@ static int arg_handle_render_frame(int argc, const char **argv, void *data)
}
static const char arg_handle_render_animation_doc[] =
- "\n\tRender frames from start to end (inclusive).";
+ "\n\t"
+ "Render frames from start to end (inclusive).";
static int arg_handle_render_animation(int UNUSED(argc), const char **UNUSED(argv), void *data)
{
bContext *C = data;
@@ -1798,7 +1861,8 @@ static int arg_handle_python_expr_run(int argc, const char **argv, void *data)
}
static const char arg_handle_python_console_run_doc[] =
- "\n\tRun Blender with an interactive console.";
+ "\n\t"
+ "Run Blender with an interactive console.";
static int arg_handle_python_console_run(int UNUSED(argc), const char **argv, void *data)
{
# ifdef WITH_PYTHON