I may be doing it wrong because I've never used this, but I don't seem to be able to access the operator by doing this? The operator is defined outside the injected script.
On Tue, Nov 5, 2013 at 12:37 PM, gareth bell <[email protected]> wrote: > I think you need some PPG.Logic > > > http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=14003709&linkID=12544120 > > using an _OnChanged callback > > > > > ------------------------------ > Date: Tue, 5 Nov 2013 12:29:57 +0100 > Subject: Controlling a parameter "live" via slider through scripting > From: [email protected] > To: [email protected] > > > Hi list, > > My script generates a bevel operator on an object. I then want a PPG to > pop up that allows the user to change certain parameters of the bevel > operator. These parameters should update whenever the values in the PPG are > changed. However, they only update after the PPG is closed via OK. Can > someone point me in the right direction here? > > Script is roughly as follows: > > # Lots of stuff after which a bevel operator (op) is generated > MyPSet = A.ActiveSceneRoot.AddProperty("CustomProperty", False, > "Bevel_Options") > MyLayout = MyPSet.PPGLayout > MyPSet.AddParameter3("PBevelRatio", c.siFloat, 10, 0.01, 100) > MySlider = MyLayout.AddItem("PBevelRatio", "Ratio", c.siControlNumber) > > A.InspectObj(MyPSet, "", "Choose Bevel Options", c.siModal, False) > > op.Parameters("ratio").Value = MyPSet.Parameters("PBevelRatio").Value > > > Thank you > Christian >

