Skip to content

0djentd/libemtk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPI GitHub release (latest SemVer including pre-releases) Python package GitHub Repo stars

libEMTK, Extended Modifiers Tool Kit (library).

This thing provides new level of abstraction for Blender modifiers stack.

Library name is not final and probably will be changed on release.

libemtk is designed to be used with EMTK.

Most classes and methods have docstrings.

There are some simple unittests for basic operations.

Installation

Linux: Symlink ~/.config/blender/3.1/scripts/modules/libemtk to libemtk

Windows: idk

Mac: idk

Main concepts

Actual modifier is an actual Blender modifier.

Modifier is a cluster or actual Blender modifier.

Cluster is an object that consists of any number of modifiers or clusters. Any subclass of ClusterTrait is a Cluster.

ModifiersCluster is a cluster that only has actual Blender modifiers in it.

ClustersLayer is a cluster that only has other clusters in it. This doesnt mean that it cant contain ModifiersClusters with actual modifiers.

ExtendedModifiersList is an object representing clusters stack. It is similar to ClustersLayer, but doesnt have ClusterTrait attributes. It require all modifiers in it to be on the same Blender object.

SortingRule is an object that represents set of rules that can be used to sort clusters in ExtendedModifiersList.

ModifiersOperator is a mix-in class for Operator class. It has methods for manipulating multiple ExtendedModifiersList instances.

ClustersCommand is implementation of command pattern for some of frequently used operations.

It consists of ClustersAction, basic elements that have minimal information about side effects of command. Examble: ClustersAction('MOVE', 'Bevel.123', {'direction': 'UP'}) This action does not included information about position of 'Bevel.123' and other detail required to interpret action as a part of command.

ClusterCommands use ClustersCommandsSolver to ask clusters for additional commands. Example: (using previous example) ClustersLayer will add ClustersAction('MOVE', 'Bevel.321', {'direction': 'DOWN'}), if 'Bevel.321' will change its index after moving 'Bevel.123'. Then ClustersCommandsSolver will ask 'Bevel.321' if it should do something else after moving it.

Currently supported features

All basic editing, like moving, applying, removing, duplication and switching visibility of clusters.

Serialization and deserialization of clusters state. Full or partial resoring of clusters state.

Serialization and deserialization of clusters types definitions.

Clusters Commands and Actions.

TODO

Buffering for ExtendedModifiersList controller.

Panel type subclass for panels that use ExtendedModifiersList.

Operators for ExtendedModifiersList controller.

More clusters operation types.