I have made a reusable material setup for my DAZ meshes.
Grouped everything used in the material and saved as an orb package.
Idea is to import the mesh and the node with materials.
Then run code that connect mesh and material.
After that it should change the A_FILENAME on some of the texture node to match the specific mesh.
I have written code that connects the mesh pins but when I try to change A_FILENAME on a texture I get an error.
Path seems ok.
Is there something specific with an imported asset that includes texture that prevents me from changing them by code?
I tried the following as well.
I manually changed the texture to the image i wanted.
Then in code i printed out the path with mytexture.getAttribute(octane.A_FILENAME) and i could see it pointing to the image in question.
in the following code row i did mytexture.setAttribute(octane.A_FILENAME, (with the path to the same image as I got above), true) but then I got the error.
Attached error message in case that can help to figure out whats wrong.
EDIT:
I tried this.
currentTextureNode:setAttribute(octane.A_FILENAME,currentTextureNode:getAttribute(octane.A_FILENAME), true)
That is to set path to same at it was already and that works so it does not seems to be anything preventing me prom setting the path.
If I look at the path it has to begin with and been set back to again it is, "assets\imagename.jpg"
The image I try to set is something like c:/xx/image.jpg
So it's a absolute path in the problem case and a relative in the case that works.
Is that the problem and how do I solve it?
EDIT:
OK, I can se that there is a A_PACKAGE attribute in the texture.
So how do I set it back to not use Package and just a file.
Imported asset nodes. Cant change filename on texture
Windows 7 Ultimate 64bit 32Gb RAM. Intel Core i7-5820K [email protected] GHZ. Display uses a Gigabyte GTX 460 1Gb VRAM. Octane uses an EVGA GTX 970 4Gb VRAM.
Hi,
maybe a stupid question, but why you have :rgba at the end of the path name?
ciao beppe
maybe a stupid question, but why you have :rgba at the end of the path name?
ciao beppe
- stratified
- Posts: 945
- Joined: Wed Aug 15, 2012 6:32 am
- Location: Auckland, New Zealand
hi,
Octane appends the :rgba in the error message. It indicates that the texture it couldn't load was meant to be used as an image with texture (in case of a float image texture it would output :mono).
cheers,
Thomas
Octane appends the :rgba in the error message. It indicates that the texture it couldn't load was meant to be used as an image with texture (in case of a float image texture it would output :mono).
A_PACKAGE
and A_FILENAME
are coupled. When you want to load the image directly from file, you need to clear the package attribute via node:clearAttribute(octane.A_PACKAGE)
.cheers,
Thomas