Free Electron Documented Operators
Common Operator Info
FE ImportOp

ImportOp

Alembic FBX Lua Ptex XGen XML

Load data from a file.

Inputs

Four optional input surfaces can be used as a context for the import.

Ptex files that lack mesh information in metadata require the corresponding mesh to be supplied in order to position the Ptex data.

Lua scripts can read from all four input surfaces. The first connected input, if any, will be copied into the output surface prior to running the script.

Parameters

The Format selects the file type for the Load File. If set to Auto an import handler is selected based on the file suffix. For historical reasons, the default choice for an unknown suffix is XML joint data.

For Maya, the Frame should be bound to an expression that dynamically provides the current frame. Every instance of the substring "$F" in a file name is replaced with this value. Binding the current frame to this attribute also provokes the operator to reload whenever time changes.

The Fallback Frame allows for a safe known frame in case the expression fails to point at a parsable file.

If Cache Frames is on, each loaded frame is stored. Repeated access to each particular frame can then skip the IO and parsing costs.

The general purpose Options string is passed along as a hint to the handler that loads the file. The handler can do whatever it pleases with that information.

A Filter File can be used to reduce the data imported. The filter can be controlled by the string tokens in Spec. The spec file is json format with a layout explained below.

If Extract Sub Nodes is not empty, it is used as a space delimited list of patterns to match for subnode names. Where supported, the data from one or more subnodes is combined into a single output. If Regex is turned on, the patterns will be interpreted as regular expressions instead of glob patterns. The Direct Input text field is treated just like text from a file. Currently, this is only supported by the Lua handler. If a Lua file is also specified, the contents of the text field will be added to the beginning of the loaded script.

Options

In the following descriptions, REAL indicates a literal real number INT indicates a literal integer, and STRING or FILENAME indicates one section of text without space.

The current FE Alembic and FBX import handlers recognize 'fps=REAL' to specify the frames per second with which the data has been saved. Without this option, a reasonable guess will be attempted.

The current FE Alembic and XML import handlers recognize 'line' to request joint data in the form of connective lines instead of perpendicular triangles.

The current FE Geo and RecordGroup import handlers do not recognize any options.

The current FE Lua import handler will simply try to convert all options of the form 'name=value' into variables available to the Lua script.

The current FE Ptex import handler recognizes 'resolution=REAL' with a range from 0.0 to 1.0 to adjust the number of texels converted to points and 'depth=INT' sets the subdivision depth used to position the points.

The current FE XGen import handler recognizes 'resolution=REAL' with a range from 0.0 to 1.0 to adjust what fraction of the curves are generated. The option of 'baked' will import an already baked xpd file instead of generating curves on the spot. The options of 'palette=STRING', 'descriptions=STRINGS', 'patch=STRING', and 'xpdPath=FILENAME' can be used to override values that would otherwise be looked up in the XGen archive.

Status

The current selectable formats include Alembic, FBX, Geo, Lua, Ptex, RecordGroup, XGen, and XML. Any addition handlers, such as for local proprietary formats, can be used in Auto mode.

The Alembic support currently accepts common meshes or non-mesh hierarchies interpreted as joints.

The FBX support currently accepts non-mesh hierarchies interpreted as joints.

The XML format is currently only used for a specific layout of joint data.

(FE) TESTING
tested in Houdini and Maya

Spec

The spec json file consists of a list of rules, each comparing against a list of regular expressions and assigning matches to be either allowed or denied. For a potential named element to be used, it must pass through these rules, in order, with a final status of allow.

The "if" conditional uses the rule only if the argument is found as a token in the Spec attribute.

Here is an example that only uses the lower body (with the "legs" token) and skips fingers and toes (with the "basic" token). Multiple tokens can used at once.

[
    {
        "comment": "start by allowing anything",
        "do": "allow",
        "re": [ ".*" ]
    },
    {
        "comment": "but for legs, deny everything by default",
        "if": ".*\\blegs\\b.*",
        "do": "deny",
        "re": [ ".*" ]
    },
    {
        "comment": "then for legs, specify exactly what is wanted",
        "if": ".*\\blegs\\b.*",
        "do": "allow",
        "re":
        [
            ".*_hips",
            ".*_hip",
            ".*_leg",
            ".*_foot",
            ".*_toe.*"
        ]
    },
    {
        "comment": "always discard unwanted auxiliary joints",
        "do": "deny",
        "re":
        [
            ".*_effector",
            ".*_manipulator"
        ]
    },
    {
        "comment": "for a basic skeleton, ignore fingers and toes",
        "if": ".*\\bbasic\\b.*",
        "do": "deny",
        "re":
        [
            ".*_finger.*",
            ".*_toe.*"
        ]
    }
]

Web page, Copyright 2008-2021, Free Electron Organization