TransWikia.com

How to know what's the radius of a stroke I've already drawn in Blender 2D?

Blender Asked by KOΛLΛ_ NET21 on September 29, 2021

I just want to know what was the radius of the drawing I’ve started, and I want to keep the same radius. I tried right clicking on the stroke but it doesn’t work.

One Answer

I don't see anywhere this information is displayed in the user interface, but you can get the info from the Python console.

First, in your list of workspace tabs at the top (e.g., probably starting with "Layout", or "2D Animation"), see if you have a "Scripting" tab. If you don't already have a "Scripting" tab, select the "+" at the right to add a workspace, and select "General -> Scripting". Click on the "Scripting" tab if it isn't already selected. It should switch to a view with your drawing in a 3D layout at the top left and a console below it -- a text Window containing blue text like "PYTHON INTERACTIVE CONSOLE" with a ">>>" prompt at the bottom.

In the 3D layout window:

  • use NumPad 0 to switch to a more usual camera view and better see your drawing
  • select the stroke in Object mode (it will probably select a bunch of individual strokes all belonging to the same object)
  • use Tab to switch to Edit mode
  • type 2 (not numpad, just the usual 2) to switch to stroke select mode
  • select the stroke you're interested in so it shows up as active (orange).

Now, enter the following command in the Python console:

>>> [s.line_width for l in bpy.context.active_object.data.layers for s in l.active_frame.strokes if s.select]

That should print the radius of the selected stroke in square brackets, like so:

[65]

If you want to see a list of widths of all the strokes used, you can drop the "if s.select" part:

>>> [s.line_width for l in bpy.context.active_object.data.layers for s in l.active_frame.strokes]
[65, 65, 20, 20, 65]

Obviously, this will be a long list if your drawing has hundreds of strokes.

Answered by K. A. Buhr on September 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP