using plugins from commandline

MakeHuman python API, python plugins, etc

Moderator: joepal

using plugins from commandline

Postby picci » Thu Jul 25, 2013 6:53 pm

Hello,
I'm creating a little python program with some part of mh.
It's just for my research so no issue with license etc..
To use the pluging I'm initiaing and starting mh without gui, now I want to load a model that I previously store in mhm file and export the mesh as obj.
I'm trying to use exportObj function but I'm having some hard time to instatiate the expoter class.
Is there some example where I can look to understand the way to instantiante an exporter and use exportObj.
Thank you
picci
 
Posts: 21
Joined: Thu Jun 06, 2013 2:10 pm
Location: USA

Re: using plugins from commandline

Postby duststorm » Thu Jul 25, 2013 7:31 pm

Have a look at mh2obj.py in the obj exporter plugin (or apps for A7 version)
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: using plugins from commandline

Postby picci » Thu Jul 25, 2013 8:03 pm

Thank you for the answer,
I was looking at that file, and it seems pretty neat the call to exportObj.
I'm a bit new in python.......
I'm loading all the setting and imports and loading the pluging.
A simple call exportObj(......) after import mh2obj should be fine?
But neither mh2obj and exportObj are recognized as modules/functions...
That's my hiccup now
picci
 
Posts: 21
Joined: Thu Jun 06, 2013 2:10 pm
Location: USA

Re: using plugins from commandline

Postby picci » Fri Jul 26, 2013 3:28 pm

OK,
I managed to get work my script so I can export mhx mesh from commandline.
Right now I'm initializing as the mh program does till loadPlugins.
I didn't go through all the refences and lib.... Can I avoid to load the fonts or the main gui or there is the need to load modules and path?

picci
picci
 
Posts: 21
Joined: Thu Jun 06, 2013 2:10 pm
Location: USA


Return to Python scripts

Who is online

Users browsing this forum: No registered users and 1 guest

cron