Blender addons - A collection of Blender tools I've written for myself over the years.

Overview

gret

A collection of Blender tools I've written for myself over the years. I use these daily so they should be bug-free, mostly. Feel free to take and use any parts of this project. gret can be typed with one hand in the search bar.

Installation

TODO

Configuration

TODO

Tools

Mesh: Graft

Connects boundaries of selected objects to the active object. I wrote it to deal with stylised fur in a non-destructive way that allows normals to be lifted from the body.

Demo

Mesh: Retarget Mesh

Refit clothing meshes to a modified version of the character mesh.

Demo

If retargeting to a different mesh, make sure they share topology and vertex order. If the retargeted mesh becomes polygon soup then it's probably the vertex order. Try using an addon like Transfer Vert Order to fix it.

Mesh: Make Collision

Intended for use with UE4, generates collision shapes for selected geometry. For example, to make compound collision for a chair:

  1. Select a part of the chair in edit mode (can use Select Linked Pick if the pieces are separate).
  2. Click Make Collision and select an appropriate shape, e.g. capsules for the posts, a box for the backrest and cylinder for the seat.
  3. Repeat for every piece.

Demo

Mesh: Vertex Color Mapping

Procedurally generates vertex colors from various sources. Sources can be vertex groups, object or vertex position, or a random value. Useful for exporting masks to game engines.

Panel

Mesh: Apply Modifiers with Shape Keys

The much needed ability to apply modifiers on a mesh with shape keys. Mirrors are specially handled to fix shape keys that move vertices off the center axis. Found in Shape Keys → Specials Menu → Apply Modifiers with Shape Keys.

Mesh: Sync UV Maps

Adds a few buttons that allow reordering UV maps. Sync UV Maps works on all selected objects to ensure UV layer names and order are consistent with the active object. It can also be used to simply switch the active UV layer for multiple objects.

Buttons

Mesh: Add Strap

Similar in function to an extruded curve. Since it's mesh and not curve based, typical mesh operators can be used to edit it. Use case is adding belts to characters.

Mesh: Add Rope

Generates helicoid meshes, mostly useful as ropes. Can edit the base shape once created.

Animation: Pose Blender

Allows blending poses together, similar to the UE4 AnimGraph node. Works on bones, not shape keys.

Demo

Has a performance cost, I'll try to optimize it further at some point.

Animation: Actions Panel

A panel for quick access to actions and working with pose libraries. Pose libraries are simply actions where each frame has a named marker, and normally they're very annoying to work with. A pose library is necessary to use the Pose Blender tool.

Panel

Animation: Rig Panel

Add any frequently used rig or bone properties here. To find the data path of a property, right click it then select Copy Data Path.

The addon Bone Selection Sets must be enabled for the second panel to show. I don't find bone pickers to be comfortable to use, and this is a workable alternative. Add and delete buttons make it easy to create temporary sets while animating.

Panel

Material: Texture Bake

One-click bake and export. Intended for quickly baking out curvature and AO masks.

Panel

Material: Tile Paint

Rudimentary tool to create tile-based UV maps. For anything more complicated use Sprytile instead.

Demo

UV: Relax Loops

Relaxes selected UV edge loops to their respective length on the mesh. Can be used to rectify non-grid meshes that TexTools Rectify won't work on. Found in UV Editor → UV → Relax Loops.

Demo

Other

Sculpt Selection: Sets the sculpt mask from the current edit-mode vertex selection. Found in the Select menu in edit mode.

Normalize Shape Key: Resets min/max of shape keys while keeping the range of motion. A shape key with range [-1..3] becomes [0..1], neutral at 0.25. Some game engines don't allow extrapolation of shape keys. Found in Shape Keys → Specials Menu → Normalize Shape Key.

Merge Shape Keys to Basis: Mixes active shape keys into the basis shape. It's possible to filter shape keys by name.

Remove Unused Vertex Groups: Originally an addon by CoDEmanX, this operator respects L/R pairs of vertex groups. Found in Vertex Groups → Specials Menu → Remove Unused Vertex Groups.

Deduplicate Materials: Squashes duplicate materials, like "Skin.002", "Skin.003", etc. Found in File → Clean Up.

Replace References: Replaces object references in modifiers. I use it to swap meshes that are shrinkwrap targets and such. Found in File → Clean Up.

Export Jobs

TODO

Comments
  • Apply Modfiers with Shapekey, but not Armature

    Apply Modfiers with Shapekey, but not Armature

    Hello, is there a way to apply modifiers with Shapekey, but ignore Armature.

    I need to apply mirror and subdiv for Fbx exports, and your plugin seems to be the most stable form all that I have tested.

    Thanks

    opened by fls-eugene 4
  • Can't enable the addon.

    Can't enable the addon.

    When I try to enable GRET 0.3.0 by clicking a checkbox in addons tab, blender won't let me do it and prints this error log -

    Traceback (most recent call last): File "blender-3.1.2-windows-x64\3.1\scripts\modules\addon_utils.py", line 351, in enable mod = import(module_name) File "AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\gret-0_3_0_init_.py", line 52, in modules = import_or_reload_modules(module_names, name) File "AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\gret-0_3_0_init_.py", line 31, in import_or_reload_modules module = globals()[module_name] = importlib.import_module(module_name) File "blender-3.1.2-windows-x64\3.1\python\lib\importlib_init_.py", line 126, in import_module return bootstrap.gcd_import(name[level:], package, level) File "AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\gret-0_3_0\mesh_init.py", line 23, in modules = import_or_reload_modules(module_names, name) File "AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\gret-0_3_0_init.py", line 31, in import_or_reload_modules module = globals()[module_name] = importlib.import_module(module_name) File "blender-3.1.2-windows-x64\3.1\python\lib\importlib_init_.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\gret-0_3_0\mesh\shape_key_store.py", line 152, in class ShapeKeyPanelPatcher(PanelPatcher): File "AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\gret-0_3_0\mesh\shape_key_store.py", line 154, in ShapeKeyPanelPatcher panel_type = bpy.types.DATA_PT_shape_keys AttributeError: 'module' object has no attribute 'DATA_PT_shape_keys'

    I am installing it on Blender 3.1.2, tried 3.1.0 but it prints the same exact error. 0.2.0 GRET works just fine.

    opened by Electrognome 3
  • Doesn't work at all for me

    Doesn't work at all for me

    I've downloaded the add on and have blender 2.93.7. I can install it, but when searching it does not appear. Tried to remove and install again and also older versions on gret.

    opened by vanessahjerpe 3
  • Request: add handling for converting Blender poses to unreal pose assets.

    Request: add handling for converting Blender poses to unreal pose assets.

    Blender poses only want the posed bones to have keyframes data. Unreal pose assets require zero transforms keyframes. For exporting a blender pose (for example for faceARKit face shapes) to unreal I need to manually keyframe the rest pose along with the changed bones. But this break's blenders about to blend poses.

    Is there a way to add an option to automatically add or strip zero keyframes from an animation to allow non destructive conversion between blender and unreal poses?

    opened by BusterCharlie 2
  • Changes in Blender 3.4 break rope and collision mesh creation

    Changes in Blender 3.4 break rope and collision mesh creation

    After installing the addon in Blender 3.4 and trying to create a rope there is an error: AttributeError: 'Mesh' object has no attribute 'use_customdata_edge_crease'

    also, when trying to create collision mesh there is another error: AttributeError: 'Mesh' object has no attribute 'use_customdata_vertex_bevel'

    Probably related to https://developer.blender.org/rB291c313f80b4cc and https://developer.blender.org/rBa8a454287a27

    opened by Ran9 1
  • Speed up shape_key_apply_modifiers using buffers

    Speed up shape_key_apply_modifiers using buffers

    By using buffer objects with type matching the 'co' data (single precision float), in foreach_set and foreach_get, Blender will directly memcpy the data into/out of the buffer instead of iterating and casting each element to the correct type. This results in slightly faster foreach_set and foreach_get calls.

    It's probably not much of a timesave unless the mesh being operated on is huge (or ends up huge from its modifiers) and/or has a ton of shape keys.

    Here's the foreach_getset code in Blender's source: https://github.com/blender/blender/blob/594f47ecd2d5367ca936cf6fc6ec8168c2b360d0/source/blender/python/intern/bpy_rna.c#L5228 The lines containing !buffer_is_compat are where it'll swap to iteration if the buffer isn't compatible with the data, the code for compatible buffers is right before.

    Here's the code I used for benchmarking along with results in the comments:

    import bpy
    import numpy as np
    import timeit
    
    # Requirements:
    # In object mode with an active mesh object in current scene that has shape keys
    
    
    def orig_get(my_list, vertices):
        my_list[:] = [0.0] * (len(vertices) * 3)
        vertices.foreach_get('co', my_list)
    
    def np_get(my_array, vertices):
        my_array.resize(len(vertices) * 3, refcheck=False)
        vertices.foreach_get('co', my_array)
        
    def put(my_list_or_array, vertices):
        vertices.foreach_set('co', my_list_or_array)
        
    
    trials = 1000
    
    
    get_setup = "basis=bpy.context.object.data.shape_keys.key_blocks[0]"
    put_setup_orig = get_setup + ";my_list = [];orig_get(my_list, basis.data)"
    put_setup_np = get_setup + ";my_array = np.empty(0, dtype=np.single);np_get(my_array, basis.data)"
    
    # ~56.49ms per call with 393218 verts (ran with 100 trials instead of 1000)
    # ~2.96ms per call with 24578 verts
    # ~0.041ms per call with 386 verts
    print(timeit.timeit("my_list = [];orig_get(my_list, basis.data)", setup=get_setup, globals=globals(), number=trials)/trials*1000)
    # ~18.82ms per call with 393218 verts (ran with 100 trials instead of 1000) (3x)
    # ~1.16ms per call with 24578 verts (2.55x)
    # ~0.022ms per call with 386 verts (1.86x)
    print(timeit.timeit("my_array = np.empty(0, dtype=np.single);np_get(my_array, basis.data)", setup=get_setup, globals=globals(), number=trials)/trials*1000)
    
    # ~28.45ms per call with 393218 verts (ran with 100 trials instead of 1000)
    # ~1.75ms per call with 24578 verts
    # ~0.03ms per call with 386 verts
    print(timeit.timeit("put(my_list, basis.data)", setup=put_setup_orig, globals=globals(), number=trials)/trials*1000)
    # ~20.85ms per call with 393218 verts (ran with 100 trials instead of 1000) (1.36x)
    # ~1.29ms per call with 24578 verts (1.36x)
    # ~0.022ms per call with 386 verts (1.36x)
    print(timeit.timeit("put(my_array, basis.data)", setup=put_setup_np, globals=globals(), number=trials)/trials*1000)```
    opened by Mysteryem 1
  • Support Live link Such As Unity MeshSync For Blender

    Support Live link Such As Unity MeshSync For Blender

    • Workflow: i.e. A real-time link from Blender to UE is like unity's meshSync plugin
    • Description: i.e.

    Hi!I recently noticed that Unity's MehSync plugin has been able to sync most of Blender's data in real time. Just bone data may not be perfect for games, but it's almost done with USD data transfer.

    The USD Hydra plug-in developed by AMD is currently the only way to dynamically link USD to Blender. However, the supported data is too few. Blender's meeting last week was still discussing the follow-up development route of USD, so it is difficult to make progress in the short term.

    So I'm really looking forward to a plugin like Unity's MeshSync that links to Blender in real time, which is a breakthrough for both game development and film production, allowing almost any Blender user project to seamlessly connect to UE, even if they've only learned the basics of UE for five minutes. 

    Hopefully you will be able to develop a similar real-time synchronization feature before Blender fully supports USD (which I think is at least a few years away), thanks for your efforts!

    Here are some links and demos

    opened by 1405100494 1
  • Remove ARP thingy from Action panel and substitue for new Blender 3.1…

    Remove ARP thingy from Action panel and substitue for new Blender 3.1…

    … Frame Range feature :)

    I've updated here on our internal tools, it's working fine from what I've tested :) Never did a Pull Request before, so excuse me if I'm doing something wrong!

    opened by elamhut 1
  • Error trying to enable add-on in Blender 2.93

    Error trying to enable add-on in Blender 2.93

    Traceback (most recent call last): File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\modules\addon_utils.py", line 386, in enable mod.register() File "C:\Users\Main\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\gret-0_0_1_init_.py", line 159, in register module.register(GRET_PG_settings) File "C:\Users\Main\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\gret-0_0_1\material_init_.py", line 14, in register module.register(settings) File "C:\Users\Main\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\gret-0_0_1\material\tile_paint.py", line 578, in register GRET_OT_tileset_draw.annotations['uv_layer_name'][1]['default'] = prefs.tileset_uv_layer_name TypeError: '_PropertyDeferred' object is not subscriptable

    opened by welovekah 1
Releases(1_1_0)
Lock a program and kills it indefinitely if it is started.

Kill By Lock Lock a program and kills it indefinitely if it is started. How start it? It' simple, you just have to double-click on the python file (.p

1 Jan 12, 2022
Antchain-MPC is a library of MPC (Multi-Parties Computation)

Antchain-MPC Antchain-MPC is a library of MPC (Multi-Parties Computation). It include Morse-STF: A tool for machine learning using MPC. Others: Commin

Alipay 37 Nov 22, 2022
0xFalcon - 0xFalcon Tool For Python

0xFalcone Installation Install 0xFalcone Tool: apt install git git clone https:/

Alharb7 6 Sep 24, 2022
A modern Python build backend

trampolim A modern Python build backend. Features Task system, allowing to run arbitrary Python code during the build process (Planned) Easy to use CL

Filipe Laíns 39 Nov 08, 2022
A simple language for new programmers and a toy language ;)

Yell An extremely simple, yet powerful language for new programmers, as well as a toy language ;) Explore the docs » Report Bug · Request Feature Yell

Yell 4 Dec 28, 2021
String Spy is a project aimed at improving MacOS defenses.

String Spy is a project aimed at improving MacOS defenses. It allows users to constantly monitor all running processes for user-defined strings, and if it detects a process with such a string it will

10 Dec 13, 2022
Oppia is an online learning tool that enables anyone to easily create and share interactive activities

Oppia is an online learning tool that enables anyone to easily create and share interactive activities (called 'explorations'). These activities simulate a one-on-one conversation with a tutor, makin

Oppia 4.7k Dec 29, 2022
In the works, creating a new Chess Board and way to Play...

sWJz4Chess date started on github.com 11-13-2021 In the works, creating a new Chess Board and way to Play... starting to write this in Pygame, any ind

Shawn 2 Nov 18, 2021
Collections of python projects

nppy, mostly contains projects written in Python. Some projects are very simple while some are a bit lenghty and difficult(for beginners) Requirements

ghanteyyy 75 Dec 20, 2022
This is a multi-app executor that it used when we have some different task in a our applications and want to run them at the same time

This is a multi-app executor that it used when we have some different task in a our applications and want to run them at the same time. It uses SQLAlchemy for ORM and Alembic for database migrations.

Majid Iranpour 5 Apr 16, 2022
Web UI for your scripts with execution management

Script-server is a Web UI for scripts. As an administrator, you add your existing scripts into Script server and other users would be ab

Iaroslav Shepilov 1.1k Jan 09, 2023
Very efficient backup system based on the git packfile format, providing fast incremental saves and global deduplication

Very efficient backup system based on the git packfile format, providing fast incremental saves and global deduplication (among and within files, including virtual machine images). Current release is

bup 6.9k Dec 27, 2022
Taking the fight to the establishment.

Throwdown Taking the fight to the establishment. Wat? I wanted a simple markdown interpreter in python and/or javascript to output html for my website

Trevor van Hoof 1 Feb 01, 2022
A very small (15 lines of code) and beautiful fetch script (exclusively for Arch Linux).

minifetch A very small (15 lines of code) and beautiful fetch script (exclusively for Arch Linux). There are many fetch scripts out there but I wanted

16 Jul 11, 2022
A napari plugin to inspect data within a cisTEM project

napari-cistem A plugin to inspect data within a cisTEM project This napari plugin was generated with Cookiecutter using with @napari's cookiecutter-na

Johannes Elferich 1 Nov 07, 2021
Insert a Spotify Playlist, Get a list of YouTube URLs from it.

spotbee This is a module that spits out YouTube URLs from Spotify Playlist URLs Why use this? It is asynchronous which makes it compatible to use with

Nishant Sapkota 10 Apr 06, 2022
Powerful virtual assistant in python

Virtual assistant in python Powerful virtual assistant in python Set up Step 1: download repo and unzip Step 2: pip install requirements.txt (if py au

Arkal 3 Jan 23, 2022
Automatically give thanks to Pypi packages you use in your project!

Automatically give thanks to Pypi packages you use in your project!

Ward 25 Dec 20, 2021
A one place destination to check whatever is trending on the top social and news websites at present.

UpTrend A one place destination to check whatever is trending on the top social and news websites at present. Explore the docs » View Demo · Report Bu

Google Developer Student Clubs - JGEC 10 Oct 03, 2021
ClamNotif: A tool to send you ClamAV notifications

A tool to forward notifications to different recipients categorised by two severity levels of the regular health reports produced by `clamscan` bundled with the ClamAV antivirus engine.

PiSoft Company Ltd. 1 Nov 15, 2021