Notifications
Clear all

[Closed] Simple Plugin and MapButton

I’m getting an Error when using a map button in a simple plugin.

Selecting the “None” map type causes an “Unable to Convert: undefined to type: TextureMap” It does not have this behavior when on other UI elements. like a rollout floater or standard dialog when selecting “None.”

Can I trap this somehow before this error happens?


plugin simpleObject EnviromentPerScene 
name:"ENV- Environment Control"
classID:#(0x1f6ee536, 0x7cbab9d)
(
parameters main rollout:params
	(
	environmentMap_ type:#texturemap ui:UIenvironmentMap
	)
rollout params "Environment Control"
	(
	mapbutton UIenvironmentMap "" width:140
	)
tool create
	()
)
select ( EnviromentPerScene() )

Thanks in Advance.

1 Reply

Got it to work by unlinking the Parameter/UI link and managing in rollout… I don’t know if it’s proper… but it’s working…


plugin simpleObject EnviromentPerScene 
name:"ENV- Environment Control"
classID:#(0x1f6ee536, 0x7cbab9d)
(
parameters main rollout:params
	(
	environmentMap_ type:#texturemap  
	)
rollout params "Environment Control"
	(
	mapbutton UIenvironmentMap "" width:140
	
        on UIenvironmentMap picked MapVal do
            (
            environmentMap_ = MapVal
            UIenvironmentMap.text = (MapVal as string)
            )
        )
tool create
	()
)
select ( EnviromentPerScene() )