Commit: 137bcc528aeb93ce00294ccf377995392979c99e Author: Rohan Rathi Date: Mon Jun 19 11:11:04 2017 +0530 Branches: soc-2017-normal-tools https://developer.blender.org/rB137bcc528aeb93ce00294ccf377995392979c99e
Merge branch 'master' into soc-2017-normal-tools =================================================================== M CMakeLists.txt M doc/python_api/examples/bpy.app.translations.py M doc/python_api/rst/bge.app.rst M doc/python_api/rst/gpu.rst M doc/python_api/rst/include__bmesh.rst D doc/python_api/rst/info_tutorial_addon.rst M doc/python_api/rst_from_bmesh_opdefines.py M doc/python_api/sphinx_doc_gen.py A doc/python_api/static/blender_logo.svg R100 doc/python_api/blender-org/static/favicon.ico doc/python_api/static/favicon.ico M intern/cycles/kernel/kernel_passes.h M intern/cycles/kernel/kernel_subsurface.h M intern/cycles/kernel/kernel_types.h M intern/cycles/kernel/kernel_volume.h M intern/cycles/kernel/split/kernel_subsurface_scatter.h M intern/cycles/render/nodes.h M intern/cycles/util/util_progress.h M intern/ghost/GHOST_C-api.h M intern/ghost/intern/GHOST_WindowCocoa.h M intern/guardedalloc/intern/mallocn_lockfree_impl.c M intern/memutil/MEM_CacheLimiterC-Api.h M release/datafiles/colormanagement/config.ocio M release/scripts/freestyle/modules/freestyle/__init__.py M source/blender/alembic/intern/abc_exporter.cc M source/blender/alembic/intern/abc_util.h M source/blender/blenkernel/BKE_action.h M source/blender/blenkernel/BKE_armature.h M source/blender/blenkernel/BKE_boids.h M source/blender/blenkernel/BKE_brush.h M source/blender/blenkernel/BKE_cachefile.h M source/blender/blenkernel/BKE_camera.h M source/blender/blenkernel/BKE_colortools.h M source/blender/blenkernel/BKE_curve.h M source/blender/blenkernel/BKE_deform.h M source/blender/blenkernel/BKE_fcurve.h M source/blender/blenkernel/BKE_gpencil.h M source/blender/blenkernel/BKE_group.h M source/blender/blenkernel/BKE_icons.h M source/blender/blenkernel/BKE_image.h M source/blender/blenkernel/BKE_key.h M source/blender/blenkernel/BKE_lamp.h M source/blender/blenkernel/BKE_lattice.h M source/blender/blenkernel/BKE_library.h M source/blender/blenkernel/BKE_linestyle.h M source/blender/blenkernel/BKE_mask.h M source/blender/blenkernel/BKE_material.h M source/blender/blenkernel/BKE_mball.h M source/blender/blenkernel/BKE_mesh.h M source/blender/blenkernel/BKE_movieclip.h M source/blender/blenkernel/BKE_node.h M source/blender/blenkernel/BKE_object.h M source/blender/blenkernel/BKE_paint.h M source/blender/blenkernel/BKE_particle.h M source/blender/blenkernel/BKE_property.h M source/blender/blenkernel/BKE_rigidbody.h M source/blender/blenkernel/BKE_sca.h M source/blender/blenkernel/BKE_speaker.h M source/blender/blenkernel/BKE_text.h M source/blender/blenkernel/BKE_texture.h M source/blender/blenkernel/BKE_tracking.h M source/blender/blenkernel/BKE_world.h M source/blender/blenkernel/intern/action.c M source/blender/blenkernel/intern/armature.c M source/blender/blenkernel/intern/blendfile.c M source/blender/blenkernel/intern/boids.c M source/blender/blenkernel/intern/brush.c M source/blender/blenkernel/intern/bvhutils.c M source/blender/blenkernel/intern/cachefile.c M source/blender/blenkernel/intern/camera.c M source/blender/blenkernel/intern/colortools.c M source/blender/blenkernel/intern/curve.c M source/blender/blenkernel/intern/deform.c M source/blender/blenkernel/intern/fcurve.c M source/blender/blenkernel/intern/fmodifier.c M source/blender/blenkernel/intern/gpencil.c M source/blender/blenkernel/intern/group.c M source/blender/blenkernel/intern/icons.c M source/blender/blenkernel/intern/image.c M source/blender/blenkernel/intern/key.c M source/blender/blenkernel/intern/lamp.c M source/blender/blenkernel/intern/lattice.c M source/blender/blenkernel/intern/library.c M source/blender/blenkernel/intern/library_remap.c M source/blender/blenkernel/intern/linestyle.c M source/blender/blenkernel/intern/mask.c M source/blender/blenkernel/intern/material.c M source/blender/blenkernel/intern/mball.c M source/blender/blenkernel/intern/mesh.c M source/blender/blenkernel/intern/mesh_evaluate.c M source/blender/blenkernel/intern/movieclip.c M source/blender/blenkernel/intern/node.c M source/blender/blenkernel/intern/object.c M source/blender/blenkernel/intern/paint.c M source/blender/blenkernel/intern/particle.c M source/blender/blenkernel/intern/particle_child.c M source/blender/blenkernel/intern/property.c M source/blender/blenkernel/intern/rigidbody.c M source/blender/blenkernel/intern/sca.c M source/blender/blenkernel/intern/sequencer.c M source/blender/blenkernel/intern/speaker.c M source/blender/blenkernel/intern/text.c M source/blender/blenkernel/intern/texture.c M source/blender/blenkernel/intern/tracking.c M source/blender/blenkernel/intern/world.c M source/blender/blenlib/BLI_math_vector.h M source/blender/blenlib/intern/BLI_ghash.c M source/blender/blenlib/intern/math_geom.c M source/blender/blenlib/intern/math_matrix.c M source/blender/blenlib/intern/math_vector.c M source/blender/blenlib/intern/string_utf8.c M source/blender/blenloader/intern/versioning_defaults.c M source/blender/bmesh/operators/bmo_connect_pair.c M source/blender/collada/DocumentImporter.cpp M source/blender/collada/MeshImporter.cpp M source/blender/depsgraph/DEG_depsgraph_build.h M source/blender/depsgraph/intern/builder/deg_builder_nodes.cc M source/blender/depsgraph/intern/builder/deg_builder_nodes.h M source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc M source/blender/depsgraph/intern/builder/deg_builder_relations.cc M source/blender/depsgraph/intern/builder/deg_builder_relations.h M source/blender/depsgraph/intern/builder/deg_builder_relations_keys.cc M source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc M source/blender/depsgraph/intern/depsgraph.cc M source/blender/depsgraph/intern/depsgraph.h M source/blender/depsgraph/intern/depsgraph_build.cc M source/blender/depsgraph/intern/depsgraph_types.h M source/blender/depsgraph/intern/eval/deg_eval_flush.cc M source/blender/depsgraph/intern/nodes/deg_node.cc M source/blender/depsgraph/intern/nodes/deg_node.h M source/blender/depsgraph/intern/nodes/deg_node_component.cc M source/blender/depsgraph/intern/nodes/deg_node_component.h M source/blender/editors/armature/armature_naming.c M source/blender/editors/gpencil/gpencil_edit.c M source/blender/editors/gpencil/gpencil_intern.h M source/blender/editors/gpencil/gpencil_utils.c M source/blender/editors/mesh/editmesh_add.c M source/blender/editors/mesh/editmesh_knife.c M source/blender/editors/object/object_add.c M source/blender/editors/object/object_group.c M source/blender/editors/screen/screen_edit.c M source/blender/editors/space_image/image_ops.c M source/blender/editors/space_node/node_edit.c M source/blender/editors/space_node/space_node.c M source/blender/editors/space_outliner/outliner_tools.c M source/blender/editors/space_text/text_format_pov.c M source/blender/editors/space_text/text_format_pov_ini.c M source/blender/editors/space_view3d/view3d_view.c M source/blender/editors/transform/transform.c M source/blender/editors/transform/transform_conversions.c M source/blender/editors/transform/transform_manipulator.c M source/blender/editors/transform/transform_snap_object.c M source/blender/freestyle/intern/geometry/matrix_util.h M source/blender/gpu/intern/gpu_select.c M source/blender/gpu/intern/gpu_select_sample_query.c M source/blender/imbuf/IMB_imbuf.h M source/blender/imbuf/IMB_imbuf_types.h M source/blender/imbuf/intern/allocimbuf.c M source/blender/makesrna/intern/rna_sequencer.c M source/blender/modifiers/intern/MOD_array.c M source/blender/modifiers/intern/MOD_curve.c M source/blender/python/intern/bpy_app.c M source/blender/python/intern/bpy_props.c M source/blender/python/intern/bpy_rna.c M source/blender/python/mathutils/mathutils.c M source/blender/render/intern/source/zbuf.c M source/blender/windowmanager/intern/wm.c M source/gameengine/GamePlayer/common/GPC_MouseDevice.h M tests/gtests/blenlib/BLI_path_util_test.cc =================================================================== diff --git a/CMakeLists.txt b/CMakeLists.txt index 66ee215864d..e7917278434 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) 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 .." diff --git a/doc/python_api/examples/bpy.app.translations.py b/doc/python_api/examples/bpy.app.translations.py index e41623d2885..4256147ef31 100644 --- a/doc/python_api/examples/bpy.app.translations.py +++ b/doc/python_api/examples/bpy.app.translations.py @@ -32,3 +32,62 @@ Module References ----------------- """ + +import bpy + +# This block can be automatically generated by UI translations addon, which also handles conversion with PO format. +# See also https://wiki.blender.org/index.php/Dev:Doc/Process/Translate_Blender#Translating_non-official_addons +# It can (should) also be put in a different, specific py file. + +# ##### BEGIN AUTOGENERATED I18N SECTION ##### +# NOTE: You can safely move around this auto-generated block (with the begin/end markers!), +# and edit the translations by hand. +# Just carefully respect the format of the tuple! + +# Tuple of tuples ((msgctxt, msgid), (sources, gen_comments), (lang, translation, (is_fuzzy, comments)), ...) +translations_tuple = ( + (("*", ""), + ((), ()), + ("fr_FR", "Project-Id-Version: Copy Settings 0.1.5 (r0)\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2013-04-18 15:27:45.563524\nPO-Revision-Date: 2013-04-18 15:38+0100\nLast-Translator: Bastien Montagne <montagn...@wanadoo.fr>\nLanguage-Team: LANGUAGE <l...@li.org>\nLanguage: __POT__\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\n", + (False, + ("Blender's translation file (po format).", + "Copyright (C) 2013 The Blender Foundation.", + "This file is distributed under the same license as the Blender package.", + "FIRST AUTHOR <EMAIL@ADDRESS>, YEAR."))), + ), + (("Operator", "Render: Copy Settings"), + (("bpy.types.SCENE_OT_render_copy_settings",), + ()), + ("fr_FR", "Rendu : copier réglages", + (False, ())), + ), + (("*", "Copy render settings from current scene to others"), + (("bpy.types.SCENE_OT_render_copy_settings",), + ()), + ("fr_FR", "Copier les réglages de rendu depuis la scène courante vers d’autres", + (False, ())), + ), + # ... etc, all messages from your addon. +) + +translations_dict = {} +for msg in translations_tuple: + key = msg[0] + for lang, trans, (is_fuzzy, comments) in msg[2:]: + if trans and not is_fuzzy: + translations_dict.setdefault(lang, {})[key] = trans + +# ##### END AUTOGENERATED I18N SECTION ##### + +# Define remaining addon (operators, UI...) here. + +def register(): + # Usual operator/UI/etc. registration... + + bpy.app.translations.register(__name__, translations_dict) + + +def unregister(): + bpy.app.translations.unregister(__name__) + + # Usual operator/UI/etc. unregistration... diff --git a/doc/python_api/rst/bge.app.rst b/doc/python_api/rst/bge.app.rst index 34b9263db0c..e8b91ffbcaf 100644 --- a/doc/python_api/rst/bge.app.rst +++ b/doc/python_api/rst/bge.app.rst @@ -47,4 +47,3 @@ Module to access application values that remain unchanged during runtime. True if the BGE has been built with physics support. :type: bool - diff --git a/doc/python_api/rst/gpu.rst b/doc/python_api/rst/gpu.rst index 6c38122a573..cf639357a31 100644 --- a/doc/python_api/rst/gpu.rst +++ b/doc/python_api/rst/gpu.rst @@ -6,6 +6,13 @@ GPU functions (gpu) This module provides access to materials GLSL shaders. +Submodules: + +.. toctree:: + :maxdepth: 1 + + gpu.offscreen.rst + Intro ===== @@ -24,7 +31,6 @@ and in the game engine. Constants ========= - GLSL Data Type -------------- diff --git a/doc/python_api/rst/include__bmesh.rst b/doc/python_api/rst/include__bmesh.rst index 83e3e73cea4..bed374bf7b6 100644 --- a/doc/python_api/rst/include__bmesh.rst +++ b/doc/python_api/rst/include__bmesh.rst @@ -7,14 +7,17 @@ Submodules: -* :mod:`bmesh.ops` -* :mod:`bmesh.types` -* :mod:`bmesh.utils` -* :mod:`bmesh.geometry` +.. toctree:: + :maxdepth: 1 + bmesh.ops.rst + bmesh.types.rst + bmesh.utils.rst + bmesh.geometry.rst -Intro ------ + +Introduction +------------ This API gives access the blenders internal mesh editing api, featuring geometry connectivity data and access to editing operations such as split, separate, collapse and dissolve. diff --git a/doc/python_api/rst/info_tutorial_addon.rst b/doc/python_api/rst/info_tutorial_addon.rst deleted file mode 100644 index 92fbf9b8787..00000000000 --- a/doc/python_api/rst/info_tutorial_addon.rst +++ /dev/null @@ -1,635 +0,0 @@ - -Add-on Tutorial -############### - -************ -Introduction -************ - - -Intended Audience -================= - -This tutorial is designed to help technical artists or developers learn to extend Blender. -An understanding of the basics of Python is expected for those working through this tutorial. - - -Prerequisites -------------- - -Before going through the tutorial you should... - -- Familiarity with the basics of working in Blender. -- Know how to run a script in Blender's text editor (as documented in the quick-start) -- Have an understanding of Python primitive types (int, boolean, string, list, tuple, dictionary, and set). -- Be familiar with the concept of Python modules. -- Basic understanding of classes (object orientation) in Python. - - -Suggested reading before starting this tutorial. - -- `Dive Into Python <http://getpython3.com/diveintopython3/index.html>`_ sections (1, 2, 3, 4, and 7). -- :ref:`Blender API Quickstart <info_quickstart>` - to help become familiar with Blender/Python basics. - - -To best troubleshoot any error message Python prints while writing scripts you run blender with from a terminal, -see :ref:`Use The Terminal <use_the_terminal>`. - - -Documentation Links -=================== - -While going through the tutorial you may want to look into our reference documentation. - -- :ref:`Blender API Overview <info_overview>`. - - *This document is rather detailed but helpful if you want to know more on a topic.* -- :mod:`bpy.context` api reference. - - *Handy to have a list of available items your script may operate on.* -- :class:`bpy.types.Operator`. - - *The following add-ons define operators, these docs give details and more examples of operators.* - - -******* -Add-ons -******* - -What is an Add-on? -================== - -An add-on is simply a Python module with some additional requirements so Blender can display it in a list with useful -information. - -To give an example, here is the simplest possible add-on. - -.. code-block:: python - - bl_info = {"name": "My Test Add-on", "category": "Object"} - def register(): - print("Hello World") - def unregister(): - print("Goodbye World") - - -- ``bl_info`` is a dictionary containing add-on metadata such as the title, - version and author to be displayed in the user preferences add-on list. -- ``register`` is a function which only runs when enabling the add-on, - this means the module can be loaded without activating the add-on. -- ``unregister`` is a function to unload anything setup by ``register``, this is called when the add-on is disabled. - - -Notice this add-on does not do anything related to Blender, (the :mod:`bpy` module is not imported for example). - -This is a contrived example of an add-on that serves to illustrate the point -that the base requirements of an add-on are simple. - -An add-on will typically register operators, panels, menu items etc, but its worth noting that _any_ script can do this, -when executed from the text editor or even the interactive console - there is nothing inherently different about an -add-on that allows it to integrate with Blender, such functionality is just provided by the :mod:`bpy` module for any -script to access. - -So an add-on is just a way to encapsulate a Python module in a way a user can easily utilize. - -.. note:: - - Running this script within the text editor won't print anything, - to see the output it must be installed through the user preferences. - Messages will be printed when enabling and disabling. - - -Your First Add-on -================= - -The simplest possible add-on above is useful as an example but not much else. -This next add-on is simple but shows how to integrate a script into Blender using an ``Operator`` -which is the typical way to define a tool accessed from menus, buttons and keyboard shortcuts. - -For the first example we will make a script that simply moves all objects in a scene. - - -Write The Script ----------------- - -Add the following script to the text editor in Blender. - -.. code-block:: python - - import bpy - - scene = bpy.context.scene - for obj in scene.objects: - obj.location.x += 1.0 - - -Click the :ref:`Run Script button <blender_manual:editors-text-run-script>`, -all objects in the active scene are moved by 1.0 Blender unit. - - -Write the Add-on (Simple) -------------------------- - -This add-on takes the body of the script above, and adds them to an operator's ``execute()`` function. - - -.. code-block:: python - - bl_info = { - "name": "Move X Axis", - "category": "Object", - } - - import bpy - - - class ObjectMoveX(bpy.types.Operator): - """My Object Moving Script""" # blender will use this as a tooltip for menu items and buttons. - bl_idname = "object.move_x" # unique identifier for buttons and menu items to reference. - bl_label = "Move X by One" # display name in the interface. - bl_options = {'REGISTER', 'UNDO'} # enable undo for the operator. - - def execute(self, context): # execute() is called by blend @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs