scripting settexturefilename misses file-path (resolved)

the code below worked until 3DCanvas 8.2
Now, I am using 9.03 and the following fails for all cases where the installpath of the programm is not in the hirarchie of the textures path. The workaround is to set the material to the correct path inside Material editor, but the pitfall is you have to change it for really every different texture

Set Matbase = Scene.CreateMaterial
textbase = "d:programme3d canvasmediatexturesYcleantrack1.tga"
MsgBox("Textbase=" & textbase) ‘-> the message box shows d:programme3d canvasmediatexturesYcleantrack1.tga
MsgBox( matbase.gettexturefilename)’ the messagebox shows Ycleantrack1.tga the path information is lost. <!– s:!: –><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!– s:!: –> <!– s:?: –><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!– s:?: –>



Yes, I’ve dropped explicit paths entirely. Internally, I use a &quot;add search path&quot; approach.

3DC should find almost any file, I think, as long as it is in your &quot;My Documents&quot; folder, or on your desktop. At least I think it should, based on what I see in the code.

Can you give me a specific example of where this causes a problem? I mean a case where 3DC doesn’t find a texture.

Ok, see your point. For me it is a bit odd. I think explicit given paths should be read at first, and only if not found the ‘automagically’ microsoftish search path should be taken into account. Specially in the ms Trainsimulator scene there exist tons of different textures all having the same name. For tracks, my obsession, it is usually ACleantrack1 and Acleantrack2. In my given incident I explicitely used Ycleantrack1, the Y beeing used for my own tracktexture. But usually the reskinners or repainters alter the texture by using the same filename. And for me it is useful to do optimizations in the one or other direction, by explicit referring to a texture in a dedicated path.

regards roman, aka ytracks

Sorry for boaring you, but for me there is another issue:


You explicit discuss the possiblity of installing multiple versions of 3dcanvas and 3dcrafter in parallel, although you do not add the version to the installer and make administration of your software hm, let’s say amazing? Maybe I missed that part in MS Style guide or .net documentation that all programs have to share the same name? Even MS does not follow this new rule <!– s:-) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":-)" title="Smile" /><!– s:-) –>

regards Roman

PS: kep up the good work, but beware of too much MS ‘automagic’

well I am using visita and there is a option to show version numbers in Control PanelPrograms and Features, See the pict attached. I should think all OS would have this option some place.
see [url:3c5ossrz]http&#58;//techlogon&#46;com/2011/04/02/how-to-view-the-version-number-of-programs/[/url:3c5ossrz]

[attachment=0:3c5ossrz]<!– ia0 –>Clipboard01.jpg<!– ia0 –>[/attachment:3c5ossrz]

I’d like to change 3DC to look at the folder of the current model for textures before looking elsewhere. I’ll see what I can do for the next release.

I have changed 3DC so it looks in the folder the model is located before looking at any other folders. This should correct this problem I think. All that is necessary to ensure the correct texture is loaded is that it be in the same folder as the model.

You must be logged in to reply in this thread.

7 posts
recent posts