[Bf-committers] Proposal: Object creation

"Martin Bürbaum" martin.buerbaum at gmx.at
Tue Oct 4 11:13:02 CEST 2011


Follow up of the "redo operator with last used settings (patch)" thread
http://lists.blender.org/pipermail/bf-committers/2011-September/033725.html

I propose a new way of handling newly created objects in Blender.
I'm sure this may not have a high priority right now, but discussion and planning is never a bad thing IMHO.
I'll not go into detail how this should be implemented since Blenders internal architecture is still new to me. I'll add my basic ideas though.

C&C welcome (especially from the coding and framework perspective).

------------------------------------------
OBJECT CREATION

Everything created with an "Add" operator is initially locked from editing and can only be changed by tweaking its parameters (see below of editing).

My basic idea would be to store a unique identifier (operator name?) and the defining parameters (operator parameters?) in that object somehow.
Maybe making this its own object type (e.g. "Generated") would work?


PARAMETER EDITING

The parameters of the object can then be tweaked (in object or edit-mode, see below) to ones linking.

I imagine this would be done by taking the the operator and parameters and "redo" them.


CONTENT EDITING

After creation you can enter edit mode, but you will not be able to change anything except the parameters.
When one wants to edit the data of the object directly (mesh/curve/etc.) it will be converted to an "editable" object.
That means that after that the object behaves no different than it does right now in Blender.

This can be done automatically (with a small prompt to the user) or explicitly by "unlocking" (i.e. converting) the object.
I'm not sure if dropping the operator & parameters it was created with is good or bad at this point.
------------------------------------------

If anybody is familiar with the way C4D handles newly added objects of certain types - this is pretty similar to that.

I implemented a very crude version of this behaviour when we started doing addon scripts, but the script could not enforce the lock (making this system kinda wonky).

Cheers,
Martin


More information about the Bf-committers mailing list