Python API - More functions for automation

Share any feature you'd like to see in coming releases
Post Reply
Wolf
Posts: 2
Joined: Mon Mar 29, 2021 10:38 am

Python API - More functions for automation

Post by Wolf » Mon Mar 29, 2021 4:59 pm

Hi SimLab Team,

thank you for the last updates, epecially the getNodeBySubString()-function. Works perfectly!

I´ve been trying to automate our process, but there are some functions missing, especially when it comes to generating and assigning Materials. So, here are some of the functions that I would like to see in Python Scripting API:

- selectedNode.setMaterial(str)
-> To change the Material of a Node.


- selectedMaterial.setETA(float) / .setReflection(float)
-> Not sure what ETA abbreviates, but it would be nice to get some handle on the gloss properties in general.


- createNewPortal(selectedNode)
-> change a Node to be a Portal-Node.


- I would like to have a documentation on how to write .SimLabAA-files for the Door-Animator. I tried to figure it out, but the files I saved had no Information in them.


- Not sure if there is a possibility to use external Python Modules? If there isn´t, it would be a good thing to add. Especially the csv package would be of use, or any other option of reading external CSVs.

Those would be of great help!
Thank you!

User avatar
SimLab
Posts: 3322
Joined: Mon Jan 04, 2010 8:09 am

Re: Python API - More functions for automation

Post by SimLab » Wed Mar 31, 2021 3:45 pm

Thank you for the input will share those suggestions with developers.

User avatar
jsaid
Posts: 191
Joined: Thu Apr 16, 2015 2:19 pm
Location: Amman, Jordan
Contact:

Re: Python API - More functions for automation

Post by jsaid » Mon Apr 26, 2021 4:32 pm

@Wolf,

In SLC10.19, to be released soon, you will find new Python functions provided as the following:
- getEta()
- setEta(float)
- replaceMaterial(node, newMaterial)
- replaceObject(str, bool, str) that replaces all scene nodes in the scene that match certain string criteria by an imported file.

By the way, it seems that eta stands for the Greek letter (η) used in electromagnetics, so it is not an abbreviation or acronym.

Jamal
Last edited by jsaid on Tue Apr 27, 2021 12:18 pm, edited 2 times in total.

User avatar
jsaid
Posts: 191
Joined: Thu Apr 16, 2015 2:19 pm
Location: Amman, Jordan
Contact:

Re: Python API - More functions for automation

Post by jsaid » Tue Apr 27, 2021 12:15 pm

@Wolf,

The documentation of SimLab Python API has recently been updated. You can learn more about the new functions by giving them a look if you wish. Here is the link.

P.S.
Please note that the new functions will be available soon in SLC10.19.

Jamal

Wolf
Posts: 2
Joined: Mon Mar 29, 2021 10:38 am

Re: Python API - More functions for automation

Post by Wolf » Wed Apr 28, 2021 7:57 am

Hi,
these seem very useful, thank you very much!! Can't wait for 10.19 now :)

Eta being η makes sense! But I still don't quite get what kind of visible material property is connected to it. It also correlates to viscosity, but that´s not really a visible surface quality as well....

However,
greetings from Germany and thanks alot!

Post Reply