Skip to content

Commit a84c26b

Browse files
authored
Merge pull request #670 from threedworld-mit/set_robot_color
Added: set_robot_color
2 parents af020de + 19366f7 commit a84c26b

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

Documentation/Changelog.md

+10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44

55
To upgrade from TDW v1.11 to v1.12, read [this guide](upgrade_guides/v1.11_to_v1.12.md).
66

7+
## v1.12.20
8+
9+
### Command API
10+
11+
#### New Commands
12+
13+
| Command | Description |
14+
| ----------------- | --------------------------------------------- |
15+
| `set_robot_color` | Set the visual color of a robot in the scene. |
16+
717
## v1.12.19
818

919
### Build

Documentation/api/command_api.md

+21
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,7 @@
645645
| [`parent_avatar_to_robot`](#parent_avatar_to_robot) | Parent an avatar to a robot. The avatar's position and rotation will always be relative to the robot. Usually you'll want to do this to add a camera to the robot. |
646646
| [`remove_robot_nav_mesh_obstacle`](#remove_robot_nav_mesh_obstacle) | Remove a NavMesh obstacle from a robot (see make_robot_nav_mesh_obstacle). |
647647
| [`set_immovable`](#set_immovable) | Set whether or not the root object of the robot is immovable. Its joints will still be moveable. |
648+
| [`set_robot_color`](#set_robot_color) | Set the visual color of a robot in the scene. |
648649
| [`set_robot_joint_id`](#set_robot_joint_id) | Set the ID of a robot joint. This can be useful when loading saved data that contains robot joint IDs. Note that the <computeroutput>id</computeroutput> parameter is for the parent robot, not the joint. The joint is located via <computeroutput>joint_name</computeroutput>. Accordingly, this command only works when all of the names of a robot's joints are unique. |
649650
| [`set_robot_obi_collision_material`](#set_robot_obi_collision_material) | Set the Obi collision material of a robot. |
650651
| [`teleport_robot`](#teleport_robot) | Teleport the robot to a new position and rotation. This is a sudden movement that might disrupt the physics simulation. You should only use this command if you really need to (for example, if the robot falls over). |
@@ -8130,6 +8131,26 @@ Set whether or not the root object of the robot is immovable. Its joints will st
81308131

81318132
***
81328133

8134+
## **`set_robot_color`**
8135+
8136+
Set the visual color of a robot in the scene.
8137+
8138+
8139+
```python
8140+
{"$type": "set_robot_color", "color": {"r": 0.219607845, "g": 0.0156862754, "b": 0.6901961, "a": 1.0}}
8141+
```
8142+
8143+
```python
8144+
{"$type": "set_robot_color", "color": {"r": 0.219607845, "g": 0.0156862754, "b": 0.6901961, "a": 1.0}, "id": 0}
8145+
```
8146+
8147+
| Parameter | Type | Description | Default |
8148+
| --- | --- | --- | --- |
8149+
| `"color"` | Color | The new color of the robot. | |
8150+
| `"id"` | int | The ID of the robot in the scene. | 0 |
8151+
8152+
***
8153+
81338154
## **`set_robot_joint_id`**
81348155

81358156
Set the ID of a robot joint. This can be useful when loading saved data that contains robot joint IDs. Note that the <computeroutput>id</computeroutput> parameter is for the parent robot, not the joint. The joint is located via <computeroutput>joint_name</computeroutput>. Accordingly, this command only works when all of the names of a robot's joints are unique.

Python/tdw/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.12.19.0"
1+
__version__ = "1.12.20.0"

0 commit comments

Comments
 (0)