ScriptSpot

Forum topic · General Scripting

load viewport background

By titane357 · 2015-03-23

Description

hello

I made a little script which create a Attribute holder.
It store camera properties (height and width) so when I switch to another camera, I can click "apply" and retrieve camera parameters.

I would like to make the same thing for viewport background.

I wrote in the rollout :
editText edt_path "Background Image:" labelOnTop:true
and then when I want to apply
backgroundimagefilename = edt_path as Filename

Don't work.
but for eg backgroundimagefilename ="e:/x.jpg" is ok.

Somebody can help converting edt_path to something which can work ?
thanks.

Comments (3)

titane357 · 2015-03-23

Thank you sooo much Pixamoon !!!!

pixamoon · 2015-03-23

no prob, Happy to help :)

`

pixamoon · 2015-03-23

I think you need to call "text" propriety of edt_path


backgroundimagefilename = edt_path.text