<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: 3dsmax mouse click event in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/3dsmax-mouse-click-event/m-p/13336142#M121</link>
    <description>&lt;P&gt;You could use "pickPoint" in combination with regular 3D snaps, or you can use the "on mousePoint" event in combination with "mapScreenToWorldRay" and some ray casting. The first should be fine if all you need is a 3D world coordinate; the latter is probably better if you need to know which object was clicked.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS: Looking at the documentation, I realize that maybe the first variant could use the "boxPickNode" function to also find out what object was clicked on...?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Feb 2025 12:00:51 GMT</pubDate>
    <dc:creator>MartinBeh</dc:creator>
    <dc:date>2025-02-24T12:00:51Z</dc:date>
    <item>
      <title>3dsmax mouse click event</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/3dsmax-mouse-click-event/m-p/13336002#M119</link>
      <description>&lt;P&gt;I want to implement a mouse click event in 3dsmax, where you click on any position on the model and then return to the coordinates of the clicked position on the model&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2025 10:12:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/3dsmax-mouse-click-event/m-p/13336002#M119</guid>
      <dc:creator>3233895328</dc:creator>
      <dc:date>2025-02-24T10:12:53Z</dc:date>
    </item>
    <item>
      <title>Betreff: 3dsmax mouse click event</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/3dsmax-mouse-click-event/m-p/13336064#M120</link>
      <description>&lt;P&gt;There is the &lt;STRONG&gt;&lt;A href="https://help.autodesk.com/view/MAXDEV/2025/ENU/?guid=GUID-42CD0531-6BD1-4489-B5A0-C001F4EE577B" target="_blank" rel="noopener"&gt;pickPoint()&lt;/A&gt;&lt;/STRONG&gt; function.&lt;/P&gt;&lt;P&gt;The &lt;A href="https://help.autodesk.com/view/MAXDEV/2025/ENU/?guid=GUID-0876DF46-FAA3-4131-838D-5739A67FF2C1" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;How to ... Draw a Freehand Spline&lt;/STRONG&gt;&lt;/A&gt; tutorial may also help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2025 11:03:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/3dsmax-mouse-click-event/m-p/13336064#M120</guid>
      <dc:creator>wernienst</dc:creator>
      <dc:date>2025-02-24T11:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: 3dsmax mouse click event</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/3dsmax-mouse-click-event/m-p/13336142#M121</link>
      <description>&lt;P&gt;You could use "pickPoint" in combination with regular 3D snaps, or you can use the "on mousePoint" event in combination with "mapScreenToWorldRay" and some ray casting. The first should be fine if all you need is a 3D world coordinate; the latter is probably better if you need to know which object was clicked.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS: Looking at the documentation, I realize that maybe the first variant could use the "boxPickNode" function to also find out what object was clicked on...?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2025 12:00:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/3dsmax-mouse-click-event/m-p/13336142#M121</guid>
      <dc:creator>MartinBeh</dc:creator>
      <dc:date>2025-02-24T12:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: 3dsmax mouse click event</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/3dsmax-mouse-click-event/m-p/13376866#M122</link>
      <description>&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;global modelA = ${}  -- &lt;/SPAN&gt;&lt;SPAN&gt;获取场景中名为&lt;/SPAN&gt;&lt;SPAN&gt; "ModelA" &lt;/SPAN&gt;&lt;SPAN&gt;的对象&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;-- &lt;/SPAN&gt;&lt;SPAN&gt;定义鼠标点击时的回调函数&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;fn mouseClickCallback msg ir obj faceNum shift ctrl alt =&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    -- &lt;/SPAN&gt;&lt;SPAN&gt;处理鼠标点击事件&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    if msg == #mouseAbort then &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    (&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        return #abort&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    )&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    elif if msg == #mousePoint then &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    (&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        -- &lt;/SPAN&gt;&lt;SPAN&gt;如果光标下有模型&lt;/SPAN&gt;&lt;SPAN&gt;A&lt;/SPAN&gt;&lt;SPAN&gt;，输出其名称&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        if isValidNode modelA and modelA == obj then&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        (&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            local rayStart = ir.pos&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            local rayStartStr = "[" + (rayStart.x as string) + ", " + (rayStart.y as string) + ", " + (rayStart.z as string) + ", "+(ctrl as string) +" ]"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            handle_mouse_point(rayStartStr)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            -- python.Execute("handle_mouse_point("+(rayStart as string)+")")&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        )&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    )&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    else &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    (&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        #continue &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    )&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    return #continue  -- &lt;/SPAN&gt;&lt;SPAN&gt;继续跟踪&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;-- &lt;/SPAN&gt;&lt;SPAN&gt;开始鼠标跟踪，指定模型&lt;/SPAN&gt;&lt;SPAN&gt;A&lt;/SPAN&gt;&lt;SPAN&gt;和回调函数&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;mouseTrack trackCallback:mouseClickCallback on:modelA&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 18 Mar 2025 10:25:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/3dsmax-mouse-click-event/m-p/13376866#M122</guid>
      <dc:creator>3233895328</dc:creator>
      <dc:date>2025-03-18T10:25:07Z</dc:date>
    </item>
  </channel>
</rss>

