Thank you everyone for the additional tips!

On Wed, Nov 6, 2013 at 8:20 AM, Stefan Kubicek <s...@tidbit-images.com> wrote:

>  The cleanest way I suppose would be to have the PPG reside on the
> operator directly.
>
> Write a command to apply the op and display its PPG (points 1 and 2 in
> your list), then on the PPG there could be a button (calling a second
> command for instance) that freezes the object and performs your additional
> modeling operations (points 3 and 4).
>
> That's what I'd do. You could even create menu items for your command(s)
> and anchor them in one of the existing menus so you can call the
> operation(s) from there.
>
> Thank you for the links, I think these contain what I need.
>
> What would be the standard way for controlling operators? I'm not trying
> to do anything special, really just looking for the most straightforward
> way to:
> 1) Add a bevel operator
> 2) Allow the user to change settings of the bevel operator
> 3) Freeze the object
> 4) Perform additional modeling operations
>
> Step 2) is the only part where I need interactive user input. Once the
> user is happy and clicks OK, steps 3) and 4) must be automatically
> performed by the script.
>
>
> On Tue, Nov 5, 2013 at 1:12 PM, Stefan Kubicek <s...@tidbit-images.com>wrote:
>
>> It is quite unusual to update operators based on another global PPG's
>> parameter I think, though theoretically it should work if the operator uses
>> the Property's relevant parameters as an input.
>>
>> Check out
>> http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_om/CustomOperator.html
>>
>> and in particular:
>> http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_om/CustomOperator.AddInputPort.html
>>
>>
>>
>> No, it's not Immediate Mode. After the PPG is closed, the operator values
>> update correctly. But they don't update when changing the slider value
>> while the PPG is open.
>> I will delete the custom property once the user closes the PPG, so I
>> think it's not too important where it's stored.
>>
>>
>> On Tue, Nov 5, 2013 at 12:37 PM, Stefan Kubicek 
>> <s...@tidbit-images.com>wrote:
>>
>>> Could it be that you have immediate mode enabled?
>>> Also, why do you store the parameters in a global PPG in the SceneRoot
>>> rather than on the actual operator per object?
>>>
>>>
>>> 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
>>>
>>>
>>>
>>>
>>> --
>>> -------------------------------------------
>>> Stefan Kubicek
>>> -------------------------------------------
>>> keyvis digital imagery
>>> Alfred Feierfeilstraße 3
>>> A-2380 Perchtoldsdorf bei Wien
>>> Phone: +43/699/12614231
>>> www.keyvis.at ste...@keyvis.at
>>> -- This email and its attachments are --
>>> --confidential and for the recipient only--
>>>
>>
>>
>>
>>
>> --
>> -------------------------------------------
>> Stefan Kubicek
>> -------------------------------------------
>> keyvis digital imagery
>> Alfred Feierfeilstraße 3
>> A-2380 Perchtoldsdorf bei Wien
>> Phone: +43/699/12614231
>> www.keyvis.at ste...@keyvis.at
>> -- This email and its attachments are --
>> --confidential and for the recipient only--
>>
>
>
>
>
> --
> -------------------------------------------
> Stefan Kubicek
> -------------------------------------------
> keyvis digital imagery
> Alfred Feierfeilstraße 3
> A-2380 Perchtoldsdorf bei Wien
> Phone: +43/699/12614231
> www.keyvis.at ste...@keyvis.at
> -- This email and its attachments are --
> --confidential and for the recipient only--
>

Reply via email to