Merge branch 'master' into blender2.8
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 16 Jun 2017 08:26:37 +0000 (10:26 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 16 Jun 2017 08:26:37 +0000 (10:26 +0200)
1  2 
CMakeLists.txt
doc/python_api/sphinx_doc_gen.py

diff --combined CMakeLists.txt
index d5ea9730e43c4d24879330d01cb64e2e8f575a9e,e7917278434e55d8d96b6f703bd9dd0024f47d4c..6cbc7d9f5266c735f31105126e949f6ff774a7c6
@@@ -32,7 -32,7 +32,7 @@@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE
        if(NOT DEFINED WITH_IN_SOURCE_BUILD)
                message(FATAL_ERROR
                        "CMake generation for blender is not allowed within the source directory!"
-                       "\n Remove the CMakeCache.txt file and try again from another folder, e.g.:"
+                       "\n Remove \"${CMAKE_SOURCE_DIR}/CMakeCache.txt\" and try again from another folder, e.g.:"
                        "\n "
                        "\n rm CMakeCache.txt"
                        "\n cd .."
@@@ -242,8 -242,6 +242,8 @@@ endif(
  option(WITH_PLAYER        "Build Player" OFF)
  option(WITH_OPENCOLORIO   "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
  
 +option(WITH_CLAY_ENGINE    "Enable Clay engine" ON)
 +
  # Compositor
  option(WITH_COMPOSITOR         "Enable the tile based nodal compositor" ON)
  
@@@ -464,16 -462,28 +464,16 @@@ endif(
  
  # OpenGL
  
 -option(WITH_GLEW_MX             "Support multiple GLEW contexts (experimental)"                                                                     OFF )
  option(WITH_GLEW_ES             "Switches to experimental copy of GLEW that has support for OpenGL ES. (temporary option for development purposes)" OFF)
  option(WITH_GL_EGL              "Use the EGL OpenGL system library instead of the platform specific OpenGL system library (CGL, glX, or WGL)"       OFF)
 -option(WITH_GL_PROFILE_COMPAT   "Support using the OpenGL 'compatibility' profile. (deprecated)"                                                    ON )
 -option(WITH_GL_PROFILE_CORE     "Support using the OpenGL 3.2+ 'core' profile."                                                                     OFF)
  option(WITH_GL_PROFILE_ES20     "Support using OpenGL ES 2.0. (thru either EGL or the AGL/WGL/XGL 'es20' profile)"                                  OFF)
  
  mark_as_advanced(
 -      WITH_GLEW_MX
        WITH_GLEW_ES
        WITH_GL_EGL
 -      WITH_GL_PROFILE_COMPAT
 -      WITH_GL_PROFILE_CORE
        WITH_GL_PROFILE_ES20
  )
  
 -if(WITH_GL_PROFILE_COMPAT)
 -      set(WITH_GLU ON)
 -else()
 -      set(WITH_GLU OFF)
 -endif()
 -
  if(WIN32)
        option(WITH_GL_ANGLE "Link with the ANGLE library, an OpenGL ES 2.0 implementation based on Direct3D, instead of the system OpenGL library." OFF)
        mark_as_advanced(WITH_GL_ANGLE)
@@@ -494,10 -504,11 +494,10 @@@ endif(
  # We default options to whatever default standard in the current compiler.
  if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "6.0") AND (NOT WITH_CXX11))
        set(_c11_init ON)
 -      set(_cxx11_init ON)
  else()
        set(_c11_init OFF)
 -      set(_cxx11_init OFF)
  endif()
 +set(_cxx11_init ON)
  
  option(WITH_C11 "Build with C11 standard enabled, for development use only!" ${_c11_init})
  mark_as_advanced(WITH_C11)
@@@ -950,11 -961,19 +950,11 @@@ endif(
  find_package(OpenGL)
  blender_include_dirs_sys("${OPENGL_INCLUDE_DIR}")
  
 -if(WITH_GLU)
 -      list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_glu_LIBRARY}")
 -      list(APPEND GL_DEFINITIONS -DWITH_GLU)
 -endif()
 -
  if(WITH_SYSTEM_GLES)
        find_package_wrapper(OpenGLES)
  endif()
  
 -if(WITH_GL_PROFILE_COMPAT OR WITH_GL_PROFILE_CORE)
 -      list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_gl_LIBRARY}")
 -
 -elseif(WITH_GL_PROFILE_ES20)
 +if(WITH_GL_PROFILE_ES20)
        if(WITH_SYSTEM_GLES)
                if(NOT OPENGLES_LIBRARY)
                        message(FATAL_ERROR
  
        endif()
  
 +else()
 +      list(APPEND BLENDER_GL_LIBRARIES "${OPENGL_gl_LIBRARY}")
 +
  endif()
  
  if(WITH_GL_EGL)
  
  endif()
  
 -if(WITH_GL_PROFILE_COMPAT)
 -      list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_COMPAT)
 -endif()
 -
 -if(WITH_GL_PROFILE_CORE)
 -      list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE)
 -endif()
 -
  if(WITH_GL_PROFILE_ES20)
        list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_ES20)
 +else()
 +      list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE)
  endif()
  
  if(WITH_GL_EGL)
@@@ -1104,6 -1126,10 +1104,6 @@@ endif(
  #-----------------------------------------------------------------------------
  # Configure GLEW
  
 -if(WITH_GLEW_MX)
 -      list(APPEND GL_DEFINITIONS -DWITH_GLEW_MX)
 -endif()
 -
  if(WITH_SYSTEM_GLEW)
        find_package(GLEW)
  
                message(FATAL_ERROR "GLEW is required to build Blender. Install it or disable WITH_SYSTEM_GLEW.")
        endif()
  
 -      if(WITH_GLEW_MX)
 -              set(BLENDER_GLEW_LIBRARIES ${GLEW_MX_LIBRARY})
 -      else()
 -              set(BLENDER_GLEW_LIBRARIES ${GLEW_LIBRARY})
 -      endif()
 +      set(BLENDER_GLEW_LIBRARIES ${GLEW_LIBRARY})
  else()
        if(WITH_GLEW_ES)
                set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew-es/include")
                list(APPEND GL_DEFINITIONS -DGLEW_STATIC -DWITH_GLEW_ES)
  
                # These definitions remove APIs from glew.h, making GLEW smaller, and catching unguarded API usage
 -              if(NOT WITH_GL_PROFILE_ES20)
 +              if(WITH_GL_PROFILE_ES20)
 +                      list(APPEND GL_DEFINITIONS -DGLEW_ES_ONLY)
 +              else()
                        # No ES functions are needed
                        list(APPEND GL_DEFINITIONS -DGLEW_NO_ES)
 -              elseif(NOT (WITH_GL_PROFILE_CORE OR WITH_GL_PROFILE_COMPAT))
 -                      # ES is enabled, but the other functions are all disabled
 -                      list(APPEND GL_DEFINITIONS -DGLEW_ES_ONLY)
                endif()
  
                if(WITH_GL_PROFILE_ES20)
  
  endif()
  
 -if(NOT WITH_GLU)
 -      list(APPEND GL_DEFINITIONS -DGLEW_NO_GLU)
 -endif()
 +list(APPEND GL_DEFINITIONS -DGLEW_NO_GLU)
  
  #-----------------------------------------------------------------------------
  # Configure Bullet
@@@ -1707,7 -1740,10 +1707,7 @@@ if(FIRST_RUN
  
        info_cfg_text("OpenGL:")
        info_cfg_option(WITH_GLEW_ES)
 -      info_cfg_option(WITH_GLU)
        info_cfg_option(WITH_GL_EGL)
 -      info_cfg_option(WITH_GL_PROFILE_COMPAT)
 -      info_cfg_option(WITH_GL_PROFILE_CORE)
        info_cfg_option(WITH_GL_PROFILE_ES20)
        if(WIN32)
                info_cfg_option(WITH_GL_ANGLE)
index 629ec6c8e9c3d976c8377b335d04da1856d8655d,c8bf0243d2cc3198d3a61e5f13a29294b6a48253..03b280f43399aac0e2e2322d59966b72a41bbf85
@@@ -341,6 -341,8 +341,8 @@@ EXTRA_SOURCE_FILES = 
      "../examples/bge.texture.py",
      "../examples/bmesh.ops.1.py",
      "../examples/bpy.app.translations.py",
+     "../static/favicon.ico",
+     "../static/blender_logo.svg",
  )
  
  
@@@ -362,8 -364,6 +364,6 @@@ INFO_DOCS = 
       "Blender/Python Quickstart: new to Blender/scripting and want to get your feet wet?"),
      ("info_overview.rst",
       "Blender/Python API Overview: a more complete explanation of Python integration"),
-     ("info_tutorial_addon.rst",
-      "Blender/Python Add-on Tutorial: a step by step guide on how to write an add-on from scratch"),
      ("info_api_reference.rst",
       "Blender/Python API Reference Usage: examples of how to use the API reference docs"),
      ("info_best_practice.rst",
@@@ -1024,7 -1024,6 +1024,7 @@@ context_type_map = 
      "brush": ("Brush", False),
      "camera": ("Camera", False),
      "cloth": ("ClothModifier", False),
 +    "collection": ("LayerCollection", False),
      "collision": ("CollisionModifier", False),
      "curve": ("Curve", False),
      "dynamic_paint": ("DynamicPaintModifier", False),
      "particle_system": ("ParticleSystem", False),
      "particle_system_editable": ("ParticleSystem", False),
      "pose_bone": ("PoseBone", False),
 +    "render_layer": ("SceneLayer", False),
      "scene": ("Scene", False),
      "sculpt_object": ("Object", False),
      "selectable_bases": ("ObjectBase", True),
@@@ -1648,14 -1646,14 +1648,14 @@@ def write_sphinx_conf_py(basepath)
  
      if ARGS.sphinx_theme == "blender-org":
          fw("html_theme_path = ['../']\n")
-         # copied with the theme, exclude else we get an error [T28873]
-         fw("html_favicon = 'favicon.ico'\n")    # in <theme>/static/
  
      # not helpful since the source is generated, adds to upload size.
      fw("html_copy_source = False\n")
      fw("html_show_sphinx = False\n")
      fw("html_split_index = True\n")
-     fw("\n")
+     fw("html_extra_path = ['__/static/favicon.ico', '__/static/blender_logo.svg']\n")
+     fw("html_favicon = '__/static/favicon.ico'\n")
+     fw("html_logo = '__/static/blender_logo.svg'\n\n")
  
      # needed for latex, pdf gen
      fw("latex_elements = {\n")
@@@ -1701,6 -1699,9 +1701,9 @@@ def write_rst_contents(basepath)
          for info, info_desc in INFO_DOCS:
              fw("   %s <%s>\n\n" % (info_desc, info))
          fw("\n")
+         fw("- :ref:`Blender/Python Add-on Tutorial: a step by step guide on")
+         fw(" how to write an add-on from scratch <blender_manual:advanced_scripting_addon_tutorial>`\n")
+         fw("\n")
  
      fw(title_string("Application Modules", "=", double=True))
      fw(".. toctree::\n")