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: 93
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: 3365
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: 771
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: 93
Joined: Tue Dec 16, 2014 4:14 pm


Return to MHX2 and other plugins developed outside MakeHuman

Who is online

Users browsing this forum: No registered users and 1 guest