Page MenuHome

Curves: Support converting curves to legacy hair system.
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on Mar 24 2022, 7:35 PM.
Tags
None
Subscribers
None
Tokens
"Love" token, awarded by hitrpr."Love" token, awarded by kynu."Love" token, awarded by eversimo.

Details

Summary

This adds a Convert Curves to Legacy Hair operator. It converts all selected curves objects into particle hair systems on their respective surface objects. Existing particle systems with the correct name are updated, otherwise new a new particle system is added.
The purpose of the operator is to make the new curves sculpting tools useful even before all functionality is ported over.

Currently, the generated hair system does not map exactly to the curves object for reasons that I don't fully understand. It's very close though. It might be a drawing issue or the hair strands are resampled somewhere else.

One thing that is still not 100% clear is how to expose this operator in the ui in curves sculpt mode. I created a follow up task for that: T96889.

Diff Detail

Repository
rB Blender
Branch
convert-curves-to-legacy-hair (branched from master)
Build Status
Buildable 21316
Build 21316: arc lint + arc unit

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.Mar 24 2022, 7:35 PM
Jacques Lucke (JacquesLucke) created this revision.

I didn't spend much time understanding all the details, but the code looks good as far as I'm concerned.
Accepting since I don't think the patch needs another review iteration from me.

Should this always create a new particle system, or should it update an existing system? If it should update an existing system, should the mapping be by name?

I have no idea personally, I guess this is a question for @Simon Thommes (simonthommes)

How should the operator be called?

Maybe "Convert to Particle System"?

Where in the ui should the operator be located? (currently it is only available via search)

I think it should be in the Object > Convert submenu.

source/blender/editors/curves/intern/curves_ops.cc
150

hairs_num according to T85728

  • Merge branch 'master' into convert-curves-to-legacy-hair
  • update existing particle system
  • cleanup
This revision is now accepted and ready to land.Mar 29 2022, 1:47 PM