- add example for python rna property update

- edit the copyright for blender specific cmake find modules
This commit is contained in:
Campbell Barton 2011-06-20 02:54:56 +00:00
parent 6d7e3509a9
commit 97a85fe100
9 changed files with 165 additions and 107 deletions

@ -12,7 +12,7 @@
# FFTW3_LIBRARY, where to find the Fftw3 library. # FFTW3_LIBRARY, where to find the Fftw3 library.
#============================================================================= #=============================================================================
# Copyright 2002-2009 Kitware, Inc. # Copyright 2011 Blender Foundation.
# #
# Distributed under the OSI-approved BSD License (the "License"); # Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details. # see accompanying file Copyright.txt for details.
@ -21,8 +21,6 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information. # See the License for more information.
#============================================================================= #=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# If FFTW3_ROOT_DIR was defined in the environment, use it. # If FFTW3_ROOT_DIR was defined in the environment, use it.
IF(NOT FFTW3_ROOT_DIR AND NOT $ENV{FFTW3_ROOT_DIR} STREQUAL "") IF(NOT FFTW3_ROOT_DIR AND NOT $ENV{FFTW3_ROOT_DIR} STREQUAL "")
@ -37,7 +35,9 @@ SET(_fftw3_SEARCH_DIRS
/opt/csw # Blastwave /opt/csw # Blastwave
) )
FIND_PATH(FFTW3_INCLUDE_DIR fftw3.h FIND_PATH(FFTW3_INCLUDE_DIR
NAMES
fftw3.h
HINTS HINTS
${_fftw3_SEARCH_DIRS} ${_fftw3_SEARCH_DIRS}
PATH_SUFFIXES PATH_SUFFIXES
@ -45,9 +45,12 @@ FIND_PATH(FFTW3_INCLUDE_DIR fftw3.h
) )
FIND_LIBRARY(FFTW3_LIBRARY FIND_LIBRARY(FFTW3_LIBRARY
NAMES "fftw3" NAMES
HINTS ${_fftw3_SEARCH_DIRS} fftw3
PATH_SUFFIXES lib64 lib HINTS
${_fftw3_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
) )
# handle the QUIETLY and REQUIRED arguments and set FFTW3_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set FFTW3_FOUND to TRUE if

@ -12,7 +12,7 @@
# JACK_LIBRARY, where to find the Jack library. # JACK_LIBRARY, where to find the Jack library.
#============================================================================= #=============================================================================
# Copyright 2002-2009 Kitware, Inc. # Copyright 2011 Blender Foundation.
# #
# Distributed under the OSI-approved BSD License (the "License"); # Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details. # see accompanying file Copyright.txt for details.
@ -21,8 +21,6 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information. # See the License for more information.
#============================================================================= #=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# If JACK_ROOT_DIR was defined in the environment, use it. # If JACK_ROOT_DIR was defined in the environment, use it.
IF(NOT JACK_ROOT_DIR AND NOT $ENV{JACK_ROOT_DIR} STREQUAL "") IF(NOT JACK_ROOT_DIR AND NOT $ENV{JACK_ROOT_DIR} STREQUAL "")
@ -37,7 +35,9 @@ SET(_jack_SEARCH_DIRS
/opt/csw # Blastwave /opt/csw # Blastwave
) )
FIND_PATH(JACK_INCLUDE_DIR jack.h FIND_PATH(JACK_INCLUDE_DIR
NAMES
jack.h
HINTS HINTS
${_jack_SEARCH_DIRS} ${_jack_SEARCH_DIRS}
PATH_SUFFIXES PATH_SUFFIXES
@ -45,9 +45,12 @@ FIND_PATH(JACK_INCLUDE_DIR jack.h
) )
FIND_LIBRARY(JACK_LIBRARY FIND_LIBRARY(JACK_LIBRARY
NAMES "jack" NAMES
HINTS ${_jack_SEARCH_DIRS} jack
PATH_SUFFIXES lib64 lib HINTS
${_jack_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
) )
# handle the QUIETLY and REQUIRED arguments and set JACK_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set JACK_FOUND to TRUE if

@ -12,7 +12,7 @@
# JEMALLOC_LIBRARY, where to find the JeMalloc library. # JEMALLOC_LIBRARY, where to find the JeMalloc library.
#============================================================================= #=============================================================================
# Copyright 2002-2009 Kitware, Inc. # Copyright 2011 Blender Foundation.
# #
# Distributed under the OSI-approved BSD License (the "License"); # Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details. # see accompanying file Copyright.txt for details.
@ -21,8 +21,6 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information. # See the License for more information.
#============================================================================= #=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# If JEMALLOC_ROOT_DIR was defined in the environment, use it. # If JEMALLOC_ROOT_DIR was defined in the environment, use it.
IF(NOT JEMALLOC_ROOT_DIR AND NOT $ENV{JEMALLOC_ROOT_DIR} STREQUAL "") IF(NOT JEMALLOC_ROOT_DIR AND NOT $ENV{JEMALLOC_ROOT_DIR} STREQUAL "")
@ -37,7 +35,9 @@ SET(_jemalloc_SEARCH_DIRS
/opt/csw # Blastwave /opt/csw # Blastwave
) )
FIND_PATH(JEMALLOC_INCLUDE_DIR jemalloc.h FIND_PATH(JEMALLOC_INCLUDE_DIR
NAMES
jemalloc.h
HINTS HINTS
${_jemalloc_SEARCH_DIRS} ${_jemalloc_SEARCH_DIRS}
PATH_SUFFIXES PATH_SUFFIXES
@ -45,9 +45,12 @@ FIND_PATH(JEMALLOC_INCLUDE_DIR jemalloc.h
) )
FIND_LIBRARY(JEMALLOC_LIBRARY FIND_LIBRARY(JEMALLOC_LIBRARY
NAMES "jemalloc" NAMES
HINTS ${_jemalloc_SEARCH_DIRS} jemalloc
PATH_SUFFIXES lib64 lib HINTS
${_jemalloc_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
) )
# handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE if

@ -19,7 +19,7 @@
# OPENEXR_LIBRARY, where to find the OpenEXR library. # OPENEXR_LIBRARY, where to find the OpenEXR library.
#============================================================================= #=============================================================================
# Copyright 2002-2009 Kitware, Inc. # Copyright 2011 Blender Foundation.
# #
# Distributed under the OSI-approved BSD License (the "License"); # Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details. # see accompanying file Copyright.txt for details.
@ -28,8 +28,6 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information. # See the License for more information.
#============================================================================= #=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# If OPENEXR_ROOT_DIR was defined in the environment, use it. # If OPENEXR_ROOT_DIR was defined in the environment, use it.
IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "") IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "")
@ -52,7 +50,9 @@ SET(_openexr_SEARCH_DIRS
/opt/csw # Blastwave /opt/csw # Blastwave
) )
FIND_PATH(OPENEXR_INCLUDE_DIR ImfXdr.h FIND_PATH(OPENEXR_INCLUDE_DIR
NAMES
ImfXdr.h
HINTS HINTS
${_openexr_SEARCH_DIRS} ${_openexr_SEARCH_DIRS}
PATH_SUFFIXES PATH_SUFFIXES
@ -64,10 +64,13 @@ FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT) STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY
NAMES ${COMPONENT} NAMES
HINTS ${_openexr_SEARCH_DIRS} ${COMPONENT}
PATH_SUFFIXES lib64 lib HINTS
) ${_openexr_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
)
LIST(APPEND _openexr_LIBRARIES "${OPENEXR_${UPPERCOMPONENT}_LIBRARY}") LIST(APPEND _openexr_LIBRARIES "${OPENEXR_${UPPERCOMPONENT}_LIBRARY}")
ENDFOREACH() ENDFOREACH()

@ -12,7 +12,7 @@
# OPENJPEG_LIBRARY, where to find the OpenJPEG library. # OPENJPEG_LIBRARY, where to find the OpenJPEG library.
#============================================================================= #=============================================================================
# Copyright 2002-2009 Kitware, Inc. # Copyright 2011 Blender Foundation.
# #
# Distributed under the OSI-approved BSD License (the "License"); # Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details. # see accompanying file Copyright.txt for details.
@ -21,8 +21,6 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information. # See the License for more information.
#============================================================================= #=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# If OPENJPEG_ROOT_DIR was defined in the environment, use it. # If OPENJPEG_ROOT_DIR was defined in the environment, use it.
IF(NOT OPENJPEG_ROOT_DIR AND NOT $ENV{OPENJPEG_ROOT_DIR} STREQUAL "") IF(NOT OPENJPEG_ROOT_DIR AND NOT $ENV{OPENJPEG_ROOT_DIR} STREQUAL "")
@ -37,7 +35,9 @@ SET(_openjpeg_SEARCH_DIRS
/opt/csw # Blastwave /opt/csw # Blastwave
) )
FIND_PATH(OPENJPEG_INCLUDE_DIR openjpeg.h FIND_PATH(OPENJPEG_INCLUDE_DIR
NAMES
openjpeg.h
HINTS HINTS
${_openjpeg_SEARCH_DIRS} ${_openjpeg_SEARCH_DIRS}
PATH_SUFFIXES PATH_SUFFIXES
@ -45,9 +45,12 @@ FIND_PATH(OPENJPEG_INCLUDE_DIR openjpeg.h
) )
FIND_LIBRARY(OPENJPEG_LIBRARY FIND_LIBRARY(OPENJPEG_LIBRARY
NAMES "openjpeg" NAMES
HINTS ${_openjpeg_SEARCH_DIRS} openjpeg
PATH_SUFFIXES lib64 lib HINTS
${_openjpeg_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
) )
# handle the QUIETLY and REQUIRED arguments and set OPENJPEG_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set OPENJPEG_FOUND to TRUE if

@ -1,5 +1,12 @@
# - Find python libraries # - Find Python libraries
# Find the native Python includes and library
# #
# Note:, This is not _yet_ intended to be a general python module for other
# projects to use since its hard coded to python 3.2 as blender only supports
# a single python version.
# This is for blender/unix python only.
#
# This module defines
# PYTHON_VERSION # PYTHON_VERSION
# PYTHON_INCLUDE_DIRS # PYTHON_INCLUDE_DIRS
# PYTHON_LIBRARIES # PYTHON_LIBRARIES
@ -7,87 +14,99 @@
# PYTHON_LINKFLAGS # PYTHON_LINKFLAGS
# PYTHON_ROOT_DIR, The base directory to search for Python. # PYTHON_ROOT_DIR, The base directory to search for Python.
# This can also be an environment variable. # This can also be an environment variable.
#
# also defined, but not for general use are
# PYTHON_LIBRARY, where to find the python library.
#=============================================================================
# Copyright 2011 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#============================================================================= #=============================================================================
# If PYTHON_ROOT_DIR was defined in the environment, use it. # If PYTHON_ROOT_DIR was defined in the environment, use it.
if(NOT PYTHON_ROOT_DIR AND NOT $ENV{PYTHON_ROOT_DIR} STREQUAL "") IF(NOT PYTHON_ROOT_DIR AND NOT $ENV{PYTHON_ROOT_DIR} STREQUAL "")
set(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR}) SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR})
endif() ENDIF()
set(PYTHON_VERSION 3.2 CACHE STRING "") SET(PYTHON_VERSION 3.2 CACHE STRING "")
mark_as_advanced(PYTHON_VERSION) MARK_AS_ADVANCED(PYTHON_VERSION)
set(PYTHON_LINKFLAGS "-Xlinker -export-dynamic") SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
mark_as_advanced(PYTHON_LINKFLAGS) MARK_AS_ADVANCED(PYTHON_LINKFLAGS)
set(_python_ABI_FLAGS SET(_python_ABI_FLAGS
"m;mu;u; " # release "m;mu;u; " # release
"md;mud;ud" # debug "md;mud;ud" # debug
) )
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION}) STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
set(_python_SEARCH_DIRS SET(_python_SEARCH_DIRS
${PYTHON_ROOT_DIR} ${PYTHON_ROOT_DIR}
"$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}" "$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}"
"/opt/py${_PYTHON_VERSION_NO_DOTS}" "/opt/py${_PYTHON_VERSION_NO_DOTS}"
) )
foreach(_CURRENT_ABI_FLAGS ${_python_ABI_FLAGS}) FOREACH(_CURRENT_ABI_FLAGS ${_python_ABI_FLAGS})
#if(CMAKE_BUILD_TYPE STREQUAL Debug) #IF(CMAKE_BUILD_TYPE STREQUAL Debug)
# set(_CURRENT_ABI_FLAGS "d${_CURRENT_ABI_FLAGS}") # SET(_CURRENT_ABI_FLAGS "d${_CURRENT_ABI_FLAGS}")
#endif() #ENDIF()
string(REPLACE " " "" _CURRENT_ABI_FLAGS ${_CURRENT_ABI_FLAGS}) STRING(REPLACE " " "" _CURRENT_ABI_FLAGS ${_CURRENT_ABI_FLAGS})
find_path(PYTHON_INCLUDE_DIR FIND_PATH(PYTHON_INCLUDE_DIR
NAMES Python.h NAMES Python.h
HINTS ${_python_SEARCH_DIRS} HINTS ${_python_SEARCH_DIRS}
PATH_SUFFIXES include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS} PATH_SUFFIXES include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}
) )
find_library(PYTHON_LIBRARY FIND_LIBRARY(PYTHON_LIBRARY
NAMES "python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}" NAMES "python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}"
HINTS ${_python_SEARCH_DIRS} HINTS ${_python_SEARCH_DIRS}
PATH_SUFFIXES lib64 lib PATH_SUFFIXES lib64 lib
) )
if(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR) IF(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
break() break()
else() ELSE()
# ensure we dont find values from 2 different ABI versions # ensure we dont find values from 2 different ABI versions
unset(PYTHON_INCLUDE_DIR CACHE) UNSET(PYTHON_INCLUDE_DIR CACHE)
unset(PYTHON_LIBRARY CACHE) UNSET(PYTHON_LIBRARY CACHE)
endif() ENDIF()
endforeach() ENDFOREACH()
unset(_CURRENT_ABI_FLAGS) UNSET(_CURRENT_ABI_FLAGS)
unset(_CURRENT_PATH) UNSET(_CURRENT_PATH)
unset(_python_ABI_FLAGS) UNSET(_python_ABI_FLAGS)
unset(_python_SEARCH_DIRS) UNSET(_python_SEARCH_DIRS)
# handle the QUIETLY and REQUIRED arguments and set PYTHONLIBSUNIX_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and SET PYTHONLIBSUNIX_FOUND to TRUE IF
# all listed variables are TRUE # all listed variables are TRUE
include(FindPackageHandleStandardArgs) INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibsUnix DEFAULT_MSG FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibsUnix DEFAULT_MSG
PYTHON_LIBRARY PYTHON_INCLUDE_DIR) PYTHON_LIBRARY PYTHON_INCLUDE_DIR)
if(PYTHONLIBSUNIX_FOUND) IF(PYTHONLIBSUNIX_FOUND)
# Assign cache items # Assign cache items
set(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR}) SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR})
set(PYTHON_LIBRARIES ${PYTHON_LIBRARY}) SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
# we need this for installation # we need this for installation
get_filename_component(PYTHON_LIBPATH ${PYTHON_LIBRARY} PATH) GET_FILENAME_COMPONENT(PYTHON_LIBPATH ${PYTHON_LIBRARY} PATH)
# not used # not used
# set(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "") # SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
mark_as_advanced( MARK_AS_ADVANCED(
PYTHON_INCLUDE_DIR PYTHON_INCLUDE_DIR
PYTHON_LIBRARY PYTHON_LIBRARY
) )
endif() ENDIF()

@ -12,7 +12,7 @@
# SAMPLERATE_LIBRARY, where to find the Samplerate library. # SAMPLERATE_LIBRARY, where to find the Samplerate library.
#============================================================================= #=============================================================================
# Copyright 2002-2009 Kitware, Inc. # Copyright 2011 Blender Foundation.
# #
# Distributed under the OSI-approved BSD License (the "License"); # Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details. # see accompanying file Copyright.txt for details.
@ -21,8 +21,6 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information. # See the License for more information.
#============================================================================= #=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# If SAMPLERATE_ROOT_DIR was defined in the environment, use it. # If SAMPLERATE_ROOT_DIR was defined in the environment, use it.
IF(NOT SAMPLERATE_ROOT_DIR AND NOT $ENV{SAMPLERATE_ROOT_DIR} STREQUAL "") IF(NOT SAMPLERATE_ROOT_DIR AND NOT $ENV{SAMPLERATE_ROOT_DIR} STREQUAL "")
@ -37,7 +35,9 @@ SET(_samplerate_SEARCH_DIRS
/opt/csw # Blastwave /opt/csw # Blastwave
) )
FIND_PATH(SAMPLERATE_INCLUDE_DIR samplerate.h FIND_PATH(SAMPLERATE_INCLUDE_DIR
NAMES
samplerate.h
HINTS HINTS
${_samplerate_SEARCH_DIRS} ${_samplerate_SEARCH_DIRS}
PATH_SUFFIXES PATH_SUFFIXES
@ -45,9 +45,12 @@ FIND_PATH(SAMPLERATE_INCLUDE_DIR samplerate.h
) )
FIND_LIBRARY(SAMPLERATE_LIBRARY FIND_LIBRARY(SAMPLERATE_LIBRARY
NAMES "samplerate" NAMES
HINTS ${_samplerate_SEARCH_DIRS} samplerate
PATH_SUFFIXES lib64 lib HINTS
${_samplerate_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
) )
# handle the QUIETLY and REQUIRED arguments and set SAMPLERATE_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set SAMPLERATE_FOUND to TRUE if

@ -12,7 +12,7 @@
# SNDFILE_LIBRARY, where to find the SndFile library. # SNDFILE_LIBRARY, where to find the SndFile library.
#============================================================================= #=============================================================================
# Copyright 2002-2009 Kitware, Inc. # Copyright 2011 Blender Foundation.
# #
# Distributed under the OSI-approved BSD License (the "License"); # Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details. # see accompanying file Copyright.txt for details.
@ -21,8 +21,6 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information. # See the License for more information.
#============================================================================= #=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# If SNDFILE_ROOT_DIR was defined in the environment, use it. # If SNDFILE_ROOT_DIR was defined in the environment, use it.
IF(NOT SNDFILE_ROOT_DIR AND NOT $ENV{SNDFILE_ROOT_DIR} STREQUAL "") IF(NOT SNDFILE_ROOT_DIR AND NOT $ENV{SNDFILE_ROOT_DIR} STREQUAL "")
@ -45,9 +43,12 @@ FIND_PATH(SNDFILE_INCLUDE_DIR sndfile.h
) )
FIND_LIBRARY(SNDFILE_LIBRARY FIND_LIBRARY(SNDFILE_LIBRARY
NAMES "sndfile" NAMES
HINTS ${_sndfile_SEARCH_DIRS} sndfile
PATH_SUFFIXES lib64 lib HINTS
${_sndfile_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib
) )
# handle the QUIETLY and REQUIRED arguments and set SNDFILE_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set SNDFILE_FOUND to TRUE if

@ -0,0 +1,20 @@
"""
Update Example
++++++++++++++
It can be useful to perform an action when a property is changed and can be
used to update other properties or synchronize with external data.
All properties define update functions except for CollectionProperty.
"""
import bpy
def update_func(self, context):
print("my test function", self)
bpy.types.Scene.testprop = bpy.props.FloatProperty(update=update_func)
bpy.context.scene.testprop = 11.0
# >>> my test function <bpy_struct, Scene("Scene")>