[Bf-python] setSel patch
Campbell Barton
cbarton at metavr.com
Sun May 30 14:13:52 CEST 2004
This patch adds only setSel(), getSel, and sel, I have bugtested this
(in editmodem faceselect, many objects etc)
This should be fine to add to the CVS-
Id like to do some restructuring before I add Object.Centre(),
- Cam
Campbell Barton wrote:
> Hi,
> While looking at existing C functions to re-impliment in Python I have
> found that it needs some restructuring.
>
> Ok- Looking at apply_object() - It calls a GUI menu and looks for keys
> to be pressed down.
> It also applys to all selected objects in the scene, so python calling
> it cant be set to a spesific object.
>
>
> A few options are available-
> 1: Copy and paste the code into a python function and modify it to work.
> Pro- No code restructure
> Con- Not reusing code.
> Con- Can only operate on selected objects.
>
> 2: Add the GUI spesific code to the butons or menuitems (QueRedraw and
> okee() functions could be moved here)
> Pro- Not much code modification, just moving calls to the gui
> Con- A bit Messy- Makes the Gui a bit cludgy with all the sily redraw
> calls,
> Con- Can still only operate on selected objects.
>
> 3: Seperate each function into 2.
> eg-
> apply_object(ob) // Rather then applying to all selected objects, only
> apply to 1 object.
> // This means python could easely have a
> hook to this: ob.ApplyObject()
> The Gui could call
>
> apply_object_gui()
> if (okee("Apply size/rot")==0) break;
> (loop through sel;ected objects)
> {
> apply_object(ob) // The real function that does all the work
> }
> QueRedraw()
>
>
> Im sure 3 is the best option. but It would involve me (a C noob) going
> through and seperation each function into 2 parts though I consider
> myself capable of this.
>
> I think this is needed for ApplySizeRot, Centre, Join, Boolean etc...
>
> Any Comments :-)
>
> - Cam
>
>
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://www.blender.org/mailman/listinfo/bf-python
>
>
--
Campbell J Barton
133 Hope Street
Geelong West, Victoria 3218 Australia
URL: http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: obsel.txt
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20040530/e244d335/attachment.txt>
More information about the Bf-python
mailing list