Option to draw mesh vertex-weights in editmode, available from the 'Mesh Display' panel.
TODO: get this to work when modifiers are applied in solid mode (texface-solidmode is working).
As some people have already noticed, the "Add" menu for nodes is a bit messy since pynodes merge. The reason for this is that the order of nodes in submenus (categories) was previously defined by the order in which all nodes are registered (at the bottom of blenkernel/intern/node.c). For the dynamic registration of node types now possible this system of defining node order along with registration is no longer viable: while it would still sort of work for C nodes, it is completely meaningless for dynamic (python) nodes, which are basically registered automatically in whatever order modules and addons are loaded, with the added complexity of unloading and reloading.
To fix this problem and add a bunch of desirable features this commit replaces the C menu with a python implementation. The new menu does not rely on any particular order of types in the node registry, but instead uses a simple explicit list of all the available nodes, grouped by categories (in scripts/nodeitems_builtins.py).
There are a number of additional features that become possible with this implementation:
1) Node Toolbar can be populated!
The list of nodes is used to create 2 UI items for each node: 1 entry in a submenu of "Add" menu and 1 item in a node toolbar panel with basically the same functionality. Clicking a button in the toolbar will add a new node of this type, just like selecting an item in the menu. The toolbar has the advantage of having collapsible panels for each category, so users can decide if they don't need certain nodes categories and have the rest more easily accessible.
2) Each node item is a true operator call.
The old Add menu is a pretty old piece of C code which doesn't even use proper operator buttons. Now there is a generic node_add operator which can be used very flexibly for adding any of the available nodes.
3) Node Items support additional settings.
Each "NodeItem" consists of the basic node type plus an optional list of initial settings that shall be applied to a new instance. This gives additional flexibility for creating variants of the same node or for defining preferred initial settings. E.g. it has been requested to disable previews for all nodes except inputs, this would be simple change in the py code and much less intrusive than in C.
4) Node items can be generated with a function.
A callback can be used in any category instead of the fixed list, which generates a set of items based on the context (much like dynamic enum items in bpy.props). Originally this was implemented for group nodes, because these nodes only make sense when linked to a node tree from the library data. This principle could come in handy for a number of other nodes, e.g. Image nodes could provide a similar list of node variants based on images in the library - no need to first add node, then select an image.
WARNING: pynodes scripters will have to rework their "draw_add_menu" callback in node tree types, this has been removed now! It was already pretty redundant, since one can add draw functions to the Add menu just like for any other menu. In the future i'd like to improve the categories system further so scripters can use it for custom node systems too, for now just make a draw callback and attach it to the Add menu.
* Fix precision overflow issue with overlay previews,
* Expose alpha mask mapping to UI (still not functional but coming soon).
* More overlay refactoring:
Overlay now does minimal checking for texture refresh.
Instead, we now have invalidation flags to set an aspect of the brush
overlay as invalid. This is necessary because this way we will be able to
separate and preview different brush attributes on the overlays, using
different textures:
These attributes/aspects are:
Primary texture (main texture for sculpt, vertex, imapaint)
Secondary texture (mask/alpha texture for imapaint)
Cursor texture (cursor texture. It involves brush strength and curves)
Modified the relevant RNA property update functions and C update callback
functions to call the relevant cursor invalidation functions instead
of checking every frame for multiple properties.
Properties that affect this are:
Image changes, if image is used by current brush,
Texture slot changes, similarly
Curve changes,
Object mode change invalidates the cursor
Paint tool change invalidates the cursor.
These changes give slightly more invalidation cases than simply
comparing the relevant properties each frame, but these do not occur in
performance critical moments and it's a much more elegant system than
adding more variables to check per frame each time we add something on
the system.
This option replaces previously added GPU limit
option, which became tricky to follow after GLSL
display space conversion.
There're 4 modes available:
- AUTO which will try to guess which mode is
best to use.
Currently It'll try using GLSL and if it fails,
will fallback to 2D textures.
Probably it'll make sense checking on whether
2D textures works well but currently such behavior
shall be sufficient.
Later we could make this method smarter (for example
don't try to use GLSL on certain GPU or so).
- GLSL will currently behave the same way as AUTO,
but it is intended to always try using GLSL
(unless it can not be used because of existing
limitation of dither and RGB curves).
- 2D Textures will use CPU-based color space conversion
and use OGL 2D Texture to display the image.
Image will be displayed in tiles, so there shall be
no big GPU memory consumption.
- DrawPixels will straightly fallback to glDrawPixels
without trying to use any fancy GPU stuff.
Hopefully this will also fix
#34943: Blender crashes when resizing the Compositing Screen Window
Added a label to guide users to line style settings in the Render Layers context
(in line with the similar labels found in the Cloth and Soft Body modifier panels),
so that Freestyle options per render layer can be more easily found.
Also workaround a nasty bug, where unregistered py classes remain listed in relevant __subclasses__() calls, which would lead to crash with python addons i18n tools (main translation was not affected, as messages extracting tools are executed in a brand new "factory startup" Blender ;) ).
* Pressing x or y to scale overlay immediately presents visual feedback
instead of requiring mouse motion
* Hide the ovelay icon when stencil is active since you can't deactivate
then.
* Mark Preset operator as 'Internal' only, so it does not show up inside the search menu. We cannot be sure if we meet the context requirements otherwise (unless we add a poll to each subclass).
* Do not share poll with other files, create own poll classes.
* Avoid some splits() and use rows instead (less code).
* Remove some commented C code.
* layout = self.layout declarations come before variable declarations.
* Cycles Render layers UI was broken after freestyle merge (changes were not merged). Did manual edits now with some tweaks.
* Some layout fixes for Mask Layer.
This commit is the first part of a two-part merger of the soc-2008-mxcurioni
(Freestyle) branch. New 'freestyle' folders were added to the source/blender/
and release/script/ directories through a couple of svn copy operations
(instead of svn merge, due to broken svn:mergeinfo properties of the branch).
by Francisco De La Cruz (xercesblue), with some of my own changes/improvements.
Converts faces to triangle-fans (useful to run on ngons).
To access select a group of faces and press "Alt+P" or alternatively select the operator from the Faces menu (Ctrl+F)
* Shift-Rclick and holding right click, x or y will trigger constrained
scaling of overlay. Pressing again will revert to uniform scaling.
* Added operator, visible under the mapping drop menu, to fit stencil
aspect ratio to brush image aspect ratio.
* Made it possible to access stencil attributes from python as vec.x,
vec.y. Thanks to kgeogeo for pointing out!
- add rna property 'as_bytes' method so you can get a string property as python bytes (bypass encoding).
- make bpy.path.abspath/relpath compatible with bytes.
- add 'relpath' option to bpy_extras.image_utils.load_image(), so you can load an image relative to a path.