triazo / immersive_scaler Goto Github PK
View Code? Open in Web Editor NEWVRChat correct proportions, made easy in blender.
License: MIT License
VRChat correct proportions, made easy in blender.
License: MIT License
output from loading the latest release or the latest git commit from the master branch
Python: Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.1\3.1\scripts\startup\bl_operators\userpref.py", line 450, in execute
mod = addon_utils.enable(self.module, default_set=True, handle_error=err_cb)
File "C:\Program Files\Blender Foundation\Blender 3.1\3.1\scripts\modules\addon_utils.py", line 305, in enable
if mod and os.path.exists(mod.__file__):
File "C:\Program Files\Blender Foundation\Blender 3.1\3.1\python\lib\genericpath.py", line 19, in exists
os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
location: <unknown location>:-1
My model has a long tail that clips with the floor a tiny bit. After running the script, the tail is aligned with the floor, pushing the avatars feet up in the air. I would guess avatars with chains and other accessories run into the same issue.
One possible solution would be to set the avatars position to the ankle/foots position before scaling, so once it is scaled the avatar is roughly in the same spot.
Hey. for avatars with tall ears or hats etc this resizes them including that in their height which is fine sometimes
but I feel there should be the option to use eye height
So I tried today for the first time your tool, did my usual things in CATS (importing a VRM avatar) and before exporting I used your tool in CATS (v 0.19.1-dev). In the viewport the scalling seems to have went smootly
but so after importing the avatar in Unity, I realised only after a while of thinkering around others things that the bones wasns't "where they should be"
while the nonscalled version is good
btw using "master" version, not the last release (for new ik support)
This is unrelated to my previous issue. Rindo model that I use can be scaled completely fine (although it requires manual bone mapping).
Model that I am trying to adjust is Avzomend: https://yorshkasencho.booth.pm/items/4118550
I can't really tell what might be causing issues by looking at armature, I even did some manual adjustments to the rig, since by default it has several issues.
Bones have been mapped manually.
Blender version: 3.4.1
CATS version: latest development absolute-quantum/cats-blender-plugin@d837be3
Immersive scaler: latest as of writing this message
Error message, happens regardless of Scale to Eyes setting:
TypeError: must be real number, not complex
Error: Python: Traceback (most recent call last):
File "C:\Users\Asovrix\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\immersive_scaler\operations.py", line 630, in invoke
return self.execute(context)
File "C:\Users\Asovrix\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\immersive_scaler\operations.py", line 612, in execute
rescale_main(self.target_height, self.arm_to_legs / 100.0, self.arm_thickness / 100.0, self.leg_thickness / 100.0, self.extra_leg_length, self.scale_hand, self.thigh_percentage / 100.0, self.custom_scale_ratio, self.scale_eyes, True )
File "C:\Users\Asovrix\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\immersive_scaler\operations.py", line 512, in rescale_main
scale_to_floor(arm_to_legs, arm_thickness, leg_thickness, extra_leg_length, scale_hand, thigh_percentage, custom_scale_ratio, legacy)
File "C:\Users\Asovrix\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\immersive_scaler\operations.py", line 366, in scale_to_floor
arm_scale_ratio = calculate_arm_rescaling(arm, rescale_arm_ratio, legacy)
File "C:\Users\Asovrix\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\immersive_scaler\operations.py", line 256, in calculate_arm_rescaling
arm_change = (math.sqrt((head_arm_change * total_length - neck_length) * (head_arm_change * total_length + neck_length)) / arm_length) - (shoulder_length / arm_length)
TypeError: must be real number, not complex
Getting this error on master/dev on multiple version of blender (3.0, 3.3, 3.6, 4.1)
Runtime error: no mesh data found
Traceback (most recent call last):
File "C:\Users\untun\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\immersive_scaler\operations.py", line 659, in execute
shrink_hips()
File "C:\Users\untun\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\immersive_scaler\operations.py", line 575, in shrink_hips
bpy.ops.object.mode_set(mode='EDIT', toggle = False)
File "N:\Program Files (x86)\Steam\steamapps\common\Blender\3.2\scripts\modules\bpy\ops.py", line 115, in __call__
ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.mode_set.poll() Context missing active object
Error: Python: Traceback (most recent call last):
File "C:\Users\untun\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\immersive_scaler\operations.py", line 659, in execute
shrink_hips()
File "C:\Users\untun\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\immersive_scaler\operations.py", line 575, in shrink_hips
bpy.ops.object.mode_set(mode='EDIT', toggle = False)
File "N:\Program Files (x86)\Steam\steamapps\common\Blender\3.2\scripts\modules\bpy\ops.py", line 115, in __call__
ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.mode_set.poll() Context missing active object
It would great if the addon let you pick which bones are which from the addon's UI instead of having to hardcode your bone names into the script. It would also be great if it did a fuzzy string match to autofill the bone names so you only have to correct the ones that are wrong.
The order of shapekeys are completely changed after running the script. This messes with stuff once imported back into Unity.
I hit scale and the feet are below the ground
I've tried checking and unchecking every combination of "Core Functionality" etc
I've tried using the CATS Dev build too
I'm on Windows 10 Home using Blender 2.93.8
On Blender 4.1.0:
When getting the current height of the avatar (or any of the ratios, for that matter), it interrupts with this error message:
bpy.ops.armature.get_avatar_height() Python: TypeError: expected sequence size 24, got 8
(This also happens when "Rescale Armature" is applied)
Current workaround:
Use Blender 4.0.2
Running CATS dev build (the one with integration), but I don't think that's relevant.
I tried both the latest commit on master, and the release, and got the same error.
Happy to help out with debugging if needed :)
Python: Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.0\3.0\scripts\startup\bl_operators\userpref.py", line 458, in execute
mod = addon_utils.enable(self.module, default_set=True, handle_error=err_cb)
File "C:\Program Files\Blender Foundation\Blender 3.0\3.0\scripts\modules\addon_utils.py", line 305, in enable
if mod and os.path.exists(mod.__file__):
File "C:\Program Files\Blender Foundation\Blender 3.0\3.0\python\lib\genericpath.py", line 19, in exists
os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
location: <unknown location>:-1
Having X-axis mirror enabled can cause bones from non-armature bones such as clothes to get moved in a way to force symmetry on X-axis. That makes sense on humanoid armature, but not on clothes, which can be asymmetrical.
Example before scaling on a bow of this kimono, I hid humanoid bones on this view:
After scaling when X-Axis Mirror under Tool option is enabled:
When I clock on "Rescale" the "Target Height" is not met and this error will be thrown out.
It seems like the Upper Body Percentage and Custom Arm Ratio does influence the scaling though.
Python: Traceback (most recent call last):
File "F:\SteamLibrary\steamapps\common\Blender\4.0\python\lib\contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "C:\Users\Home\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\immersive_scaler\operations.py", line 58, in temp_ensure_enabled
yield
File "C:\Users\Home\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\immersive_scaler\operations.py", line 1133, in execute
return self.execute_main(context, arm, meshes)
File "C:\Users\Home\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\immersive_scaler\operations.py", line 1153, in execute_main
rescale_main(
File "C:\Users\Home\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\immersive_scaler\operations.py", line 838, in rescale_main
scale_to_floor(arm_to_legs, arm_thickness, leg_thickness, extra_leg_length, scale_hand, thigh_percentage, custom_scale_ratio, scale_relative, upper_body_percent)
File "C:\Users\Home\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\immersive_scaler\operations.py", line 719, in scale_to_floor
apply_pose_to_rest()
File "C:\Users\Home\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\immersive_scaler\operations.py", line 1102, in apply_pose_to_rest
bpy.ops.pose.armature_apply({'active_object': arm})
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\modules\bpy\ops.py", line 106, in __call__
C_exec, C_undo = _BPyOpsSubModOp._parse_args(args)
File "F:\SteamLibrary\steamapps\common\Blender\4.0\scripts\modules\bpy\ops.py", line 60, in _parse_args
raise ValueError("1-2 args execution context is supported")
ValueError: 1-2 args execution context is supported
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.