VDM brush baker #104580
@ -186,6 +186,7 @@ class create_vdm_brush(bpy.types.Operator):
|
|||||||
return {'CANCELLED'}
|
return {'CANCELLED'}
|
||||||
|
|
||||||
vdm_plane = context.active_object
|
vdm_plane = context.active_object
|
||||||
|
|
||||||
addon_data = get_addon_data()
|
addon_data = get_addon_data()
|
||||||
new_brush_name = addon_data.draft_brush_name
|
new_brush_name = addon_data.draft_brush_name
|
||||||
reference_brush_name = addon_data.draft_brush_name
|
reference_brush_name = addon_data.draft_brush_name
|
||||||
@ -207,6 +208,8 @@ class create_vdm_brush(bpy.types.Operator):
|
|||||||
default_denoise = scene.cycles.use_denoising
|
default_denoise = scene.cycles.use_denoising
|
||||||
default_compute_device = scene.cycles.device
|
default_compute_device = scene.cycles.device
|
||||||
default_scene_samples = scene.cycles.samples
|
default_scene_samples = scene.cycles.samples
|
||||||
|
default_plane_location = vdm_plane.location.copy()
|
||||||
|
default_plane_rotation = vdm_plane.rotation_euler.copy()
|
||||||
|
|
||||||
vdm_bake_material = bakematerial.get_vdm_bake_material()
|
vdm_bake_material = bakematerial.get_vdm_bake_material()
|
||||||
try:
|
try:
|
||||||
@ -277,8 +280,9 @@ class create_vdm_brush(bpy.types.Operator):
|
|||||||
scene.cycles.use_denoising = default_denoise
|
scene.cycles.use_denoising = default_denoise
|
||||||
scene.cycles.device = default_compute_device
|
scene.cycles.device = default_compute_device
|
||||||
scene.render.engine = default_render_engine
|
scene.render.engine = default_render_engine
|
||||||
|
|
||||||
vdm_plane.data.materials.clear()
|
vdm_plane.data.materials.clear()
|
||||||
|
vdm_plane.location = default_plane_location
|
||||||
|
vdm_plane.rotation_euler = default_plane_rotation
|
||||||
|
|
||||||
# Needs to be in sculpt mode to set 'AREA_PLANE' mapping on new brush.
|
# Needs to be in sculpt mode to set 'AREA_PLANE' mapping on new brush.
|
||||||
bpy.ops.object.mode_set(mode='SCULPT')
|
bpy.ops.object.mode_set(mode='SCULPT')
|
||||||
|
Loading…
Reference in New Issue
Block a user