diff --git a/math_formula/__init__.py b/math_formula/__init__.py index e03c139..e6f6833 100644 --- a/math_formula/__init__.py +++ b/math_formula/__init__.py @@ -5,7 +5,7 @@ bl_info = { "name": "Node Math Formula", "author": "Wannes Malfait", - "version": (1, 2, 0), + "version": (1, 2, 1), "location": "Node Editor Toolbar and SHIFT+F or ALT+F", "description": "Quickly add math nodes by typing in a formula", "category": "Node", diff --git a/math_formula/changes.log b/math_formula/changes.log index fdfcf29..26ba62d 100644 --- a/math_formula/changes.log +++ b/math_formula/changes.log @@ -1,3 +1,7 @@ +v1.2.1 +- Fix vector math `fract` not working. +- Fix separate xyz with one component always returning `x`. + v1.2.0 - Update positioning algorithm to work better with multiple outputs. - Add support for the new vector math functions: 'Refract' and 'Faceforward'. diff --git a/math_formula/main.py b/math_formula/main.py index c7ac41b..6c122b2 100644 --- a/math_formula/main.py +++ b/math_formula/main.py @@ -685,7 +685,11 @@ def execute(self, context): a if a in data else None for a in ('x', 'y', 'z')] node = self.add_separate_xyz_node( context, nodes, name, components) - stack.append('x') + best_name = 'x' + for comp in components: + if comp is not None: + best_name = comp + stack.append(best_name) if props.add_frame and nodes != []: # Add all nodes in a frame frame = tree.nodes.new(type='NodeFrame') diff --git a/math_formula/scanner.py b/math_formula/scanner.py index 49dbcbf..241e6e4 100644 --- a/math_formula/scanner.py +++ b/math_formula/scanner.py @@ -110,7 +110,7 @@ 'normalize': ('NORMALIZE', 1), 'vfloor': ('FLOOR', 1), 'vceil': ('CEIL', 1), - 'vfract': ('FRACT', 1), + 'vfract': ('FRACTION', 1), 'vabs': ('ABSOLUTE', 1), 'vabsolute': ('ABSOLUTE', 1), 'vsin': ('SINE', 1),