Similar to rBf9308a585ecd, use psys_get_current if we cant get the
active psys from context (which is only defined for the Properties
Editor). Other solution would be to define a "particle_system" context
member in other editors, but for now, stick with the simplest solution.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
- Branch
- T92402 (branched from master)
- Build Status
Buildable 18219 Build 18219: arc lint + arc unit
Event Timeline
Comment Actions
To ensure a small optimization, it might be good to check whether the active "particle_system" is required:
ParticleSystem *psys_from = NULL;
if (use_active) {
psys_from = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem).data;
if (psys_from == NULL) {
/* Particle System context pointer is only valid in the Properties Editor. */
psys_from = psys_get_current(ob_from);
}
}