Phyton Code Snippet for ccslider / Character Height?

Hello, not shure if this is the proper place to ask.

Does anyone has a short phyton code snipped on hand which i can manipulate ccsliders and / or set the “Character Height” Slider Value in CC 4,52 with ?

This is how I set ccsliders:

import RLPy


def get_first_avatar():
    avatars = RLPy.RScene.GetAvatars()
    if avatars:
        return avatars[0]
    return None


def find_morph_id(avatar, morph_name):
    shaping_component = avatar.GetAvatarShapingComponent()
    categories = shaping_component.GetShapingMorphCatergoryNames()
    for category in categories:
        ids = shaping_component.GetShapingMorphIDs(category)
        names = shaping_component.GetShapingMorphDisplayNames(category)
        for i, name in enumerate(names):
            if name == morph_name:
                return ids[i]
    return None


def set_morph_slider(avatar, slider_name, weight):
    shaping_component = avatar.GetAvatarShapingComponent()
    morph_id = find_morph_id(avatar, slider_name)
    if morph_id:
        shaping_component.SetShapingMorphWeight(morph_id, weight)


avatar = get_first_avatar()
if avatar:
    # character height works in reverse, negative values for taller
    set_morph_slider(avatar, "Character Height", -0.9)

Thank you, ive been trying several ways to set a slider value without success. Your snippet seems only to identify the ccslider path names.

I’m trying to set the value of a CC slider (e.g., “Character Height” with path “essential body morphs/pack_full_body6”) . I can find the morph path with GetAvatarShapingComponent().GetShapingMorphIDs(), but I can’t find the correct method to set the slider value. I’ve tried SetMorphValue, SetMorphIntensity, SetMorphStrength, etc., but all result in AttributeError.

What would be the exact RLPy method to set a morph slider value using the morph path (e.g., “essential body morphs/pack_full_body6”)? A code example would be greatly appreciated!

Thanks!

scroll down the code window. It sets the slider value at the end.

Oops, my mistake, that was a big help :blush: Thanks so much !