Profile Picture

This doesn't work for me

Posted By Kelleytoons 6 Years Ago
You don't have permission to rate!
Author
Message
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: Yesterday
Posts: 9.1K, Visits: 21.8K
Here's code that is supposed to work, and apparently does for the devs, but not for me:






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
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 Mike,

I tried the first part of your code, the one that gets the Avatars and it does not work for me either.
But I wonder how can we make any kind of code working till the documentation is largely incomplete:

def RLPy.RScene.GetAvatars( args)

Get all avatars in the scene.

Parameters
eAvatarType[IN] avatar type
Returns
avatar list


1. What object type is "args" ? What values shall be passed ?
2. Is it optional ?
3. Is the return a list (i.e. a Python "list" data structure) of objects ? Whjat is the type of each object ? Is it RLPy.RIAvatar ?

Each method and data in the doc lacks all of these information.
RL shall add them if they want us to be able to build something

  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

Edited
6 Years Ago by RobertoColombo
The-any-Key
The-any-Key
Posted 6 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)

Group: Forum Members
Last Active: 2 Weeks Ago
Posts: 356, Visits: 1.9K
Try something like this:

# Get avatars from scene
avatar_list=RLPy.RScene.GetAvatars()
# Check if avatar was found
if len(avatar_list)>0:
    # Get first avatar
    avatar=avatar_list[0]
    material_component=avatar.GetMaterialComponent()
    mesh_list=avatar.GetMeshNames()
    mesh_name=mesh_list[0]
    material_list=material_component.GetMaterialNames(mesh_name)
    # Check if first mesh in model got material
    if len(material_list)>0:
        material_name=material_list[0]
        print(material_name)
    else:
        print("No material found for mesh")
else:
    print("No avatar found in scene!")






iClone 7, 3DXchange 7 Pipeline, CC3 Pipeline, CT8 Pipeline, Iray, Live Face, iPhone Xr, Win 10, i9 9900K ~5GHz, Nvidia RTX 2080 8GB, 16GB Ram, M.2 SSD
Edited
6 Years Ago by The-any-Key
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: Yesterday
Posts: 9.1K, Visits: 21.8K
No, there is a bug in the male dummy avatar (the devs are aware of this).  There is also, apparently, a bug in some clothing as well (and most props).  GetMaterial won't work in those cases.

This will be fixed.  In the meantime, just be aware the code is... sketchy (in that it will work with some things, and not with others -- in cases like that, it's better to not use it).



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



Reading This Topic