|
Home Table of Contents News Dev Blogs Gallery Timeline Legend Tags Sponsors |
|
Join us on... |
|
|
|
Current: Month Day, Year
| name | description |
|---|---|
| names | 3 names, preset to None. |
| values | 3 values, preset to 0.0. |
| name | parameters | returns | description |
|---|---|---|---|
| insert | name value | None | If name is none, a certain value is inserted. |
| name | description |
|---|---|
| glob | reference to global object. |
| obj | set to baseClass object. |
| group | current group of morph, set to empty string. |
| displayname | displayed name. |
| default | default value. |
| incr | reference to increment morph, preset to None. |
| decr | reference to decrement morph, preset to None. |
| macro | reference to macro morph, preset to None. |
| macro_influence | macro influences from json file. |
| m_influence | list of influences, preset empty list. |
| barycentric | reference to map slider, preset to None. |
| barycentric_diffuse | sets values to diffuse color. |
| opposite | dual slider, has an opposite. |
| slider | reference to slider which gets the values. |
| sym | name of symmmetric side (left or right). |
| isRSide | morph is the right side (preset to false). |
| measure | is measurement needed (preset to None). |
| virtual_val | changed value by formula for virtual value (a text used with eval for e.g age.) |
| pattern | a search pattern used for e.g opposite morphs. |
| tip | target tip. |
| name | parameters | returns | description |
|---|---|---|---|
| memInfo | None | list of 5 elements | this class creates the entries more the memory viewer. In case of barycentric it creates a special line with 3 entries, in case of a macro, the macro is returned, otherwise increment and decrement targets are returned (name and number of changed vertices) |
| setFromDict | t argetpath bintargets | None | fills all the initial values using t. for decr and incr it loads targetdata via Morphtarget class and set references. displayname, group, tip, sym, isRSide are set. In case of measurement, values are linked. If target influences text slot, it is also set. In case of a macro, macro and macro_influence are set, barycentric_diffuse is set, when available. Default value is multiplied by 100. |
| macro_influence | array | None | appends macro influences to m_influence |
| macro_barycentric | val | None | creates barycentric macro with 3 texts and values. |
| resetValue | None | None | resets a target to default and self.barycentric to 0.33, 0.33, 0.34 |
| set_barycentricFromMapSlider | None | None | set the 3 barycentric values from slider. |
| printSlot | None | formatted text | calculates the formula with eval and sets virtual value and returns formated text. |
| textSlot | descr | None | set the textslot via printSlot function. |
| search_pattern | user | pattern | creates a pattern to be found in the target repo, for macros it is of a different type, dual targets will be referenced by dual patterns, the opposites are defined in base.json. Single targets will be referenced by just the name, user targets will get a "custom/" in front. |
| displayMeasurement | new (boolean) | None | If it is new, the marker is set the first time, otherwise it is modified. Measurement were presented near slider. |
| initialize | None | None | Initialize a slider. Factor is calculated by dividing value by 100, marker is deleted, if it is a macro, mesh is resetted to all non-macro targets. Otherwise initial copy of slider is fetched and if needed measurement is displayed. In case of symmetry the copy of the symmetric slider is also fetched. |
| generateAllMacroWeights | targetlist macroname factor weights | None | Recursive function to generate weights. Since for example 4 different components will change the character, one need to figure out how much each component will be used. Therefore one need to consider the components like a tree for the leaf the value itself is added, otherwise we do a further recursion. |
| macroCalculation | m_influence list | None | The complete macro calculation.
The influences are used and a targetlist is created.
Each component is considered, in case of barycentric macro and a value
bigger than 0.001 it is inserted. Otherwise the steps are calculated
and the the values are inserted according to the distance of two steps.
In the end the weights are generated.
The last step is the optimization: Some weightfiles are not existing. So they would be a factor of 0. Sometimes targets are identical. All targets are in memory and there are no duplicates. The calculated target name will be mapped to the targets (using the value "t") So it either add them the new targetname to a list or add the second factor if allready exists. After that target will be add to macrobuffer and macro buffer itself will be added to basemesh (which only has all non-macro targets atm.) |
| macroCalculationLoad | None list | None | Creates all macro targets when loading. |
| changeMacroTarget | bckproc args | None | Recalculates all Macros and updates assets. |
| setBaryCentricDiffuse | None | None | changes the diffuse color (mixcolor). |
| postChange | None | None | Handles all actions after change: change size, change skeleton, mark project as changed. |
| finished_bckproc | None | None | used in parallel mode, does last change and calls postChange. |
| callback | None | None | Target callback function, works different for macros (as a thread) when self.env.parslide is used otherwise it works normal to avoid pyInstaller problems. Handles Macro, barycentric and normal targets. |
| name | description |
|---|---|
| name | name of the target. |
| raw | reference to raw data. |
| verts | vertices changed by target. |
| data | values for vertices. |
| env | reference to global environment. |
| name | parameters | returns | description |
|---|---|---|---|
| loadTargetData | path bintargets | None | get Target data either from pre-loaded npz file or from single targets. Set raw, verts and data. |
| releaseNumpy | None | None | releases data explicitely. |
| name | description |
|---|---|
| glob | reference to global information. |
| env | reference to environment information. |
| modelling_targets | List of all targets. |
| collection | Target collection connected with basename. |
| macrodef | Macro defintion file. |
| target_sysindex | Target index set to -1 (will be 0, 1, 2). |
| categories | categories read from file. |
| baseClass | reference to baseClass. |
| symmetry | boolean set to false. |
| target_env | Target environment, 3 classes of targets paths. |
| default_icon | reference to empty target. |
| name | parameters | returns | description |
|---|---|---|---|
| getSym | None | None | getter for symmetry |
| setSym | value | None | setter for symmetry |
| makeSym | RtoL | None | creates symmetry for right to left or left to right. |
| loadModellingJSON | None | None | loads the macro.json and modelling.json file. So macro.json (if available) will be loaded first from contarget in user section, then from system path. Then load modelling.json from contarget in user section, then from system path, load additional flexible modelling.json from userpath. macrodefs are created and linked to glob.targetMacros. targetjson from system (+ userjson) are returned. |
| createTarget | name t | None | create a target either from system/user-contarget path or user path. It is added to the glob.targetRepo by name or by name or list and appended to modelling_targets. |
| loadTargets | None t | None | loads target categories, loads macros and modelling json files. Then it loads binary targets, if not possible it creates them. Inside the macro targets are loaded and all targets are created. |
| saveBinaryTargets | bckproc *args t | None | save targets as compressed binary (running as background command) also works for contargets. Argument [0][0] explains what to compress: 1 = system, 2 = user (3 is both). |
| setSkinDiffuseColor | None | None | searches for barycentric target and set diffuse color. |
| reset | colors | None | reset all targets and does a setSkinDiffuseColor if colors is True. |
| isHeadPattern | pattern | is head (boolean) | returns True if a pattern is used for head. |
| isHeadTarget | key | is head (boolean) | returns True if a target is for head. |
| resetHead | None | None | sets all head values to default. |
| setTargetByName | key value | None | set target name key to a certain value, also appends missing targets to glob.missingTargets. |
| modifierPresets | presets | None | set presets mentioned in base.json to targets. |
| destroyTargets | None | None | destroys all targets and sets modelling_targets to an empty array. |