Files
blender-portable-repo/scripts/addons/RetopoFlow/retopoflow/rftool_strokes/strokes_options.html
T
2026-03-17 14:30:01 -06:00

74 lines
4.3 KiB
HTML

<script type="python">
def set_span_mode(self, value):
elems = self.document.body.getElementsByName('strokes-span-mode')
for e in elems:
if e.value == value:
e.checked = True
self.document.body.getElementById('strokes-insert-modes').dirty()
</script>
<details id="strokes-options">
<summary id="strokes-summary">Strokes</summary>
<div class="contents">
<div class='collection' id="strokes-insert-modes">
<h1>Span Insert Mode</h1>
<div class='contents'>
<label class="half-size">
<input type="radio" id='strokes-span-mode-brush' value='Brush Size' checked="BoundString('''options['strokes span insert mode']''')" name='strokes-span-mode' on_input="self.update_span_mode()" title="Insert spans based on brush size">
Brush Size
</label>
<label class="half-size">
<input type="radio" id='strokes-span-mode-fixed' value='Fixed' checked="BoundString('''options['strokes span insert mode']''')" name='strokes-span-mode' on_input="self.update_span_mode()" title="Insert fixed number of spans">
Fixed
</label>
<div class="labeled-input-text">
<label for="strokes-radius">Brush size</label>
<input type="number" id="strokes-radius" value="self.rfwidgets['brush'].get_radius_boundvar()" on_focus="set_span_mode(self, 'Brush Size')" title="Adjust brush size. When Span Insert Mode is set to Brush Size, the number of spans inserted is based on the size of the brush.">
</div>
<div class="labeled-input-text">
<label for="strokes-fixed-spans">Fixed spans</label>
<input type="number" id="strokes-fixed-spans" value="self._var_fixed_span_count" on_focus="set_span_mode(self, 'Fixed')" title="When Span Insert Mode is set to Fixed, the number of spans inserted is exactly this number.">
</div>
</div>
</div>
<div class="collection">
<h1>Snap Stroke</h1>
<div class="contents">
<label>
<input type="checkbox" checked="BoundBool('''options['strokes snap stroke']''')" title="Allows the start and end of the stroke to snap to nearby vertices">
Enable Stroke Snapping
</label>
<div class="labeled-input-text">
<label for="strokes-snap-distance">Snap distance</label>
<input id="strokes-snap-distance" type="number" value="BoundInt( '''options['strokes snap dist'] ''')" title="Pixel distance for snapping stroke to nearby geometry (only when Stroke Snapping is enabled)">
</div>
</div>
</div>
<div class="collection">
<h1>Automerge</h1>
<div class="contents">
<label>
<input type="checkbox" checked="BoundBool('''options['strokes automerge']''')" title="If enabled, grabbed vertices automatically merged with nearby vertices">
Enable Automerge
</label>
<div class="labeled-input-text">
<label for="strokes-merge-distance">Merge distance</label>
<input id="strokes-merge-distance" type="number" value="BoundInt( '''options['strokes merge dist'] ''')" title="Pixel distance for merging and snapping (only when Automerge is enabled)">
</div>
</div>
</div>
<div class="collection">
<h1>New Geometry Edits</h1>
<div class="contents">
<div class="labeled-input-text">
<label for="strokes-new-spans">Spans</label>
<input type="number" id="strokes-new-spans" value="self._var_cross_count" title="Number of spans between previously selected strip and newly created strip">
</div>
<div class="labeled-input-text">
<label for="strokes-new-loops">Loops</label>
<input type="number" id="strokes-new-loops" value="self._var_loop_count" title="Number of loops between previously selected loop and newly created loop">
</div>
</div>
</div>
</div>
</details>