Notifications
Clear all

[Closed] Set Draw On: Surface object of Graphite Tools via MXS?

does any one has an idea how to do it? do I miss anything and can’t see easy way?

*

3 Replies

You can find code of button in Customize Ribbon menu:


PolyBoost.PolyDrawPickNode() 

-> X:\3ds Max 2018\stdplugs\stdscripts\PolyTools.ms


fn PolyDrawPickNode =
(
   PolyToolsUI.PDPickButton = true
   updateToolbarButtons()
   pickedobj = pickObject filter:PolyDrawPickFilter
   PolyToolsUI.PDPickButton = false
   if pickedobj != undefined then
   (
      PBo_Pickobject = pickedobj
      pickname = pickedobj.name
      ncount = pickname.count
      if pickname.count > 14 do
      (
         namm = ""
         for i = 1 to 11 do namm += pickname[i]
         namm += "..."
         pickname = namm
      )
      PolyDrawPicktext = pickname
      updateToolbarButtons()
   )
   else
   (
      if not (isValidNode PBo_Pickobject) then
      (
         PBo_Pickobject = undefined
         PolyDrawPicktext = ~POLYDRAWPICKTEXT_PICK~
         updateToolbarButtons()
      )
      if pickedobj != undefined do messagebox ~MSGBOX_PICK_GEOMETRY_OBJ~ title:~POLYDRAW_TITLE~ beep:false
   )
),

so without update UI :


PBo_Pickobject = $myobject

yes… thank you. i’ve just found it myself.

PBo_Pickobject = $
PolyBoost.PolyDrawPicktext = $.name

awsme thanks a lot