Profile Picture

Python FAQ Tracker

Posted By RobertoColombo 6 Years Ago
You don't have permission to rate!
Author
Message
RobertoColombo
RobertoColombo
Posted 6 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)

Group: Forum Members
Last Active: 3 Years Ago
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 + 1x2TB Samsung
VB: Palit GTX2080 TI GamingPro 11GB / AB: embedded in the MB and VB (audio from the MOTU M4 I/F) / DirectX: 12

RobertoColombo
RobertoColombo
Posted 6 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)

Group: Forum Members
Last Active: 3 Years Ago
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 + 1x2TB Samsung
VB: Palit GTX2080 TI GamingPro 11GB / AB: embedded in the MB and VB (audio from the MOTU M4 I/F) / DirectX: 12

Edited
6 Years Ago by RobertoColombo
RobertoColombo
RobertoColombo
Posted 6 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)

Group: Forum Members
Last Active: 3 Years Ago
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 + 1x2TB Samsung
VB: Palit GTX2080 TI GamingPro 11GB / AB: embedded in the MB and VB (audio from the MOTU M4 I/F) / DirectX: 12

Edited
6 Years Ago by RobertoColombo
RobertoColombo
RobertoColombo
Posted 6 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)

Group: Forum Members
Last Active: 3 Years Ago
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 + 1x2TB Samsung
VB: Palit GTX2080 TI GamingPro 11GB / AB: embedded in the MB and VB (audio from the MOTU M4 I/F) / DirectX: 12

luke (RL)
luke (RL)
Posted 6 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)

Group: Power Developer
Last Active: Last Week
Posts: 245, Visits: 5.3K
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 6 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)

Group: Power Developer
Last Active: Last Week
Posts: 245, Visits: 5.3K
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 6 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)

Group: Power Developer
Last Active: Last Week
Posts: 245, Visits: 5.3K
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 6 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)Distinguished Member (35.6K reputation)

Group: Forum Members
Last Active: 4 hours ago
Posts: 9.1K, Visits: 21.8K
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 R12, Win 10, i9-119000KF, 3.5GHz CPU, 128GB RAM, RTX 3090 (24GB), Samsung 960 Pro 4TB M-2 SSD, TB+ Disk space
Mike "ex-genius" Kelley
Edited
6 Years Ago by Kelleytoons
justaviking
justaviking
Posted 6 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (20.4K reputation)Distinguished Member (20.4K reputation)Distinguished Member (20.4K reputation)Distinguished Member (20.4K reputation)Distinguished Member (20.4K reputation)Distinguished Member (20.4K reputation)Distinguished Member (20.4K reputation)Distinguished Member (20.4K reputation)Distinguished Member (20.4K reputation)

Group: Forum Members
Last Active: 2 Weeks Ago
Posts: 8.2K, Visits: 26.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 10, Ryzen 9 3900x CPU, GTX 1080 GPU (8GB), 32GB RAM, Asus X570 Pro motherboard, 2TB 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 6 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)Distinguished Member (15.0K reputation)

Group: Forum Members
Last Active: Last Week
Posts: 5.7K, Visits: 26.4K
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 (21H2), 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 Studio-536.99), Samsung 850 Pro 512 GB SSD, 6 TB HD storage.





Reading This Topic