Source Filmmaker

Source Filmmaker

994 个评价
Directional Scale Controls (Stretching)
24
11
3
16
4
4
7
7
3
3
5
2
3
2
2
2
   
奖励
收藏
已收藏
取消收藏
Script
标签: SFM
文件大小
发表于
更新日期
17.904 KB
2023 年 3 月 5 日 下午 2:10
2023 年 3 月 7 日 下午 4:57
4 项改动说明 ( 查看 )

订阅以下载
Directional Scale Controls (Stretching)

描述
This script adds xyz scale controls for selected dag.

Credits:
- Me
- Unknown Soldier aka @0TheSpy

Github: https://github.com/kumfc/sfm-tools/tree/master/directional-scale-controls


Important
- You should run this script from embedded python interpreter!
- Not compatible with Source 2 Filmmaker.
- Works with all models.

Installation
Just subscribe to this item!
Additionally, if you're familiar with Python - invoke Directional Scale Patch's main() from sfm_init.py so it will be executed automatically on startup.

Usage
To create controls, execute Directional Scale Controls from "DAG Utilities Menu" in dag (bone) submenu.

To display the scale changes, you should execute Directional Scale Patch script from Scripts menu (navbar) every time you restart SFM.

Known issues
Problem: Applying this script on multiple ancestor dags may cause FPS drops when posing their childs. E.g. applying it to spine3, spine4 and neck will cause some lags when posing the head. This happens because SFM has retarded expression handling in slider controls. However, it doesn't affect completed animation and happens only when you directly change pos/rot from the interface. Dags without such ancestors or from any other "Animation Set" in the session won't cause the FPS drops. Not really problematic until you want to rescale every bone in the model with poor CPU aboard.

Solution: This script has an unused function create_attr_slider_simple which creates slider without the use of an expression. Just swap function names with original create_attr_slider. This slider type, however, is limited to [0, 1] range and not remapable. To bypass this limit use Facial Flex Unlocker (which unlocks not only flexes but all sliders in general) or Graph Editor mode — not UI-friendly, but lag-free.



Problem: In order to minimize the effect from previous issue, I simplified the expression and by that sacrificed "Remap Slider Range" functionality.

Solution: Actually, with the use of master-scale you can stretch the dag up to 64 times in every direction, but if you want more, or, for some reason, negative values — use Facial Flex Unlocker or simply Graph Editor mode.



Problem: Directions on different bones even of single model are oriented differently. X may be Y or Z can be X in relation to the world.

Solution: Presented X Y Z is actually local bone orientation. That's not a bug.



Problem: Jigglebones (if there's any) of attached models (e.g. hats) will slightly distort after Undo (CTRL+Z) on scale controls.

Solution: Just hide-unhide the distorted model to normalize it.



Problem: Under some conditions RGB position/orientation controls (as well as skeleton) can be stretched and hardly usable. It started to happen after we added support for locked bones and attached cosmetics. Why? Because these 3D-controls are the very same kind of attached objects as hats.

Solution: We're still searching for a way to separate that effect. It seems unreasonable for us to revert the update, so you can change it manually if you want. Just comment these two lines (add # at the beginning):
line 325: mwrite(i_patch_skip_read_parent_override, patch_skip_read) line 371: mwrite(i_patch_rescale_2, patch_rescale_jump_2)

This will prevent the attached/locked elements from rescaling. If you still want them, don't comment these lines, but instead adapt to use Graph Editor mode or "yellow circle" controls.


This is a beta release. If you faced any bugs or issues not listed above - report it to the project's GitHub.

If you faced a crash, provide the screencast recording and essential steps to reproduce. If it affects specific models - write the model name and it's source. Double check that it happens ONLY when patch is applied and not a general SFM issue.

Includes:
sfm\dag\exact\count1\Directional_Scale_Controls.py
sfm\mainmenu\umfc\Directional_Scale_Patch.py
热门讨论 查看全部(3)
11
7 月 15 日 下午 3:42
Beginner's Guide
CommanderCTC
4
2024 年 11 月 21 日 下午 3:51
It disappears when you rotate :/
JIIINGJING
2
2023 年 11 月 24 日 下午 2:00
Crashes on execution
Sabi.The.Bunny(STB)
307 条留言
Skulltronprime 10 月 28 日 下午 9:07 
Uhh...how'd I use this?
yuuri 10 月 23 日 下午 5:33 
Does this work with IK rigs? I tried to attach an IK script to a rig that had some parts scaled with this but for some reason the limb just distorts and the IK for it is messed up.
Scientist Vovik 10 月 20 日 上午 10:53 
Не работает. дизлайк. хyйня. переделывай
6o6PoBa9l cTpy9I JIe4eHue rPu60M  [作者] 10 月 14 日 下午 8:38 
@Caidenz

I guess it heavilly depends on the model rig weights. You can make a screen recording and link the problematic model, I will check.
Caidenz 10 月 13 日 下午 8:39 
Everything is working perfectly! but with most of my models, when the Directional Scale Controls are applied, the eyes/pupils distort when moving them up/down or left/right. is there a solution to this?
Iateurcookies 10 月 6 日 上午 7:02 
oh nwm i tried to modify the count1 script and not the umfc one.
Iateurcookies 10 月 5 日 下午 1:10 
where do i run "mwrite(i_patch_skip_read_parent_override, patch_skip_read)"?
Modilla 8 月 23 日 上午 12:19 
a
KenDoStudios 8 月 20 日 下午 12:52 
directional patch is not found! help!
LineX240 6 月 16 日 上午 4:03 
thats a feature SFM should have by default, thx mate