def load(app): category = app.getCategory("Modelling") humanmodifier.loadModifiers(getpath.getSysDataPath("modifiers/modeling_modifiers.json"), app.selectedHuman) guimodifier.loadModifierTaskViews( getpath.getSysDataPath("modifiers/modeling_sliders.json"), app.selectedHuman, category )
def load(app): """ Plugin load function, needed by design. """ category = app.getCategory('Modelling') humanmodifier.loadModifiers(getpath.getSysDataPath('modifiers/measurement_modifiers.json'), app.selectedHuman) guimodifier.loadModifierTaskViews(getpath.getSysDataPath('modifiers/measurement_sliders.json'), app.selectedHuman, category, taskviewClass=MeasureTaskView)
def _loadModifiers(human): """ Load modifiers from file. Set human to None to not assign them to a human. """ import humanmodifier modifiers = humanmodifier.loadModifiers(getpath.getSysDataPath('modifiers/modeling_modifiers.json'), human) modifiers.extend(humanmodifier.loadModifiers(getpath.getSysDataPath('modifiers/measurement_modifiers.json'), human)) return modifiers
def load(app): """ Plugin load function, needed by design. """ category = app.getCategory('Modelling') humanmodifier.loadModifiers( getpath.getSysDataPath('modifiers/measurement_modifiers.json'), app.selectedHuman)
def load(app): category = app.getCategory('Modelling') humanmodifier.loadModifiers( getpath.getSysDataPath('modifiers/modeling_modifiers.json'), app.selectedHuman) guimodifier.loadModifierTaskViews( getpath.getSysDataPath('modifiers/modeling_sliders.json'), app.selectedHuman, category)
def _loadModifiers(human): """ Load modifiers from file. Set human to None to not assign them to a human. """ import humanmodifier modifiers = humanmodifier.loadModifiers(getpath.getSysDataPath('modifiers/modeling_modifiers.json'), human) ## COMMENT - adds measurement modifiers - earlier 207 now 226 because of the extension modifiers.extend(humanmodifier.loadModifiers(getpath.getSysDataPath('modifiers/measurement_modifiers.json'), human)) return modifiers
def _loadModifiers(human): """ Load modifiers from file. Set human to None to not assign them to a human. """ import humanmodifier modifiers = humanmodifier.loadModifiers( getpath.getSysDataPath('modifiers/modeling_modifiers.json'), human) modifiers.extend( humanmodifier.loadModifiers( getpath.getSysDataPath('modifiers/measurement_modifiers.json'), human)) return modifiers
def _loadModifiers(human): """ Load modifiers from file. Set human to None to not assign them to a human. """ import humanmodifier modifiers = humanmodifier.loadModifiers( getpath.getSysDataPath('modifiers/modeling_modifiers.json'), human) ## COMMENT - adds measurement modifiers - earlier 207 now 226 because of the extension modifiers.extend( humanmodifier.loadModifiers( getpath.getSysDataPath('modifiers/measurement_modifiers.json'), human)) return modifiers
def getHuman(): with mhpath: thuman = Human( files3d.loadMesh(getpath.getSysDataPath("3dobjs/base.obj"), maxFaces=5)) humanmodifier.mods_loaded = False modifiers = humanmodifier.loadModifiers( getpath.getSysDataPath('modifiers/modeling_modifiers.json'), thuman) return thuman
def getHuman(self): """Load a human model with modifiers.""" with self.mhpath: # maxFaces *uint* Number of faces per vertex (pole), None for default (min 4) human = Human( files3d.loadMesh(getpath.getSysDataPath("3dobjs/base.obj"), maxFaces=5)) # load modifiers onto human humanmodifier.mods_loaded = False modifiers = humanmodifier.loadModifiers( getpath.getSysDataPath('modifiers/modeling_modifiers.json'), human) return human
def __init__(this, path): this.path = path + '/makehuman' this.syspath = ['.' + x for x in ('/', '/lib', '/apps', '/shared', '/apps/gui', '/core', '/plugins')] #cwd = os.getcwd() #syspath = sys.path os.chdir(this.path) sys.path += this.syspath if verbose: sys.stderr.write("Probing makehuman ...\n") import core import headless import getpath import humanmodifier import log ## uncomment to disable makehuman log #log.init() #core.G.app = headless.ConsoleApp() #this.human = core.G.app.selectedHuman modifierGroups = ('head', 'forehead', 'eyebrows', 'neck', 'nose', 'mouth', 'ears', 'chin', 'cheek', 'macrodetails', 'macrodetails-universal', 'macrodetails-proportions') proxyTypes = ('hair', 'eyebrows', 'eyelashes') modifiers = humanmodifier.loadModifiers(getpath.getSysDataPath('modifiers/modeling_modifiers.json'), None) modifiers = [x for x in modifiers if x.groupName in modifierGroups and x.fullName != 'macrodetails/Caucasian'] this.symmetricalModifiers = [x for x in modifiers if x.getSymmetrySide() is None] this.rightModifiers = [x for x in modifiers if x.getSymmetrySide() == 'r'] this.leftModifiers = [x for x in modifiers if x.getSymmetrySide() == 'l'] if verbose: sys.stderr.write("Found %i symmetrical facial features\n" % len(this.symmetricalModifiers)) sys.stderr.write("Found %i left facial features\n" % len(this.leftModifiers)) sys.stderr.write("Found %i right facial features\n" % len(this.rightModifiers)) this.proxies = {} for proxyType in proxyTypes: files = getpath.search([getpath.getDataPath(proxyType),getpath.getSysDataPath(proxyType)], ['.proxy', '.mhclo'], True) files = list(files) if verbose: sys.stderr.write("Found %i %s proxies\n" % (len(files), proxyType)) this.proxies[proxyType] = files skins = getpath.search([getpath.getDataPath('skins'),getpath.getSysDataPath('skins')], ['.mhmat'], True) this.skins = list(skins) if verbose: sys.stderr.write("Found %i skins\n" % len(this.skins))
self.log_window = log_windowDummy() self.statusBar = None self.progress = None def addLogMessage(self, arg1, arg2): "Noop" buddy = human.Human( files3d.loadMesh(mh.getSysDataPath("3dobjs/base.obj"), maxFaces=5)) G.app = appDummy(buddy) base_skel = skeleton.load(mh.getSysDataPath('rigs/default.mhskel'), buddy.meshData) buddy.setBaseSkeleton(base_skel) import humanmodifier humanmodifier.loadModifiers("data/modifiers/modeling_modifiers.json", buddy) import proxy print os.getcwd() sys.stdout = stdout buddyProxy = proxy.loadProxy( buddy, os.path.join(os.getcwd(), 'data', 'eyes', 'low-poly', 'low-poly'), 'Eyes') print mesh, obj = buddyProxy.loadMeshAndObject(buddy) print buddy.setEyesProxy(buddyProxy) mesh = obj.getSeedMesh() sys.stdout = f
self.splash = splashDummy() self.log_window = log_windowDummy() self.statusBar = None self.progress = None def addLogMessage(self, arg1, arg2): "Noop" buddy = human.Human(files3d.loadMesh(mh.getSysDataPath("3dobjs/base.obj"), maxFaces = 5)) G.app = appDummy(buddy) base_skel = skeleton.load(mh.getSysDataPath('rigs/default.mhskel'), buddy.meshData) buddy.setBaseSkeleton(base_skel) import humanmodifier humanmodifier.loadModifiers("data/modifiers/modeling_modifiers.json", buddy) import proxy print os.getcwd() sys.stdout = stdout buddyProxy = proxy.loadProxy(buddy, os.path.join(os.getcwd(), 'data', 'eyes', 'low-poly', 'low-poly'), 'Eyes') print mesh, obj = buddyProxy.loadMeshAndObject(buddy) print buddy.setEyesProxy(buddyProxy) mesh = obj.getSeedMesh() sys.stdout = f mods = []
def load(app): #category = app.getCategory('Modelling') humanmodifier.loadModifiers(getpath.getSysDataPath('modifiers/modeling_modifiers.json'), app.selectedHuman)