Comments (4)
Off the top of my head I'm not sure. RUNNING_MODAL is the expected behaviour - this prevents Blender locking up while the process runs. Eventually it will return FINISHED, but I'm not sure how to access that from your script. Waiting for the exe to end seems like a reasonable approach, but the addon is still processing the data returned from Rhubarb after it exits, so maybe your sleep needs to be longer.
Or maybe you'd be better off just copying some of the code from the addon directly into your script so you can run it non-modally. The relevant parts are all in op_blender_rhubarb.py.
from blender-rhubarb-lipsync.
I think you should be able to do this by using a simple wrapper python script. Something like:
import bpy;
bpy.context.context.object.pose_library.mouth_shapes.sound_file = "<your sound file>"
bpy.ops.object.rhubarb_lipsync()
Check here for info on to how to pass arguments to a python script from the command line.
Hope this gets you started in the right direction at least.
from blender-rhubarb-lipsync.
I have a problem with a similar approach.
I want to do everything from a script, adding the pose library and populating it with the basic mouth shapes. After that, I load the audio and script files and perform the lip syncing in rhubarb. All of this I do in a python script that I call using
> blender --python myscript -- audio.wav script.txt output
When the blender GUI opens, I see that all works fine and the character is animated. Also the handles for the face rig bones appear in the timeline. When I save this using the GUI (File -> SaveAs) everything works as expected and when I open the blend file, the handles are still present.
However, when I add the commands to store the blend file into the python script and run it without the GUI (using -b
), then the blend file is stored and the pose library is constructed and contains the basic mouth shapes, correctly associated to the rhubarb names but the handles for the face rig bones do not appear, i.e. the animation of the mouth is not present.
Do you have any idea what could go wrong? One thing I noticed was that I had to manually look for the process rhubarb.exe
to finish as the call of bpy.ops.object.rhubarb_lipsync()
does return immediately RUNNING_MODAL
even though rhubarb
does not seem to be done in the background. (When I don't look for the process to end manually and for example change mode from "POSE" to "OBJECT", I get errors.) Now I am wondering whether a similar thing might be happening with the handles and that maybe they are added in a background process but are not yet present when I store the blend file. I tried adding time.sleep()
's but so far without success.
from blender-rhubarb-lipsync.
Thanks a lot for your reply. I'll try it out!
from blender-rhubarb-lipsync.
Related Issues (20)
- New install failure on Windows 11, Blender 3.1.0
- Rhubar lipsync 3.0.1 won't install on blender 3.1 (error report)
- Blender 3.0.1 - Phonemes detection problem HOT 1
- Update Request: Work with Blender 3.2 HOT 24
- Can't find .exe file. HOT 1
- python : Traceback (most recent call last) HOT 1
- Can I use it to make an animation on Youtube? HOT 1
- Rhubarb lipsync error in mac
- Is not an Issue, is a question HOT 1
- Python Error... (most recent call last) HOT 1
- Not complete file is picked and baked.
- Transformation Error.
- How can I fix this error? HOT 1
- Post library not working with blender 3.5 HOT 5
- Thank you Rhubarb lipsync addon creators...
- Utility in Blender 3.5
- Export to fbx file issues
- Rhubarb lipsync dont open in Blender 3.6.2 HOT 2
- Pin: How to get blender-rhubarb-lipsync working on the latest version of Blender (including 3.6) HOT 9
- rhubarb not work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blender-rhubarb-lipsync.