1
$\begingroup$

in v2.79 the following works:

bpy.context.space_data.grid_scale = 0.25
bpy.ops.view3d.snap_selected_to_grid()

but v2.8 doesn't know bpy.context.space_data.grid_scale

What is the equivalent command in v2.8?

many thanks, Smooth

$\endgroup$

1 Answer 1

0
$\begingroup$

In v2.81 I am changing it like this:

import bpy

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        area.spaces.active.overlay.grid_scale = 0.25
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .