We've just announced http://www.makehuman.org/blog/the_makeh ... mhapi.html.
Comments?
Moderator: joepal
Solkar wrote:That API is definitely a good idea.
Just one more use case, related to viewtopic.php?p=26434#p26434 pp
I obviously need script access to the vertex data of characters with certain significant features.
Afais, the most plain workflow currently possible¹ is
(A)load char via gui => (B)export char to .obj via gui => (C) import that .obj in my script code
That's a little like scratching the neck with the big toe.
Even if MH command line interface would permit building an ABC pipeline, that would still yield a huge overhead because of latency of program start and char customization carried along.
Thus, having fine-granular API calls for (A) and (B) at one's disposal, would be a huge asset for use cases like this.
¹Feel free to correct me if there's a more plain workflow
mesh = G.app.selectedHuman.meshData
module mhapi {
module idl { /* precaution againt name clashes */
typedef float real_t;
typedef long size_t;
typedef long index_t;
// for easy unicode migration
typedef char char_t;
typedef string string_t;
/*
flattened to to 1d to enable versatile marshalling
*/
typedef sequence<real_t> real_array_t;
typedef sequence<index_t> index_array_t;
/*
* information for reshaping the flattened arrays
*/
struct ArrayDescriptor {
size_t vertex_dim; // = 3
size_t uv_dim; // = 2
size_t face_granularity; // = 4
size_t vertex_adjadcency_granularity; // = 4
char_t order; // "C", "F"
}; // struct ArrayDescriptor
exception ELoadError {
string_t msg;
};
interface IModel {
const string_t unit = "decimetre";
const string_t orientation = "right-handed, Y up, face Z";
// no struct consts in idl[1]
readonly attribute ArrayDescriptor array_descriptor;
readonly attribute real_array_t coords;
/* many many more attribs */
void load(in string_t name) raises (ELoadError);
/* many many more methods*/
}; // interface IModel
interface IServer {
string_t ping();
oneway void terminate();
readonly attribute IModel currrent_model;
};
}; // module idl
/*
* References
* [1] http://www.omg.org/spec/IDL35/3.5/PDF/ 5.10.1
*/
}; // module mhapi
G.app.selectedHuman.meshData.face_mask
duststorm wrote:A CORBA RPC interaction is one possible way, note though that it is bound to the restrictions of the AGPL license, which is that any service you create that uses MH over a network or through some form of IPC must be licensed and the source released under a GPL compatible license.
(emphasis mine)##############################################################################
# Copyright (C) Solkar 2014
# memberlist.php?mode=viewprofile&u=16965
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##############################################################################
duststorm wrote:Ho giddyup, no need to get on your horse.
duststorm wrote:To some, it cannot be stated often enough that MakeHuman is not a library. (not unless you are willing to give back to the community at least)
duststorm wrote:You see, we often get a visit from people looking to integrate MH as an interactive character creator into their closed-source game or MMORPG (or something of the kind).
Users browsing this forum: No registered users and 1 guest