-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from JacquesLucke/new-docs-for-refactor
New docs for refactor
- Loading branch information
Showing
86 changed files
with
470 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
Animation-Nodes-Documentation | ||
============================= | ||
Animation Nodes Manual | ||
====================== | ||
|
||
http://animation-nodes-documentation.readthedocs.org/en/latest/ | ||
http://animation-nodes-manual.readthedocs.org/en/latest/ | ||
|
||
This is the Official **documentation** repository for the Animation Nodes Project. | ||
This is the Official **Maunal** repository for the Animation Nodes Project. | ||
|
||
If you want to contribute: | ||
|
||
1. Fork https://github.com/JacquesLucke/Animation-Nodes-Documentation | ||
1. Fork https://github.com/JacquesLucke/animation_nodes_manual | ||
2. Add some useful description of nodes, images, examples, correct typos, ... | ||
3. Create a pull request to integrate your modifications into the official repository | ||
4. Wait for your modifications to be accepted | ||
5. Congratulations, you have added some very useful information for future users! | ||
5. Congratulations, you have added some very useful information for future users! | ||
|
||
|
||
**You don't know what Animation-Nodes is?** | ||
**You don't know what Animation Nodes is?** | ||
|
||
Check it out! It's an awesome Blender add-on to easily animate about everything with a node based setup! | ||
|
||
You can find the official **Animation-Nodes** repository at | ||
https://github.com/JacquesLucke/animation-nodes | ||
https://github.com/JacquesLucke/animation_nodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
******************* | ||
Creating a new Node | ||
******************* | ||
|
||
A node is a single python file. All registration is done automatically. | ||
|
||
At first you have to decide in which category your node idea fits. | ||
|
||
a) Choose one of the existing node categories (folders inside the ``nodes\\`` directory) or | ||
b) Create a new category. To do that make a new folder and put an empty file called ``__init__.py`` inside. | ||
|
||
Then create a new python file inside the category you choosed and copy the template in: | ||
|
||
.. code-block:: python | ||
:linenos: | ||
import bpy | ||
from ... base_types.node import AnimationNode | ||
class TemplateNode(bpy.types.Node, AnimationNode): | ||
bl_idname = "an_TemplateNode" | ||
bl_label = "Template Node" | ||
def create(self): | ||
pass | ||
def execute(self): | ||
return | ||
Replace *Template* with the name of your node. | ||
|
||
.. code-block:: python | ||
:linenos: | ||
class RoundNumberNode(bpy.types.Node, AnimationNode): | ||
bl_idname = "an_RoundNumberNode" | ||
bl_label = "Round Number" | ||
Create the input and output sockets in the ``create`` function: | ||
|
||
.. code-block:: python | ||
:linenos: | ||
def create(self): | ||
self.inputs.new("an_FloatSocket", "Number", "number") | ||
self.inputs.new("an_IntegerSocket", "Decimals", "decimals") | ||
self.outputs.new("an_FloatSocket", "Rounded Value", "value") | ||
The parameters are: | ||
|
||
1. ``bl_idname`` of the socket type. You find all existing types here: :ref:`socket-data-types` | ||
2. Name of the socket that will be visible in the UI. | ||
3. Variable name that will be used in the ``execute`` function | ||
|
||
Fill in the execution code: | ||
|
||
.. code-block:: python | ||
:linenos: | ||
def execute(self, number, decimals): | ||
value = round(number, decimals) | ||
return value | ||
Save, start Blender test if your node works. | ||
It isn't in the menu yet but you can find the node by searching for the ``bl_label`` property. | ||
|
||
|
||
This is the final node file: | ||
|
||
.. code-block:: python | ||
:linenos: | ||
import bpy | ||
from ... base_types.node import AnimationNode | ||
class RoundNumberNode(bpy.types.Node, AnimationNode): | ||
bl_idname = "an_RoundNumberNode" | ||
bl_label = "Round Number" | ||
def create(self): | ||
self.inputs.new("an_FloatSocket", "Number", "number") | ||
self.inputs.new("an_IntegerSocket", "Decimals", "decimals") | ||
self.outputs.new("an_FloatSocket", "Rounded Value", "value") | ||
def execute(self, number, decimals): | ||
value = round(number, decimals) | ||
return value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Getting Started | ||
=============== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
setup_environment | ||
first_node |
Oops, something went wrong.