Profile Picture

Can someone tell me what I am doing wrong with this script please?

Posted By Data Juggler 4 Years Ago
You don't have permission to rate!

Can someone tell me what I am doing wrong with this script please?

Author
Message
Data Juggler
Data Juggler
Posted 4 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)

Group: Forum Members
Last Active: 9 Months Ago
Posts: 1.8K, Visits: 5.6K
Edit: 11.22.2021: I fixed it, by cloning the prop, and applying the images to each prop, then hiding all the props, and each loop I show one of the cloned props, and hide the last prop.

The code is checked in on Git Hub. Video coming soon, I am trying to think of another use besides a sign.
https://github.com/DataJuggler/PythonScripts/blob/main/ImageRotator.py
--------

I have a python script called ImageRotator.py:
https://github.com/DataJuggler/PythonScripts/blob/main/ImageRotator.py

What am I trying do is apply a series of images to a prop, similar to an animated Gif:

I have a simple prop I created, and I select SignFace whenever I run the script. The last image applies, and doesn't animate.

I suspect I am doing something wrong around this:

result = material_component.LoadImageToTexture(mesh_name, material_name, texture_channel, fileName)

Thanks for any help, I think this script could be useful if I can get it to work.

https://forum.reallusion.com/uploads/images/9eb56cb5-67b9-4df2-85d7-8a9b.png

Here are the 5 images I am using:
https://forum.reallusion.com/uploads/images/fc2fa18a-273d-413e-affe-c8ec.png
https://forum.reallusion.com/uploads/images/e26d1f17-801b-442b-9495-5b27.png
https://forum.reallusion.com/uploads/images/df7e74e8-5131-4d54-975d-c5d2.png
https://forum.reallusion.com/uploads/images/083b0c7f-bea4-424a-a852-c596.pnghttps://forum.reallusion.com/uploads/images/d985872d-5c10-4b3d-b0d3-b462.png





Creator of the free website:
PixelDatabase.Net
A Free Online Text Based Image Editor
https://forum.reallusion.com/uploads/images/6e6663e2-0ecf-447a-ab3d-d49d.png

Data Juggler
Data Juggler
Posted 4 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)

Group: Forum Members
Last Active: 9 Months Ago
Posts: 1.8K, Visits: 5.6K
I thought I needed AddDiffuseKey, but that only works for colors.

Is there a way to do this?






Creator of the free website:
PixelDatabase.Net
A Free Online Text Based Image Editor
https://forum.reallusion.com/uploads/images/6e6663e2-0ecf-447a-ab3d-d49d.png

videodv
videodv
Posted 4 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)Distinguished Member (2.9K reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 342, Visits: 12.0K
I tried to do this sometime ago and was unable to do so, the issue is you cannot set a key to change the material.
Chris.
Data Juggler
Data Juggler
Posted 4 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)Distinguished Member (13.9K reputation)

Group: Forum Members
Last Active: 9 Months Ago
Posts: 1.8K, Visits: 5.6K
Yeah, I switched it to now I clone the prop x number of times based on the number of images in a folder (number cloned = numberImages - 1), and am working on showing a different prop at each loop, and hiding the rest.

Thanks for verifying what I had just figured out.




Creator of the free website:
PixelDatabase.Net
A Free Online Text Based Image Editor
https://forum.reallusion.com/uploads/images/6e6663e2-0ecf-447a-ab3d-d49d.png




Reading This Topic