Коммит 1e842ae2 создал по автору rastart's avatar rastart
Просмотр файлов

Merge remote-tracking branch 'upstream/master'

владельцы a9a2f6ca 280b94b6
...@@ -104,7 +104,7 @@ class NodesUpdater: ...@@ -104,7 +104,7 @@ class NodesUpdater:
@classmethod @classmethod
def add_task(cls, event: Union[TreeEvent, GroupEvent]): def add_task(cls, event: Union[TreeEvent, GroupEvent]):
"""It can handle ony one tree at a time""" """It can handle only one tree at a time"""
if cls.is_running(): if cls.is_running():
raise RuntimeError(f"Can't update tree: {event.tree.name}, already updating tree: {cls._event.tree.name}") raise RuntimeError(f"Can't update tree: {event.tree.name}, already updating tree: {cls._event.tree.name}")
cls._event = event cls._event = event
...@@ -351,7 +351,8 @@ class ContextTrees: ...@@ -351,7 +351,8 @@ class ContextTrees:
Should be called upon loading new file, other wise it can lead to errors and even crash Should be called upon loading new file, other wise it can lead to errors and even crash
Also according the fact that trees have links to real blender nodes Also according the fact that trees have links to real blender nodes
it is also important to call this method upon undo method otherwise errors and crashes it is also important to call this method upon undo method otherwise errors and crashes
Also single tre can be added, in this case only it will be deleted (it's going to be used in force update) Also single tree can be added, in this case only it will be deleted
(it's going to be used in force update)
""" """
if bl_tree and bl_tree.tree_id in cls._trees: if bl_tree and bl_tree.tree_id in cls._trees:
del cls._trees[bl_tree.tree_id] del cls._trees[bl_tree.tree_id]
...@@ -394,7 +395,7 @@ class ContextTrees: ...@@ -394,7 +395,7 @@ class ContextTrees:
has_old_from_socket_links = False has_old_from_socket_links = False
# this is only because some nodes calculated data only if certain output socket is connected # this is only because some nodes calculated data only if certain output socket is connected
# ideally we would not like ot make previous node outdated, but it requires changes in many nodes # ideally we would not like to make previous node outdated, but it requires changes in many nodes
if not has_old_from_socket_links: if not has_old_from_socket_links:
link.from_node.is_input_changed = True link.from_node.is_input_changed = True
else: else:
......
...@@ -80,15 +80,15 @@ def make_dep_dict(node_tree, down=False): ...@@ -80,15 +80,15 @@ def make_dep_dict(node_tree, down=False):
if node.bl_idname == 'WifiInNode'} if node.bl_idname == 'WifiInNode'}
for i,link in enumerate(list(ng.links)): for i,link in enumerate(list(ng.links)):
# this proctects against a rare occurance where # this protects against a rare occurrence where
# a link is considered valid without a to_socket # a link is considered valid without a to_socket
# or a from_socket. proctects against a blender crash # or a from_socket. protects against a blender crash
# see https://github.com/nortikin/sverchok/issues/493 # see https://github.com/nortikin/sverchok/issues/493
if not (link.to_socket and link.from_socket): if not (link.to_socket and link.from_socket):
ng.links.remove(link) ng.links.remove(link)
raise ValueError("Invalid link found!, please report this file") raise ValueError("Invalid link found!, please report this file")
# it seems to work even with invalid links, maybe beacuse sverchok update is indepentent from blender update # it seems to work even with invalid links, maybe because sverchok update is independent from blender update
# if not link.is_valid: # if not link.is_valid:
# return collections.defaultdict(set) # this happens more often than one might think # return collections.defaultdict(set) # this happens more often than one might think
if link.is_hidden: if link.is_hidden:
......
...@@ -22,7 +22,7 @@ And activate Sverchok with flag: ...@@ -22,7 +22,7 @@ And activate Sverchok with flag:
.. image:: https://user-images.githubusercontent.com/28003269/125616257-1c5af6b8-9bae-486b-8bed-cff1210987d9.png .. image:: https://user-images.githubusercontent.com/28003269/125616257-1c5af6b8-9bae-486b-8bed-cff1210987d9.png
If the add-on was enabled successfully open Sverchok editor and crate new node tree. Now you can add new nodes. If the add-on was enabled successfully open Sverchok editor and create new node tree. Now you can add new nodes.
If the add-on was not enabled open system console ``Window -> Toggle system console`` and create If the add-on was not enabled open system console ``Window -> Toggle system console`` and create
`new issue <https://github.com/nortikin/sverchok/issues/new>`_ with the error message. `new issue <https://github.com/nortikin/sverchok/issues/new>`_ with the error message.
......
...@@ -39,7 +39,7 @@ This node has the following parameters: ...@@ -39,7 +39,7 @@ This node has the following parameters:
package is installed. package is installed.
* **Sverchok**. Use built-in Sverchok implementation. * **Sverchok**. Use built-in Sverchok implementation.
In general (with large nuber of control points), built-in implementation In general (with large number of control points), built-in implementation
should be faster; but Geomdl implementation is better tested. should be faster; but Geomdl implementation is better tested.
The default option is **Geomdl**, when it is available; otherwise, built-in The default option is **Geomdl**, when it is available; otherwise, built-in
implementation is used. implementation is used.
......
...@@ -22,7 +22,7 @@ This node has the following parameter: ...@@ -22,7 +22,7 @@ This node has the following parameter:
* **Operation**. This defines the mathematical operation to perform. The available operations are: * **Operation**. This defines the mathematical operation to perform. The available operations are:
* **Add**. Add two scalar fields. * **Add**. Add two scalar fields.
* **Sub**. Substract one scalar field from another. * **Sub**. Subtract one scalar field from another.
* **Multiply**. Multiply two scalar fields. * **Multiply**. Multiply two scalar fields.
* **Minimum**. Create a scalar field, the value of which is calculated as * **Minimum**. Create a scalar field, the value of which is calculated as
minimal of values of two scalar fields at the same point. minimal of values of two scalar fields at the same point.
......
...@@ -4,7 +4,7 @@ List Zip ...@@ -4,7 +4,7 @@ List Zip
Functionality Functionality
------------- -------------
Making pares of data to mix togather as zip function. Making pairs of data to mix togather as zip function.
x = [[[1,2],[3,4]]] x = [[[1,2],[3,4]]]
y = [[[5,6],[7,8]]] y = [[[5,6],[7,8]]]
......
...@@ -18,7 +18,7 @@ Inputs ...@@ -18,7 +18,7 @@ Inputs
This node has the following inputs, all of them can accept one or many different values: This node has the following inputs, all of them can accept one or many different values:
- **Distance** - distance to vertex. - **Distance** - distance to vertex.
- **Nº Vertices** - Number of vectices per vertex - **Nº Vertices** - Number of vertices per vertex
- **Verts_in** - origin vertices. - **Verts_in** - origin vertices.
- **Edgs_in** - edges (pairs of integers). - **Edgs_in** - edges (pairs of integers).
...@@ -37,11 +37,11 @@ Parameters ...@@ -37,11 +37,11 @@ Parameters
+------------------+---------------+-------------+-------------------------------------------------------------+ +------------------+---------------+-------------+-------------------------------------------------------------+
|**Distance** | Float | 1.0 | Distance to vertex. | |**Distance** | Float | 1.0 | Distance to vertex. |
+------------------+---------------+-------------+-------------------------------------------------------------+ +------------------+---------------+-------------+-------------------------------------------------------------+
|**Nº Vertices** | Float | 1.0 | Number of vectices per vertex. | |**Nº Vertices** | Float | 1.0 | Number of vertices per vertex. |
+------------------+---------------+-------------+-------------------------------------------------------------+ +------------------+---------------+-------------+-------------------------------------------------------------+
| **Verts_in** | Vector |(0.0,0.0,0.0)| Origin vectors. | | **Verts_in** | Vector |(0.0,0.0,0.0)| Origin vectors. |
+------------------+---------------+-------------+-------------------------------------------------------------+ +------------------+---------------+-------------+-------------------------------------------------------------+
| **Edges_in** | Int tuples | [] | Connexion between vectices | | **Edges_in** | Int tuples | [] | Connection between vertices |
+------------------+---------------+-------------+-------------------------------------------------------------+ +------------------+---------------+-------------+-------------------------------------------------------------+
|In the N-Panel | |In the N-Panel |
+------------------+---------------+-------------+-------------------------------------------------------------+ +------------------+---------------+-------------+-------------------------------------------------------------+
......
...@@ -27,7 +27,7 @@ All Vector parameters (except axis) default to (0,0,0) if no input is given. ...@@ -27,7 +27,7 @@ All Vector parameters (except axis) default to (0,0,0) if no input is given.
+-------------+---------------+-----------------------------------------------------------------+ +-------------+---------------+-----------------------------------------------------------------+
| **Degrees** | Scalar, Float | angle of the total rotation. Default 360.0 | | **Degrees** | Scalar, Float | angle of the total rotation. Default 360.0 |
+-------------+---------------+-----------------------------------------------------------------+ +-------------+---------------+-----------------------------------------------------------------+
| **Steps** | Scalar, Int | numer of rotation steps. Default 20 | | **Steps** | Scalar, Int | number of rotation steps. Default 20 |
+-------------+---------------+-----------------------------------------------------------------+ +-------------+---------------+-----------------------------------------------------------------+
| **Merge** | Bool, toggle | removes double vertices if the geometry can be merged, | | **Merge** | Bool, toggle | removes double vertices if the geometry can be merged, |
| | | usually used to prevent doubles of first profile and last | | | | usually used to prevent doubles of first profile and last |
......
...@@ -5,15 +5,15 @@ Functionality ...@@ -5,15 +5,15 @@ Functionality
------------- -------------
Get objects from the Blender ``Scene`` and output them into Sverchok's node tree. This node supports most object types. All are converted to a Sverchok representation of ``Mesh`` where possible. Get objects from the Blender ``Scene`` and output them into Sverchok's node tree. This node supports most object types. All are converted to a Sverchok representation of ``Mesh`` where possible.
A few points worth stating explicitely. A few points worth stating explicitly.
- Empties, Cameras, and Lamps produce only matrix data. - Empties, Cameras, and Lamps produce only matrix data.
- The order of the selected Objects can be sorted by name. - The order of the selected Objects can be sorted by name.
- It supports Object collections. - It supports Object collections.
- It understands also ``vertex groups``, when activated, showing additional socket representing indices, that you can use for further processing. All groups are cached in one list _without_weights_. - It understands also ``vertex groups``, when activated, showing additional socket representing indices, that you can use for further processing. All groups are cached in one list _without_weights_.
- When you ``Get`` objects from the Scene that have modifiers on them, you can import the final mesh by enableing the ``Post`` button. - When you ``Get`` objects from the Scene that have modifiers on them, you can import the final mesh by enabling the ``Post`` button.
- Importing Objects with a lot of geometry will decrease Sverchok tree update speed, be careful with any modifiers that produce a lot of extra geometry (like subdivision modifier) - Importing Objects with a lot of geometry will decrease Sverchok tree update speed, be careful with any modifiers that produce a lot of extra geometry (like subdivision modifier)
- The Matrix socket lets you ignore or acquire the Object's ``World Matrix``, by default the Object data is untransformed. Use a matrix-apply node if you want to explicitely transform the vertex data. - The Matrix socket lets you ignore or acquire the Object's ``World Matrix``, by default the Object data is untransformed. Use a matrix-apply node if you want to explicitly transform the vertex data.
limitations: limitations:
......
NURBS Surface from Curves Net NURBS Surface from Curves Net
============================= =============================
Functionaltiy Functionality
------------- -------------
Given a net of intersecting curves, this node generates a surface which passes Given a net of intersecting curves, this node generates a surface which passes
...@@ -13,7 +13,7 @@ direction) and another set of curves is called "V-curves" (curves along V ...@@ -13,7 +13,7 @@ direction) and another set of curves is called "V-curves" (curves along V
direction). direction).
Apart of curves grid, this node requires intersection points of curves provided Apart of curves grid, this node requires intersection points of curves provided
explictly. Intersection points can be calculated by use of "Intersect NURBS explicitly. Intersection points can be calculated by use of "Intersect NURBS
curves" node. Note: that node uses numeric algorithms to calculate curves" node. Note: that node uses numeric algorithms to calculate
intersections, so it can fail to find intersections, or give imprecise results. intersections, so it can fail to find intersections, or give imprecise results.
So, if you have intersection points in advance, it's better to use them. So, if you have intersection points in advance, it's better to use them.
...@@ -101,10 +101,10 @@ This node has the following parameters: ...@@ -101,10 +101,10 @@ This node has the following parameters:
they are not provided by user. The available options are: they are not provided by user. The available options are:
* Manhattan * Manhattan
* Euclidian * Euclidean
* Points (just number of points from the beginning) * Points (just number of points from the beginning)
* Chebyshev * Chebyshev
* Centripetal (square root of Euclidian distance). * Centripetal (square root of Euclidean distance).
The default option is Points. In most cases, this option gives the best results. The default option is Points. In most cases, this option gives the best results.
* **Knotvector accuracy**. This parameter is available in the N panel only. * **Knotvector accuracy**. This parameter is available in the N panel only.
......
...@@ -52,7 +52,7 @@ This node has the following parameters: ...@@ -52,7 +52,7 @@ This node has the following parameters:
package is installed. package is installed.
* **Sverchok**. Use built-in Sverchok implementation. * **Sverchok**. Use built-in Sverchok implementation.
In general (with large nuber of control points), built-in implementation In general (with large number of control points), built-in implementation
should be faster; but Geomdl implementation is better tested. should be faster; but Geomdl implementation is better tested.
The default option is **Geomdl**, when it is available; otherwise, built-in The default option is **Geomdl**, when it is available; otherwise, built-in
implementation is used. implementation is used.
...@@ -66,12 +66,12 @@ This node has the following parameters: ...@@ -66,12 +66,12 @@ This node has the following parameters:
available values are: available values are:
* Manhattan * Manhattan
* Euclidian * Euclidean
* Points (just number of points from the beginning) * Points (just number of points from the beginning)
* Chebyshev * Chebyshev
* Centripetal (square root of Euclidian distance). * Centripetal (square root of Euclidean distance).
The default value is Euclidian. The default value is Euclidean.
* **Input mode**. The available values are: * **Input mode**. The available values are:
......
...@@ -10,7 +10,7 @@ Given a NURBS Surface object and a knot value, the node reduces the ...@@ -10,7 +10,7 @@ Given a NURBS Surface object and a knot value, the node reduces the
multiplicity of this knot in surface's U- or V-knotvector. This procedure can multiplicity of this knot in surface's U- or V-knotvector. This procedure can
not always be performed. In general, this procedure changes the shape of the not always be performed. In general, this procedure changes the shape of the
surface. There is "tolerance" parameter, defining how much is it allowed to surface. There is "tolerance" parameter, defining how much is it allowed to
chagne the shape of the surface. change the shape of the surface.
This node can work only with NURBS surfaces. This node can work only with NURBS surfaces.
......
...@@ -41,7 +41,7 @@ The *N-panel* has a few options too ...@@ -41,7 +41,7 @@ The *N-panel* has a few options too
- **force input** : mode for CSV to automatically try to do the right thing when the CSV is - **force input** : mode for CSV to automatically try to do the right thing when the CSV is
a mixed bag of strings with quotes and numbers. Try this if the file won't load correctly. (else let us know in the issue tracker) a mixed bag of strings with quotes and numbers. Try this if the file won't load correctly. (else let us know in the issue tracker)
- **Extended Mode** : this turns off all parsing convertors and outputs just strings for now, you must then use formula nodes to cast params manually. - **Extended Mode** : this turns off all parsing converters and outputs just strings for now, you must then use formula nodes to cast params manually.
Outputs Outputs
......
...@@ -49,7 +49,7 @@ Examples ...@@ -49,7 +49,7 @@ Examples
.. image:: https://user-images.githubusercontent.com/28003269/59979532-33818680-95fa-11e9-8e0c-e63ab4ba8fef.png .. image:: https://user-images.githubusercontent.com/28003269/59979532-33818680-95fa-11e9-8e0c-e63ab4ba8fef.png
**Also it is possible to align object only to part of mesh for this just cut unuseful part of mesh before align node.** **Also it is possible to align object only to part of mesh, for this just cut unnecessary part of mesh before align node.**
.. image:: https://user-images.githubusercontent.com/28003269/59979719-409f7500-95fc-11e9-8df8-62610b36799d.gif .. image:: https://user-images.githubusercontent.com/28003269/59979719-409f7500-95fc-11e9-8df8-62610b36799d.gif
......
...@@ -6,7 +6,7 @@ Functionality ...@@ -6,7 +6,7 @@ Functionality
This node performs the standard Blender's "Symmetrize" transformation on the This node performs the standard Blender's "Symmetrize" transformation on the
mesh. In general, it takes one half of the mesh, mirrors it relative to some mesh. In general, it takes one half of the mesh, mirrors it relative to some
plane, and then joins these two halfs together. Please refer to Blender_ plane, and then joins these two halves together. Please refer to Blender_
documentation for more precise description of the transformation. documentation for more precise description of the transformation.
.. _Blender: https://docs.blender.org/manual/en/latest/modeling/meshes/editing/basics/symmetry.html#symmetrize .. _Blender: https://docs.blender.org/manual/en/latest/modeling/meshes/editing/basics/symmetry.html#symmetrize
......
...@@ -6,13 +6,13 @@ Functionality ...@@ -6,13 +6,13 @@ Functionality
Reverse operation to Matrix apply. Reverse operation to Matrix apply.
If matrix apply adding all transformations to vertices. If matrix apply adding all transformations to vertices.
Than vector drop substract matrix from vertices. Than vector drop subtract matrix from vertices.
Inputs Inputs
------ ------
**Vertices** - Vectors input to transform **Vertices** - Vectors input to transform
**Matrix** - Matrix to substract from vertices **Matrix** - Matrix to subtract from vertices
Outputs Outputs
------- -------
......
...@@ -4,7 +4,7 @@ Curve Viewer ...@@ -4,7 +4,7 @@ Curve Viewer
Functionality Functionality
------------- -------------
This node takes ``verts`` and ``edges`` and makes straight sections of Curve to represent them. Like a pipe, but without smooth transitions between pipes. Each edge is truely disjoint and the renderable geometry can overlap. This node takes ``verts`` and ``edges`` and makes straight sections of Curve to represent them. Like a pipe, but without smooth transitions between pipes. Each edge is truly disjoint and the renderable geometry can overlap.
This is useful for quickly generating renderable lightweight geometry for scaffolding, beams, pillars, plynths, tubes, fences, neon signage. This is useful for quickly generating renderable lightweight geometry for scaffolding, beams, pillars, plynths, tubes, fences, neon signage.
......
...@@ -18,20 +18,20 @@ Built on the core of the original ViewerDraw, this version allows all of the fol ...@@ -18,20 +18,20 @@ Built on the core of the original ViewerDraw, this version allows all of the fol
- Vertex, Edges, Faces displays can be toggled. - Vertex, Edges, Faces displays can be toggled.
- Defining Normal of Brigtness Source (via N-Panel) - Defining Normal of Brigtness Source (via N-Panel)
- ``Faux Transparancy`` via dotted edges or checkered polygons. - ``Faux Transparancy`` via dotted edges or checkered polygons.
- ``ngons tesselation`` (via N-Panel) - see description below - ``ngons tessellation`` (via N-Panel) - see description below
- bake and bake all. (via N-Panel, show bake interface is not on by default) - bake and bake all. (via N-Panel, show bake interface is not on by default)
**draws using display lists** **draws using display lists**
Uses OpenGL display list to cache the drawing function. This optimizes for rotating the viewport around static geometry. Changing the geometry clears the display cache, with big geometry inputs you may notice some lag on the initial draw + cache. Uses OpenGL display list to cache the drawing function. This optimizes for rotating the viewport around static geometry. Changing the geometry clears the display cache, with big geometry inputs you may notice some lag on the initial draw + cache.
**ngons tesselation** **ngons tessellation**
By default vdmk2 drawing routine fills all polygons using the standard ``GL_POLYGON``, which uses the triangle fan approach ( `see here <https://stackoverflow.com/a/8044252/1243487>`_ ) By default vdmk2 drawing routine fills all polygons using the standard ``GL_POLYGON``, which uses the triangle fan approach ( `see here <https://stackoverflow.com/a/8044252/1243487>`_ )
This is a fast way to draw large amounts of quads and triangles. This default (while faster) doesn't draw concave ngons correctly. This is a fast way to draw large amounts of quads and triangles. This default (while faster) doesn't draw concave ngons correctly.
When enabled ``ngons tesselation`` will draw any Ngons using a slightly more involved but appropriate algorithm. The algorithm turns all ngons into individual triangles and fills them, edge drawing will be unchanged and still circumscribe the original polygon. When enabled ``ngons tessellation`` will draw any Ngons using a slightly more involved but appropriate algorithm. The algorithm turns all ngons into individual triangles and fills them, edge drawing will be unchanged and still circumscribe the original polygon.
.. image:: https://user-images.githubusercontent.com/619340/30099972-9159fd40-92e7-11e7-9051-325011e6bec1.png .. image:: https://user-images.githubusercontent.com/619340/30099972-9159fd40-92e7-11e7-9051-325011e6bec1.png
......
...@@ -34,9 +34,9 @@ If, for example, you want to generate edges between vertices, you reference the ...@@ -34,9 +34,9 @@ If, for example, you want to generate edges between vertices, you reference the
If we want to generate an object composed of 3 edges from the above ``vertex list`` we would end up with an edge list similar to this:: If we want to generate an object composed of 3 edges from the above ``vertex list`` we would end up with an edge list similar to this::
edges_list = [(0, 1), (1, 2), (2, 3)] edges_list = [(0, 1), (1, 2), (2, 0)]
At a fundamental level sverchok works by using nodes to creat lists of values, then using other nodes to evaluate those lists and generate new lists. Eventually the results of the final list will be used to generate the output that will be passed to the viewport with a viewer node. At a fundamental level sverchok works by using nodes to create lists of values, then using other nodes to evaluate those lists and generate new lists. Eventually the results of the final list will be used to generate the output that will be passed to the viewport with a viewer node.
This is why the nesting concept is fundamental in order to use Sverchok. This is why the nesting concept is fundamental in order to use Sverchok.
......
...@@ -360,7 +360,7 @@ class NodeUtils: ...@@ -360,7 +360,7 @@ class NodeUtils:
def get_bpy_data_from_name(self, identifier, bpy_data_kind): # todo, method which have nothing related with nodes def get_bpy_data_from_name(self, identifier, bpy_data_kind): # todo, method which have nothing related with nodes
""" """
fail gracefuly? fail gracefully?
This function acknowledges that the identifier being passed can be a string or an object proper. This function acknowledges that the identifier being passed can be a string or an object proper.
for a long time Sverchok stored the result of a prop_search as a StringProperty, and many nodes will for a long time Sverchok stored the result of a prop_search as a StringProperty, and many nodes will
be stored with that data in .blends, here we try to permit older blends having data stored as a string, be stored with that data in .blends, here we try to permit older blends having data stored as a string,
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать