I am a designer and I have recently switched from C4D to Blender.
I am missing a tool in Blender that was very useful in C4D, the “Fill Selection” tool. 0071. fill selection in cinema 4d - YouTube
There is no indication that this tool is being developed for Blender.
With the help of Ai GPT, I created this script, but it still doesn’t work.
The installation goes well and I should be able to find the “fill selection” tool in the list of mesh tools, but despite my multiple attempts, nothing happens.
Do you have any ideas? Maybe it’s simply not possible?
Thx !
bl_info = {
“name”: “Fill selection”,
“author”: “Florian Guzek”,
“version”: (1, 0, 0),
“blender”: (3, 2, 1),
“location”: “View3D > Edit Mode > Tool Shelf”,
“description”: “Fill Selection Tool”,
“warning”: “”,
“wiki_url”: “”,
“tracker_url”: “”,
“category”: “Mesh”,
}
import bpy
import bmesh
def fill_selection(direction):
# Get the active mesh
mesh = bpy.context.view_layer.objects.active.data
# Create a BMesh object from the mesh
bm = bmesh.new()
bm.from_mesh(mesh)
# Expand the selection in the specified direction
if direction == "outward":
bm.select_history_expand(True)
elif direction == "inward":
bm.select_history_expand(False)
# Update the mesh with the modified BMesh
bm.to_mesh(mesh)
bm.free()
class FillSelectionOperator(bpy.types.Operator):
bl_idname = “mesh.fill_selection”
bl_label = “Fill Selection”
bl_options = {“REGISTER”, “UNDO”}
direction: bpy.props.EnumProperty(
name="Direction",
items=[
("outward", "Outward", "Expand the selection outward"),
("inward", "Inward", "Expand the selection inward"),
],
)
def execute(self, context):
fill_selection(self.direction)
return {"FINISHED"}
def register():
bpy.utils.register_class(FillSelectionOperator)
def unregister():
bpy.utils.unregister_class(FillSelectionOperator)
if name == “main”:
register()