SetShapingMorphWeight() changes

Title: SetShapingMorphWeight() changes reported morph range at runtime — expected behavior?

Hi Reallusion Python team,

I’m seeing a reproducible behavior in Character Creator 5 using RLPy that I’d like to confirm before relying on Python-driven morph edits.

Environment:

  • Character Creator 5.13.2031
  • RLPy API 0.8.4
  • Python 3.8.8

Test morph:

  • Display name: Ear Scale
  • Morph ID: cc embed morphs/embed_ear5

Fresh CC5 process / freshly loaded test project:

  • minimum: 0
  • maximum: 1
  • value: 0

I then call:

SetShapingMorphWeight(...)

with a small requested value of approximately:

0.02

The write succeeds and reads back as approximately:

0.019999999553

However, after that write, the reported range changes to:

  • minimum: -1
  • maximum: 1

instead of the original:

  • minimum: 0
  • maximum: 1

Additional observations:

  • The maximum remains 1 .
  • Reloading the same project in the same CC5 process restores the morph value to 0 , but the reported range remains -1..1 .
  • Fully exiting CC5 and starting a fresh process restores the reported range to 0..1 .
  • Repeated getter reads before the first write remain stable at 0..1 .
  • Enumerating all morphs before the write does not cause the transition.
  • No project save is required for the range transition to occur.
  • Other morph metadata remains stable.

This suggests the first shaping-morph write may be causing some native runtime initialization or normalization that changes the range exposed by the API.

My questions are:

  1. Is this range transition expected behavior after the first call to SetShapingMorphWeight() ?
  2. Is the initial 0..1 range an incomplete/uninitialized value, with -1..1 being the authoritative runtime range?
  3. Is there an initialization/update call that should be made before querying morph ranges?
  4. Should applications cache the initial range, use the post-write range, or query some other API for the authoritative valid range?
  5. Is it safe to treat this as metadata-only behavior, or can the range transition affect morph evaluation or persistence?

I have a minimal reproduction script and observations available if useful.

Thanks for any clarification.

Thanks for the detailed report.

To keep startup fast, Character Creator loads shaping-slider information lazily. Until a slider’s data file has been read, its min/max are placeholder values (0…1). The first SetShapingMorphWeight() call loads that slider’s real data, and after that the API reports the correct range (-1…1 for embed_ear5). The loaded state lasts for the whole CC session, so reloading the project keeps -1…1, while restarting CC resets it.

Answers:

  1. The range getter probably should load the slider data first. I’ll let the team knows and see if we can schedule a fix.
  2. Yes — treat the post-write range (-1…1) as authoritative; the initial 0…1 is uninitialized.
  3. There’s no dedicated init call today. Workaround: read the current weight and write the same value back with SetShapingMorphWeight(id, GetShapingMorphWeight(id)) before querying the range. The shape stays the same.
  4. Don’t cache the initial range; query it after the workaround above, or after any write.
  5. Morph evaluation and saved weights aren’t affected; the stored weight is used as-is. The incorrect range only matters if your code limits values to it.

Edit: Changed some wording before I get a confirmation from the team.