Dear Chaos group members
I am trying to create a Library-GUI that should load different Dome-lights with different HDRIs attached (Basically what the Vray-Expressbar used to do in the past). Every-time a button gets pressed in the Library-GUI the current Domelight should be deleted and a new one with the desired texture imported from the corresponding file.
Sadly whenever i try to import, it creates a 2nd node that is non-select-able. This prevents to load the "new" dome light with the imported textures, but leaves me with the old one in place.
The manual approach (non desired) by going to File->Import...-> Fails!
Python in Rhino and C# GH with the following option: Fails!
Rhino.FileIO.FileReadOptions Opt = new Rhino.FileIO.FileReadOptions();
string Path = "....\\HDRI_PG_1928_DuskSun.3dm";
Rhino.RhinoDoc.ReadFile(Path, Opt);
RhinoCommand Fails!
rs.Command("-_import ....\\HDRI_PG_1928_DuskSun.3dm")
The only method that seems to work is if you drag and drop the file into the viewport and use import, then it creates just one node, and everything works.
Is there any chance:
1.) Either delete somehow the 2nd "Ghost node"?
2.) Or use the same function as the drag and drop import, which doesnt seem to work with one of the code-lines from above
3.) Or Change the texture of the HDRI per script?
I am working on Rhino 6 Version 6 SR16 and Vray for Rhinoceros 6 3.60.03
Grateful for any help or hints.
Kind regards
Marko
V-Ray for Rhinoceros 6 3.60.03
I am trying to create a Library-GUI that should load different Dome-lights with different HDRIs attached (Basically what the Vray-Expressbar used to do in the past). Every-time a button gets pressed in the Library-GUI the current Domelight should be deleted and a new one with the desired texture imported from the corresponding file.
Sadly whenever i try to import, it creates a 2nd node that is non-select-able. This prevents to load the "new" dome light with the imported textures, but leaves me with the old one in place.
The manual approach (non desired) by going to File->Import...-> Fails!
Python in Rhino and C# GH with the following option: Fails!
Rhino.FileIO.FileReadOptions Opt = new Rhino.FileIO.FileReadOptions();
string Path = "....\\HDRI_PG_1928_DuskSun.3dm";
Rhino.RhinoDoc.ReadFile(Path, Opt);
RhinoCommand Fails!
rs.Command("-_import ....\\HDRI_PG_1928_DuskSun.3dm")
The only method that seems to work is if you drag and drop the file into the viewport and use import, then it creates just one node, and everything works.
Is there any chance:
1.) Either delete somehow the 2nd "Ghost node"?
2.) Or use the same function as the drag and drop import, which doesnt seem to work with one of the code-lines from above
3.) Or Change the texture of the HDRI per script?
I am working on Rhino 6 Version 6 SR16 and Vray for Rhinoceros 6 3.60.03
Grateful for any help or hints.
Kind regards
Marko
V-Ray for Rhinoceros 6 3.60.03
Comment