MoI discussion forum
MoI discussion forum

Full Version: Enumerate object names

Show messages: All  1-4  5-6

From: andrewsimper
24 Apr 2014   [#5] In reply to [#4]
I implemented the script as a command and came to post here to complain that it wouldn't undo, but you have beaten me to it :)

Copying all of the geometry by a clone is a very heavyweight operation for a simple re-name. Is it possible to add the name field to your undo system?

edit: how does the current system work when I click on the top left name field and type in a new name? I can undo that operation, is this also a completely clone of all geometry that is being renamed?
From: Michael Gibson
24 Apr 2014   [#6] In reply to [#5]
Hi andrew,

> edit: how does the current system work when I click on the top left name field and type
> in a new name? I can undo that operation, is this also a completely clone of all geometry
> that is being renamed?

I had to look it up, I had forgotten about this.

When you use the regular UI to edit the name it does set up a special undo unit that just contains object state (including name, style assignment, hidden and locked states), and just the geometry's ID number as a reference to it, rather than storing a clone of the actual geometry.

But currently the creation of these particular undo units is baked in to some specific functions like the property panel's name edit function (which includes showing the dialog as part of it), there isn't any way to trigger it by itself from script right now.

- Michael

Show messages: All  1-4  5-6