[Bf-docboard-svn] bf-manual: [8135] branches/blender-2.93-release/blender_docs/manual/advanced/scripting/addon_tutorial.rst: Backport addon tutorial fixes
Aaron Carlisle
noreply at blender.org
Fri Jun 11 23:40:08 CEST 2021
Revision: 8135
https://developer.blender.org/rBM8135
Author: Blendify
Date: 2021-06-11 23:40:08 +0200 (Fri, 11 Jun 2021)
Log Message:
-----------
Backport addon tutorial fixes
Fixes T89047
Modified Paths:
--------------
branches/blender-2.93-release/blender_docs/manual/advanced/scripting/addon_tutorial.rst
Modified: branches/blender-2.93-release/blender_docs/manual/advanced/scripting/addon_tutorial.rst
===================================================================
--- branches/blender-2.93-release/blender_docs/manual/advanced/scripting/addon_tutorial.rst 2021-06-11 21:32:09 UTC (rev 8134)
+++ branches/blender-2.93-release/blender_docs/manual/advanced/scripting/addon_tutorial.rst 2021-06-11 21:40:08 UTC (rev 8135)
@@ -33,10 +33,14 @@
to help become familiar with Blender/Python basics.
To best troubleshoot any error message Python prints while writing scripts, you run Blender from a terminal.
-See `Use The Terminal
-<https://docs.blender.org/api/current/info_tips_and_tricks.html#use-the-terminal>`__.
+See `Use The Terminal <https://docs.blender.org/api/current/info_tips_and_tricks.html#use-the-terminal>`__.
+.. tip::
+ You can enable :ref:`Developer Extras <prefs-interface-dev-extras>`
+ in the preferences to enable features that make developing add-ons easier.
+
+
Documentation Links
===================
@@ -125,6 +129,7 @@
Click the :ref:`Run Script button <editors-text-run-script>`,
all objects in the active scene are moved by 1.0 unit.
+
.. _advanced-scripting-write-the-add-on-simple:
Write the Add-on (Simple)
@@ -156,10 +161,13 @@
return {'FINISHED'} # Lets Blender know the operator finished successfully.
+ def menu_func(self, context):
+ self.layout.operator(ObjectMoveX.bl_idname)
+
def register():
bpy.utils.register_class(ObjectMoveX)
+ bpy.types.VIEW3D_MT_object.append(menu_func) # Adds the new operator to an existing menu.
-
def unregister():
bpy.utils.unregister_class(ObjectMoveX)
@@ -302,7 +310,7 @@
If you are interested in this area, read into :class:`blender_api:mathutils.Vector`
-- there are many handy utility functions such as getting the angle between vectors,
cross product, dot products as well as more advanced functions in :mod:`blender_api:mathutils.geometry`
-such as Bézier spline interpolation and ray-triangle intersection.
+such as Bézier spline interpolation and ray-triangle intersection.
For now we will focus on making this script an add-on, but it's good to know that this
3D math module is available and can help you with more advanced functionality later on.
More information about the Bf-docboard-svn
mailing list