Skip to content

Blender v4.0 nodes #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jan 22, 2024
Merged

Blender v4.0 nodes #79

merged 18 commits into from
Jan 22, 2024

Conversation

BrendanParmer
Copy link
Owner

@BrendanParmer BrendanParmer commented Jan 7, 2024

Features

  • Geometry Node trees now set geometry type and editor modes for Tool groups
  • Variable name generation is now more robust, checking if a variable is a Python keyword or is otherwise invalid (e.g starting with a digit like the 3D cursor node's default variable)
  • Repeat zones are now supported
  • Zone logic is now dependent on the Blender version
  • Added new Geometry Nodes and attributes to settings, including
    • New tool nodes (GeometryNodeTool3DCursor, GeometryNodeToolSelection, GeometryNodeToolSetSelection, GeometryNodeToolFaceSet, GeometryNodeToolSetFaceSet)
    • Added domain attribute to GeometryNodeSetShadeSmooth
    • Added GeometryNodeInputEdgeSmooth, GeometryNodePointsToCurves
    • Repeat zone nodes (GeometryNodeRepeatInput, GeometryNodeRepeatOutput)
    • Rotation nodes (FunctionNodeAxisAngleToRotation, FunctionNodeEulerToRotation, FunctionNodeInvertRotation, FunctionNodeRotateVector, FunctionNodeRotationToAxisAngle, FunctionNodeRotationToEuler, FunctionNodeRotationToQuaternion, FunctionNodeQuaternionToRotation)
  • Updated shader node settings
    • Added model attribute to ShaderNodeBsdfHairPrincipled
    • Added ShaderNodeBsdfSheen
    • Added normalize attribute to ShaderNodeTexNoise and ShaderNodeTexVoronoi
  • Updated compositor node settings
    • Reorganized settings list to be in line with Blender 4.0's add menu organization
    • Added CompositorNodeKuwahara
  • Added Node Panels
    • Refactored node tree io logic for Blender v4+
  • Added general node settings (NodeFrame, NodeGroupInput, NodeGroupOutput, NodeReroute)
  • Some print statements have been converted to Blender's operator reporting system, making them visible in the UI
  • Fix issue with not using generated node tree in group node if already in the blend file (Group nodes don't use correct tree if one already present in scene #74)
    • NodeToPython now scans the node tree to see what dependencies exist and what node trees need processed first
  • Add an array_to_py_str() method for bpy_prop_array
  • Refactor "outermost group" logic to just store the base node tree we're converting to Python
  • Functions arguments have been simplified a bit, no more passing around lots of unnecessary variable names and indentation info
  • Group nodes are no longer special, setting their node trees just like other node settings

@BrendanParmer BrendanParmer self-assigned this Jan 7, 2024
@BrendanParmer BrendanParmer added the enhancement New feature or request label Jan 7, 2024
@BrendanParmer BrendanParmer added this to the v3.0 milestone Jan 7, 2024
@BrendanParmer BrendanParmer added the bug Something isn't working label Jan 7, 2024
@BrendanParmer BrendanParmer marked this pull request as ready for review January 15, 2024 04:46
@BrendanParmer
Copy link
Owner Author

Group nodes and nodes with attributes that have been deprecated generate incorrect warnings

@@ -1,4 +1,5 @@
from bpy.types import NodeTree
import bpy

class NTP_NodeTree:
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this type is necessary any longer, at least in the general case. I like what the Geometry Node Tree does with it, but with the node_tree_vars dictionary I don't think it's probably necessary for Shader and Compositing nodes.

@BrendanParmer BrendanParmer changed the title Blender v4 0 nodes Blender v4.0 nodes Jan 21, 2024
@BrendanParmer
Copy link
Owner Author

Group nodes and nodes with attributes that have been deprecated generate incorrect warnings

Will solve as part of #81

@BrendanParmer
Copy link
Owner Author

BrendanParmer commented Jan 21, 2024

4.0 looks good
TODO: spot check with 3.3 and 3.6 LTS

@BrendanParmer BrendanParmer merged commit 6f1bf76 into v3.0 Jan 22, 2024
@BrendanParmer BrendanParmer deleted the BlenderV4_0Nodes branch January 22, 2024 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant