From 6d7b49210f0cc2416b6d19e27630a19797c9f0ff Mon Sep 17 00:00:00 2001 From: jackplum64 Date: Tue, 28 Nov 2023 16:12:47 -0600 Subject: [PATCH] Standard radius resizing --- bleMD/__init__.py | 3 +-- bleMD/bleMDNodes.py | 2 ++ bleMD/bleMDProperties.py | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bleMD/__init__.py b/bleMD/__init__.py index a2e3709..eff1f68 100644 --- a/bleMD/__init__.py +++ b/bleMD/__init__.py @@ -216,8 +216,6 @@ def execute(self, context): break - #Not currently functional - #TODO: set up color map to color ramp if mytool.my_enum == 'OP1': self.clearNode() self.assignNode(self.colormap32['viridis']) @@ -300,6 +298,7 @@ def draw(self, context): layout.prop(mytool, "my_enum") row = layout.row() row.operator("wm.enumerator") + layout.prop(mytool, "my_radius") layout.label(text="Animation") diff --git a/bleMD/bleMDNodes.py b/bleMD/bleMDNodes.py index 2ba2577..1b2a191 100644 --- a/bleMD/bleMDNodes.py +++ b/bleMD/bleMDNodes.py @@ -113,6 +113,8 @@ def defaultSettings(): bpy.context.space_data.context = 'OBJECT' +def updateRadius(self, context): + bpy.data.node_groups["geonode_object"].nodes["Mesh to Points"].inputs[3].default_value = self.my_radius def makeSun(): lamp = bpy.data.objects.get('Sun') diff --git a/bleMD/bleMDProperties.py b/bleMD/bleMDProperties.py index 276c998..372807f 100644 --- a/bleMD/bleMDProperties.py +++ b/bleMD/bleMDProperties.py @@ -124,6 +124,13 @@ def openLAMMPSFile(self, context): ) + my_radius: FloatProperty( + name="Standard Radius", + description="Change the radius size", + default=1, + update=updateRadius, + ) + # # Ovito Modifiers #