Getting ready for deploy
This commit is contained in:
+124
-45
@@ -121,17 +121,23 @@ class KnotAllowedMaterial(bpy.types.PropertyGroup):
|
||||
class KnotGlobalSettings(bpy.types.PropertyGroup):
|
||||
"""Scene-level playback and rendering settings."""
|
||||
frames_per_knot: bpy.props.IntProperty(
|
||||
name="Frames per Knot", default=12, min=1)
|
||||
name="Frames per Knot", default=12, min=1,
|
||||
description="Base display duration (in frames) for each playlist entry. Each knot's effective duration is frames_per_knot × cycle_rate")
|
||||
preview_resolution: bpy.props.IntProperty(
|
||||
name="Preview Curve Res", default=64, min=3, max=1024)
|
||||
name="Preview Curve Res", default=64, min=3, max=1024,
|
||||
description="NURBS subdivision used in the viewport. Higher values produce a smoother curve but update more slowly")
|
||||
render_resolution: bpy.props.IntProperty(
|
||||
name="Render Curve Res", default=128, min=3, max=2048)
|
||||
name="Render Curve Res", default=128, min=3, max=2048,
|
||||
description="NURBS subdivision used during renders and baking. Higher values produce higher quality output")
|
||||
preview_bevel_resolution: bpy.props.IntProperty(
|
||||
name="Preview Bevel Res", default=4, min=0, max=64)
|
||||
name="Preview Bevel Res", default=4, min=0, max=64,
|
||||
description="Number of sides on the tube cross-section in the viewport")
|
||||
render_bevel_resolution: bpy.props.IntProperty(
|
||||
name="Render Bevel Res", default=8, min=0, max=64)
|
||||
name="Render Bevel Res", default=8, min=0, max=64,
|
||||
description="Number of sides on the tube cross-section during renders and baking")
|
||||
knot_scale: bpy.props.FloatProperty(
|
||||
name="Global Scale", default=1.0, min=0.01)
|
||||
name="Global Scale", default=1.0, min=0.01,
|
||||
description="Uniform scale multiplier applied to all knots")
|
||||
global_speed: bpy.props.FloatProperty(
|
||||
name="Global Speed", default=1.0, min=0.01,
|
||||
description="Multiplies the effective frame counter for all knots. Keyframeable.")
|
||||
@@ -183,20 +189,29 @@ class KnotItem(bpy.types.PropertyGroup):
|
||||
# Shape Type
|
||||
shape_type: bpy.props.EnumProperty(
|
||||
name="Shape",
|
||||
description="Parametric curve type used to generate this knot",
|
||||
items=[
|
||||
('TORUS_KNOT', "Torus Knot", ""),
|
||||
('MOBIUS', "Mobius Strip", ""),
|
||||
('LISSAJOUS', "Lissajous 3D", ""),
|
||||
('SPIRAL', "Spherical Spiral", ""),
|
||||
('TORUS_KNOT', "Torus Knot", "Classic (p,q) torus knot wound around a torus surface"),
|
||||
('MOBIUS', "Mobius Strip", "One-sided surface with a half-twist — non-orientable loop"),
|
||||
('LISSAJOUS', "Lissajous 3D", "3-axis frequency-ratio figure trace"),
|
||||
('SPIRAL', "Spherical Spiral", "Spherical spiral (loxodrome) with configurable turns and radius"),
|
||||
],
|
||||
default='TORUS_KNOT'
|
||||
)
|
||||
|
||||
# Topology (Torus Knot)
|
||||
torus_p: bpy.props.IntProperty(name="Revolutions (p)", default=2, min=1)
|
||||
mod_torus_p: bpy.props.FloatProperty(name="Mod p", default=0.0)
|
||||
torus_q: bpy.props.IntProperty(name="Spins (q)", default=3, min=1)
|
||||
mod_torus_q: bpy.props.FloatProperty(name="Mod q", default=0.0)
|
||||
torus_p: bpy.props.IntProperty(
|
||||
name="Revolutions (p)", default=2, min=1,
|
||||
description="Number of revolutions around the torus axis. Must be coprime with q for a true knot")
|
||||
mod_torus_p: bpy.props.FloatProperty(
|
||||
name="Mod p", default=0.0,
|
||||
description="Per-frame attenuverter offset applied to p before rendering")
|
||||
torus_q: bpy.props.IntProperty(
|
||||
name="Spins (q)", default=3, min=1,
|
||||
description="Number of spins around the torus tube. Must be coprime with p for a true knot")
|
||||
mod_torus_q: bpy.props.FloatProperty(
|
||||
name="Mod q", default=0.0,
|
||||
description="Per-frame attenuverter offset applied to q before rendering")
|
||||
|
||||
# Topology (Mobius)
|
||||
mobius_twists: bpy.props.IntProperty(name="Half Twists", default=1, min=1)
|
||||
@@ -221,25 +236,48 @@ class KnotItem(bpy.types.PropertyGroup):
|
||||
mod_spiral_R: bpy.props.FloatProperty(name="Mod Radius", default=0.0)
|
||||
|
||||
# Radii (Torus Knot)
|
||||
torus_R: bpy.props.FloatProperty(name="Major", default=2.0, min=0.0)
|
||||
mod_torus_R: bpy.props.FloatProperty(name="Mod Major", default=0.0)
|
||||
torus_r: bpy.props.FloatProperty(name="Minor", default=1.0, min=0.0)
|
||||
mod_torus_r: bpy.props.FloatProperty(name="Mod Minor", default=0.0)
|
||||
torus_R: bpy.props.FloatProperty(
|
||||
name="Major", default=2.0, min=0.0,
|
||||
description="Distance from the centre of the torus to the centre of the tube")
|
||||
mod_torus_R: bpy.props.FloatProperty(
|
||||
name="Mod Major", default=0.0,
|
||||
description="Per-frame attenuverter offset applied to the major radius")
|
||||
torus_r: bpy.props.FloatProperty(
|
||||
name="Minor", default=1.0, min=0.0,
|
||||
description="Radius of the tube itself")
|
||||
mod_torus_r: bpy.props.FloatProperty(
|
||||
name="Mod Minor", default=0.0,
|
||||
description="Per-frame attenuverter offset applied to the minor radius")
|
||||
|
||||
# Colors (legacy TKP path)
|
||||
multiple_links: bpy.props.BoolProperty(name="Multiple Links", default=False)
|
||||
use_colors: bpy.props.BoolProperty(name="Use Colors", default=False)
|
||||
multiple_links: bpy.props.BoolProperty(
|
||||
name="Multiple Links", default=False,
|
||||
description="Render all gcd(p,q) link components as separate curves")
|
||||
use_colors: bpy.props.BoolProperty(
|
||||
name="Use Colors", default=False,
|
||||
description="Apply per-link vertex colors to the curve (legacy TKP color mode)")
|
||||
colorSet: bpy.props.EnumProperty(
|
||||
name="Color Set",
|
||||
items=[('1', "RGBish", ""), ('2', "Rainbow", "")],
|
||||
description="Which built-in vertex color palette to use",
|
||||
items=[('1', "RGBish", "Red/Green/Blue-based palette"), ('2', "Rainbow", "Full-spectrum rainbow palette")],
|
||||
default='1')
|
||||
random_colors: bpy.props.BoolProperty(name="Randomize Colors", default=False)
|
||||
random_colors: bpy.props.BoolProperty(
|
||||
name="Randomize Colors", default=False,
|
||||
description="Shuffle the vertex color assignment randomly each frame")
|
||||
|
||||
# Multipliers & phases
|
||||
torus_u: bpy.props.IntProperty( name="Rev. Multiplier", default=1, min=1)
|
||||
torus_v: bpy.props.IntProperty( name="Spin Multiplier", default=1, min=1)
|
||||
torus_rP: bpy.props.FloatProperty(name="Rev. Phase", default=0.0)
|
||||
torus_sP: bpy.props.FloatProperty(name="Spin Phase", default=0.0)
|
||||
torus_u: bpy.props.IntProperty(
|
||||
name="Rev. Multiplier", default=1, min=1,
|
||||
description="Repeats the revolution pattern — creates multiple overlapping copies of the knot")
|
||||
torus_v: bpy.props.IntProperty(
|
||||
name="Spin Multiplier", default=1, min=1,
|
||||
description="Repeats the spin pattern around the tube")
|
||||
torus_rP: bpy.props.FloatProperty(
|
||||
name="Rev. Phase", default=0.0,
|
||||
description="Revolution phase offset in radians (orbit rotation)")
|
||||
torus_sP: bpy.props.FloatProperty(
|
||||
name="Spin Phase", default=0.0,
|
||||
description="Spin phase offset in radians (tube rotation)")
|
||||
|
||||
# Animation rates
|
||||
spin_phase_rate: bpy.props.FloatProperty(
|
||||
@@ -268,36 +306,69 @@ class KnotItem(bpy.types.PropertyGroup):
|
||||
update=_update_knot_material_cb)
|
||||
transition_easing: bpy.props.EnumProperty(
|
||||
name="Easing",
|
||||
description="Interpolation curve applied during the morph window",
|
||||
items=[
|
||||
('LINEAR', "Linear", ""),
|
||||
('QUAD_IN_OUT', "Quadratic In/Out", ""),
|
||||
('SMOOTHSTEP', "Smoothstep", ""),
|
||||
('LINEAR', "Linear", "Constant-rate blend between the two knots"),
|
||||
('QUAD_IN_OUT', "Quadratic In/Out", "Slow start and end, faster in the middle"),
|
||||
('SMOOTHSTEP', "Smoothstep", "S-curve blend — smooth at both endpoints"),
|
||||
],
|
||||
default='QUAD_IN_OUT')
|
||||
|
||||
# Geometry
|
||||
geo_extrude: bpy.props.FloatProperty(name="Extrude", default=0.0, min=0.0)
|
||||
mod_geo_extrude: bpy.props.FloatProperty(name="Mod Extrude", default=0.0)
|
||||
geo_offset: bpy.props.FloatProperty(name="Offset", default=0.0)
|
||||
mod_geo_offset: bpy.props.FloatProperty(name="Mod Offset", default=0.0)
|
||||
geo_bDepth: bpy.props.FloatProperty(name="Bevel Depth", default=0.04, min=0.0)
|
||||
mod_geo_bDepth: bpy.props.FloatProperty(name="Mod BDepth", default=0.0)
|
||||
geo_extrude: bpy.props.FloatProperty(
|
||||
name="Extrude", default=0.0, min=0.0,
|
||||
description="Extrude the curve profile outward — creates a ribbon effect when combined with Offset")
|
||||
mod_geo_extrude: bpy.props.FloatProperty(
|
||||
name="Mod Extrude", default=0.0,
|
||||
description="Per-frame attenuverter offset applied to Extrude")
|
||||
geo_offset: bpy.props.FloatProperty(
|
||||
name="Offset", default=0.0,
|
||||
description="Offset the extruded profile from the curve centreline")
|
||||
mod_geo_offset: bpy.props.FloatProperty(
|
||||
name="Mod Offset", default=0.0,
|
||||
description="Per-frame attenuverter offset applied to Offset")
|
||||
geo_bDepth: bpy.props.FloatProperty(
|
||||
name="Bevel Depth", default=0.04, min=0.0,
|
||||
description="Tube thickness — controls how wide the knot strand is")
|
||||
mod_geo_bDepth: bpy.props.FloatProperty(
|
||||
name="Mod BDepth", default=0.0,
|
||||
description="Per-frame attenuverter offset applied to Bevel Depth")
|
||||
|
||||
# Dimensions mode
|
||||
mode: bpy.props.EnumProperty(
|
||||
name="Dimensions Mode",
|
||||
items=[('MAJOR_MINOR', "Major/Minor", ""), ('EXT_INT', "Exterior/Interior", "")],
|
||||
description="Choose how to specify the torus radii",
|
||||
items=[
|
||||
('MAJOR_MINOR', "Major/Minor", "Specify inner and outer radius as Major and Minor"),
|
||||
('EXT_INT', "Exterior/Interior", "Specify the outer edge and the hole as Exterior and Interior radii"),
|
||||
],
|
||||
default='MAJOR_MINOR')
|
||||
torus_eR: bpy.props.FloatProperty(name="Exterior", default=3.0, min=0.0)
|
||||
mod_torus_eR: bpy.props.FloatProperty(name="Mod Ext", default=0.0)
|
||||
torus_iR: bpy.props.FloatProperty(name="Interior", default=1.0, min=0.0)
|
||||
mod_torus_iR: bpy.props.FloatProperty(name="Mod Int", default=0.0)
|
||||
torus_h: bpy.props.FloatProperty(name="Height", default=1.0, min=0.0)
|
||||
mod_torus_h: bpy.props.FloatProperty(name="Mod Height", default=0.0)
|
||||
torus_eR: bpy.props.FloatProperty(
|
||||
name="Exterior", default=3.0, min=0.0,
|
||||
description="Outer edge radius of the torus (Exterior/Interior mode)")
|
||||
mod_torus_eR: bpy.props.FloatProperty(
|
||||
name="Mod Ext", default=0.0,
|
||||
description="Per-frame attenuverter offset applied to Exterior radius")
|
||||
torus_iR: bpy.props.FloatProperty(
|
||||
name="Interior", default=1.0, min=0.0,
|
||||
description="Inner hole radius of the torus (Exterior/Interior mode)")
|
||||
mod_torus_iR: bpy.props.FloatProperty(
|
||||
name="Mod Int", default=0.0,
|
||||
description="Per-frame attenuverter offset applied to Interior radius")
|
||||
torus_h: bpy.props.FloatProperty(
|
||||
name="Height", default=1.0, min=0.0,
|
||||
description="Vertical stretch of the torus — values above 1.0 elongate the knot")
|
||||
mod_torus_h: bpy.props.FloatProperty(
|
||||
name="Mod Height", default=0.0,
|
||||
description="Per-frame attenuverter offset applied to Height")
|
||||
|
||||
# Direction
|
||||
flip_p: bpy.props.BoolProperty(name="Flip p", default=False)
|
||||
flip_q: bpy.props.BoolProperty(name="Flip q", default=False)
|
||||
flip_p: bpy.props.BoolProperty(
|
||||
name="Flip p", default=False,
|
||||
description="Reverse the direction of the p (revolution) winding")
|
||||
flip_q: bpy.props.BoolProperty(
|
||||
name="Flip q", default=False,
|
||||
description="Reverse the direction of the q (spin) winding")
|
||||
|
||||
# UI expand state (display-only, not serialised to animation)
|
||||
ui_show_shape: bpy.props.BoolProperty(name="Shape", default=True)
|
||||
@@ -311,7 +382,11 @@ class KnotItem(bpy.types.PropertyGroup):
|
||||
# Material
|
||||
material_mode: bpy.props.EnumProperty(
|
||||
name="Material Mode",
|
||||
items=[('PRESET', "Shader Preset", ""), ('PROJECT', "Project Material", "")],
|
||||
description="Choose between a built-in shader preset or an existing material from the project",
|
||||
items=[
|
||||
('PRESET', "Shader Preset", "Use one of the 20 built-in procedural shader presets"),
|
||||
('PROJECT', "Project Material", "Use any material already in this .blend file"),
|
||||
],
|
||||
default='PRESET',
|
||||
update=_update_knot_material_cb)
|
||||
project_material: bpy.props.PointerProperty(
|
||||
@@ -327,15 +402,19 @@ class KnotItem(bpy.types.PropertyGroup):
|
||||
preset_color: bpy.props.FloatVectorProperty(
|
||||
name="Preset Color", subtype='COLOR', size=3,
|
||||
default=(0.2, 0.6, 1.0), min=0.0, max=1.0,
|
||||
description="Base colour tint passed into the selected shader preset",
|
||||
update=_update_knot_material_cb)
|
||||
preset_roughness: bpy.props.FloatProperty(
|
||||
name="Preset Roughness", default=0.1, min=0.0, max=1.0,
|
||||
description="Roughness override for the active preset (0 = mirror-smooth, 1 = fully diffuse)",
|
||||
update=_update_knot_material_cb)
|
||||
preset_metallic: bpy.props.FloatProperty(
|
||||
name="Preset Metallic", default=0.0, min=0.0, max=1.0,
|
||||
description="Metallic factor override for the active preset (0 = dielectric, 1 = metal)",
|
||||
update=_update_knot_material_cb)
|
||||
preset_emission_strength: bpy.props.FloatProperty(
|
||||
name="Preset Emission Strength", default=1.0, min=0.0, max=100.0,
|
||||
description="Emission strength override for presets that emit light",
|
||||
update=_update_knot_material_cb)
|
||||
|
||||
def to_dict(self) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user