diff options
author | Richard Antalik <richardantalik@gmail.com> | 2020-01-22 15:41:43 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2020-01-22 15:41:43 +0300 |
commit | d51760dc5ade1b0104ae9d537c137545957d1fb6 (patch) | |
tree | 1538a4c66515bdaa09f78482e3a18d7e6de03d36 | |
parent | 4099ad1984a6410652bdfdc27efc61256807e9af (diff) | |
parent | a60a623a1ac5416a6c07b4e8c038d603735a0061 (diff) |
Merge branch 'blender-v2.82-release'
-rw-r--r-- | intern/mantaflow/intern/MANTA_main.cpp | 9 | ||||
-rwxr-xr-x | release/darwin/bundle.sh | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_empty.py | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 14 |
4 files changed, 17 insertions, 10 deletions
diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp index 79363126aff..05e6999c193 100644 --- a/intern/mantaflow/intern/MANTA_main.cpp +++ b/intern/mantaflow/intern/MANTA_main.cpp @@ -2057,7 +2057,10 @@ static char *pyObjectToString(PyObject *inputObject) PyObject *encoded = PyUnicode_AsUTF8String(inputObject); char *result = PyBytes_AsString(encoded); - Py_DECREF(encoded); + + /* Do not decref (i.e. Py_DECREF(encoded)) of string 'encoded' PyObject. + * Otherwise those objects will be invalidated too early (see T72894). + * Reference count of those Python objects will be decreased with 'del' in Python scripts. */ Py_DECREF(inputObject); PyGILState_Release(gilstate); @@ -2566,6 +2569,8 @@ void MANTA::updatePointers() pyObjectToString(callPythonFunction("y_guidevel" + solver_ext, func))); mGuideVelocityZ = (float *)stringToPointer( pyObjectToString(callPythonFunction("z_guidevel" + solver_ext, func))); + mNumGuide = (float *)stringToPointer( + pyObjectToString(callPythonFunction("numGuides" + solver_ext, func))); } if (mUsingInvel) { mInVelocityX = (float *)stringToPointer( @@ -2574,8 +2579,6 @@ void MANTA::updatePointers() pyObjectToString(callPythonFunction("y_invel" + solver_ext, func))); mInVelocityZ = (float *)stringToPointer( pyObjectToString(callPythonFunction("z_invel" + solver_ext, func))); - mNumGuide = (float *)stringToPointer( - pyObjectToString(callPythonFunction("numGuides" + solver_ext, func))); } if (mUsingSmoke) { mDensity = (float *)stringToPointer( diff --git a/release/darwin/bundle.sh b/release/darwin/bundle.sh index 5cd855f8f97..6d8695a441d 100755 --- a/release/darwin/bundle.sh +++ b/release/darwin/bundle.sh @@ -104,7 +104,7 @@ _image_size=$(echo "${_directory_size}" + 400 | bc) # extra 400 need for codesig echo echo -n "Creating disk image of size ${_image_size}M.." test -f "${_tmp_dmg}" && rm "${_tmp_dmg}" -hdiutil create -size "${_image_size}m" -fs HFS+ -srcfolder "${_tmp_dir}" -volname "${_volume_name}" -format UDRW "${_tmp_dmg}" -uid 0 -gid 0 -mode 755 +hdiutil create -size "${_image_size}m" -fs HFS+ -srcfolder "${_tmp_dir}" -volname "${_volume_name}" -format UDRW "${_tmp_dmg}" -mode 755 echo "Mounting readwrite image..." hdiutil attach -readwrite -noverify -noautoopen "${_tmp_dmg}" diff --git a/release/scripts/startup/bl_ui/properties_data_empty.py b/release/scripts/startup/bl_ui/properties_data_empty.py index 4ce87b85410..dc9c170c65b 100644 --- a/release/scripts/startup/bl_ui/properties_data_empty.py +++ b/release/scripts/startup/bl_ui/properties_data_empty.py @@ -49,7 +49,7 @@ class DATA_PT_empty(DataButtonsPanel, Panel): col = layout.column() col.active = ob.use_empty_image_alpha - col.prop(ob, "color", text="Transparency", index=3, slider=True) + col.prop(ob, "color", text="Opacity", index=3, slider=True) col = layout.column(align=True) col.prop(ob, "empty_image_offset", text="Offset X", index=0) diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index d42436ecb40..84d135c7f32 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -411,7 +411,7 @@ void BKE_sound_delete_cache(bSound *sound) } } -static void sound_load_audio(Main *bmain, bSound *sound) +static void sound_load_audio(Main *bmain, bSound *sound, bool free_waveform) { if (sound->cache) { @@ -425,7 +425,9 @@ static void sound_load_audio(Main *bmain, bSound *sound) sound->playback_handle = NULL; } - BKE_sound_free_waveform(sound); + if (free_waveform) { + BKE_sound_free_waveform(sound); + } /* XXX unused currently */ # if 0 @@ -488,7 +490,7 @@ static void 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); + sound_load_audio(bmain, sound, true); } AUD_Device *BKE_sound_mixdown(Scene *scene, AUD_DeviceSpecs specs, int start, float volume) @@ -902,7 +904,7 @@ void BKE_sound_read_waveform(Main *bmain, bSound *sound, short *stop) bool need_close_audio_handles = false; if (sound->playback_handle == NULL) { /* TODO(sergey): Make it fully independent audio handle. */ - sound_load_audio(bmain, sound); + sound_load_audio(bmain, sound, true); need_close_audio_handles = true; } @@ -1096,7 +1098,9 @@ bool BKE_sound_info_get(struct Main *main, struct bSound *sound, SoundInfo *soun return sound_info_from_playback_handle(sound->playback_handle, sound_info); } /* TODO(sergey): Make it fully independent audio handle. */ - sound_load_audio(main, sound); + /* Don't free waveforms during non-destructive queries. + * This causes unnecessary recalculation - see T69921 */ + sound_load_audio(main, sound, false); const bool result = sound_info_from_playback_handle(sound->playback_handle, sound_info); sound_free_audio(sound); return result; |