image replacement on a rigged doll

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
starchild
Posts: 22
Joined: Mon Nov 06, 2006 11:12 pm

image replacement on a rigged doll

Post 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.
User avatar
DK
Posts: 2891
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post 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
User avatar
synthsin75
Posts: 10253
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post 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.
User avatar
slowtiger
Posts: 6237
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post 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.
User avatar
DK
Posts: 2891
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post 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
User avatar
Spence
Posts: 20
Joined: Mon Nov 28, 2005 10:45 am
Location: British

Post 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
Why does rendering take so long?
User avatar
DK
Posts: 2891
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

Hi Spence.
PM me with your email address.

Cheers
D.K
Post Reply