Great! I was a bit confused by the example as it did it all on one line of
code. This wouldn't work:

oDef.InputParamDefs.GetParamDefByName( "reflectivity" ).DefaultValue = 0.3

I'll try yours, thanks!


On Wed, Jan 9, 2013 at 3:32 PM, Stephen Blair <stephenrbl...@gmail.com>wrote:

>  Hi
>
> If you wanted to change the default value, you do something like this:
>
>
> from siutils import si        # Application
> from siutils import log        # LogMessage
> from siutils import disp    # win32com.client.Dispatch
> from siutils import C        # win32com.client.constants
>
> # Get ShaderDef for the Environment shader
> sProgID = "Softimage.mia_material_phen.1.0"
> oDef = si.GetShaderDef( sProgID )
>
> # Get ShaderParamDef for the Tranformation parameter
> oReflectivity = oDef.InputParamDefs.GetParamDefByName( "reflectivity" )
>
> # Change the default value
> oReflectivity.DefaultValue = 0.333
>
>
>
>
>
>
>
>
>
> On 09/01/2013 8:58 AM, Arvid Björn wrote:
>
>
> Honestly didn't know that existed, but I'd rather have it as a plugin on
> the workgroup so I can keep it general across our workstations and future
> versions, thanks though. =)
>
>
>
>
>  On Wed, Jan 9, 2013 at 2:39 PM, César Sáez <cesa...@gmail.com> wrote:
>
>> Or just use the preset manager :)
>>
>>
>> On Wed, Jan 9, 2013 at 2:33 PM, Arvid Björn <arvidbj...@gmail.com> wrote:
>>
>>> Thanks, sounds good! A default scene takes care of everything except
>>> default shader definitions.
>>>
>>> Can't get it to work though, I'm using the example in that article to
>>> try and change the architectural shader, but using the examples and looking
>>> through the SDK I can't figure out how to actually set the values, which
>>> method or syntax should I use?
>>>
>>>     if "Softimage.mia_material_phen.1.0" in sProgID:
>>>         oDef.InputParamDefs.GetParamDefByName( "reflectivity" ) --> ???
>>>
>>>
>>>
>>>
>>>  On Wed, Jan 9, 2013 at 12:02 PM, Stephen Blair <stephenrbl...@gmail.com
>>> > wrote:
>>>
>>>> You could use events eg OnNewScene.
>>>> Or create your own presets?
>>>>
>>>> I'd avoid editing the factory SPDLs and presets (I think you can
>>>> probably find a number of posts from Luc-Eric about defaults and spdls and
>>>> the factory location)
>>>>
>>>> For shaders, you can use events to override SPDL defaults with a
>>>> OnCreateShaderDef
>>>> http://xsisupport.com/2012/02/27/overriding-spdl-defaults/
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On 09/01/2013 5:20 AM, Arvid Björn wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Is it possible to change default settings of the rendering ppg,
>>>>> architectural shader settings, geo approx, lights etc?
>>>>>
>>>>> There are so many things that I constantly edit because the default
>>>>> settings isn't really up to date. I've made a few script buttons for it,
>>>>> but I'd rather just have different default settings.
>>>>>
>>>>> I'd be interested in hearing how you all solve this on a daily basis.
>>>>> Can you dig up the SPDLs and just edit those? Could it even be put in a
>>>>> workgroup so it works globally?
>>>>>
>>>>>
>>>>> Cheers
>>>>>
>>>>
>>>>
>>>
>>
>
>

Reply via email to