I made this addon to speed up my level prototyping phase. It allows the user to quickly create new geo, all snapped to a world space grid. I’m certain there are bugs and it might crash Blender, so save early and often when using this. The script is a bit of a mess. I’ll clean it up as I get feedback and add new features to it.
In Object mode it always creates a new object, and in Edit mode it adds the new geometry to the active object. If the face normal is World Axis aligned (or no face was found), the grid will be BLUE, otherwise it will be GREEN. When the closest edge length is used for grid size, the grid will be RED. Doesn’t currently play nice with a mesh that doesn’t have rotation and scale applied.
The settings for the addon can be found in the T-Panel (in Object or Edit mode) under “LDK_DrawBox”.
If your existing geometry isn’t snapped to a world space grid, you might want to enable the “Force to face” checkbox in the settings panel. If you don’t the grid will be always slightly off.
D - Activate addon. Creates a grid on the closest face under the mouse. If no face is found, it creates the grid on the 3d cursor location (snapped to world space).
While the addon is active:
D - Create the grid on the face under the mouse. If face normal has a different axis than before, drawn boxes are erased. If the face normal is not World Axis aligned, works the same as ‘F’.
F - Force the grid on the face under the mouse, and use the closest edge as the grid basis (you can check the “Force to face” in the T-Panel to make this the default behaviour when pressing ‘D’).
F (TWICE) - Same as before, but uses the closest edge length as the grid size. Pressing F again after this will revert the grid back.
LMB - Two click method for creating a box. You can pan and move around with this method.
LMB (HOLD) - Drag and release method for creating a box
ALT + LMB - Create the first vertext of an ngon. Subsequent LMB (without ALT) clicks then add vertices to the ngon.
SHIFT (HOLD) - Activate the 0.1 step grid (works with all of the above)
C - Delete the last box, or ngon vertex.
S - Snap to grid On/Off (also in T-Panel)
CTRL + LMB + DRAG MOUSE LEFT OR RIGHT - Adjust the extrude amount (+ SHIFT to adjust by 0.1)
E - Flip the extrude direction
0 - Set extrude amount to 0
CTRL + MOUSE WHEEL - Move the grid along its normal (+ SHIFT to move by 0.1)
PAGE UP, PAGE DOWN - Move the grid along its normal (+ SHIFT to move by 0.1)
X, Y, Z - Change the grid axis
- Increase grid size
- Decrease grid size
SPACE - Finish
ESC - Cancel
If you find any bugs, please report them here with the repro steps and the error message from the console. If you have any feature requests, don’t be afraid to ask.
ldk_drawbox.zip (8.79 KB)