$unlockdefinebones: Difference between revisions
Jump to navigation
Jump to search
Tip:If you define your $model, $body, or $bodygroup at the very end of the qc, or at least below the $animation and $sequence, you will generate new definebones based on your new ref pose without shuffling the definebone order.
This would be very useful for viewmodels that have arms and weapon separated, where a different definebone order causes issues. Such as in
Left 4 Dead 2
Note:This behavior is the opposite of the default behavior in previous versions of the model compiler. For Half-Life 2: Episode Two, the default behavior was changed to stop the more common undesirable effect of animation order messing up default locations of bones - such as those used by attachments - that were only actually defined in a small subset of the source files. The drawback is that some badly exported LOD models - ones whose skeletons don't match their actual pose since they're no longer attached - now will show the previously hidden errors. Setting $unlockdefinebones will get the old behavior back.
($unlockdefinebones) |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Normally, the [[$definebone]] definitions are always used for the default positions and rotations of the skeleton. Setting [[$unlockdefinebones]] will instead use the first | {{LanguageBar}} | ||
{{This is a|name=$unlockdefinebones|QC command}} Normally, the [[$definebone]] definitions are always used for the default positions and rotations of the skeleton. Setting [[$unlockdefinebones]] will instead use the bone positions of the first frame in the '''last defined smd/dmx file''' of the qc for the definebone values.<br> | |||
$Unlockdefinebones will not shuffle the order of the $definebone lines, unlike the studiomdl command '''-definebones''' would.<br> | |||
{{tip|If you define your [[$model]], [[$body]], or [[$bodygroup]] at the very end of the qc, ''or at least below the [[$animation]] and [[$sequence]]'', you will generate new definebones based on your new ref pose without shuffling the definebone order.<br>This would be very useful for viewmodels that have arms and weapon separated, where a different definebone order causes issues. Such as in {{l4d2|4}}}} | |||
{{note|This behavior is the opposite of the default behavior in previous versions of the model compiler. For Half-Life 2: Episode Two, the default behavior was changed to stop the more common undesirable effect of animation order messing up default locations of bones - such as those used by attachments - that were only actually defined in a small subset of the source files. The drawback is that some badly exported LOD models - ones whose skeletons don't match their actual pose since they're no longer attached - now will show the previously hidden errors. Setting [[$unlockdefinebones]] will get the old behavior back.}} | {{note|This behavior is the opposite of the default behavior in previous versions of the model compiler. For Half-Life 2: Episode Two, the default behavior was changed to stop the more common undesirable effect of animation order messing up default locations of bones - such as those used by attachments - that were only actually defined in a small subset of the source files. The drawback is that some badly exported LOD models - ones whose skeletons don't match their actual pose since they're no longer attached - now will show the previously hidden errors. Setting [[$unlockdefinebones]] will get the old behavior back.}} | ||
Line 6: | Line 10: | ||
$unlockdefinebones | $unlockdefinebones | ||
__NOTOC__ | __NOTOC__ |
Latest revision as of 17:57, 3 August 2025
$unlockdefinebones
is a QC command available in all Source games. Normally, the $definebone definitions are always used for the default positions and rotations of the skeleton. Setting $unlockdefinebones will instead use the bone positions of the first frame in the last defined smd/dmx file of the qc for the definebone values.
$Unlockdefinebones will not shuffle the order of the $definebone lines, unlike the studiomdl command -definebones would.

This would be very useful for viewmodels that have arms and weapon separated, where a different definebone order causes issues. Such as in


Syntax
$unlockdefinebones