[Addon] KTX_MeshVersions (Create versions of current mesh on the fly) #51177
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#51177
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi There,
I've released a plugin a while ago on Github and made people aware of it on IRC, Twitter and BlenderArtists
https://blenderartists.org/forum/showthread.php?416861-Blender-Meshversions-addon
A quick tutorial has been made on Youtube:
https://www.youtube.com/watch?v=bcxVqEOMXgw&feature=youtu.be
I'm sorry but I can't provide you with a wiki page (yet)
Today I was approached by Brendon Murphy (meta-androcto) on IRC and he thought it was a shame that only few people are aware of this little addon,
so he suggested to me to do what I'm doing now ;-)
I've attached the python script.. It's really no rocket science and it works by copying mesh data and relinking it to the current object.
The elaborate naming of the mesh is to prevent it relinking to newly created objects with the same base name.
Of course you are free to do with it what you want, rename, alter or discard ;-)
KTX_MeshVersions.py
Changed status to: 'Open'
Added subscriber: @kostex
Added subscriber: @BrendonMurphy
hi, thanks for creating the task, after testing the addon a few times it works very well, I will test this out over the next few days.
So far it looks good to fill a gap in mesh modeling tools.
@kostex
hi, testing some more, I think it's needed to have a function to delete unwanted mesh versions,
also tooltips are important for users to understand functions,
I think also edit mode needs some update function?
creating a subdivided version of the mesh seemed to not work when saving.
any ideas here?
Hi,
deleting unwanted mesh versions is something I've investigated.. but it's Blender that is not allowing it..
It's the same behaviour as discarding textures/materials.. they only really get purged when saving/re-opening the file.
But maybe I'm wrong..
Tooltips is no problem, I'll look into that.
As soon as I want to implement more intelligent 'snapshots' of a mesh, a great deal of programming is needed. At this time it's just based around ONE blender python function bpy.context.object.data.copy()
My level of expertise stops around there ;-)
The edit mode needing update function I don't understand.. The mesh gets updated as soon as you change to another version does it not?
The added tooltips.. and mesh remove!
KTX_MeshVersions.py
or get it at my github
https://github.com/kostex/blenderscripts/blob/master/KTX_MeshVersions.py
Added subscriber: @VukGardasevic
For discarding meshes give a tooltip explaining
purge all
function in the Outliner.Yeah that is a bit weak sauce, but not all users know about it.
The addon uses bpy.data.meshes.remove(..mesh..) function and it is working without the need for purging? In the outliner the orphaned meshes disappear when removed with the addon.
I don't know when Blender team implemented this purging, maybe long time ago, but I was always under the impression that you cannot purge without save/reopen..
Anyhow.. so the outliner button purge all is not required I would think.
So the option "delete unwanted meshes" has been implemented now.. the code needs a better approach in disabling deletion of the last mesh..
At this time I'm just iterating the same loop twice to find out if there is only one 'linked/stored' mesh in the active object..
I've found out that due to automatic naming of objects in Blender it can get messy.. independent of the addon.
Example:
Open Blender
Create Plane (it will have the name Plane)
Blender attaches a mesh with the name Plane
Delete te Plane
Create a Plane
This time the object is still named Plane, but the mesh will be named Plane.001
The addon will not be able to handle this at this time.. you will get the previous left over Plane mesh selectable too.. hope it all makes sense.
I'm thinking of renaming the original object/mesh to the same naming convention as the consecutive mesh versions as soon as the addon is used..
Will investigate.
I've made some intensive changes.. The naming of the versions has changed.
There were way too many ways to get mixups when having multiple similar named objects in the scene.
Blender does that .001, .002 naming of meshes when there's already a similar named object.
i.e.
Start Fresh
Create plane
Object will be named: Plane
Mesh will be named: Plane
Delete Plane
Create Plane
Object will be named: Plane
Mesh will be named: Plane.001
Since the addon will search for meshes with the same name, mixups can occur.
This has been fixed now by initialising the addon.. that way, the object and mesh will be renamed to something relatively unique, but both have the same name.
New versions will just get the default blender behavior naming convention: .001 .002 etc
No more dates/microseconds etc.
Another option is added: when no mesh is selected but let's say a camera.. the addon will jump into cleanup mode.
I'm not perfectly happy with that approach.. but think of something more logical..
The cleanup mode lets users remove stray/orphaned meshes and or pin them (fake_user=true)
Next, when I find the time, I will try to change all to use UILists
KTX_MeshVersions.py
Changed status from 'Open' to: 'Resolved'
committed to contrib, closed as resolved