Page 1 of 1

image replacement on a rigged doll

Posted: Wed Mar 18, 2009 2:36 am
by starchild
hey guys.

im using photoshop to create a cutout character on AS.
everything just fine but...

im wondering how can I replace the leg's images of
my already rigged cut-out character BUT still keep the bones setups and stuff intact for these legs im changing; (i think my bones are fine, i just wanted to change the legs images);

sorry if it's a dumb question to ask but i can't find an easy way to do it, and im sure there must be a very easy one.

Posted: Wed Mar 18, 2009 2:47 am
by DK
Genete wrote this great little script for me that refreshes and replaces images from AS.

Cheers
D.K

-- **************************************************
-- Provide Moho with the name of this script object
-- **************************************************

ScriptName = "GE_reload_image"

-- **************************************************
-- General information about this script
-- **************************************************

GE_reload_image = {}
function GE_reload_image:Name()
return "Reload Image"
end



function GE_reload_image:Version()
return "1.0"
end

function GE_reload_image:Description()
return "Reload image form disk"
end

function GE_reload_image:Creator()
return "Carlos López (Genete)"
end

function GE_reload_image:UILabel()
return "Reload Image Source"
end


-- **************************************************
-- The guts of this script
-- **************************************************

function GE_reload_image:IsEnabled(moho)

if (moho.layer:LayerType() == MOHO.LT_IMAGE) then

return true

end

return false

end

function GE_reload_image:Run(moho)

local l=moho.layer
if(l:LayerType()~=MOHO.LT_IMAGE) then
return
else
-- print("reloading...")
l=moho:LayerAsImage(l)
local fname = l:SourceImage()
l:SetSourceImage(fname)
return
end
end

Posted: Wed Mar 18, 2009 3:07 am
by synthsin75
Or in the image layer's layer settings, image tab, you just need to assign the new source image. That script is for updating a changed image, but it sounds like you want to swap images.

Posted: Wed Mar 18, 2009 11:25 am
by slowtiger
You can always assign a new image for one which already is imported and rigged. Just go inside the layer properties and assign a new source.

If you don't see a change, just close the AS file and open it again. It now has updated all image information.

Posted: Wed Mar 18, 2009 11:36 am
by DK
If you don't see a change, just close the AS file and open it again. It now has updated all image information.
Slowtiger, This is what the script that Genete wrote, (above), does without the user having to close and re-open AS. It's a real timesaver for people who use a lot of images in their work. It came about when I was using image sequences in a project and photoshopping them as I went along but was frustrated with AS not refreshin the source sequence without shutting down and re-assigning etc hence a thread on the forum resulted in this Lua script from Genete. it's fantastic! :)

Cheers
D.K

Posted: Tue Dec 06, 2011 12:05 am
by Spence
Hi DK...
I realise that this is an old thred but I cant seem to get the ge_reload_image.lua script to work?

In another post you said you deleated the ******'s. This too doesn't work for me? could you take a look at the script you've installed and copy it!

Ta,
Spence

Posted: Tue Dec 06, 2011 12:30 am
by DK
Hi Spence.
PM me with your email address.

Cheers
D.K