Page MenuHome

Fix T60849: Adding poll method for quick effects operators
ClosedPublic

Authored by matc (matc) on Jan 26 2019, 9:24 AM.

Details

Summary

Quick Explode, Smoke and Fluid are not working properly when executed in edit mode. Quick Fur happens to be working in edit mode too.

Fixes T60849

Diff Detail

Repository
rB Blender

Event Timeline

matc (matc) created this revision.Jan 26 2019, 9:24 AM
matc (matc) edited the summary of this revision. (Show Details)
Jacques Lucke (JacquesLucke) requested changes to this revision.Mar 7 2019, 3:16 PM

Next time you provide a patch, please add at least one of the core developers (or original author) as reviewer. Otherwise it is easy to oversee such patches..

release/scripts/startup/bl_operators/object_quick_effects.py
49

This base class should not inherit from bpy.types.Operator. Better let the subclasses inherit from two classes.

matc (matc) updated this revision to Diff 14081.Mar 8 2019, 4:32 PM

QuickFur and QuickExplode are currently working in edit mode. But users will only see the results once they leave edit mode.

QuickSmoke fails to create a "Smoke Domain" object while in edit mode.

QuickFluid triggers a bpy.ops.object.shade_smooth.poll() that fails in edit mode.

Should all four be limited to object mode only?

matc (matc) marked an inline comment as done.Mar 8 2019, 4:33 PM

Yes, I think it would be good to limit all these operators to object mode.

matc (matc) updated this revision to Diff 14084.Mar 8 2019, 4:54 PM

Limiting all quick effect operators to object mode.

The name QuickObjectMode feels a bit weird. ObjectModeOperator is probably more descriptive.
Other than that, looks good.

matc (matc) updated this revision to Diff 14086.Mar 8 2019, 5:09 PM

Renamed to ObjectModeOperator

This revision is now accepted and ready to land.Mar 19 2019, 5:15 PM
This revision was automatically updated to reflect the committed changes.