Merge branch 'master' into blender2.8
This commit is contained in:
commit
c8e2436734
|
@ -59,6 +59,11 @@ ccl_device void kernel_scene_intersect(KernelGlobals *kg)
|
|||
/* intersect scene */
|
||||
uint visibility = path_state_ray_visibility(kg, &state);
|
||||
|
||||
if(state.bounce > kernel_data.integrator.ao_bounces) {
|
||||
visibility = PATH_RAY_SHADOW;
|
||||
ray.t = kernel_data.background.ao_distance;
|
||||
}
|
||||
|
||||
#ifdef __HAIR__
|
||||
float difl = 0.0f, extmax = 0.0f;
|
||||
uint lcg_state = 0;
|
||||
|
@ -75,11 +80,6 @@ ccl_device void kernel_scene_intersect(KernelGlobals *kg)
|
|||
lcg_state = lcg_state_init(&rng, state.rng_offset, state.sample, 0x51633e2d);
|
||||
}
|
||||
|
||||
if(state.bounce > kernel_data.integrator.ao_bounces) {
|
||||
visibility = PATH_RAY_SHADOW;
|
||||
ray.t = kernel_data.background.ao_distance;
|
||||
}
|
||||
|
||||
bool hit = scene_intersect(kg, ray, visibility, &isect, &lcg_state, difl, extmax);
|
||||
#else
|
||||
bool hit = scene_intersect(kg, ray, visibility, &isect, NULL, 0.0f, 0.0f);
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
# <pep8 compliant>
|
||||
import bpy
|
||||
import math
|
||||
from bpy.types import Header, Menu, Panel
|
||||
from bl_ui.properties_paint_common import (
|
||||
UnifiedPaintPanel,
|
||||
|
@ -727,11 +728,73 @@ class IMAGE_PT_tools_transform_uvs(Panel, UVToolsPanel):
|
|||
col.operator("transform.translate")
|
||||
col.operator("transform.rotate")
|
||||
col.operator("transform.resize", text="Scale")
|
||||
col.separator()
|
||||
|
||||
col.operator("transform.shear")
|
||||
|
||||
|
||||
class IMAGE_PT_tools_align_uvs(Panel, UVToolsPanel):
|
||||
bl_label = "UV Align"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
sima = context.space_data
|
||||
return sima.show_uvedit and not context.tool_settings.use_uv_sculpt
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.operator_context = 'EXEC_REGION_WIN'
|
||||
|
||||
split = layout.split()
|
||||
col = split.column(align=True)
|
||||
col.operator("transform.mirror", text="Mirror X").constraint_axis[0] = True
|
||||
col.operator("transform.mirror", text="Mirror Y").constraint_axis[1] = True
|
||||
col = split.column(align=True)
|
||||
col.operator("transform.rotate", text="Rotate +90°").value = math.pi / 2
|
||||
col.operator("transform.rotate", text="Rotate - 90°").value = math.pi / -2
|
||||
|
||||
split = layout.split()
|
||||
col = split.column(align=True)
|
||||
col.operator("uv.align", text="Straighten").axis = 'ALIGN_S'
|
||||
col.operator("uv.align", text="Straighten X").axis = 'ALIGN_T'
|
||||
col.operator("uv.align", text="Straighten Y").axis = 'ALIGN_U'
|
||||
col = split.column(align=True)
|
||||
col.operator("uv.align", text="Align Auto").axis = 'ALIGN_AUTO'
|
||||
col.operator("uv.align", text="Align X").axis = 'ALIGN_X'
|
||||
col.operator("uv.align", text="Align Y").axis = 'ALIGN_Y'
|
||||
|
||||
|
||||
class IMAGE_PT_tools_uvs(Panel, UVToolsPanel):
|
||||
bl_label = "UV Tools"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
sima = context.space_data
|
||||
return sima.show_uvedit and not context.tool_settings.use_uv_sculpt
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
col = layout.column(align=True)
|
||||
row = col.row(align=True)
|
||||
row.operator("uv.weld")
|
||||
row.operator("uv.stitch")
|
||||
col.operator("uv.remove_doubles")
|
||||
col.operator("uv.average_islands_scale")
|
||||
col.operator("uv.pack_islands")
|
||||
col.operator("mesh.faces_mirror_uv")
|
||||
col.operator("uv.minimize_stretch")
|
||||
|
||||
layout.label(text="UV Unwrap:")
|
||||
row = layout.row(align=True)
|
||||
row.operator("uv.pin").clear = False
|
||||
row.operator("uv.pin", text="Unpin").clear = True
|
||||
col = layout.column(align=True)
|
||||
row = col.row(align=True)
|
||||
row.operator("uv.mark_seam", text="Mark Seam").clear = False
|
||||
row.operator("uv.mark_seam", text="Clear Seam").clear = True
|
||||
col.operator("uv.seams_from_islands", text="Mark Seams from Islands")
|
||||
col.operator("uv.unwrap")
|
||||
|
||||
|
||||
class IMAGE_PT_paint(Panel, ImagePaintPanel):
|
||||
bl_label = "Paint"
|
||||
bl_category = "Tools"
|
||||
|
@ -1100,6 +1163,29 @@ class IMAGE_PT_tools_mask(MASK_PT_tools, Panel):
|
|||
# --- end mask ---
|
||||
|
||||
|
||||
class IMAGE_PT_options_uvs(Panel, UVToolsPanel):
|
||||
bl_label = "UV Options"
|
||||
bl_category = "Options"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
sima = context.space_data
|
||||
return sima.show_uvedit
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
sima = context.space_data
|
||||
uv = sima.uv_editor
|
||||
toolsettings = context.tool_settings
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(toolsettings, "use_uv_sculpt")
|
||||
col.prop(uv, "use_live_unwrap")
|
||||
col.prop(uv, "use_snap_to_pixels")
|
||||
col.prop(uv, "lock_bounds")
|
||||
|
||||
|
||||
class ImageScopesPanel:
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
|
@ -1267,6 +1353,9 @@ classes = (
|
|||
IMAGE_PT_game_properties,
|
||||
IMAGE_PT_view_properties,
|
||||
IMAGE_PT_tools_transform_uvs,
|
||||
IMAGE_PT_tools_align_uvs,
|
||||
IMAGE_PT_tools_uvs,
|
||||
IMAGE_PT_options_uvs,
|
||||
IMAGE_PT_paint,
|
||||
IMAGE_PT_tools_brush_overlay,
|
||||
IMAGE_PT_tools_brush_texture,
|
||||
|
|
|
@ -1222,23 +1222,25 @@ class USERPREF_PT_input(Panel):
|
|||
sub = col.column()
|
||||
sub.label(text="View Navigation:")
|
||||
sub.row().prop(inputs, "navigation_mode", expand=True)
|
||||
if inputs.navigation_mode == 'WALK':
|
||||
walk = inputs.walk_navigation
|
||||
|
||||
sub.prop(walk, "use_mouse_reverse")
|
||||
sub.prop(walk, "mouse_speed")
|
||||
sub.prop(walk, "teleport_time")
|
||||
sub.label(text="Walk Navigation:")
|
||||
|
||||
sub = col.column(align=True)
|
||||
sub.prop(walk, "walk_speed")
|
||||
sub.prop(walk, "walk_speed_factor")
|
||||
walk = inputs.walk_navigation
|
||||
|
||||
sub.separator()
|
||||
sub.prop(walk, "use_gravity")
|
||||
sub = col.column(align=True)
|
||||
sub.active = walk.use_gravity
|
||||
sub.prop(walk, "view_height")
|
||||
sub.prop(walk, "jump_height")
|
||||
sub.prop(walk, "use_mouse_reverse")
|
||||
sub.prop(walk, "mouse_speed")
|
||||
sub.prop(walk, "teleport_time")
|
||||
|
||||
sub = col.column(align=True)
|
||||
sub.prop(walk, "walk_speed")
|
||||
sub.prop(walk, "walk_speed_factor")
|
||||
|
||||
sub.separator()
|
||||
sub.prop(walk, "use_gravity")
|
||||
sub = col.column(align=True)
|
||||
sub.active = walk.use_gravity
|
||||
sub.prop(walk, "view_height")
|
||||
sub.prop(walk, "jump_height")
|
||||
|
||||
if inputs.use_ndof:
|
||||
col.separator()
|
||||
|
|
|
@ -4515,7 +4515,6 @@ static void draw_mesh_fancy(Scene *scene, SceneLayer *sl, ARegion *ar, View3D *v
|
|||
|
||||
if (is_obact && BKE_paint_select_vert_test(ob)) {
|
||||
const bool use_depth = (v3d->flag & V3D_ZBUF_SELECT) != 0;
|
||||
glColor3f(0.0f, 0.0f, 0.0f);
|
||||
glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE));
|
||||
|
||||
if (!use_depth) glDisable(GL_DEPTH_TEST);
|
||||
|
@ -4977,7 +4976,6 @@ static void draw_mesh_fancy_new(Scene *scene, SceneLayer *sl, ARegion *ar, View3
|
|||
#if 0 // (merwin) what is this for?
|
||||
if (is_obact && BKE_paint_select_vert_test(ob)) {
|
||||
const bool use_depth = (v3d->flag & V3D_ZBUF_SELECT) != 0;
|
||||
glColor3f(0.0f, 0.0f, 0.0f);
|
||||
glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE));
|
||||
|
||||
if (!use_depth) glDisable(GL_DEPTH_TEST);
|
||||
|
|
Loading…
Reference in New Issue