SOFILE(3iv)
π SoFile β the whole vibe, bestie (3IV) π
okay so. gather round π«Ά this is the manual page for SoFile from the 3IV manual, and it's genuinely one of my faves. It's the node that reads its children from a named file. yes. a file file. no cap β¨
πΈ NAME πΈ
SoFile β node that reads children from a named file π
π¦ INHERITS FROM π¦
SoBase > SoFieldContainer > SoNode > SoFile
so it's got the whole family tree behind it, the way that it just inherits everything π
β¨ SYNOPSIS β¨
#include <Inventor/nodes/SoFile.h>
π Fields from class SoFile:
SoSFString name
π Methods from class SoFile:
SoFile()
SoGroup * copyChildren() const
static SoType getClassTypeId()
π Methods from class SoNode:
void setOverride(SbBool state)
SbBool isOverride() const
SoNode * copy(SbBool copyConnections = FALSE) const
virtual SbBool affectsState() const
static SoNode * getByName(const SbName &name)
static int getByName(const SbName &name, SoNodeList &list)
π Methods from class SoFieldContainer:
void setToDefaults()
SbBool hasDefaultValues() const
SbBool fieldsAreEqual(const SoFieldContainer *fc) const
void copyFieldValues(const SoFieldContainer *fc, SbBool
copyConnections = FALSE)
SbBool set(const char *fieldDataString)
void get(SbString &fieldDataString)
virtual int getFields(SoFieldList &resultList) const
virtual SoField * getField(const SbName &fieldName) const
SbBool getFieldName(const SoField *field, SbName &fieldName)
const
SbBool isNotifyEnabled() const
SbBool enableNotify(SbBool flag)
π Methods from class SoBase:
void ref()
void unref() const
void unrefNoDelete() const
void touch()
virtual SoType getTypeId() const
SbBool isOfType(SoType type) const
virtual void setName(const SbName &name)
virtual SbName getName() const
π DESCRIPTION π
okay so here's the tea β this node represents a subgraph that was read from a named input file. That's literally its whole personality.
When an SoFile node gets written out, just the field containing the name of the file is written; no children are written out. not one. none. π When an SoFile is encountered during reading, reading continues from the named file, and all nodes read from the file are added as hidden children of the file node.
Whenever the name field changes, any existing children are removed and the contents of the new file is read in. The file node remembers what directory the last file was read from and will read the new file from the same directory after checking the standard list of directories (see SoInput), assuming the field isn't set to an absolute path name. it's giving "I know a guy, and the guy knows a directory" π§
The children of an SoFile node are hidden; there is no way of accessing or editing them. π If you wish to edit the contents of an SoFile node, you can modify the contents of the named file and then "touch" the name field (see SoField). Alternatively, you can use the copyChildren() method to get a editable copy of the file node's children. Note that this does not affect the original file on disk, however. the disk said "not my business" and honestly, respect.
π FIELDS π
SoSFString nameβ Name of file from which to read children. that's it, that's the field, she's lowkey carrying the entire node π
π METHODS π
SoFile()β Creates a file node with default settings. fresh out the box, default settings, main character energy β¨SoGroup * copyChildren() constβ Returns a newSoGroupcontaining copies of all of the file node's children. a little photocopy of the kids, and the original stays untouched π«Άstatic SoType getClassTypeId()β Returns type identifier for this class. iykyk π
π₯ ACTION BEHAVIOR π₯
SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoHandleEventAction
Traverses its children just as SoGroup does. same energy, different node π
SoRayPickAction
Traverses its hidden children, but, if intersections are found, generates paths that end at the SoFile node. so it goes in, does the work, and the path comes back ending at SoFile β no sneaking past it π¦
SoWriteAction
Writes just the name field and no children. periodt. π
β FILE FORMAT/DEFAULTS β
File {
name "<Undefined file>"
}
note that <Undefined file> is the default and it is, in fact, undefined. iconically honest. π
π SEE ALSO π
SoInput, SoPath β go read those too bestie, they're the supporting cast and they ate π
one last thing: the children of anSoFileare hidden and there is genuinely no way of accessing or editing them, andcopyChildren()gives you a copy that does not affect the original file on disk. don't come for me when your edits don't stick β I warned you π
okay that's the whole page!! this entire masterpiece lives in the SoFile(3IV) manual, and the footer is just SoFile(3IV)() β no version, no date, just mystery-era energy. iconic of her, honestly ππΈβ¨
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms