Macrorecorder doen't load texture file

3D Studio Max Plugin (Export Script Plugins developed by [gk] and KilaD; Integrated Plugin developed by Karba)
Forum rules
Please post only in English in this subforum. For alternate language discussion please go here http://render.otoy.com/forum/viewforum.php?f=18
Post Reply
User avatar
mbetke
Licensed Customer
Posts: 1295
Joined: Fri Jun 04, 2010 9:12 am
Location: Germany
Contact:

I I try to record some steps for a script which I need for some automatation and I created a material. The problem is I can't get the texture to load. The recorder doesn't record Octane texture assignment. It worked well in Scanline.

This is what gets recorded:

Code: Select all

sceneMaterials["Wood"].diffuse_input_type = 2
sceneMaterials["Wood"].diffuse_tex = RGB_image ()
Now I think I need one more line to the texture path and texture. I hope this is not to special and someone can hep here. :)
PURE3D Visualisierungen
Sys: Intel Core i9-12900K, 128GB RAM, 2x 5090 RTX, Windows 11 Pro x64, 3ds Max 2024.2
User avatar
paride4331
Octane Guru
Posts: 3821
Joined: Fri Sep 18, 2015 7:19 am

Hi Mbetke,
I asked more information to developers, To expose a property of a material, you will want to use the setProperty function (there is also a getProperty function if you need that).
Example: setProperty $.material.diffuse_tex "filename" "[filepath_of_the_texture_file]"
You may want to use "getProperty" and/or "getAttribute" calls to handle checks for attributes
so it would be something like
setProperty $sceneMaterials["Wood"].diffuse_tex "filename" ""c:/dummy.png""
not sure about the '$' sign
they will investigate why this can not be recorded by the macro recorder.
Regards
Paride
2 x Evga Titan X Hybrid / 3 x Evga RTX 2070 super Hybrid
User avatar
mbetke
Licensed Customer
Posts: 1295
Joined: Fri Jun 04, 2010 9:12 am
Location: Germany
Contact:

Thanks. :) Really nice.
PURE3D Visualisierungen
Sys: Intel Core i9-12900K, 128GB RAM, 2x 5090 RTX, Windows 11 Pro x64, 3ds Max 2024.2
User avatar
mbetke
Licensed Customer
Posts: 1295
Joined: Fri Jun 04, 2010 9:12 am
Location: Germany
Contact:

I wonder if there is list of Mascript commands which are related to Octane. I'm no scripter at all but maybe can doo small stuff on my own.
PURE3D Visualisierungen
Sys: Intel Core i9-12900K, 128GB RAM, 2x 5090 RTX, Windows 11 Pro x64, 3ds Max 2024.2
Post Reply

Return to “Autodesk 3Ds Max”