Profile Picture

Python FAQ Tracker

Posted By RobertoColombo Last Year
You don't have permission to rate!
Author
Message
RobertoColombo
RobertoColombo
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)

Group: Forum Members
Last Active: Last Month
Posts: 1.6K, Visits: 3.0K
Hi,

I thought it might be useful to insert in a single thread all the questions & doubts that will come out while developing Python plug-ins.
The idea is simple: put a number before the text and let's have RL answering them one by one.
Hereafter are the first ones that popped up after approaching iClone Python for few minutes.

Cheers

  Roberto

My PC:
OS: Windows 10 Pro English 64-bit / CPU: Intel i7-9700 3.6GHz / MB: ASUS ROG Strix Z390  RAM: 32GB DDR4 2.6GHz / HD: 2TB+3TB  /  
SSD: 2x512GB Samsung 860 EVO / 
VB: Palit GTX2080 TI GamingPro 11GB / AB: embedded in the MB and VB (audio from the VB with an HDMI splitter) / DirectX: 12

RobertoColombo
RobertoColombo
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)

Group: Forum Members
Last Active: Last Month
Posts: 1.6K, Visits: 3.0K
1. Where shall we put the main.py Pythin file ?
    The doc is not clear: shall we create a new folder called "OpenPlugin" ?
2. in order to use Qt libs, shall we install the whole Qt package or are already part of iClone 7.4 setup files ?
3. Shall we download and install pyside2 and shiboken2 or are already part of iClone 7.4 setup files ?



My PC:
OS: Windows 10 Pro English 64-bit / CPU: Intel i7-9700 3.6GHz / MB: ASUS ROG Strix Z390  RAM: 32GB DDR4 2.6GHz / HD: 2TB+3TB  /  
SSD: 2x512GB Samsung 860 EVO / 
VB: Palit GTX2080 TI GamingPro 11GB / AB: embedded in the MB and VB (audio from the VB with an HDMI splitter) / DirectX: 12

Edited
Last Year by RobertoColombo
RobertoColombo
RobertoColombo
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)

Group: Forum Members
Last Active: Last Month
Posts: 1.6K, Visits: 3.0K
4. Documentation for RUi is largely incomplete.
Just to give an example: ShowMessageBox()

4a. There is no indication aboutwhat is the value type of the input parameters.
      Intuitively the first two are strings but what about the olthers ?
      The "Hello world" Python example uses the value "RLPy.EMsgButton_Ok" => how to link from the doc of this function that this is the value to be used ?
4b. The "Hello world" Python example uses 3 input parameters, whereas in teh doc there are listred 5.
       Which one are optional ?
4c. Retun is "button status".
      What does this mean ?
      What are the possible values ?


My PC:
OS: Windows 10 Pro English 64-bit / CPU: Intel i7-9700 3.6GHz / MB: ASUS ROG Strix Z390  RAM: 32GB DDR4 2.6GHz / HD: 2TB+3TB  /  
SSD: 2x512GB Samsung 860 EVO / 
VB: Palit GTX2080 TI GamingPro 11GB / AB: embedded in the MB and VB (audio from the VB with an HDMI splitter) / DirectX: 12

Edited
Last Year by RobertoColombo
RobertoColombo
RobertoColombo
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)Distinguished Member (6.4K reputation)

Group: Forum Members
Last Active: Last Month
Posts: 1.6K, Visits: 3.0K
5. Which events and associated methods are triggered when main.py is executed ?
Only initialize_plugin() or others ?

6. Which events and associated methods are triggered when a Python script is loaded and executed ?
Only run_script() or others ?

My PC:
OS: Windows 10 Pro English 64-bit / CPU: Intel i7-9700 3.6GHz / MB: ASUS ROG Strix Z390  RAM: 32GB DDR4 2.6GHz / HD: 2TB+3TB  /  
SSD: 2x512GB Samsung 860 EVO / 
VB: Palit GTX2080 TI GamingPro 11GB / AB: embedded in the MB and VB (audio from the VB with an HDMI splitter) / DirectX: 12

luke (RL)
luke (RL)
Posted Last Year
View Quick Profile
Junior Member

Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)

Group: Power Developer
Last Active: Yesterday
Posts: 106, Visits: 3.2K
RobertoColombo (12/26/2018)
1. Where shall we put the main.py Pythin file ?
    The doc is not clear: shall we create a new folder called "OpenPlugin" ?

Yes, you need to create OpenPlugin folder under your [iClone Install Path]/Bin64/, but if you have MotionLIVE installed, that should be there.

2. in order to use Qt libs, shall we install the whole Qt package or are already part of iClone 7.4 setup files ?

Yes, it is part of iClone 7.4.

3. Shall we download and install pyside2 and shiboken2 or are already part of iClone 7.4 setup files ?

Yes, it is part of iClone 7.4.
luke (RL)
luke (RL)
Posted Last Year
View Quick Profile
Junior Member

Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)

Group: Power Developer
Last Active: Yesterday
Posts: 106, Visits: 3.2K
RobertoColombo (12/26/2018)
5. Which events and associated methods are triggered when main.py is executed ?
Only initialize_plugin() or others ?

It's not the event, the initialize_plugin function will be executed when iClone load main.py file in OpenPlugin folder. Must remember that the iClone only execute the initialize_function with the py file called "main.py",

6. Which events and associated methods are triggered when a Python script is loaded and executed ?
Only run_script() or others ?

Same as above, the run_script() will be executed when you use "Load Python" in the menu

luke (RL)
luke (RL)
Posted Last Year
View Quick Profile
Junior Member

Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)Junior Member (203 reputation)

Group: Power Developer
Last Active: Yesterday
Posts: 106, Visits: 3.2K
RobertoColombo (12/26/2018)
4. Documentation for RUi is largely incomplete.
Just to give an example: ShowMessageBox()

4a. There is no indication aboutwhat is the value type of the input parameters.
      Intuitively the first two are strings but what about the olthers ?
      The "Hello world" Python example uses the value "RLPy.EMsgButton_Ok" => how to link from the doc of this function that this is the value to be used ?
4b. The "Hello world" Python example uses 3 input parameters, whereas in teh doc there are listred 5.
       Which one are optional ?
4c. Retun is "button status".
      What does this mean ?
      What are the possible values ?


move to "Basic Sample Request" thread, thanks

Kelleytoons
Kelleytoons
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (17.0K reputation)Distinguished Member (17.0K reputation)Distinguished Member (17.0K reputation)Distinguished Member (17.0K reputation)Distinguished Member (17.0K reputation)Distinguished Member (17.0K reputation)Distinguished Member (17.0K reputation)Distinguished Member (17.0K reputation)Distinguished Member (17.0K reputation)

Group: Forum Members
Last Active: 3 hours ago
Posts: 5.6K, Visits: 11.0K
I'm having just basic issues with even sample code provided.  We have this in the docs:

avatar_list = RLPy.RScene.GetAvatars()
avatar = avatar_list[0]
material_component = avatar.GetMaterialComponent()
mesh_list = avatar.GetMeshNames()
mesh_name = mesh_list[0]
material_list = material_component.GetMaterialNames(mesh_name)
material_name = material_list[0]

and it doesn't work, throwing an error at the last line (
<class 'IndexError'>Wink.  So either I'm completely stupid (always a possibility) or the docs are just wrong (my bet).

This isn't the only example but it's typical -- were these samples not tested?




Alienware Aurora R7, Win 10, i7-8700k, 4.7GHz CPU, 32GB RAM, GTX Titan XP (12GB), Samsung 960 Pro 2TB M-2 SSD, TB+ Disk space
Mike "ex-genius" Kelley
Edited
Last Year by Kelleytoons
justaviking
justaviking
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (14.2K reputation)Distinguished Member (14.2K reputation)Distinguished Member (14.2K reputation)Distinguished Member (14.2K reputation)Distinguished Member (14.2K reputation)Distinguished Member (14.2K reputation)Distinguished Member (14.2K reputation)Distinguished Member (14.2K reputation)Distinguished Member (14.2K reputation)

Group: Forum Members
Last Active: 21 minutes ago
Posts: 7.4K, Visits: 22.5K
Kelleytoons (12/27/2018)
This isn't the only example but it's typical -- were these samples not tested?


Did you have to ask?

Allow me rephrase the question:  "Why were these not tested?"





iClone 7... Character Creator... Substance Designer/Painter... Blender... Audacity...
Desktop (homebuilt) - Windows 7, i7-3770k CPU, GTX 1080 GPU (8GB), 16GB RAM, Asus P8Z77-V Pro motherboard, 500 GB SSD, terabytes of disk space, dual  monitors.
Laptop - Windows 10, MSI GS63VR STEALTH-252, 16GB RAM, GTX 1060 (6GB), 256GB SSD and 1TB HDD

wires
wires
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (8.5K reputation)Distinguished Member (8.5K reputation)Distinguished Member (8.5K reputation)Distinguished Member (8.5K reputation)Distinguished Member (8.5K reputation)Distinguished Member (8.5K reputation)Distinguished Member (8.5K reputation)Distinguished Member (8.5K reputation)Distinguished Member (8.5K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 4.0K, Visits: 19.2K
justaviking (12/27/2018)
Kelleytoons (12/27/2018)
This isn't the only example but it's typical -- were these samples not tested?


Did you have to ask?

Allow me rephrase the question:  "Why were these not tested?"


Maybe they don't have any testers available. 😁



Gerry



System: Win 10 Pro (1803), Asus X99-E WS, CPU i7-5930K -3,5 GHz, 32 GB DDR4 2666-16 RAM, NVidia GTX 1080 Ti GPU - 11 GB VRAM(Driver 417.35), Samsung 850 Pro 512 GB SSD, 6 TB HD storage.





Reading This Topic