|
Home Table of Contents News Dev Blogs Gallery Timeline Legend Tags Sponsors |
|
Join us on... |
|
|
|
Current: Month Day, Year
| name | description |
|---|---|
| glob | reference to globalObjects |
| env | reference to environment (class programInfo) |
| eqtype | Equipment-type, like "teeth". |
| openGL | Reference to openGL functions. |
| filename | filename of the loaded object. |
| name | object name used in Makehuman. |
| npGrpNames | ordered list of groupnames numpy format. |
| prim | number of primitives (triangles). |
| n_origverts | number of vertices after loading |
| n_verts | number of vertices |
| n_faces | number of faces |
| n_fuvs | number of uv-faces |
| n_groups | number of groups |
| z_depth | z_depth used for sorting 3d objects. |
| coord | list of positions of vertices, array of float32 for openGL. |
| uvs | list of coordinates for uvs. |
| fverts | list of vertices per face, [verts, 3] array of uint32 for openGL >. 2. |
| n_fverts | number of vertices for openGL. |
| loadedgroups | contains the group after loading from file (also for hidden geometry). |
| group | list of references to group per face. |
| overflow | list of vertices or double used vertices [source, dest]. |
| gl_coord | list of flattened gl-Buffer (these are coordinates to be changed by program). |
| gl_coord_o | list of unchanged positions |
| gl_coord_w | list of unchanged positions (working mode with targets) and for posing. |
| gl_coord_mn | list of coordinates to work with macro buffers, (all changes except the macros). |
| gl_coord_mm | list of coordinates to work with macro buffers, (all changes of the macros). |
| gl_uvcoord | list of flattened gluv-Buffer. |
| gl_norm | list of flattended normal buffer. |
| n_glnorm | number of normals for openGL. |
| gl_icoord | list of openGL-Drawarray Index. |
| gl_hicoord | list of openGL-Drawarray used when parts are hidden. |
| min_index | list of 3 elements containing the index number for lowest value in each direction. |
| max_index | list of 3 elements containing the index number for highest value in each direction. |
| minpose_index | list of 3 elements containing the index number for lowest value in each direction in pose-mode. |
| maxpose_index | list of 3 elements containing the index number for highest value in each direction in pose-mode. |
| material | reference to material. |
| visible | contains visible groups for baseinfo, otherwise None. |
| is_base | boolean set to true in case of basemesh. |
| name | parameters | returns | description |
|---|---|---|---|
| load | path use_obj (boolean) | success (boolean) text |
loads an object using importObjFromFile. Intializes material. |
| setZDepth | z_depth | None | Setter for z-depth. |
| initMaterial | filename or None | None | Uses self.filename if filename is None and creates a material for the object. |
| listAllMaterials | None | list of materials | calls materials.listAllMaterials() with filename and return list, returns empty list if no material is available. |
| getMaterialPath | filename | materialpath | Uses material.class function to get an existent path. Returns None when not successful. |
| loadMaterial | pathname | success (boolean) | Load a material witm material.loadMatFile and return success (True also when no material is available) |
| newMaterial | pathname | None | free an old material if existent (freeTextures) and call material.loadMatFile |
| getMaterialFilename | None | filename | returns the current material filename or None |
| exportBinary | None | None | calculates binary filename from self.filename and calls exportObj3dBinary |
| setName | name | None | If name is None it creates generic_type. This function is the setter for name. |
| setGroupNames | list of names | None | packs the group names to fit for numpy arrays. (sets npGrpNames and n_groups) |
| getOpenGLIndex | None | gindex | returns either gl_hicoord or gl_icoord as index depending on hidden vertices. |
| notHidden | None | None | set gl_hicoord to None to mark no hidden vertices. |
| createGLVertPos | pos uvs overflow orig | None | creates self.coord from pos and self.uvs from uvs and sets numberes values, also sets overflow. |
| overflowCorrection | overflow buffer | None | handle overflow buffer after main mesh is corrected. |
| calcNormals | None | valid (boolean) | calculates face-normals and then vertex normals. Returns if geometry is valid (invalid: normal vector cannot be calculated) |
| calcFaceBufSize | mask overrideignore (boolean) | numind numfaces |
create buffersizes for vertsperface, faceverts buffer. The mask calculates if faces are used. overrideignore: normaly used when the helper as invisible group should also be considered. Returns number of indices and faces. |
| highestVisibleVert | None | highest vertex | Checks all visible groups and returns highest visible vertex number. Also works for assets without extra groups (usually this is used to figure out, where the helper begins for bone reduction). |
| fillFaceBuffers | vertsperface faceverts mask overrideignore | highest | fill vertsperface, faceverts buffer. vertsperface is the buffer to put the vertices per face, faceverts is the buffer for the face vertex numbers. mask calculates if faces are used and overrideignore is used when the helper as invisible group should also be considered. returns highest vertex number. |
| unUsedVerts | faceind | mask | creates a table of used vertices (the elements are set to one) like a mask. |
| shortenOverflow | mapping | newoberflow buffer | shortens the overflow table leaving out the non-mapped elements. |
| getVisGeometry | displayhidden (boolean) helper (boolean) | coord norm gl_uvcoord vertsperface faceverts overflow mapping |
return flattened vectors with coordinates, norms, uvcoords, vertex-per-face, faces and overflow. All values are deduplicated, this function is used for exports. |
| createGLFaces | nfaces ufaces prim groups | boolean | Creates fverts, gl_icoord, gl_coord, gl_coord_o (gl_coord_w for base) and gl_uvcoord. Then calculates normals. Also sets loadedgroups, prim, n_faces, n_fuvs and group and n_fverts |
| getPosition | num | x, y, z values | get position of vertex num based on gl_coord |
| getMeanPosition | arr | x, y, z list | used for skeleton mainly, mean postion of an array, based on gl_coord |
| resetMesh | None | None | get back the copy from gl_coord_o |
| createWCopy | None | None | create the working copy gl_coord_w |
| resetFromCopy | None | None | reset form gl_coord from gl_coord_w |
| hideVertices | verts | None | calculate new index gl_hicoord from gl_icoord |
| hideApproxVertices | asset base verts | None | hide vertices (recalulate gl_hicoord) by testing reference verts |
| hiddenMask | None | mask | returns a mask what should be hidden or None if nothing should be deleted. |
| createMapping | mask | mapping fill |
creates a mapping index reduced by hidden coords, also returns highest value |
| optimizeHiddenMesh | bweights | gl_index gl_coord gl_uvcoord gl_norm nweights overflow mapping |
duplicate the mesh for effective saving without hidden vertices, used e.g. for glTF, returns all necessary values. None if nothing is hidden |
| getInitialCopyForSlider | factor targetlower targetupper | None | called when starting work with one slider, a copy without the value of this slider is created. So this target is substracted. The proportial part of the slider is than added to the initial copy. |
| updateByTarget | factor targetlower targetupper | None | updates the mesh when slider is moved. Not used for macro targets. |
| setTarget | factor targetlower targetupper | None | updates from file (all done on basemesh directly, no overflow correction) |
| resetToNonMacroTargets | None | None | reset to original mesh + add all changes of non-macrotargets, preparation to deal with macro targets. result is in self.gl_coord_mn |
| prepareMacroBuffer | None | None | copy original mesh + add all changes of non-macrotargets. It uses gl_coord_mn and sets gl_coord_mm to zero. |
| addTargetToMacroBuffer | factor target | None | add target to gl_coord_mm |
| addMacroBuffer | None | None | after changing a macro it will be added make sure to write in same buffer (out will avoid to get a new one) |
| approxToBasemesh | asset base | None | updates the mesh, barycentric approximation (assets). Uses weights and offsets from mhclo file and bases gl_coord. |
| precalculateApproxInRestPose | asset base | None | calls approxToBasemesh and copies values to gl_coord_w |
| _getMinMaxValues | coord | min max |
calculate numbers of vertices, which are on the outside for later use do that only for visible groups. In case of an empty object None is returned. |
| precalculateDimension | None | None | sets min_index and max_index with the help of _getMinMaxValues |
| precalculatePosedDimension | None | None | sets minpose_index, maxpose_index with the help of _getMinMaxValues for posed position. |
| boundingBox | None | Ax Ay Az Bx By Bz |
calculate bounding box of an object. sets self.min_index and self.max_index, can be None in case of empty object even after precalculation. and returns Ax, Ay, Az, Bx, By, Bz, if none it returns all values set to 0.0. |
| getCenterWidth | None | center width | returns value center (width), 0.0 if min_index is None. |
| getCenterHeight | None | center height | returns value center (height), 0.0 if min_index is None. |
| getCenterDepth | None | center depth | returns value center (depth), 0.0 if min_index is None. |
| getCenter | None | list of center width, height, depth | returns value center (widht, height, depth). |
| getLowestPos | posed (boolean) | lowest value | Used for floor calculation. returns lowest value either in pose mode or standard mode. |
| setNoPose | None | None | set minpose_index, maxpose_index to None. |
| getHeightInUnits | None | None | returns height in units (0.0 if min_index is None) |
| getMeasure | vindex (list) | measure coords |
create a measurement, results in an array of vertices for presentation and the result (length). Length is simply calculated by distances. The coords are filled with the coordinates and measure contains total distance. |
| calculateAttachedGeom | faces | attachedFaces attachedEdges borderneighbour |
get a dictionary of attached facenumbers and edgenumbers per vertex for borders, get the next border neighbours (used in loop subdivision) |