Results 1 to 14 of 14

Thread: script idea - edit selected texture in photoshop / other app

  1. #1

    script idea - edit selected texture in photoshop / other app

    maybe i missed something, or is there already a script which opens the current image editor selection right in photoshop (or any other defined application)? currently have to edit a lot of textures from commercial imported assets with terrible file naming conventions, so looking up for them in the file selcetion dialog is driving me crazy. this should work platform indipendent (i am on a mac)...

    cheers

    markus
    3dworks visual computing
    demo reel on vimeo
    instagram

    OSX 10.12.x, macpro 5.1, nvidia gtx 980 ti, LW2015.x / 2018.x, octane 3.x

  2. #2
    I like the idea of a script for this very much. While we hope for someone to give it a go, this is what I do when trying to modify an image mapped to an object, while in modeler, Select the surface by activating PickSurf, in layout it's the same thing but using VPR, then shift clicking on the geometry, This opens the surface editor with the appropriate surface selected. Then go to the [T] where the image is (color channel for example) then click on the "edit image" button that is below the thumbnail. Once the image editor comes up with your image highlighted click on Replace, if the list is really long on the file editor select the name it shows below and paste it on the search bar, once they have been filtered right click on the image and select open with.. Once it's modified and saved, go back to Lightwave, close the replace file requester and hit reload on the image editor.

    If anyone is doing this in a faster fashion let us know.
    Last edited by Danner; 02-21-2017 at 09:50 AM.

  3. #3
    I believe Sensei already has a plugin that does some of this. At the very least it auto updates the texture in LightWave.

    Even if it doesn't, something like this would have to be a C plugin or in python, not lscript.
    My opinions and comments do not represent those of my employer.
    www.ernestpchan.com
    www.zazzle.com/gopuggo

  4. #4
    @ernpchan: yes, probably it needs to access OS informations for file path etc - so probably lscript is not the best way to do it. i'm not an expert, just suggesting the idea here :-)

    @danner, yes that's more or less the way i'm doing now, but when using hundreds of similar named images it is becoming a pain... i wonder why LW does not have this natively, most otehr 3d apps have this option as a native solution, you just need to set it up somewhere in preferences. maybe LW 2017 then? NT are you listening?

    still, if someone would give this a try, i would be happy to pay a small shareware fee. gonna check out truearts plugins as well, but i seem to remember it was windows only.

    EDIT: i found out that blochi did something like this a long time ago, but only for windows. not sure if it is still working with current LW.

    http://www.blochi.com/gfx/imgeditor_en.html

    cheers

    markus
    Last edited by 3dworks; 02-21-2017 at 09:59 AM.
    3dworks visual computing
    demo reel on vimeo
    instagram

    OSX 10.12.x, macpro 5.1, nvidia gtx 980 ti, LW2015.x / 2018.x, octane 3.x

  5. #5
    It's an LSC so it might work on the Mac, it spits out an error every time you switch images but it works on Modeler 2015 64bits =)

    A bit unrelated but I need to vent a little, I configured Unity to open photoshop when I double click on an image, and it's very cool, but what really frustrates me is that Unity lacks the shift-clicking capability of lightwave dealing with materials, I always have a hard time finding the one I want to edit.


    Update: same thing in Layout 2015 64bits, it spits out an error but works fine.
    Last edited by Danner; 02-21-2017 at 10:29 AM.

  6. #6
    Quote Originally Posted by Danner View Post
    It's an LSC so it might work on the Mac, it spits out an error every time you switch images but it works on Modeler 2015 64bits =)

    A bit unrelated but I need to vent a little, I configured Unity to open photoshop when I double click on an image, and it's very cool, but what really frustrates me is that Unity lacks the shift-clicking capability of lightwave dealing with materials, I always have a hard time finding the one I want to edit.

    Update: same thing in Layout 2015 64bits, it spits out an error but works fine.
    it's giving an error here, but then it will open PS but not load the image file. maybe it just needs just a small fix, but unfortunately it's a compiled script.
    3dworks visual computing
    demo reel on vimeo
    instagram

    OSX 10.12.x, macpro 5.1, nvidia gtx 980 ti, LW2015.x / 2018.x, octane 3.x

  7. #7

    did something like that using an AHK script some time back...

    http://forums.newtek.com/showthread....-AHK-EditImage


    crude hack, kinda works.
    LW vidz   DPont donate   LightWiki   RHiggit   IKBooster   My vidz

  8. #8

    hm, thought that had plugin had stopped working.

    neat  :)

    LW vidz   DPont donate   LightWiki   RHiggit   IKBooster   My vidz

  9. #9
    Quote Originally Posted by 3dworks View Post
    it's giving an error here, but then it will open PS but not load the image file. maybe it just needs just a small fix, but unfortunately it's a compiled script.
    Maybe reach out to blochi to see if he can update it or release it as uncompiled so someone can fix it.
    My opinions and comments do not represent those of my employer.
    www.ernestpchan.com
    www.zazzle.com/gopuggo

  10. #10
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,897
    Quote Originally Posted by 3dworks View Post
    currently have to edit a lot of textures from commercial imported assets with terrible file naming conventions,
    I would drag'n'drop entire image folder to Photoshop at once..
    .. and then use Auto Update Images,
    http://autoupdateimages.trueart.eu
    and start painting in Photoshop on loaded images.

    Quote Originally Posted by 3dworks View Post
    gonna check out truearts plugins as well, but i seem to remember it was windows only.
    Because Auto Update Images is using Windows OS functions directly to monitor files on disk without user having anything to do to reload them..

    But TrueArt's Modeling Pack has tool, Reload Images.
    It should be in TrueArtLayoutPack.plugin
    It's ignoring whether file was created right now, or earlier. Simply reloading the all images.
    Last edited by Sensei; 02-27-2017 at 10:58 AM.

  11. #11
    thanks, good tips. in my case i need to edit only certain textures which i identify inside LW, so the opening in PS first will not help here. actually finding/revealing the selected image (in image editor) in OS finder would help more. but imo a direct functionality to send a selected texture to an image editor is something seriously missing in current LW.
    3dworks visual computing
    demo reel on vimeo
    instagram

    OSX 10.12.x, macpro 5.1, nvidia gtx 980 ti, LW2015.x / 2018.x, octane 3.x

  12. #12
    Quote Originally Posted by 3dworks View Post
    actually finding/revealing the selected image (in image editor) in OS finder would help more. but imo a direct functionality to send a selected texture to an image editor is something seriously missing in current LW.
    I already have a script that does the first part. Just don't know if it'll work on OS as I don't use a mac. The second part should be doable...just wasn't working for me last night. May have been user error in my code.
    My opinions and comments do not represent those of my employer.
    www.ernestpchan.com
    www.zazzle.com/gopuggo

  13. #13
    Super Member vncnt's Avatar
    Join Date
    Sep 2003
    Location
    Amsterdam
    Posts
    1,570
    Quote Originally Posted by 3dworks View Post
    maybe i missed something, or is there already a script which opens the current image editor selection right in photoshop (or any other defined application)? currently have to edit a lot of textures from commercial imported assets with terrible file naming conventions, so looking up for them in the file selcetion dialog is driving me crazy. this should work platform indipendent (i am on a mac)...

    cheers

    markus
    I know this is an old thread.
    It was difficult to find documentation about selecting an Image by filename in LScript when all AVI files have unique filenames but have the same name in the image list, so I tried something that you might want to use to feed a spawn() function to feed an external image editor process like krita.exe:

    Code:
    result = "";
    newFileName = "S:\\Content\\myFile.avi";
    index = 0;
    img = Image();
    while(img) {
    	
    	++index;
    	
    	// GET FILENAME AT FRAME 0
    	result += string(string(index) +": " + string(img.filename(0)) + " " + string(img.id) + "   " );
    	
    	// TAKE ACTION
    	if(index==... || img.id==... || img.name=="..." || img.filename(0)=="...") {
    		
    		// REPLACE SPECIFIC IMAGE FILE
    		img.replace(newFileName);
    		
    		// loadimage(); clearimage(); replaceimage();
    		// spawn(); systemex(); wait(); terminate();
    		break;
    		}
    	
    	img = img.next();
    	}

  14. #14
    Quote Originally Posted by vncnt View Post
    I know this is an old thread.
    It was difficult to find documentation about selecting an Image by filename in LScript when all AVI files have unique filenames but have the same name in the image list, so I tried something that you might want to use to feed a spawn() function to feed an external image editor process like krita.exe:

    Code:
    result = "";
    newFileName = "S:\\Content\\myFile.avi";
    index = 0;
    img = Image();
    while(img) {
    	
    	++index;
    	
    	// GET FILENAME AT FRAME 0
    	result += string(string(index) +": " + string(img.filename(0)) + " " + string(img.id) + "   " );
    	
    	// TAKE ACTION
    	if(index==... || img.id==... || img.name=="..." || img.filename(0)=="...") {
    		
    		// REPLACE SPECIFIC IMAGE FILE
    		img.replace(newFileName);
    		
    		// loadimage(); clearimage(); replaceimage();
    		// spawn(); systemex(); wait(); terminate();
    		break;
    		}
    	
    	img = img.next();
    	}
    thanks for getting back!
    as i am no coder, i just wish this could be useful for someone building a complete script or plugin. i will try to ask oliver if he wants to include this into OD tools one day... cheers markus
    3dworks visual computing
    demo reel on vimeo
    instagram

    OSX 10.12.x, macpro 5.1, nvidia gtx 980 ti, LW2015.x / 2018.x, octane 3.x

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •