Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 10th, 2025, 8:57 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Experiment with SetTexture
PostPosted: December 8th, 2005, 12:40 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
I cannot figure out why my script is not duplicating a texture effect properly.

First I applied a Custom texture to an image, by setting Properties>>Effects (Texture) for the main image object. ( both "Main" pic and texture .bmp are shown on Pub page.)

Then I created script to achieve same thing. But do not get the same "look". ( using Invert Texture and Metal gloss )

I used the Script example from Help File for SetTexture. Got that working after some tweaking of path.

Attached .zip has both images... hence the filesize.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject:
PostPosted: December 8th, 2005, 5:23 am 
Offline

Joined: October 26th, 2004, 1:26 pm
Posts: 262
Quote:
<< "Then I created script to achieve same thing. But do not get the same "look". ( using Invert Texture and Metal gloss )" >>


Hi Lar,

That is because you have used a custom file to create the texture effect. I don't think 'custom file' or the sub-menu texture styles (Bamboo Weave, Cross Step, etc, etc) are supported in OpusScript? The first SetTexture() parameter requires a keyword. (or a variable containing that keyword). Chris, Paul or DW may know some clever workaround if it is at all possible to read the custom file.

Secondly, in your sample pub, you say that the image disappears. That is because your pathname was incorrect and also your object name (in the organiser) is not script compatible. ......you have 'Image 3' -- when it should be 'Image_3'.

In your script,, try this code on your button...

//-------

ImageUsed = SYSTEM_PUBLICATION_DIR + "\\SetTexture1 Resource\\picture 111sz.jpg"
Image_3.SetTexture("Metal",true,false,ImageUsed,false)

//-------


<ImageUsed> is the pathname of the image file, not the filename of your custom file you're using for the actual effect.

Failing a script solution to achieve your effect, you could have two images. (one with your textured look, initially hidden and stacked on top of the other image).

Hope this helps! :mrgreen:

_________________
Cheers,
Steve


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 58 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group