Merge branch 'blender2.8' into soc-2018-bevel
This commit is contained in:
@@ -439,7 +439,7 @@ mark_as_advanced(WITH_MEM_VALGRIND)
|
|||||||
option(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking (only enable for development)" OFF)
|
option(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking (only enable for development)" OFF)
|
||||||
mark_as_advanced(WITH_CXX_GUARDEDALLOC)
|
mark_as_advanced(WITH_CXX_GUARDEDALLOC)
|
||||||
|
|
||||||
option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" OFF)
|
option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" ON)
|
||||||
mark_as_advanced(WITH_ASSERT_ABORT)
|
mark_as_advanced(WITH_ASSERT_ABORT)
|
||||||
|
|
||||||
option(WITH_BOOST "Enable features depending on boost" ON)
|
option(WITH_BOOST "Enable features depending on boost" ON)
|
||||||
@@ -806,7 +806,8 @@ set(C_WARNINGS)
|
|||||||
set(CXX_WARNINGS)
|
set(CXX_WARNINGS)
|
||||||
|
|
||||||
# for gcc -Wno-blah-blah
|
# for gcc -Wno-blah-blah
|
||||||
set(CC_REMOVE_STRICT_FLAGS)
|
set(C_REMOVE_STRICT_FLAGS)
|
||||||
|
set(CXX_REMOVE_STRICT_FLAGS)
|
||||||
|
|
||||||
# libraries to link the binary with passed to target_link_libraries()
|
# libraries to link the binary with passed to target_link_libraries()
|
||||||
# known as LLIBS to scons
|
# known as LLIBS to scons
|
||||||
@@ -1415,16 +1416,22 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# flags to undo strict flags
|
# flags to undo strict flags
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_DEPRECATED_DECLARATIONS -Wno-deprecated-declarations)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_DEPRECATED_DECLARATIONS -Wno-deprecated-declarations)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
|
||||||
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_TYPE_LIMITS -Wno-type-limits)
|
||||||
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INT_IN_BOOL_CONTEXT -Wno-int-in-bool-context)
|
||||||
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_FORMAT -Wno-format)
|
||||||
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_SWITCH -Wno-switch)
|
||||||
|
|
||||||
|
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CLASS_MEMACCESS -Wno-class-memaccess)
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "7.0"))
|
if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "7.0"))
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_IMPLICIT_FALLTHROUGH -Wno-implicit-fallthrough)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_IMPLICIT_FALLTHROUGH -Wno-implicit-fallthrough)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT APPLE)
|
if(NOT APPLE)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
@@ -1453,23 +1460,23 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
|||||||
# ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNUSED_MACROS -Wunused-macros)
|
# ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNUSED_MACROS -Wunused-macros)
|
||||||
|
|
||||||
# flags to undo strict flags
|
# flags to undo strict flags
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
|
||||||
|
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_VARIABLE_DECLARATIONS -Wno-missing-variable-declarations)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_VARIABLE_DECLARATIONS -Wno-missing-variable-declarations)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_INCOMPAT_PTR_DISCARD_QUAL -Wno-incompatible-pointer-types-discards-qualifiers)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INCOMPAT_PTR_DISCARD_QUAL -Wno-incompatible-pointer-types-discards-qualifiers)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_FUNCTION -Wno-unused-function)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_INT_TO_VOID_POINTER_CAST -Wno-int-to-void-pointer-cast)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_INT_TO_VOID_POINTER_CAST -Wno-int-to-void-pointer-cast)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_PROTOTYPES -Wno-missing-prototypes)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_PROTOTYPES -Wno-missing-prototypes)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_DUPLICATE_ENUM -Wno-duplicate-enum)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_DUPLICATE_ENUM -Wno-duplicate-enum)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_UNDEF -Wno-undef)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNDEF -Wno-undef)
|
||||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_NORETURN -Wno-missing-noreturn)
|
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_NORETURN -Wno-missing-noreturn)
|
||||||
|
|
||||||
ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_PRIVATE_FIELD -Wno-unused-private-field)
|
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_PRIVATE_FIELD -Wno-unused-private-field)
|
||||||
ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_CXX11_NARROWING -Wno-c++11-narrowing)
|
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_CXX11_NARROWING -Wno-c++11-narrowing)
|
||||||
ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_NON_VIRTUAL_DTOR -Wno-non-virtual-dtor)
|
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_NON_VIRTUAL_DTOR -Wno-non-virtual-dtor)
|
||||||
ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
|
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
|
||||||
ADD_CHECK_CXX_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS CXX_WARN_NO_REORDER -Wno-reorder)
|
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_REORDER -Wno-reorder)
|
||||||
|
|
||||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||||
|
|
||||||
|
@@ -58,4 +58,3 @@ if(MSVC)
|
|||||||
DEPENDEES mkdir update patch download configure build install
|
DEPENDEES mkdir update patch download configure build install
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -216,4 +216,3 @@ if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe")
|
|||||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe"
|
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -216,4 +216,3 @@ if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe")
|
|||||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
|
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -37,4 +37,3 @@ endif()
|
|||||||
if(MSVC)
|
if(MSVC)
|
||||||
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
|
set_target_properties(external_zlib_mingw PROPERTIES FOLDER Mingw)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -79,4 +79,3 @@ macro( select_library_configurations basename )
|
|||||||
${basename}_LIBRARY_DEBUG
|
${basename}_LIBRARY_DEBUG
|
||||||
)
|
)
|
||||||
endmacro( select_library_configurations )
|
endmacro( select_library_configurations )
|
||||||
|
|
||||||
|
@@ -93,4 +93,3 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(LLVM DEFAULT_MSG
|
|||||||
MARK_AS_ADVANCED(
|
MARK_AS_ADVANCED(
|
||||||
LLVM_LIBRARY
|
LLVM_LIBRARY
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -674,7 +674,9 @@ function(SETUP_BLENDER_SORTED_LIBS)
|
|||||||
extern_openjpeg
|
extern_openjpeg
|
||||||
ge_videotex
|
ge_videotex
|
||||||
bf_dna
|
bf_dna
|
||||||
|
|
||||||
bf_blenfont
|
bf_blenfont
|
||||||
|
bf_gpu # duplicate for blenfont
|
||||||
bf_blentranslation
|
bf_blentranslation
|
||||||
bf_intern_audaspace
|
bf_intern_audaspace
|
||||||
audaspace
|
audaspace
|
||||||
@@ -1054,13 +1056,19 @@ macro(remove_cc_flag
|
|||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(add_cc_flag
|
macro(add_c_flag
|
||||||
flag)
|
flag)
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
macro(add_cxx_flag
|
||||||
|
flag)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
|
||||||
|
endmacro()
|
||||||
|
|
||||||
macro(remove_strict_flags)
|
macro(remove_strict_flags)
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
if(CMAKE_COMPILER_IS_GNUCC)
|
||||||
@@ -1083,7 +1091,8 @@ macro(remove_strict_flags)
|
|||||||
)
|
)
|
||||||
|
|
||||||
# negate flags implied by '-Wall'
|
# negate flags implied by '-Wall'
|
||||||
add_cc_flag("${CC_REMOVE_STRICT_FLAGS}")
|
add_c_flag("${C_REMOVE_STRICT_FLAGS}")
|
||||||
|
add_cxx_flag("${CXX_REMOVE_STRICT_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
@@ -1095,7 +1104,8 @@ macro(remove_strict_flags)
|
|||||||
)
|
)
|
||||||
|
|
||||||
# negate flags implied by '-Wall'
|
# negate flags implied by '-Wall'
|
||||||
add_cc_flag("${CC_REMOVE_STRICT_FLAGS}")
|
add_c_flag("${C_REMOVE_STRICT_FLAGS}")
|
||||||
|
add_cxx_flag("${CXX_REMOVE_STRICT_FLAGS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
@@ -1125,28 +1135,39 @@ endmacro()
|
|||||||
# note, we can only append flags on a single file so we need to negate the options.
|
# note, we can only append flags on a single file so we need to negate the options.
|
||||||
# at the moment we cant shut up ffmpeg deprecations, so use this, but will
|
# at the moment we cant shut up ffmpeg deprecations, so use this, but will
|
||||||
# probably add more removals here.
|
# probably add more removals here.
|
||||||
macro(remove_strict_flags_file
|
macro(remove_strict_c_flags_file
|
||||||
filenames)
|
filenames)
|
||||||
|
|
||||||
foreach(_SOURCE ${ARGV})
|
foreach(_SOURCE ${ARGV})
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC OR
|
if(CMAKE_COMPILER_IS_GNUCC OR
|
||||||
(CMAKE_C_COMPILER_ID MATCHES "Clang"))
|
(CMAKE_C_COMPILER_ID MATCHES "Clang"))
|
||||||
|
|
||||||
set_source_files_properties(${_SOURCE}
|
set_source_files_properties(${_SOURCE}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
COMPILE_FLAGS "${CC_REMOVE_STRICT_FLAGS}"
|
COMPILE_FLAGS "${C_REMOVE_STRICT_FLAGS}"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
# TODO
|
# TODO
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
unset(_SOURCE)
|
unset(_SOURCE)
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
macro(remove_strict_cxx_flags_file
|
||||||
|
filenames)
|
||||||
|
remove_strict_c_flags_file(${filenames} ${ARHV})
|
||||||
|
foreach(_SOURCE ${ARGV})
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCC OR
|
||||||
|
(CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
||||||
|
set_source_files_properties(${_SOURCE}
|
||||||
|
PROPERTIES
|
||||||
|
COMPILE_FLAGS "${CXX_REMOVE_STRICT_FLAGS}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(MSVC)
|
||||||
|
# TODO
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
unset(_SOURCE)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
# External libs may need 'signed char' to be default.
|
# External libs may need 'signed char' to be default.
|
||||||
|
@@ -15,6 +15,7 @@ font_info = {
|
|||||||
"handler": None,
|
"handler": None,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def init():
|
def init():
|
||||||
"""init function - runs once"""
|
"""init function - runs once"""
|
||||||
import os
|
import os
|
||||||
|
@@ -10,22 +10,22 @@ bm = bmesh.new()
|
|||||||
|
|
||||||
# Add a circle XXX, should return all geometry created, not just verts.
|
# Add a circle XXX, should return all geometry created, not just verts.
|
||||||
bmesh.ops.create_circle(
|
bmesh.ops.create_circle(
|
||||||
bm,
|
bm,
|
||||||
cap_ends=False,
|
cap_ends=False,
|
||||||
radius=0.2,
|
radius=0.2,
|
||||||
segments=8)
|
segments=8)
|
||||||
|
|
||||||
|
|
||||||
# Spin and deal with geometry on side 'a'
|
# Spin and deal with geometry on side 'a'
|
||||||
edges_start_a = bm.edges[:]
|
edges_start_a = bm.edges[:]
|
||||||
geom_start_a = bm.verts[:] + edges_start_a
|
geom_start_a = bm.verts[:] + edges_start_a
|
||||||
ret = bmesh.ops.spin(
|
ret = bmesh.ops.spin(
|
||||||
bm,
|
bm,
|
||||||
geom=geom_start_a,
|
geom=geom_start_a,
|
||||||
angle=math.radians(180.0),
|
angle=math.radians(180.0),
|
||||||
steps=8,
|
steps=8,
|
||||||
axis=(1.0, 0.0, 0.0),
|
axis=(1.0, 0.0, 0.0),
|
||||||
cent=(0.0, 1.0, 0.0))
|
cent=(0.0, 1.0, 0.0))
|
||||||
edges_end_a = [ele for ele in ret["geom_last"]
|
edges_end_a = [ele for ele in ret["geom_last"]
|
||||||
if isinstance(ele, bmesh.types.BMEdge)]
|
if isinstance(ele, bmesh.types.BMEdge)]
|
||||||
del ret
|
del ret
|
||||||
@@ -33,8 +33,8 @@ del ret
|
|||||||
|
|
||||||
# Extrude and create geometry on side 'b'
|
# Extrude and create geometry on side 'b'
|
||||||
ret = bmesh.ops.extrude_edge_only(
|
ret = bmesh.ops.extrude_edge_only(
|
||||||
bm,
|
bm,
|
||||||
edges=edges_start_a)
|
edges=edges_start_a)
|
||||||
geom_extrude_mid = ret["geom"]
|
geom_extrude_mid = ret["geom"]
|
||||||
del ret
|
del ret
|
||||||
|
|
||||||
@@ -45,19 +45,19 @@ verts_extrude_b = [ele for ele in geom_extrude_mid
|
|||||||
edges_extrude_b = [ele for ele in geom_extrude_mid
|
edges_extrude_b = [ele for ele in geom_extrude_mid
|
||||||
if isinstance(ele, bmesh.types.BMEdge) and ele.is_boundary]
|
if isinstance(ele, bmesh.types.BMEdge) and ele.is_boundary]
|
||||||
bmesh.ops.translate(
|
bmesh.ops.translate(
|
||||||
bm,
|
bm,
|
||||||
verts=verts_extrude_b,
|
verts=verts_extrude_b,
|
||||||
vec=(0.0, 0.0, 1.0))
|
vec=(0.0, 0.0, 1.0))
|
||||||
|
|
||||||
|
|
||||||
# Create the circle on side 'b'
|
# Create the circle on side 'b'
|
||||||
ret = bmesh.ops.spin(
|
ret = bmesh.ops.spin(
|
||||||
bm,
|
bm,
|
||||||
geom=verts_extrude_b + edges_extrude_b,
|
geom=verts_extrude_b + edges_extrude_b,
|
||||||
angle=-math.radians(180.0),
|
angle=-math.radians(180.0),
|
||||||
steps=8,
|
steps=8,
|
||||||
axis=(1.0, 0.0, 0.0),
|
axis=(1.0, 0.0, 0.0),
|
||||||
cent=(0.0, 1.0, 1.0))
|
cent=(0.0, 1.0, 1.0))
|
||||||
edges_end_b = [ele for ele in ret["geom_last"]
|
edges_end_b = [ele for ele in ret["geom_last"]
|
||||||
if isinstance(ele, bmesh.types.BMEdge)]
|
if isinstance(ele, bmesh.types.BMEdge)]
|
||||||
del ret
|
del ret
|
||||||
@@ -65,30 +65,30 @@ del ret
|
|||||||
|
|
||||||
# Bridge the resulting edge loops of both spins 'a & b'
|
# Bridge the resulting edge loops of both spins 'a & b'
|
||||||
bmesh.ops.bridge_loops(
|
bmesh.ops.bridge_loops(
|
||||||
bm,
|
bm,
|
||||||
edges=edges_end_a + edges_end_b)
|
edges=edges_end_a + edges_end_b)
|
||||||
|
|
||||||
|
|
||||||
# Now we have made a links of the chain, make a copy and rotate it
|
# Now we have made a links of the chain, make a copy and rotate it
|
||||||
# (so this looks something like a chain)
|
# (so this looks something like a chain)
|
||||||
|
|
||||||
ret = bmesh.ops.duplicate(
|
ret = bmesh.ops.duplicate(
|
||||||
bm,
|
bm,
|
||||||
geom=bm.verts[:] + bm.edges[:] + bm.faces[:])
|
geom=bm.verts[:] + bm.edges[:] + bm.faces[:])
|
||||||
geom_dupe = ret["geom"]
|
geom_dupe = ret["geom"]
|
||||||
verts_dupe = [ele for ele in geom_dupe if isinstance(ele, bmesh.types.BMVert)]
|
verts_dupe = [ele for ele in geom_dupe if isinstance(ele, bmesh.types.BMVert)]
|
||||||
del ret
|
del ret
|
||||||
|
|
||||||
# position the new link
|
# position the new link
|
||||||
bmesh.ops.translate(
|
bmesh.ops.translate(
|
||||||
bm,
|
bm,
|
||||||
verts=verts_dupe,
|
verts=verts_dupe,
|
||||||
vec=(0.0, 0.0, 2.0))
|
vec=(0.0, 0.0, 2.0))
|
||||||
bmesh.ops.rotate(
|
bmesh.ops.rotate(
|
||||||
bm,
|
bm,
|
||||||
verts=verts_dupe,
|
verts=verts_dupe,
|
||||||
cent=(0.0, 1.0, 0.0),
|
cent=(0.0, 1.0, 0.0),
|
||||||
matrix=mathutils.Matrix.Rotation(math.radians(90.0), 3, 'Z'))
|
matrix=mathutils.Matrix.Rotation(math.radians(90.0), 3, 'Z'))
|
||||||
|
|
||||||
# Done with creating the mesh, simply link it into the scene so we can see it
|
# Done with creating the mesh, simply link it into the scene so we can see it
|
||||||
|
|
||||||
|
@@ -17,4 +17,5 @@ from bpy.app.handlers import persistent
|
|||||||
def load_handler(dummy):
|
def load_handler(dummy):
|
||||||
print("Load Handler:", bpy.data.filepath)
|
print("Load Handler:", bpy.data.filepath)
|
||||||
|
|
||||||
|
|
||||||
bpy.app.handlers.load_post.append(load_handler)
|
bpy.app.handlers.load_post.append(load_handler)
|
||||||
|
@@ -11,4 +11,5 @@ import bpy
|
|||||||
def my_handler(scene):
|
def my_handler(scene):
|
||||||
print("Frame Change", scene.frame_current)
|
print("Frame Change", scene.frame_current)
|
||||||
|
|
||||||
|
|
||||||
bpy.app.handlers.frame_change_pre.append(my_handler)
|
bpy.app.handlers.frame_change_pre.append(my_handler)
|
||||||
|
@@ -54,19 +54,19 @@ translations_tuple = (
|
|||||||
"Copyright (C) 2013 The Blender Foundation.",
|
"Copyright (C) 2013 The Blender Foundation.",
|
||||||
"This file is distributed under the same license as the Blender package.",
|
"This file is distributed under the same license as the Blender package.",
|
||||||
"FIRST AUTHOR <EMAIL@ADDRESS>, YEAR."))),
|
"FIRST AUTHOR <EMAIL@ADDRESS>, YEAR."))),
|
||||||
),
|
),
|
||||||
(("Operator", "Render: Copy Settings"),
|
(("Operator", "Render: Copy Settings"),
|
||||||
(("bpy.types.SCENE_OT_render_copy_settings",),
|
(("bpy.types.SCENE_OT_render_copy_settings",),
|
||||||
()),
|
()),
|
||||||
("fr_FR", "Rendu : copier réglages",
|
("fr_FR", "Rendu : copier réglages",
|
||||||
(False, ())),
|
(False, ())),
|
||||||
),
|
),
|
||||||
(("*", "Copy render settings from current scene to others"),
|
(("*", "Copy render settings from current scene to others"),
|
||||||
(("bpy.types.SCENE_OT_render_copy_settings",),
|
(("bpy.types.SCENE_OT_render_copy_settings",),
|
||||||
()),
|
()),
|
||||||
("fr_FR", "Copier les réglages de rendu depuis la scène courante vers d’autres",
|
("fr_FR", "Copier les réglages de rendu depuis la scène courante vers d’autres",
|
||||||
(False, ())),
|
(False, ())),
|
||||||
),
|
),
|
||||||
# ... etc, all messages from your addon.
|
# ... etc, all messages from your addon.
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -81,6 +81,7 @@ for msg in translations_tuple:
|
|||||||
|
|
||||||
# Define remaining addon (operators, UI...) here.
|
# Define remaining addon (operators, UI...) here.
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
# Usual operator/UI/etc. registration...
|
# Usual operator/UI/etc. registration...
|
||||||
|
|
||||||
|
@@ -14,6 +14,7 @@ class MaterialSettings(bpy.types.PropertyGroup):
|
|||||||
my_float = bpy.props.FloatProperty()
|
my_float = bpy.props.FloatProperty()
|
||||||
my_string = bpy.props.StringProperty()
|
my_string = bpy.props.StringProperty()
|
||||||
|
|
||||||
|
|
||||||
bpy.utils.register_class(MaterialSettings)
|
bpy.utils.register_class(MaterialSettings)
|
||||||
|
|
||||||
bpy.types.Material.my_settings = \
|
bpy.types.Material.my_settings = \
|
||||||
|
@@ -14,6 +14,7 @@ class SceneSettingItem(bpy.types.PropertyGroup):
|
|||||||
name = bpy.props.StringProperty(name="Test Prop", default="Unknown")
|
name = bpy.props.StringProperty(name="Test Prop", default="Unknown")
|
||||||
value = bpy.props.IntProperty(name="Test Prop", default=22)
|
value = bpy.props.IntProperty(name="Test Prop", default=22)
|
||||||
|
|
||||||
|
|
||||||
bpy.utils.register_class(SceneSettingItem)
|
bpy.utils.register_class(SceneSettingItem)
|
||||||
|
|
||||||
bpy.types.Scene.my_settings = \
|
bpy.types.Scene.my_settings = \
|
||||||
|
@@ -14,6 +14,7 @@ import bpy
|
|||||||
def update_func(self, context):
|
def update_func(self, context):
|
||||||
print("my test function", self)
|
print("my test function", self)
|
||||||
|
|
||||||
|
|
||||||
bpy.types.Scene.testprop = bpy.props.FloatProperty(update=update_func)
|
bpy.types.Scene.testprop = bpy.props.FloatProperty(update=update_func)
|
||||||
|
|
||||||
bpy.context.scene.testprop = 11.0
|
bpy.context.scene.testprop = 11.0
|
||||||
|
@@ -19,6 +19,7 @@ def get_float(self):
|
|||||||
def set_float(self, value):
|
def set_float(self, value):
|
||||||
self["testprop"] = value
|
self["testprop"] = value
|
||||||
|
|
||||||
|
|
||||||
bpy.types.Scene.test_float = bpy.props.FloatProperty(get=get_float, set=set_float)
|
bpy.types.Scene.test_float = bpy.props.FloatProperty(get=get_float, set=set_float)
|
||||||
|
|
||||||
|
|
||||||
@@ -27,6 +28,7 @@ def get_date(self):
|
|||||||
import datetime
|
import datetime
|
||||||
return str(datetime.datetime.now())
|
return str(datetime.datetime.now())
|
||||||
|
|
||||||
|
|
||||||
bpy.types.Scene.test_date = bpy.props.StringProperty(get=get_date)
|
bpy.types.Scene.test_date = bpy.props.StringProperty(get=get_date)
|
||||||
|
|
||||||
|
|
||||||
@@ -40,6 +42,7 @@ def get_array(self):
|
|||||||
def set_array(self, values):
|
def set_array(self, values):
|
||||||
self["somebool"] = values[0] and values[1]
|
self["somebool"] = values[0] and values[1]
|
||||||
|
|
||||||
|
|
||||||
bpy.types.Scene.test_array = bpy.props.BoolVectorProperty(size=2, get=get_array, set=set_array)
|
bpy.types.Scene.test_array = bpy.props.BoolVectorProperty(size=2, get=get_array, set=set_array)
|
||||||
|
|
||||||
|
|
||||||
@@ -50,7 +53,7 @@ test_items = [
|
|||||||
("GREEN", "Green", "", 2),
|
("GREEN", "Green", "", 2),
|
||||||
("BLUE", "Blue", "", 3),
|
("BLUE", "Blue", "", 3),
|
||||||
("YELLOW", "Yellow", "", 4),
|
("YELLOW", "Yellow", "", 4),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def get_enum(self):
|
def get_enum(self):
|
||||||
@@ -61,6 +64,7 @@ def get_enum(self):
|
|||||||
def set_enum(self, value):
|
def set_enum(self, value):
|
||||||
print("setting value", value)
|
print("setting value", value)
|
||||||
|
|
||||||
|
|
||||||
bpy.types.Scene.test_enum = bpy.props.EnumProperty(items=test_items, get=get_enum, set=set_enum)
|
bpy.types.Scene.test_enum = bpy.props.EnumProperty(items=test_items, get=get_enum, set=set_enum)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@ bl_info = {
|
|||||||
"wiki_url": "",
|
"wiki_url": "",
|
||||||
"tracker_url": "",
|
"tracker_url": "",
|
||||||
"category": "Object",
|
"category": "Object",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
@@ -23,17 +23,17 @@ class ExampleAddonPreferences(AddonPreferences):
|
|||||||
bl_idname = __name__
|
bl_idname = __name__
|
||||||
|
|
||||||
filepath = StringProperty(
|
filepath = StringProperty(
|
||||||
name="Example File Path",
|
name="Example File Path",
|
||||||
subtype='FILE_PATH',
|
subtype='FILE_PATH',
|
||||||
)
|
)
|
||||||
number = IntProperty(
|
number = IntProperty(
|
||||||
name="Example Number",
|
name="Example Number",
|
||||||
default=4,
|
default=4,
|
||||||
)
|
)
|
||||||
boolean = BoolProperty(
|
boolean = BoolProperty(
|
||||||
name="Example Boolean",
|
name="Example Boolean",
|
||||||
default=False,
|
default=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
@@ -14,4 +14,5 @@ import bpy
|
|||||||
def menu_draw(self, context):
|
def menu_draw(self, context):
|
||||||
self.layout.operator("wm.save_homefile")
|
self.layout.operator("wm.save_homefile")
|
||||||
|
|
||||||
|
|
||||||
bpy.types.INFO_MT_file.append(menu_draw)
|
bpy.types.INFO_MT_file.append(menu_draw)
|
||||||
|
@@ -32,7 +32,7 @@ class AddPresetObjectDraw(AddPresetBase, Operator):
|
|||||||
# variable used for all preset values
|
# variable used for all preset values
|
||||||
preset_defines = [
|
preset_defines = [
|
||||||
"obj = bpy.context.object"
|
"obj = bpy.context.object"
|
||||||
]
|
]
|
||||||
|
|
||||||
# properties to store in the preset
|
# properties to store in the preset
|
||||||
preset_values = [
|
preset_values = [
|
||||||
@@ -42,7 +42,7 @@ class AddPresetObjectDraw(AddPresetBase, Operator):
|
|||||||
"obj.show_name",
|
"obj.show_name",
|
||||||
"obj.show_axis",
|
"obj.show_axis",
|
||||||
"obj.show_wire",
|
"obj.show_wire",
|
||||||
]
|
]
|
||||||
|
|
||||||
# where to store the preset
|
# where to store the preset
|
||||||
preset_subdir = "object/draw"
|
preset_subdir = "object/draw"
|
||||||
@@ -61,7 +61,7 @@ def panel_func(self, context):
|
|||||||
classes = (
|
classes = (
|
||||||
OBJECT_MT_draw_presets,
|
OBJECT_MT_draw_presets,
|
||||||
AddPresetObjectDraw,
|
AddPresetObjectDraw,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
|
@@ -60,6 +60,7 @@ def menu_func(self, context):
|
|||||||
layout.separator()
|
layout.separator()
|
||||||
layout.operator(WM_OT_button_context_test.bl_idname)
|
layout.operator(WM_OT_button_context_test.bl_idname)
|
||||||
|
|
||||||
|
|
||||||
classes = (
|
classes = (
|
||||||
WM_OT_button_context_test,
|
WM_OT_button_context_test,
|
||||||
WM_MT_button_context,
|
WM_MT_button_context,
|
||||||
@@ -77,5 +78,6 @@ def unregister():
|
|||||||
bpy.utils.unregister_class(cls)
|
bpy.utils.unregister_class(cls)
|
||||||
bpy.types.WM_MT_button_context.remove(menu_func)
|
bpy.types.WM_MT_button_context.remove(menu_func)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
register()
|
register()
|
||||||
|
@@ -21,4 +21,5 @@ class CyclesNodeTree(bpy.types.NodeTree):
|
|||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
return context.scene.render.engine == 'CYCLES'
|
return context.scene.render.engine == 'CYCLES'
|
||||||
|
|
||||||
|
|
||||||
bpy.utils.register_class(CyclesNodeTree)
|
bpy.utils.register_class(CyclesNodeTree)
|
||||||
|
@@ -42,6 +42,7 @@ class SimpleMouseOperator(bpy.types.Operator):
|
|||||||
self.y = event.mouse_y
|
self.y = event.mouse_y
|
||||||
return self.execute(context)
|
return self.execute(context)
|
||||||
|
|
||||||
|
|
||||||
bpy.utils.register_class(SimpleMouseOperator)
|
bpy.utils.register_class(SimpleMouseOperator)
|
||||||
|
|
||||||
# Test call to the newly defined operator.
|
# Test call to the newly defined operator.
|
||||||
|
@@ -42,6 +42,7 @@ def menu_func(self, context):
|
|||||||
self.layout.operator_context = 'INVOKE_DEFAULT'
|
self.layout.operator_context = 'INVOKE_DEFAULT'
|
||||||
self.layout.operator(ExportSomeData.bl_idname, text="Text Export Operator")
|
self.layout.operator(ExportSomeData.bl_idname, text="Text Export Operator")
|
||||||
|
|
||||||
|
|
||||||
# Register and add to the file selector
|
# Register and add to the file selector
|
||||||
bpy.utils.register_class(ExportSomeData)
|
bpy.utils.register_class(ExportSomeData)
|
||||||
bpy.types.INFO_MT_file_export.append(menu_func)
|
bpy.types.INFO_MT_file_export.append(menu_func)
|
||||||
|
@@ -41,6 +41,7 @@ class CustomDrawOperator(bpy.types.Operator):
|
|||||||
|
|
||||||
col.prop(self, "my_string")
|
col.prop(self, "my_string")
|
||||||
|
|
||||||
|
|
||||||
bpy.utils.register_class(CustomDrawOperator)
|
bpy.utils.register_class(CustomDrawOperator)
|
||||||
|
|
||||||
# test call
|
# test call
|
||||||
|
@@ -22,6 +22,7 @@ class HelloWorldOperator(bpy.types.Operator):
|
|||||||
print("Hello World")
|
print("Hello World")
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
|
||||||
bpy.utils.register_class(HelloWorldOperator)
|
bpy.utils.register_class(HelloWorldOperator)
|
||||||
|
|
||||||
# test call to the newly defined operator
|
# test call to the newly defined operator
|
||||||
|
@@ -31,6 +31,7 @@ class MyPropertyGroup(bpy.types.PropertyGroup):
|
|||||||
custom_1 = bpy.props.FloatProperty(name="My Float")
|
custom_1 = bpy.props.FloatProperty(name="My Float")
|
||||||
custom_2 = bpy.props.IntProperty(name="My Int")
|
custom_2 = bpy.props.IntProperty(name="My Int")
|
||||||
|
|
||||||
|
|
||||||
bpy.utils.register_class(MyPropertyGroup)
|
bpy.utils.register_class(MyPropertyGroup)
|
||||||
|
|
||||||
bpy.types.Object.my_prop_grp = bpy.props.PointerProperty(type=MyPropertyGroup)
|
bpy.types.Object.my_prop_grp = bpy.props.PointerProperty(type=MyPropertyGroup)
|
||||||
|
@@ -10,4 +10,5 @@ import bpy
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.layout.label("Hello World")
|
self.layout.label("Hello World")
|
||||||
|
|
||||||
|
|
||||||
bpy.context.window_manager.popup_menu(draw, title="Greeting", icon='INFO')
|
bpy.context.window_manager.popup_menu(draw, title="Greeting", icon='INFO')
|
||||||
|
@@ -12,6 +12,7 @@ from bpy.props import PointerProperty
|
|||||||
class MyPropGroup(bpy.types.PropertyGroup):
|
class MyPropGroup(bpy.types.PropertyGroup):
|
||||||
nested = bpy.props.FloatProperty(name="Nested", default=0.0)
|
nested = bpy.props.FloatProperty(name="Nested", default=0.0)
|
||||||
|
|
||||||
|
|
||||||
# register it so its available for all bones
|
# register it so its available for all bones
|
||||||
bpy.utils.register_class(MyPropGroup)
|
bpy.utils.register_class(MyPropGroup)
|
||||||
bpy.types.Bone.my_prop = PointerProperty(type=MyPropGroup,
|
bpy.types.Bone.my_prop = PointerProperty(type=MyPropGroup,
|
||||||
|
@@ -23,9 +23,9 @@ class OffScreenDraw(bpy.types.Operator):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def handle_add(self, context):
|
def handle_add(self, context):
|
||||||
OffScreenDraw._handle_draw = bpy.types.SpaceView3D.draw_handler_add(
|
OffScreenDraw._handle_draw = bpy.types.SpaceView3D.draw_handler_add(
|
||||||
self.draw_callback_px, (self, context),
|
self.draw_callback_px, (self, context),
|
||||||
'WINDOW', 'POST_PIXEL',
|
'WINDOW', 'POST_PIXEL',
|
||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def handle_remove():
|
def handle_remove():
|
||||||
@@ -58,20 +58,20 @@ class OffScreenDraw(bpy.types.Operator):
|
|||||||
|
|
||||||
modelview_matrix = camera.matrix_world.inverted()
|
modelview_matrix = camera.matrix_world.inverted()
|
||||||
projection_matrix = camera.calc_matrix_camera(
|
projection_matrix = camera.calc_matrix_camera(
|
||||||
render.resolution_x,
|
render.resolution_x,
|
||||||
render.resolution_y,
|
render.resolution_y,
|
||||||
render.pixel_aspect_x,
|
render.pixel_aspect_x,
|
||||||
render.pixel_aspect_y,
|
render.pixel_aspect_y,
|
||||||
)
|
)
|
||||||
|
|
||||||
offscreen.draw_view3d(
|
offscreen.draw_view3d(
|
||||||
scene,
|
scene,
|
||||||
render_layer,
|
render_layer,
|
||||||
context.space_data,
|
context.space_data,
|
||||||
context.region,
|
context.region,
|
||||||
projection_matrix,
|
projection_matrix,
|
||||||
modelview_matrix,
|
modelview_matrix,
|
||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _opengl_draw(context, texture, aspect_ratio, scale):
|
def _opengl_draw(context, texture, aspect_ratio, scale):
|
||||||
|
1
extern/rangetree/CMakeLists.txt
vendored
1
extern/rangetree/CMakeLists.txt
vendored
@@ -28,4 +28,3 @@ set(SRC
|
|||||||
)
|
)
|
||||||
|
|
||||||
blender_add_lib(extern_rangetree "${SRC}" "${INC}" "")
|
blender_add_lib(extern_rangetree "${SRC}" "${INC}" "")
|
||||||
|
|
||||||
|
@@ -355,4 +355,3 @@ endif()
|
|||||||
if(NOT WITH_BLENDER AND WITH_CYCLES_STANDALONE)
|
if(NOT WITH_BLENDER AND WITH_CYCLES_STANDALONE)
|
||||||
delayed_do_install(${CMAKE_BINARY_DIR}/bin)
|
delayed_do_install(${CMAKE_BINARY_DIR}/bin)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -63,4 +63,3 @@ endif()
|
|||||||
add_dependencies(bf_intern_cycles bf_rna)
|
add_dependencies(bf_intern_cycles bf_rna)
|
||||||
|
|
||||||
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${ADDON_FILES}" ${CYCLES_INSTALL_PATH})
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${ADDON_FILES}" ${CYCLES_INSTALL_PATH})
|
||||||
|
|
||||||
|
@@ -193,7 +193,7 @@ class CYCLES_RENDER_PT_sampling(CyclesButtonsPanel, Panel):
|
|||||||
|
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.prop(cscene, "seed")
|
row.prop(cscene, "seed")
|
||||||
row.prop(cscene, "use_animated_seed", text="", icon="TIME")
|
row.prop(cscene, "use_animated_seed", text="", icon='TIME')
|
||||||
|
|
||||||
layout.prop(cscene, "sampling_pattern", text="Pattern")
|
layout.prop(cscene, "sampling_pattern", text="Pattern")
|
||||||
|
|
||||||
@@ -847,7 +847,7 @@ class CYCLES_CAMERA_PT_dof_aperture(CyclesButtonsPanel, Panel):
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
layout.use_property_split = True
|
layout.use_property_split = True
|
||||||
flow = layout.grid_flow(row_major=True, num_columns=0, even_columns=True, even_rows=False, align=False)
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
|
||||||
|
|
||||||
cam = context.camera
|
cam = context.camera
|
||||||
ccam = cam.cycles
|
ccam = cam.cycles
|
||||||
@@ -878,7 +878,7 @@ class CYCLES_CAMERA_PT_dof_viewport(CyclesButtonsPanel, Panel):
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
layout.use_property_split = True
|
layout.use_property_split = True
|
||||||
flow = layout.grid_flow(row_major=True, num_columns=0, even_columns=True, even_rows=False, align=False)
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
|
||||||
|
|
||||||
cam = context.camera
|
cam = context.camera
|
||||||
dof_options = cam.gpu_dof
|
dof_options = cam.gpu_dof
|
||||||
@@ -1126,31 +1126,30 @@ class CYCLES_LAMP_PT_lamp(CyclesButtonsPanel, Panel):
|
|||||||
|
|
||||||
layout.prop(lamp, "type", expand=True)
|
layout.prop(lamp, "type", expand=True)
|
||||||
|
|
||||||
split = layout.split()
|
layout.use_property_split = True
|
||||||
col = split.column(align=True)
|
|
||||||
|
col = layout.column()
|
||||||
|
|
||||||
if lamp.type in {'POINT', 'SUN', 'SPOT'}:
|
if lamp.type in {'POINT', 'SUN', 'SPOT'}:
|
||||||
col.prop(lamp, "shadow_soft_size", text="Size")
|
col.prop(lamp, "shadow_soft_size", text="Size")
|
||||||
elif lamp.type == 'AREA':
|
elif lamp.type == 'AREA':
|
||||||
col.prop(lamp, "shape", text="")
|
col.prop(lamp, "shape", text="Shape")
|
||||||
sub = col.column(align=True)
|
sub = col.column(align=True)
|
||||||
|
|
||||||
if lamp.shape in {'SQUARE', 'DISK'}:
|
if lamp.shape in {'SQUARE', 'DISK'}:
|
||||||
sub.prop(lamp, "size")
|
sub.prop(lamp, "size")
|
||||||
elif lamp.shape in {'RECTANGLE', 'ELLIPSE'}:
|
elif lamp.shape in {'RECTANGLE', 'ELLIPSE'}:
|
||||||
sub.prop(lamp, "size", text="Size X")
|
sub.prop(lamp, "size", text="Size X")
|
||||||
sub.prop(lamp, "size_y", text="Size Y")
|
sub.prop(lamp, "size_y", text="Y")
|
||||||
|
|
||||||
if not (lamp.type == 'AREA' and clamp.is_portal):
|
if not (lamp.type == 'AREA' and clamp.is_portal):
|
||||||
sub = col.column(align=True)
|
sub = col.column()
|
||||||
if use_branched_path(context):
|
if use_branched_path(context):
|
||||||
subsub = sub.row(align=True)
|
subsub = sub.row(align=True)
|
||||||
subsub.active = use_sample_all_lights(context)
|
subsub.active = use_sample_all_lights(context)
|
||||||
subsub.prop(clamp, "samples")
|
subsub.prop(clamp, "samples")
|
||||||
sub.prop(clamp, "max_bounces")
|
sub.prop(clamp, "max_bounces")
|
||||||
|
|
||||||
col = split.column()
|
|
||||||
|
|
||||||
sub = col.column(align=True)
|
sub = col.column(align=True)
|
||||||
sub.active = not (lamp.type == 'AREA' and clamp.is_portal)
|
sub.active = not (lamp.type == 'AREA' and clamp.is_portal)
|
||||||
sub.prop(clamp, "cast_shadow")
|
sub.prop(clamp, "cast_shadow")
|
||||||
@@ -1192,17 +1191,12 @@ class CYCLES_LAMP_PT_spot(CyclesButtonsPanel, Panel):
|
|||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
lamp = context.lamp
|
lamp = context.lamp
|
||||||
|
layout.use_property_split = True
|
||||||
|
|
||||||
split = layout.split()
|
col = layout.column()
|
||||||
|
col.prop(lamp, "spot_size", text="Size")
|
||||||
col = split.column()
|
col.prop(lamp, "spot_blend", text="Blend", slider=True)
|
||||||
sub = col.column()
|
|
||||||
sub.prop(lamp, "spot_size", text="Size")
|
|
||||||
sub.prop(lamp, "spot_blend", text="Blend", slider=True)
|
|
||||||
|
|
||||||
col = split.column()
|
|
||||||
col.prop(lamp, "show_cone")
|
col.prop(lamp, "show_cone")
|
||||||
|
|
||||||
|
|
||||||
@@ -1545,6 +1539,7 @@ class CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel):
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
layout.use_property_split = True
|
layout.use_property_split = True
|
||||||
|
layout.use_property_decorate = False # No animation.
|
||||||
|
|
||||||
scene = context.scene
|
scene = context.scene
|
||||||
cscene = scene.cycles
|
cscene = scene.cycles
|
||||||
@@ -1573,7 +1568,7 @@ class CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel):
|
|||||||
if cscene.bake_type == 'NORMAL':
|
if cscene.bake_type == 'NORMAL':
|
||||||
col.prop(cbk, "normal_space", text="Space")
|
col.prop(cbk, "normal_space", text="Space")
|
||||||
|
|
||||||
sub = col.row(align=True)
|
sub = col.column(align=True)
|
||||||
sub.prop(cbk, "normal_r", text="Swizzle R")
|
sub.prop(cbk, "normal_r", text="Swizzle R")
|
||||||
sub.prop(cbk, "normal_g", text="G")
|
sub.prop(cbk, "normal_g", text="G")
|
||||||
sub.prop(cbk, "normal_b", text="B")
|
sub.prop(cbk, "normal_b", text="B")
|
||||||
@@ -1595,6 +1590,7 @@ class CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel):
|
|||||||
|
|
||||||
elif cscene.bake_type in {'DIFFUSE', 'GLOSSY', 'TRANSMISSION', 'SUBSURFACE'}:
|
elif cscene.bake_type in {'DIFFUSE', 'GLOSSY', 'TRANSMISSION', 'SUBSURFACE'}:
|
||||||
row = col.row(align=True)
|
row = col.row(align=True)
|
||||||
|
row.use_property_split = False
|
||||||
row.prop(cbk, "use_pass_direct", toggle=True)
|
row.prop(cbk, "use_pass_direct", toggle=True)
|
||||||
row.prop(cbk, "use_pass_indirect", toggle=True)
|
row.prop(cbk, "use_pass_indirect", toggle=True)
|
||||||
row.prop(cbk, "use_pass_color", toggle=True)
|
row.prop(cbk, "use_pass_color", toggle=True)
|
||||||
@@ -1613,10 +1609,12 @@ class CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel):
|
|||||||
sub.prop(cbk, "use_cage", text="Cage")
|
sub.prop(cbk, "use_cage", text="Cage")
|
||||||
if cbk.use_cage:
|
if cbk.use_cage:
|
||||||
sub.prop(cbk, "cage_extrusion", text="Extrusion")
|
sub.prop(cbk, "cage_extrusion", text="Extrusion")
|
||||||
sub.prop_search(cbk, "cage_object", scene, "objects", text="")
|
sub.prop_search(cbk, "cage_object", scene, "objects", text="Cage Object")
|
||||||
else:
|
else:
|
||||||
sub.prop(cbk, "cage_extrusion", text="Ray Distance")
|
sub.prop(cbk, "cage_extrusion", text="Ray Distance")
|
||||||
|
|
||||||
|
layout.separator()
|
||||||
|
|
||||||
layout.operator("object.bake", icon='RENDER_STILL').type = cscene.bake_type
|
layout.operator("object.bake", icon='RENDER_STILL').type = cscene.bake_type
|
||||||
|
|
||||||
|
|
||||||
@@ -1783,7 +1781,7 @@ def draw_pause(self, context):
|
|||||||
|
|
||||||
if view.shading.type == 'RENDERED':
|
if view.shading.type == 'RENDERED':
|
||||||
cscene = scene.cycles
|
cscene = scene.cycles
|
||||||
layout.prop(cscene, "preview_pause", icon="PAUSE", text="")
|
layout.prop(cscene, "preview_pause", icon='PAUSE', text="")
|
||||||
|
|
||||||
|
|
||||||
def get_panels():
|
def get_panels():
|
||||||
|
@@ -481,7 +481,7 @@ def do_versions(self):
|
|||||||
cworld = world.cycles
|
cworld = world.cycles
|
||||||
# World MIS
|
# World MIS
|
||||||
if not cworld.is_property_set("sampling_method"):
|
if not cworld.is_property_set("sampling_method"):
|
||||||
if cworld.get("sample_as_light", False):
|
if cworld.get("sample_as_light", True):
|
||||||
cworld.sampling_method = 'MANUAL'
|
cworld.sampling_method = 'MANUAL'
|
||||||
else:
|
else:
|
||||||
cworld.sampling_method = 'NONE'
|
cworld.sampling_method = 'NONE'
|
||||||
|
@@ -457,6 +457,7 @@ static void blender_camera_sync(Camera *cam,
|
|||||||
cam->matrix = blender_camera_matrix(bcam->matrix,
|
cam->matrix = blender_camera_matrix(bcam->matrix,
|
||||||
bcam->type,
|
bcam->type,
|
||||||
bcam->panorama_type);
|
bcam->panorama_type);
|
||||||
|
cam->motion.clear();
|
||||||
cam->motion.resize(bcam->motion_steps, cam->matrix);
|
cam->motion.resize(bcam->motion_steps, cam->matrix);
|
||||||
cam->use_perspective_motion = false;
|
cam->use_perspective_motion = false;
|
||||||
cam->shuttertime = bcam->shuttertime;
|
cam->shuttertime = bcam->shuttertime;
|
||||||
|
@@ -448,6 +448,7 @@ Object *BlenderSync::sync_object(BL::Depsgraph& b_depsgraph,
|
|||||||
mesh->motion_steps = motion_steps;
|
mesh->motion_steps = motion_steps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object->motion.clear();
|
||||||
object->motion.resize(motion_steps, transform_empty());
|
object->motion.resize(motion_steps, transform_empty());
|
||||||
|
|
||||||
if(motion_steps) {
|
if(motion_steps) {
|
||||||
|
@@ -54,6 +54,7 @@ BlenderSession::BlenderSession(BL::RenderEngine& b_engine,
|
|||||||
BL::BlendData& b_data,
|
BL::BlendData& b_data,
|
||||||
bool preview_osl)
|
bool preview_osl)
|
||||||
: session(NULL),
|
: session(NULL),
|
||||||
|
sync(NULL),
|
||||||
b_engine(b_engine),
|
b_engine(b_engine),
|
||||||
b_userpref(b_userpref),
|
b_userpref(b_userpref),
|
||||||
b_data(b_data),
|
b_data(b_data),
|
||||||
@@ -81,6 +82,7 @@ BlenderSession::BlenderSession(BL::RenderEngine& b_engine,
|
|||||||
BL::RegionView3D& b_rv3d,
|
BL::RegionView3D& b_rv3d,
|
||||||
int width, int height)
|
int width, int height)
|
||||||
: session(NULL),
|
: session(NULL),
|
||||||
|
sync(NULL),
|
||||||
b_engine(b_engine),
|
b_engine(b_engine),
|
||||||
b_userpref(b_userpref),
|
b_userpref(b_userpref),
|
||||||
b_data(b_data),
|
b_data(b_data),
|
||||||
@@ -209,11 +211,8 @@ void BlenderSession::reset_session(BL::BlendData& b_data, BL::Depsgraph& b_depsg
|
|||||||
/* if scene or session parameters changed, it's easier to simply re-create
|
/* if scene or session parameters changed, it's easier to simply re-create
|
||||||
* them rather than trying to distinguish which settings need to be updated
|
* them rather than trying to distinguish which settings need to be updated
|
||||||
*/
|
*/
|
||||||
|
free_session();
|
||||||
delete session;
|
|
||||||
|
|
||||||
create_session();
|
create_session();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -449,11 +448,11 @@ void BlenderSession::render(BL::Depsgraph& b_depsgraph_)
|
|||||||
BL::Object b_camera_override(b_engine.camera_override());
|
BL::Object b_camera_override(b_engine.camera_override());
|
||||||
sync->sync_camera(b_render, b_camera_override, width, height, b_rview_name.c_str());
|
sync->sync_camera(b_render, b_camera_override, width, height, b_rview_name.c_str());
|
||||||
sync->sync_data(b_render,
|
sync->sync_data(b_render,
|
||||||
b_depsgraph,
|
b_depsgraph,
|
||||||
b_v3d,
|
b_v3d,
|
||||||
b_camera_override,
|
b_camera_override,
|
||||||
width, height,
|
width, height,
|
||||||
&python_thread_state);
|
&python_thread_state);
|
||||||
builtin_images_load();
|
builtin_images_load();
|
||||||
|
|
||||||
/* Make sure all views have different noise patterns. - hardcoded value just to make it random */
|
/* Make sure all views have different noise patterns. - hardcoded value just to make it random */
|
||||||
@@ -610,11 +609,11 @@ void BlenderSession::bake(BL::Depsgraph& b_depsgraph_,
|
|||||||
BL::Object b_camera_override(b_engine.camera_override());
|
BL::Object b_camera_override(b_engine.camera_override());
|
||||||
sync->sync_camera(b_render, b_camera_override, width, height, "");
|
sync->sync_camera(b_render, b_camera_override, width, height, "");
|
||||||
sync->sync_data(b_render,
|
sync->sync_data(b_render,
|
||||||
b_depsgraph,
|
b_depsgraph,
|
||||||
b_v3d,
|
b_v3d,
|
||||||
b_camera_override,
|
b_camera_override,
|
||||||
width, height,
|
width, height,
|
||||||
&python_thread_state);
|
&python_thread_state);
|
||||||
builtin_images_load();
|
builtin_images_load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -177,7 +177,7 @@ void BlenderSync::sync_recalc(BL::Depsgraph& b_depsgraph)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void BlenderSync::sync_data(BL::RenderSettings& b_render,
|
void BlenderSync::sync_data(BL::RenderSettings& b_render,
|
||||||
BL::Depsgraph& b_depsgraph,
|
BL::Depsgraph& b_depsgraph,
|
||||||
BL::SpaceView3D& b_v3d,
|
BL::SpaceView3D& b_v3d,
|
||||||
BL::Object& b_override,
|
BL::Object& b_override,
|
||||||
int width, int height,
|
int width, int height,
|
||||||
|
@@ -293,7 +293,7 @@ static inline int4 get_int4(const BL::Array<int, 4>& array)
|
|||||||
return make_int4(array[0], array[1], array[2], array[3]);
|
return make_int4(array[0], array[1], array[2], array[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint get_layer(const BL::Array<int, 20>& array)
|
static inline uint get_layer(const BL::Array<bool, 20>& array)
|
||||||
{
|
{
|
||||||
uint layer = 0;
|
uint layer = 0;
|
||||||
|
|
||||||
@@ -304,8 +304,8 @@ static inline uint get_layer(const BL::Array<int, 20>& array)
|
|||||||
return layer;
|
return layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint get_layer(const BL::Array<int, 20>& array,
|
static inline uint get_layer(const BL::Array<bool, 20>& array,
|
||||||
const BL::Array<int, 8>& local_array,
|
const BL::Array<bool, 8>& local_array,
|
||||||
bool is_light = false,
|
bool is_light = false,
|
||||||
uint view_layers = (1 << 20) - 1)
|
uint view_layers = (1 << 20) - 1)
|
||||||
{
|
{
|
||||||
|
@@ -385,7 +385,7 @@ public:
|
|||||||
VLOG(1) << "Found nvcc " << nvcc
|
VLOG(1) << "Found nvcc " << nvcc
|
||||||
<< ", CUDA version " << cuda_version
|
<< ", CUDA version " << cuda_version
|
||||||
<< ".";
|
<< ".";
|
||||||
const int major = cuda_version / 10, minor = cuda_version & 10;
|
const int major = cuda_version / 10, minor = cuda_version % 10;
|
||||||
if(cuda_version == 0) {
|
if(cuda_version == 0) {
|
||||||
cuda_error_message("CUDA nvcc compiler version could not be parsed.");
|
cuda_error_message("CUDA nvcc compiler version could not be parsed.");
|
||||||
return false;
|
return false;
|
||||||
|
@@ -20,4 +20,3 @@ include_directories(${INC})
|
|||||||
include_directories(SYSTEM ${INC_SYS})
|
include_directories(SYSTEM ${INC_SYS})
|
||||||
|
|
||||||
cycles_add_library(cycles_graph ${SRC} ${SRC_HEADERS})
|
cycles_add_library(cycles_graph ${SRC} ${SRC_HEADERS})
|
||||||
|
|
||||||
|
@@ -520,4 +520,3 @@ delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_SVM_HEADERS}" ${CYCLES_INSTAL
|
|||||||
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_GEOM_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/geom)
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_GEOM_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/geom)
|
||||||
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_UTIL_HEADERS}" ${CYCLES_INSTALL_PATH}/source/util)
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_UTIL_HEADERS}" ${CYCLES_INSTALL_PATH}/source/util)
|
||||||
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_SPLIT_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/split)
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_SPLIT_HEADERS}" ${CYCLES_INSTALL_PATH}/source/kernel/split)
|
||||||
|
|
||||||
|
@@ -72,15 +72,15 @@ ccl_device_inline float bsdf_get_roughness_squared(const ShaderClosure *sc)
|
|||||||
return bsdf_get_specular_roughness_squared(sc);
|
return bsdf_get_specular_roughness_squared(sc);
|
||||||
}
|
}
|
||||||
|
|
||||||
ccl_device_forceinline int bsdf_sample(KernelGlobals *kg,
|
ccl_device_inline int bsdf_sample(KernelGlobals *kg,
|
||||||
ShaderData *sd,
|
ShaderData *sd,
|
||||||
const ShaderClosure *sc,
|
const ShaderClosure *sc,
|
||||||
float randu,
|
float randu,
|
||||||
float randv,
|
float randv,
|
||||||
float3 *eval,
|
float3 *eval,
|
||||||
float3 *omega_in,
|
float3 *omega_in,
|
||||||
differential3 *domega_in,
|
differential3 *domega_in,
|
||||||
float *pdf)
|
float *pdf)
|
||||||
{
|
{
|
||||||
int label;
|
int label;
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ ccl_device_forceinline int bsdf_sample(KernelGlobals *kg,
|
|||||||
#ifndef __KERNEL_CUDA__
|
#ifndef __KERNEL_CUDA__
|
||||||
ccl_device
|
ccl_device
|
||||||
#else
|
#else
|
||||||
ccl_device_forceinline
|
ccl_device_inline
|
||||||
#endif
|
#endif
|
||||||
float3 bsdf_eval(KernelGlobals *kg,
|
float3 bsdf_eval(KernelGlobals *kg,
|
||||||
ShaderData *sd,
|
ShaderData *sd,
|
||||||
|
@@ -31,4 +31,3 @@ include_directories(${INC})
|
|||||||
include_directories(SYSTEM ${INC_SYS})
|
include_directories(SYSTEM ${INC_SYS})
|
||||||
|
|
||||||
cycles_add_library(cycles_kernel_osl ${SRC} ${HEADER_SRC})
|
cycles_add_library(cycles_kernel_osl ${SRC} ${HEADER_SRC})
|
||||||
|
|
||||||
|
@@ -127,4 +127,3 @@ cycles_set_solution_folder(cycles_osl_shaders)
|
|||||||
# CMAKE_CURRENT_SOURCE_DIR is already included in OSO paths
|
# CMAKE_CURRENT_SOURCE_DIR is already included in OSO paths
|
||||||
delayed_install("" "${SRC_OSO}" ${CYCLES_INSTALL_PATH}/shader)
|
delayed_install("" "${SRC_OSO}" ${CYCLES_INSTALL_PATH}/shader)
|
||||||
delayed_install("${CMAKE_CURRENT_SOURCE_DIR}" "${SRC_OSL_HEADERS}" ${CYCLES_INSTALL_PATH}/shader)
|
delayed_install("${CMAKE_CURRENT_SOURCE_DIR}" "${SRC_OSL_HEADERS}" ${CYCLES_INSTALL_PATH}/shader)
|
||||||
|
|
||||||
|
@@ -17,13 +17,13 @@
|
|||||||
#include "stdosl.h"
|
#include "stdosl.h"
|
||||||
|
|
||||||
shader node_ambient_occlusion(
|
shader node_ambient_occlusion(
|
||||||
color ColorIn = color(0.8, 0.8, 0.8),
|
color ColorIn = color(1.0, 1.0, 1.0),
|
||||||
int samples = 8,
|
int samples = 16,
|
||||||
float Distance = 1.0,
|
float Distance = 1.0,
|
||||||
normal Normal = N,
|
normal Normal = N,
|
||||||
int inside = 0,
|
int inside = 0,
|
||||||
int only_local = 1,
|
int only_local = 0,
|
||||||
output color ColorOut = color(0.8, 0.8, 0.8),
|
output color ColorOut = color(1.0, 1.0, 1.0),
|
||||||
output float AO = 1.0)
|
output float AO = 1.0)
|
||||||
{
|
{
|
||||||
int global_radius = (Distance == 0.0 && !isconnected(Distance));
|
int global_radius = (Distance == 0.0 && !isconnected(Distance));
|
||||||
|
@@ -144,7 +144,6 @@ CCL_NAMESPACE_END
|
|||||||
#include "kernel/svm/svm_color_util.h"
|
#include "kernel/svm/svm_color_util.h"
|
||||||
#include "kernel/svm/svm_math_util.h"
|
#include "kernel/svm/svm_math_util.h"
|
||||||
|
|
||||||
#include "kernel/svm/svm_ao.h"
|
|
||||||
#include "kernel/svm/svm_attribute.h"
|
#include "kernel/svm/svm_attribute.h"
|
||||||
#include "kernel/svm/svm_gradient.h"
|
#include "kernel/svm/svm_gradient.h"
|
||||||
#include "kernel/svm/svm_blackbody.h"
|
#include "kernel/svm/svm_blackbody.h"
|
||||||
@@ -185,6 +184,7 @@ CCL_NAMESPACE_END
|
|||||||
#include "kernel/svm/svm_bump.h"
|
#include "kernel/svm/svm_bump.h"
|
||||||
|
|
||||||
#ifdef __SHADER_RAYTRACE__
|
#ifdef __SHADER_RAYTRACE__
|
||||||
|
# include "kernel/svm/svm_ao.h"
|
||||||
# include "kernel/svm/svm_bevel.h"
|
# include "kernel/svm/svm_bevel.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -587,7 +587,7 @@ void LightManager::device_update_background(Device *device,
|
|||||||
double time_start = time_dt();
|
double time_start = time_dt();
|
||||||
if(max(res.x, res.y) < 512) {
|
if(max(res.x, res.y) < 512) {
|
||||||
/* Small enough resolution, faster to do single-threaded. */
|
/* Small enough resolution, faster to do single-threaded. */
|
||||||
background_cdf(0, res.x, res.x, res.y, &pixels, cond_cdf);
|
background_cdf(0, res.y, res.x, res.y, &pixels, cond_cdf);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Threaded evaluation for large resolution. */
|
/* Threaded evaluation for large resolution. */
|
||||||
|
@@ -2792,14 +2792,14 @@ NODE_DEFINE(AmbientOcclusionNode)
|
|||||||
{
|
{
|
||||||
NodeType* type = NodeType::add("ambient_occlusion", create, NodeType::SHADER);
|
NodeType* type = NodeType::add("ambient_occlusion", create, NodeType::SHADER);
|
||||||
|
|
||||||
SOCKET_INT(samples, "Samples", 8);
|
SOCKET_INT(samples, "Samples", 16);
|
||||||
|
|
||||||
SOCKET_IN_COLOR(color, "Color", make_float3(0.8f, 0.8f, 0.8f));
|
SOCKET_IN_COLOR(color, "Color", make_float3(1.0f, 1.0f, 1.0f));
|
||||||
SOCKET_IN_FLOAT(distance, "Distance", 1.0f);
|
SOCKET_IN_FLOAT(distance, "Distance", 1.0f);
|
||||||
SOCKET_IN_NORMAL(normal, "Normal", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_NORMAL);
|
SOCKET_IN_NORMAL(normal, "Normal", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_NORMAL);
|
||||||
|
|
||||||
SOCKET_BOOLEAN(inside, "Inside", false);
|
SOCKET_BOOLEAN(inside, "Inside", false);
|
||||||
SOCKET_BOOLEAN(only_local, "Only Local", true);
|
SOCKET_BOOLEAN(only_local, "Only Local", false);
|
||||||
|
|
||||||
SOCKET_OUT_COLOR(color, "Color");
|
SOCKET_OUT_COLOR(color, "Color");
|
||||||
SOCKET_OUT_FLOAT(ao, "AO");
|
SOCKET_OUT_FLOAT(ao, "AO");
|
||||||
|
@@ -91,7 +91,8 @@ link_directories(${OPENIMAGEIO_LIBPATH}
|
|||||||
${JPEG_LIBPATH}
|
${JPEG_LIBPATH}
|
||||||
${ZLIB_LIBPATH}
|
${ZLIB_LIBPATH}
|
||||||
${TIFF_LIBPATH}
|
${TIFF_LIBPATH}
|
||||||
${OPENEXR_LIBPATH})
|
${OPENEXR_LIBPATH}
|
||||||
|
${OPENCOLORIO_LIBPATH})
|
||||||
|
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
|
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
|
||||||
|
@@ -606,7 +606,7 @@ ccl_device_inline const ssef uint32_to_float(const ssei &in)
|
|||||||
template<size_t S1, size_t S2, size_t S3, size_t S4>
|
template<size_t S1, size_t S2, size_t S3, size_t S4>
|
||||||
ccl_device_inline const ssef set_sign_bit(const ssef &a)
|
ccl_device_inline const ssef set_sign_bit(const ssef &a)
|
||||||
{
|
{
|
||||||
return a ^ cast(ssei(S1 << 31, S2 << 31, S3 << 31, S4 << 31));
|
return cast(cast(a) ^ ssei(S1 << 31, S2 << 31, S3 << 31, S4 << 31));
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@@ -46,4 +46,3 @@ set(SRC
|
|||||||
)
|
)
|
||||||
|
|
||||||
blender_add_lib(bf_intern_dualcon "${SRC}" "${INC}" "${INC_SYS}")
|
blender_add_lib(bf_intern_dualcon "${SRC}" "${INC}" "${INC_SYS}")
|
||||||
|
|
||||||
|
@@ -48,6 +48,9 @@ bool EIG_invert_m4_m4(float inverse[4][4], const float matrix[4][4])
|
|||||||
Matrix4f R;
|
Matrix4f R;
|
||||||
bool invertible = true;
|
bool invertible = true;
|
||||||
M.computeInverseWithCheck(R, invertible, 0.0f);
|
M.computeInverseWithCheck(R, invertible, 0.0f);
|
||||||
|
if (!invertible) {
|
||||||
|
R = R.Zero();
|
||||||
|
}
|
||||||
memcpy(inverse, R.data(), sizeof(float)*4*4);
|
memcpy(inverse, R.data(), sizeof(float)*4*4);
|
||||||
return invertible;
|
return invertible;
|
||||||
}
|
}
|
||||||
|
@@ -75,4 +75,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_IContext_H__
|
#endif // __GHOST_IContext_H__
|
||||||
|
|
||||||
|
@@ -91,4 +91,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_IEVENT_H__
|
#endif // __GHOST_IEVENT_H__
|
||||||
|
|
||||||
|
@@ -462,4 +462,3 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_ISYSTEM_H__
|
#endif // __GHOST_ISYSTEM_H__
|
||||||
|
|
||||||
|
@@ -91,4 +91,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_ITIMERTASK_H__
|
#endif // __GHOST_ITIMERTASK_H__
|
||||||
|
|
||||||
|
@@ -368,4 +368,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_IWINDOW_H__
|
#endif // __GHOST_IWINDOW_H__
|
||||||
|
|
||||||
|
@@ -257,4 +257,3 @@ inline bool GHOST_Rect::isInside(GHOST_TInt32 x, GHOST_TInt32 y) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // __GHOST_RECT_H__
|
#endif // __GHOST_RECT_H__
|
||||||
|
|
||||||
|
@@ -557,4 +557,3 @@ typedef void (*GHOST_TimerProcPtr)(struct GHOST_TimerTaskHandle__ *task, GHOST_T
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // __GHOST_TYPES_H__
|
#endif // __GHOST_TYPES_H__
|
||||||
|
|
||||||
|
@@ -75,4 +75,3 @@ struct GHOST_Buttons {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_BUTTONS_H__
|
#endif // __GHOST_BUTTONS_H__
|
||||||
|
|
||||||
|
@@ -80,4 +80,3 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_CALLBACKEVENTCONSUMER_H__
|
#endif // __GHOST_CALLBACKEVENTCONSUMER_H__
|
||||||
|
|
||||||
|
@@ -84,4 +84,3 @@
|
|||||||
#endif // GHOST_DEBUG
|
#endif // GHOST_DEBUG
|
||||||
|
|
||||||
#endif // __GHOST_DEBUG_H__
|
#endif // __GHOST_DEBUG_H__
|
||||||
|
|
||||||
|
@@ -142,4 +142,3 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
#endif // __GHOST_DISPLAYMANAGER_H__
|
#endif // __GHOST_DISPLAYMANAGER_H__
|
||||||
|
|
||||||
|
@@ -103,4 +103,3 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
#endif // __GHOST_DISPLAYMANAGERCOCOA_H__
|
#endif // __GHOST_DISPLAYMANAGERCOCOA_H__
|
||||||
|
|
||||||
|
@@ -98,4 +98,3 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
#endif // __GHOST_DISPLAYMANAGERWIN32_H__
|
#endif // __GHOST_DISPLAYMANAGERWIN32_H__
|
||||||
|
|
||||||
|
@@ -120,4 +120,3 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
#endif //
|
#endif //
|
||||||
|
|
||||||
|
@@ -392,4 +392,3 @@ void printLastError(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // GHOST_DEBUG
|
#endif // GHOST_DEBUG
|
||||||
|
|
||||||
|
@@ -104,4 +104,3 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_EVENT_H__
|
#endif // __GHOST_EVENT_H__
|
||||||
|
|
||||||
|
@@ -63,4 +63,3 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_EVENTBUTTON_H__
|
#endif // __GHOST_EVENTBUTTON_H__
|
||||||
|
|
||||||
|
@@ -65,4 +65,3 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
#endif // __GHOST_EVENTCURSOR_H__
|
#endif // __GHOST_EVENTCURSOR_H__
|
||||||
|
|
||||||
|
@@ -133,4 +133,3 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_EVENTDRAGNDROP_H__
|
#endif // __GHOST_EVENTDRAGNDROP_H__
|
||||||
|
|
||||||
|
@@ -89,4 +89,3 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_EVENTKEY_H__
|
#endif // __GHOST_EVENTKEY_H__
|
||||||
|
|
||||||
|
@@ -161,4 +161,3 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_EVENTMANAGER_H__
|
#endif // __GHOST_EVENTMANAGER_H__
|
||||||
|
|
||||||
|
@@ -338,4 +338,3 @@ void GHOST_EventPrinter::getKeyString(GHOST_TKey key, char str[32]) const
|
|||||||
sprintf(str, "%s", tstr);
|
sprintf(str, "%s", tstr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -61,4 +61,3 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_EVENTPRINTER_H__
|
#endif // __GHOST_EVENTPRINTER_H__
|
||||||
|
|
||||||
|
@@ -64,4 +64,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_EVENTSTRING_H__
|
#endif // __GHOST_EVENTSTRING_H__
|
||||||
|
|
||||||
|
@@ -72,4 +72,3 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
#endif // _GHOST_EVENT_PAN_H_
|
#endif // _GHOST_EVENT_PAN_H_
|
||||||
|
|
||||||
|
@@ -65,4 +65,3 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
#endif // __GHOST_EVENTWHEEL_H__
|
#endif // __GHOST_EVENTWHEEL_H__
|
||||||
|
|
||||||
|
@@ -105,4 +105,3 @@ GHOST_ISystem *GHOST_ISystem::getSystem()
|
|||||||
{
|
{
|
||||||
return m_system;
|
return m_system;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -96,6 +96,3 @@ GHOST_ISystemPaths *GHOST_ISystemPaths::get()
|
|||||||
}
|
}
|
||||||
return m_systemPaths;
|
return m_systemPaths;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -100,4 +100,3 @@ struct GHOST_ModifierKeys {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_MODIFIERKEYS_H__
|
#endif // __GHOST_MODIFIERKEYS_H__
|
||||||
|
|
||||||
|
@@ -138,4 +138,3 @@ bool GHOST_Rect::clip(GHOST_Rect& r) const
|
|||||||
}
|
}
|
||||||
return clipped;
|
return clipped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -390,4 +390,3 @@ bool GHOST_System::useNativePixel(void)
|
|||||||
m_nativePixel = true;
|
m_nativePixel = true;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -396,4 +396,3 @@ inline GHOST_NDOFManager *GHOST_System::getNDOFManager() const
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // __GHOST_SYSTEM_H__
|
#endif // __GHOST_SYSTEM_H__
|
||||||
|
|
||||||
|
@@ -323,4 +323,3 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_SYSTEMCOCOA_H__
|
#endif // __GHOST_SYSTEMCOCOA_H__
|
||||||
|
|
||||||
|
@@ -77,5 +77,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@@ -90,4 +90,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_SYSTEMPATHSWIN32_H__
|
#endif // __GHOST_SYSTEMPATHSWIN32_H__
|
||||||
|
|
||||||
|
@@ -325,7 +325,8 @@ GHOST_IContext *GHOST_SystemWin32::createOffscreenContext()
|
|||||||
);
|
);
|
||||||
|
|
||||||
HDC mHDC = GetDC(wnd);
|
HDC mHDC = GetDC(wnd);
|
||||||
|
HDC prev_hdc = wglGetCurrentDC();
|
||||||
|
HGLRC prev_context = wglGetCurrentContext();
|
||||||
#if defined(WITH_GL_PROFILE_CORE)
|
#if defined(WITH_GL_PROFILE_CORE)
|
||||||
for (int minor = 5; minor >= 0; --minor) {
|
for (int minor = 5; minor >= 0; --minor) {
|
||||||
context = new GHOST_ContextWGL(
|
context = new GHOST_ContextWGL(
|
||||||
@@ -337,7 +338,7 @@ GHOST_IContext *GHOST_SystemWin32::createOffscreenContext()
|
|||||||
GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY);
|
GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY);
|
||||||
|
|
||||||
if (context->initializeDrawingContext()) {
|
if (context->initializeDrawingContext()) {
|
||||||
return context;
|
goto finished;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
delete context;
|
delete context;
|
||||||
@@ -353,7 +354,7 @@ GHOST_IContext *GHOST_SystemWin32::createOffscreenContext()
|
|||||||
GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY);
|
GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY);
|
||||||
|
|
||||||
if (context->initializeDrawingContext()) {
|
if (context->initializeDrawingContext()) {
|
||||||
return context;
|
goto finished;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MessageBox(
|
MessageBox(
|
||||||
@@ -386,8 +387,9 @@ GHOST_IContext *GHOST_SystemWin32::createOffscreenContext()
|
|||||||
#else
|
#else
|
||||||
# error // must specify either core or compat at build time
|
# error // must specify either core or compat at build time
|
||||||
#endif
|
#endif
|
||||||
|
finished:
|
||||||
return NULL;
|
wglMakeCurrent(prev_hdc, prev_context);
|
||||||
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -438,4 +438,3 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -127,4 +127,3 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_TIMERMANAGER_H__
|
#endif // __GHOST_TIMERMANAGER_H__
|
||||||
|
|
||||||
|
@@ -193,4 +193,3 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_TIMERTASK_H__
|
#endif // __GHOST_TIMERTASK_H__
|
||||||
|
|
||||||
|
@@ -242,4 +242,3 @@ bool GHOST_Window::getModifiedState()
|
|||||||
{
|
{
|
||||||
return m_isUnsavedChanges;
|
return m_isUnsavedChanges;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -461,4 +461,3 @@ inline GHOST_TStandardCursor GHOST_Window::getCursorShape() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // _GHOST_WINDOW_H
|
#endif // _GHOST_WINDOW_H
|
||||||
|
|
||||||
|
@@ -168,4 +168,3 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GHOST_WINDOWMANAGER_H__
|
#endif // __GHOST_WINDOWMANAGER_H__
|
||||||
|
|
||||||
|
@@ -38,4 +38,3 @@ void rect_copy (int dst[2][2], int src[2][2]);
|
|||||||
int rect_contains_pt (int rect[2][2], int pt[2]);
|
int rect_contains_pt (int rect[2][2], int pt[2]);
|
||||||
int rect_width (int rect[2][2]);
|
int rect_width (int rect[2][2]);
|
||||||
int rect_height (int rect[2][2]);
|
int rect_height (int rect[2][2]);
|
||||||
|
|
||||||
|
@@ -27,4 +27,3 @@
|
|||||||
|
|
||||||
char *eventtype_to_string(GHOST_TEventType type);
|
char *eventtype_to_string(GHOST_TEventType type);
|
||||||
void event_to_buf(GHOST_EventHandle evt, char buf[128]);
|
void event_to_buf(GHOST_EventHandle evt, char buf[128]);
|
||||||
|
|
||||||
|
@@ -37,4 +37,3 @@
|
|||||||
#else // defined(WIN32) || defined(__APPLE__)
|
#else // defined(WIN32) || defined(__APPLE__)
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#endif // defined(WIN32) || defined(__APPLE__)
|
#endif // defined(WIN32) || defined(__APPLE__)
|
||||||
|
|
||||||
|
@@ -50,4 +50,3 @@ void scrollbar_get_rect (ScrollBar *sb, int rect_r[2][2]);
|
|||||||
void scrollbar_get_thumb (ScrollBar *sb, int thumb_r[2][2]);
|
void scrollbar_get_thumb (ScrollBar *sb, int thumb_r[2][2]);
|
||||||
|
|
||||||
void scrollbar_free (ScrollBar *sb);
|
void scrollbar_free (ScrollBar *sb);
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user