Blender 2.8 changes for Mhx2

Discussions about MHX2 and other plugins that are developed outside the scope of MakeHuman. Note that bug reports should go to the respective code projects and might go unseen here.

Moderator: joepal

Blender 2.8 changes for Mhx2

Postby jcpalmer » Wed Sep 05, 2018 5:49 pm

I have been evaluating changes for other things for Blender 2.8. I have started to make known changes, and thought I would pass one on which will even keep add-onsfrom loading. That is a utility for registering sub-classes of Blender objects has been removed, see https://en.blender.org/index.php/Dev:2.8/Source/Python/UpdatingScripts. This is in __init__.py of the main directory.

I have already changed this in community plugins. I am still working on an interface with a kinect2 sensor so it cannot be commited, but the code for this is:
Code: Select all
classes =  (
    Community_Panel,
    MeshSyncOperator,
    PoseSyncOperator,
    ExpressionTransOperator,
    AmputateFingers,
    AmputateFace,
    SnapOnIkRig,
    RemoveIkRig,
    SnapOnFingerRig,
    RemoveFingerRig,
    ToKinect2,
    StartKinectRecording,
    StopKinectRecording,
    KinectAssignment,
    KinectRefresh,
    PoseRight,
    ActionTrimLeft,
    ActionTrimRight,
    ActionSmoothing,
    Animation_items
)

def register():
    from bpy.utils import register_class
    for cls in classes:
        register_class(cls)

def unregister():
    from bpy.utils import unregister_class
    for cls in reversed(classes):
        unregister_class(cls)


There is also a requirement to set the Blender minimum version to 2.8. These are just to get the thing to load. My other add-ons die rather early when actually running. The community stuff came out almost unscathed. I am just guessing something like make walk is going to need TLC. Quaternion & matrix multiplication seem to be done differently.
jcpalmer
 
Posts: 115
Joined: Tue Dec 16, 2014 4:14 pm

Re: Blender 2.8 changes for Mhx2

Postby joepal » Wed Sep 05, 2018 9:19 pm

That's good to know.

All the blendertools addons are in a sore need of an overhaul anyway.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am

Re: Blender 2.8 changes for Mhx2

Postby RobBaer » Sat Sep 08, 2018 6:45 am

Very helpful. I linked back to your post on the MHX2 issues page. https://bitbucket.org/Diffeomorphic/mhx ... blender-28

Please keep sharing.

Edit: Here is a nice short video on adapting plugins:
https://blender.community/c/today/Szcbb ... ts-youtube
User avatar
RobBaer
 
Posts: 1208
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA

Re: Blender 2.8 changes for Mhx2

Postby jcpalmer » Tue Sep 11, 2018 4:35 pm

Well, it was 2 weeks from the last build, so I got the 9/11 win64 distributable. It has a change which causes most of the UI not be shown. When you create a label you now must use the named parameter of 'text'. The draw function for community does not very early, so only button still there. I only used the explicit when a second parameter like 'icon' was also used.

Prior worked:
Code: Select all
ikBox = layout.box()
ikBox.label("IK Rig:")

Now must be:
Code: Select all
ikBox = layout.box()
ikBox.label(text="IK Rig:")

I peeked at MHX2. It has a label right at the top that needs to be changed (probably others too), so nothing would show.
jcpalmer
 
Posts: 115
Joined: Tue Dec 16, 2014 4:14 pm

Re: Blender 2.8 changes for Mhx2

Postby TCarp » Fri Apr 19, 2019 1:03 am

I have come across a problem with the Mhx2 blender addon that is only a problem in blender 2.8 (works fine in 2.79). When I try importing a Moho(.dat) file I get an error message that something is wrong with the visemes python file.
The error message in blender says the issue is on lines 206 and 179. I know this is not a problem with the moho file I am using because it works for with the Mhx2 plugin in Blender 2.79.
I don't know enough about blender scripting to find the exact issue myself so please walk me through what I should change in the script if you do not post a new version of the Mhx2 download with this issue resolved where others can use it.
I am not sure what the process is for fixing bugs in this plugin for a beta version of blender and will understand if you are waiting until the stable release of blender 2.8 to solve this problem.
TCarp
 
Posts: 20
Joined: Fri Feb 08, 2019 12:24 am

Re: Blender 2.8 changes for Mhx2

Postby RobBaer » Fri Apr 19, 2019 6:09 pm

Here is the URL where you can post issues related to MHX2, if that is indeed where things are going wrong for you:
https://bitbucket.org/Diffeomorphic/mhx ... tatus=open

Here is the URL for posting issues related to problems with Blender 2.80:
https://developer.blender.org/maniphest ... it/form/1/

This is unlikely an issue with core Makehuman behavior. I have only lightly looked at Visemes with make human, and without more detail about the exact error message you get, it would be difficult even to provide good advice on which of the two entities above is struggling. Perhaps you'll get lucky here, but I'm afraid your guess on being patient until Blender 2.80 is finally released is the more likely outcome.

To potentially improve your luck at getting help on this forum, maybe you could specify your error messages more completely.
User avatar
RobBaer
 
Posts: 1208
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA

Re: Blender 2.8 changes for Mhx2

Postby TCarp » Fri Dec 06, 2019 1:27 am

This problem is still present working in blender 2.80 full release with the 2.80 version of import MHX2. Here is the Blender error message: Image
I am using a rigify rig but I don't think that would make a difference.
TCarp
 
Posts: 20
Joined: Fri Feb 08, 2019 12:24 am

Re: Blender 2.8 changes for Mhx2

Postby punkduck » Fri Dec 06, 2019 11:23 pm

Hi

I can check this when the code is in our own MakeHuman repository. This would hopefully happen soon. I got a similar problem in the new make clothes by applying transformations and guess it could be a similar problem, the use of "view_layer" instead of "scene" fixed my problem.

So it might be:

Code: Select all
context.view_layer.objects.active = rig


Greetings ..
User avatar
punkduck
 
Posts: 1216
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: Blender 2.8 changes for Mhx2

Postby Aranuvir » Fri Dec 06, 2019 11:54 pm

https://github.com/makehumancommunity/mhx2-makehuman-exchange

BTW, admitting I might be stupid, but what is a moho.dat file?
Aranuvir
 
Posts: 1314
Joined: Sun Oct 12, 2014 2:12 pm

Re: Blender 2.8 changes for Mhx2

Postby TCarp » Mon Dec 09, 2019 1:29 pm

Aranuvir wrote:
https://github.com/makehumancommunity/mhx2-makehuman-exchange

BTW, admitting I might be stupid, but what is a moho.dat file?

It is a text file that lists the used visems in order with their start time. It is created from an audio file in a program like: https://my.smithmicro.com/papagayo.html
TCarp
 
Posts: 20
Joined: Fri Feb 08, 2019 12:24 am

Next

Return to MHX2 and other plugins developed outside MakeHuman

Who is online

Users browsing this forum: No registered users and 1 guest

cron