VDM brush baker #104580
@ -195,8 +195,6 @@ class create_vdm_brush(bpy.types.Operator):
|
||||
if len(addon_data.draft_brush_name) == 0 or is_occupied:
|
||||
addon_data.draft_brush_name = brush_name
|
||||
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
|
||||
# Saving user settings
|
||||
scene = context.scene
|
||||
default_render_engine = scene.render.engine
|
||||
@ -210,6 +208,9 @@ class create_vdm_brush(bpy.types.Operator):
|
||||
default_scene_samples = scene.cycles.samples
|
||||
default_plane_location = vdm_plane.location.copy()
|
||||
default_plane_rotation = vdm_plane.rotation_euler.copy()
|
||||
default_mode = bpy.context.object.mode
|
||||
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
|
||||
vdm_bake_material = bakematerial.get_vdm_bake_material()
|
||||
try:
|
||||
@ -317,6 +318,9 @@ class create_vdm_brush(bpy.types.Operator):
|
||||
new_brush.strength = 1.0
|
||||
new_brush.hardness = 0.9
|
||||
|
||||
bpy.ops.object.mode_set(mode = default_mode)
|
||||
|
||||
if bpy.context.object.mode == 'SCULPT':
|
||||
context.tool_settings.sculpt.brush = new_brush
|
||||
|
||||
return {'FINISHED'}
|
||||
|
Loading…
Reference in New Issue
Block a user