<?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: I am not able to figure out how to make the Bevel work with spinners, it may need controllers. in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/i-am-not-able-to-figure-out-how-to-make-the-bevel-work-with/m-p/12063225#M2421</link>
    <description>&lt;P&gt;First, try to use codeblocks when posting code samples, unformatted code makes it harder for everyone to contribute. Second, edit poly modifier needs&amp;nbsp;animationMode active to be able to interactively change the parameters after setting them once, and once you commit, you can no longer control them. You don't need to enter the subobject mode either. In addition, your handlers refer to nonexistant controls, instead of&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;spn_spn_bevel1&amp;nbsp;&lt;/FONT&gt;and&amp;nbsp;&lt;FONT face="courier new,courier"&gt;spn_spn_bevel2&lt;/FONT&gt;, it should be&amp;nbsp;&lt;FONT face="courier new,courier"&gt;spn_spn_bevel1&amp;nbsp;&lt;/FONT&gt;and&amp;nbsp;&lt;FONT face="courier new,courier"&gt;spn_spn_bevel2&lt;/FONT&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;try destroyDialog paramChanger catch()
rollout paramChanger "parameter changer" width:250
(
	local obj, turbo1, ep

	spinner spn_height "Change Height " type:#float range:[1,300,40] scale:.1
	spinner spn_bevel1 "Bevel Height " type:#float range:[-10,20,7.7] scale:.001
	spinner spn_bevel2 "Bevel Outline " type:#float range:[-10,20,3.2] scale:.001
	spinner spn_turbo1 "TurboSmooth Iterations " type:#integer range:[0,4,2]

	on spn_height changed val do obj.height = val
	on spn_bevel1 changed val do ep.bevelHeight = val
	on spn_bevel2 changed val do ep.bevelOutline = val
	on spn_turbo1 changed val do turbo1.iterations = val

	on paramChanger open do
	( 
		delete objects
		obj = Cylinder radius:20 height:40 sides:10 heightsegs:4 isSelected:on
		ep = Edit_Poly animationMode:1 bevelType:2 bevelHeight:spn_bevel1.value bevelOutline:spn_bevel2.value
		ep.setOperation #Bevel

		addModifier obj ep
		local allFaces = #{1..ep.GetNumFaces()}
		ep.SetSelection #Face (allFaces - #{1, ep.GetNumFaces()})
		ep.SetOperation #Bevel

		turbo1 = TurboSmooth iterations:2
		addModifier obj turbo1
	)
) 
createDialog paramChanger&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 27 Jun 2023 10:07:04 GMT</pubDate>
    <dc:creator>Swordslayer</dc:creator>
    <dc:date>2023-06-27T10:07:04Z</dc:date>
    <item>
      <title>I am not able to figure out how to make the Bevel work with spinners, it may need controllers.</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/i-am-not-able-to-figure-out-how-to-make-the-bevel-work-with/m-p/12048318#M2420</link>
      <description>&lt;P&gt;I am not able to figure out how to make the Bevel work with spinners, it may need controllers.&lt;/P&gt;&lt;P&gt;I tried, but get error:&lt;/P&gt;&lt;DIV&gt;--change bevel and height with spinners&lt;/DIV&gt;&lt;DIV&gt;try destroyDialog paramChanger catch()&lt;/DIV&gt;&lt;DIV&gt;rollout paramChanger "parameter changer" width:220 (&lt;/DIV&gt;&lt;DIV&gt;local obj,turbo1,bevel1,ep&lt;/DIV&gt;&lt;DIV&gt;spinner spn_height "change height"type:#float&amp;nbsp; range:[1,300,40] scale:.1&lt;/DIV&gt;&lt;DIV&gt;spinner spn_bevel1 "bevel Height " type:#float range:[-10,20,7.7] scale:.001&lt;/DIV&gt;&lt;DIV&gt;spinner spn_bevel2 "bevel Outline " type:#float range:[-10,20,3.2] scale:.001&lt;/DIV&gt;&lt;DIV&gt;spinner spn_turbo1 "turbosmooth iterations" range:[0,4,2] scale:1&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;on spn_height changed val do obj.height=val&lt;/DIV&gt;&lt;DIV&gt;on spn_spn_bevel1 changed val do bevel1.bevelHeight = val&lt;/DIV&gt;&lt;DIV&gt;on spn_spn_bevel2 changed val do bevel1.bevelOutline = val&lt;/DIV&gt;&lt;DIV&gt;on spn_turbo1 changed val do turbo1.iterations = val&lt;/DIV&gt;&lt;DIV&gt;on paramChanger open do (&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;delete objects&lt;/DIV&gt;&lt;DIV&gt;obj=Cylinder radius:20 height:40 sides:10 heightsegs:4 isSelected:on&lt;/DIV&gt;&lt;DIV&gt;ep = Edit_Poly()&lt;/DIV&gt;&lt;DIV&gt;addModifier obj ep&lt;/DIV&gt;&lt;DIV&gt;max modify mode&lt;/DIV&gt;&lt;DIV&gt;subobjectLevel = 4&lt;/DIV&gt;&lt;DIV&gt;ep.Select #Face #{2..41}&lt;/DIV&gt;&lt;DIV&gt;ep.SetOperation #Bevel&lt;/DIV&gt;&lt;DIV&gt;ep.bevelType = 2&lt;/DIV&gt;&lt;DIV&gt;ep.bevelHeight = 7.7&lt;/DIV&gt;&lt;DIV&gt;ep.bevelOutline = -3.2&lt;/DIV&gt;&lt;DIV&gt;ep.Commit ()&lt;/DIV&gt;&lt;DIV&gt;bevel1 = bevel bevelType:2 bevelHeight:7.7 bevelOutline:-3.2&lt;/DIV&gt;&lt;DIV&gt;turbo1 = TurboSmooth iterations:2&lt;/DIV&gt;&lt;DIV&gt;addModifier obj turbo1&lt;/DIV&gt;&lt;DIV&gt;addModifier ep bevel1&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;) )&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;createDialog paramChanger&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Jun 2023 01:12:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/i-am-not-able-to-figure-out-how-to-make-the-bevel-work-with/m-p/12048318#M2420</guid>
      <dc:creator>heinz_krause</dc:creator>
      <dc:date>2023-06-21T01:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: I am not able to figure out how to make the Bevel work with spinners, it may need controllers.</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/i-am-not-able-to-figure-out-how-to-make-the-bevel-work-with/m-p/12063225#M2421</link>
      <description>&lt;P&gt;First, try to use codeblocks when posting code samples, unformatted code makes it harder for everyone to contribute. Second, edit poly modifier needs&amp;nbsp;animationMode active to be able to interactively change the parameters after setting them once, and once you commit, you can no longer control them. You don't need to enter the subobject mode either. In addition, your handlers refer to nonexistant controls, instead of&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;spn_spn_bevel1&amp;nbsp;&lt;/FONT&gt;and&amp;nbsp;&lt;FONT face="courier new,courier"&gt;spn_spn_bevel2&lt;/FONT&gt;, it should be&amp;nbsp;&lt;FONT face="courier new,courier"&gt;spn_spn_bevel1&amp;nbsp;&lt;/FONT&gt;and&amp;nbsp;&lt;FONT face="courier new,courier"&gt;spn_spn_bevel2&lt;/FONT&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;try destroyDialog paramChanger catch()
rollout paramChanger "parameter changer" width:250
(
	local obj, turbo1, ep

	spinner spn_height "Change Height " type:#float range:[1,300,40] scale:.1
	spinner spn_bevel1 "Bevel Height " type:#float range:[-10,20,7.7] scale:.001
	spinner spn_bevel2 "Bevel Outline " type:#float range:[-10,20,3.2] scale:.001
	spinner spn_turbo1 "TurboSmooth Iterations " type:#integer range:[0,4,2]

	on spn_height changed val do obj.height = val
	on spn_bevel1 changed val do ep.bevelHeight = val
	on spn_bevel2 changed val do ep.bevelOutline = val
	on spn_turbo1 changed val do turbo1.iterations = val

	on paramChanger open do
	( 
		delete objects
		obj = Cylinder radius:20 height:40 sides:10 heightsegs:4 isSelected:on
		ep = Edit_Poly animationMode:1 bevelType:2 bevelHeight:spn_bevel1.value bevelOutline:spn_bevel2.value
		ep.setOperation #Bevel

		addModifier obj ep
		local allFaces = #{1..ep.GetNumFaces()}
		ep.SetSelection #Face (allFaces - #{1, ep.GetNumFaces()})
		ep.SetOperation #Bevel

		turbo1 = TurboSmooth iterations:2
		addModifier obj turbo1
	)
) 
createDialog paramChanger&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 27 Jun 2023 10:07:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/i-am-not-able-to-figure-out-how-to-make-the-bevel-work-with/m-p/12063225#M2421</guid>
      <dc:creator>Swordslayer</dc:creator>
      <dc:date>2023-06-27T10:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: I am not able to figure out how to make the Bevel work with spinners, it may need controllers.</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/i-am-not-able-to-figure-out-how-to-make-the-bevel-work-with/m-p/12064048#M2422</link>
      <description>thanx</description>
      <pubDate>Tue, 27 Jun 2023 15:07:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/i-am-not-able-to-figure-out-how-to-make-the-bevel-work-with/m-p/12064048#M2422</guid>
      <dc:creator>heinz_krause</dc:creator>
      <dc:date>2023-06-27T15:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: I am not able to figure out how to make the Bevel work with spinners, it may need controllers.</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/i-am-not-able-to-figure-out-how-to-make-the-bevel-work-with/m-p/12066943#M2423</link>
      <description>thanx, it is working.</description>
      <pubDate>Wed, 28 Jun 2023 16:14:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/i-am-not-able-to-figure-out-how-to-make-the-bevel-work-with/m-p/12066943#M2423</guid>
      <dc:creator>heinz_krause</dc:creator>
      <dc:date>2023-06-28T16:14:09Z</dc:date>
    </item>
  </channel>
</rss>

