Copy link to clipboard
Copied
Description:
Following might be wrong, but my understanding is that Magnetic Lasso Tool's Frequency property is not available from scripting.
Is there way to access? or defined any other place?
Other properties (Feather, Width, Contrast) are available.
Steps:
1. Launch Photoshop
2. Open new doc
3. Select Magnetic Lasso tool and set property value for easy to find
ex) 12, 34, 56, 78
4. Menu: File -> Scripts -> Browse .... -> Select "Getter Demo.jsx" file from xtools
http://ps-scripts.sourceforge.net/xtools.html
5. Select Application only from the dialog and click "Process"
then Getter.xml file will be created on desktop
6. Open Getter.xml
7. Search string "CurrentToolOptions" and look around the property to match "Frequency"
Expected:
Found property for "Frequency"
Actual Result:
Not found property for "Frequency"
=== sample out put ==
<Object symname="CurrentToolOptions" sym="CrnT" objectTypeString="CurrentToolOptions" objectType="CrnT" count="10">
<Boolean symname="Contiguous" sym="Cntg" boolean="true"/>
<Integer symname="Selection" sym="Slct" integer="0"/>
<UnitDouble symname="DrwR" sym="DrwR" unitDoubleTypeString="Pixels" unitDoubleType="#Pxl" unitDoubleValue="12"/>
<Boolean symname="DrwA" sym="DrwA" boolean="true"/>
<Boolean symname="MgLP" sym="MgLP" boolean="true"/>
<Integer symname="MgEd" sym="MgEd" integer="56"/>
<Integer symname="MgCl" sym="MgCl" integer="12"/>
<Integer symname="MgWd" sym="MgWd" integer="34"/>
<Integer symname="MgSS" sym="MgSS" integer="2"/>
<Integer symname="MgSn" sym="MgSn" integer="600"/>
</Object>
<Enumerated symname="Tool" sym="Tool" enumeratedTypeString="magneticLassoTool" enumeratedType="magneticLassoTool" enumeratedValueString="Target" enumeratedValue="Trgt"/>
=================
Copy link to clipboard
Copied
t seems that this is some sort of derivative of MgCl and, possibly, from MgSS and MgSn. And there is an "bug". Set the frequency to 99 or 98, then restart photoshop. The frequency will be equal to 100.
Here are morons
Copy link to clipboard
Copied
Hi r-bin,
Thank you very much for this info.
Finally I got some formula to work with MgCL value.
Short note:
UI display value = Math.floor((100/35)*(40-$MgCl))
Long note:
Photoshop UI: Min=0, Max=100, Integer, Arrow key step=1
MgCl value from data dump
Min: 5 (UI value = 100)
Max: 40 (UI value = 0)
There's display value shift on Photoshop UI (I think it is a legacy bug)
UI value shifting happens as following
1) Select Magnetic Lasso Tool
2) Set Frequency to 98
3) Select Move tool
4) Select Magnetic Lasso Tool again
5) Check Frequency value
It become 100.
After some struggles for figuring out, following formula was lead.
UI display value = Math.floor((100/35)*(40-$MgCl))
40 = (max value)
35 = 40 (max value) - 5 (min value)
Thank you very much,
Naoki
Copy link to clipboard
Copied
By the way, I think MgCl is something like CoolingThreshold or Cooling or Cool. The same incomprehensible parameters are in the MagneticPen Tool