[Bf-taskforce25] operators and context

Martin Poirier theeth at yahoo.com
Wed Oct 8 02:00:12 CEST 2008




--- On Tue, 10/7/08, Michael Fox <mfoxdogg at gmail.com> wrote:

> From: Michael Fox <mfoxdogg at gmail.com>
> Subject: Re: [Bf-taskforce25] operators and context
> To: "The Blender 2.5 TaskForce" <bf-taskforce25 at blender.org>
> Date: Tuesday, October 7, 2008, 6:55 PM
> I know this maybe silly but, delete as a basic operation, i
> say have a
> global delete operator that will delete any data given to
> it, and have
> each area have an interpretation operator that takes the
> data it needs
> and calls the delete operator, that way checks can be done
> to see if its
> possible and clean
> 
> i know this will make for more code but its really the only
> way i can
> see that only the data that needs to be deleted is deleted.
> 
> this can also be applied to copy aswel
> a given scene
> so basically 1 operator that each area has readies the data
> to be
> operated, then a separate global operator does the actual
> operation
> a given scene
> i know this will make alot of separate operators and extra
> code but is
> more modular and can handle contexts better

I agree, that's what I was going to suggest too.

To recap:

Special operators specific to view (or rather to data interpretation) feeds parameters into a lower level operator that is less context sensitive.

For example, a low level delete operator is being fed objects to delete from the outliner delete operator based on outliner selection and from the 3d view (or others) operator based on object selection in the current scene.

Martin


      


More information about the Bf-taskforce25 mailing list