Git Product home page Git Product logo

immersive_scaler's People

Contributors

alertedsnake avatar feilen avatar mysteryem avatar notakidonsteam avatar triazo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

immersive_scaler's Issues

Addon path fails on initial install

Discovered by Cαt on discord. Goes away after a restart of blender.

image

I suspect updating the loading process to reload everything before importing could help.

Hip Fix error

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

Model floor is set incorrectly when an object on the avatar is lower than the feet.

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.

TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

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

Allow choosing the bone mapping from the addon UI.

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.

Clicking on "rescale" in Blender 4 results in an error, without scaling it to the target height

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


It won't move the model up after scaling

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

Avzomend can't be rescaled, with scale to eyes is set to true target height is detected as negative

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

fails to load in blender 3.1

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

Ensure that X-axis mirror is disabled before rescaling armature

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:
blender_2023-01-31_12-49-44
After scaling when X-Axis Mirror under Tool option is enabled:
blender_2023-01-31_12-50-28

after scalling, bones seems to be in the right place on blender, but not on Unity

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
blender

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"
unity_scaled

while the nonscalled version is good
unity_notscaled

btw using "master" version, not the last release (for new ik support)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.