Subject: Forcing absolute paths 2005-07-06 - By Halfdan Ingvarsson
Back There's actually more to it: Paths are stored as absolute but can be looked up in two ways.
How it works is that the path storage takes up two parameters. One is the actual storage and the other one is a kind of a "virtual" component and are usually named "*Path" and "*Name", respectively. (E.g. in the render options, the absolute path companion to "ImageFileName" is "ImageFilePath").
If you ask for the value of the "*Name" part, you get relative or absolute, depending if the item is in the project or not (as it would show up in the UI). On the other hand if you ask for the value of the "*Path" part you get the full name. The "*Path" part is what we use internally for all our path needs (it's really an object but the SDK conveniently translates a string from it when using GetValue).
If you run this script with a new scene:
LogMessage GetValue( "Passes.Default_Pass.RenderOptions.ImageFileName" ) LogMessage GetValue( "Passes.Default_Pass.RenderOptions.ImageFilePath" )
You'll get this:
'INFO : Render_Pictures\Default_Pass_Render.#.pic 'INFO : C:\db\Render_Pictures\Default_Pass_Render.#.pic
Now, if you set the path to "C:\temp\bob.#.pic" (outside the project) the result will be:
'INFO : c:\temp\bob.#.pic 'INFO : c:\temp\bob.#.pic
I agree that it is a wee bit weird but so are curling and cricket, and no-one bats an eyelid about those two.
- ?
> -- --Original Message-- -- > From: owner-xsi@(protected) > [mailto:owner-xsi@(protected)]On Behalf > Of Bernard Lebel > Sent: Wednesday, 06 July, 2005 09:08 > To: XSI@(protected) > Subject: Re: Forcing absolute paths > > > The problem is not to rebuild a path. The problem is that XSI seems to > randomly manage the "relativeness" of the path. As soon as you reopen > the scene, reimport the model, or update the ref model, XSI decides to > make that path relative or absolute. I want 100% absolute paths! > > > Cheers > Bernard > > > On 7/6/05, kim aldis <kim@(protected)> wrote: > > it's surprisingly difficult to work out if a path is valid > and exists or if > > it's just a local path. Especially with windows. It can be > done but it's > > messy. Python, luckily, will make life easier for you. > > --- > Unsubscribe? Mail Majordomo@(protected) with the following > text in body: > unsubscribe xsi >
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|