sound export error and fix, rev. 439

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

sound export error and fix, rev. 439

Postby D'Lanor » Thu Sep 10, 2009 4:33 am

I have found and fixed an issue with prp_SndClasses: I made PyPRP fall back on Robert's file search method if the internal Blender sound block exists but has somehow become corrupt.

I ran into this problem when I received a blend file from someone who had used the old method of loading sound objects into Blender in the Scene Properties window. He had packed his external data into the blend file but somehow this packing fails for sound objects. His local paths ended up in the sound block but as far as I could tell not the wav files themselves. This gave me the export error: "Cannot locate any sound named <insert long local path here>".

Since I possessed the ogg files in question I expected that dropping them into the same folder as the blend file would solve this problem, but alas... PyPRP stubbornly insisted on using the corrupted sound objects. And unfortunately Blender does not allow the deletion of sound objects (later I realized that renaming them could have worked but by then I had already fixed it in the PyPRP source ;) ).

Christian, do you see a chance to review my fix and still sneak it into the 1.6.0 beta? See rev. 439.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: sound export error and fix, rev. 439

Postby Christian Walther » Sat Sep 12, 2009 5:40 am

Done (r443). The code looks OK and doesn't break my age that uses only the new method without Blender sound objects, so I trust you that the rest works as well. :)

I don't think it makes sense to do another beta, I'll just do the full release tomorrow, and if it breaks anything we can always do a quick 1.6.1 release.
Christian Walther
 
Posts: 443
Joined: Sun Jun 08, 2008 3:10 am
Location: Switzerland

Re: sound export error and fix, rev. 439

Postby Robert The Rebuilder » Sun Sep 13, 2009 4:40 pm

On a related note: anyone have any idea how to remove an audio data block from Blender? There's no delete button, and it doesn't show up on the OOPS schematic - even with all the layers turned on.

[I guess I could write a script to remove it, but that seems too convoluted a solution.]
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: sound export error and fix, rev. 439

Postby Paradox » Sun Sep 13, 2009 4:58 pm

Ah... I think using a script might be the only way to delete sounds after they have been used with PyPRP.

Blender has an issue where it doesn't properly save sound blocks, and every time you close it, you will lose all of the sound blocks (which makes exporting a pain). I added a feature to PyPRP back when we first started using sounds. It sets the "multiple users, do not delete" flag on any sound blocks used during export. Unfortunately, there is no way to set/remove this flag via the UI.
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: sound export error and fix, rev. 439

Postby D'Lanor » Sun Sep 13, 2009 5:21 pm

Even without the fake user (F) property you still cannot remove sound blocks. You can only hope that Blender loses them for you. :D
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: sound export error and fix, rev. 439

Postby D'Lanor » Tue Sep 15, 2009 6:58 am

I made a script which unlocks all sound blocks (removes the fake user). And for good measure I have thrown in a script that locks them all.

I would have preferred to process only the selected sound block but I could not find a way in the Blender API to do that since the API seems to be rather limited in the sound department. If anyone knows how to get only the selected sound block feel free to modify this.

wizards.zip
(11.58 KiB) Downloaded 230 times
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: sound export error and fix, rev. 439

Postby Robert The Rebuilder » Tue Sep 15, 2009 6:20 pm

That script works great, D'Lanor! Thanks for saving me the trouble of figuring out how to write it.

It just took one round of save and reload in order to lose the unlocked embedded sound file.

Maybe this should be in 1.6.1? :)
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US


Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 0 guests