Zero gravity command history not valid in python / vs code / omni code
physx.binding not valid and <omni.physx not valid… what to do?
Also, was thinking of running a recording type API to just record my clicks but i couldnt find anything, especially something that simple.
Trying to finish this for the contest.
import omni.kit.commands
from omni import physx.bindings._physx
omni.kit.commands.execute(‘SelectPrims’,
old_selected_paths=[‘/World/Sphere_01’],
new_selected_paths=[‘/World/Sphere_01’, ‘/World/Sphere_02’, ‘/World/Sphere_03’, ‘/World/Sphere_04’, ‘/World/Sphere_05’, ‘/World/Sphere_06’, ‘/World/Sphere_07’, ‘/World/Sphere_08’, ‘/World/Sphere_09’, ‘/World/Sphere_10’, ‘/World/Sphere_11’, ‘/World/Sphere_12’, ‘/World/Sphere_13’, ‘/World/Sphere_14’],
expand_in_stage=True)
omni.kit.commands.execute(‘PlacementModeTransform’,
physx_authoring=<omni.physx.bindings._physx.IPhysxAuthoring object at 0x000001DF849FCAF0>,
capture_session_id=8)
omni.kit.commands.execute(‘PlacementModeTransform’,
physx_authoring=<omni.physx.bindings._physx.IPhysxAuthoring object at 0x000001DF849FCAF0>,
capture_session_id=9)
These codes above recorded by commands in code dont work. Here is the vs code and with “”" what i need in between sections documented"“”
see code
omni.kit.commands.execute(
"SelectPrims",
old_selected_paths=[],
new_selected_paths=[
"/World/Sphere",
"/World/Sphere_01",
"/World/Sphere_02",
"/World/Sphere_03",
"/World/Sphere_04",
"/World/Sphere_05",
"/World/Sphere_06",
"/World/Sphere_07",
"/World/Sphere_08",
"/World/Sphere_09",
"/World/Sphere_10",
"/World/Sphere_11",
"/World/Sphere_12",
"/World/Sphere_13",
"/World/Sphere_14",
],
expand_in_stage=True,
)
“”" I want to have the previous seleted prims hold the gravity option for dynamic"“”
omni.kit.commands.execute(
"SelectPrims",
old_selected_paths=[
"/World/Sphere",
"/World/Sphere_01",
"/World/Sphere_02",
"/World/Sphere_03",
"/World/Sphere_04",
"/World/Sphere_05",
"/World/Sphere_06",
"/World/Sphere_07",
"/World/Sphere_08",
"/World/Sphere_09",
"/World/Sphere_10",
"/World/Sphere_11",
"/World/Sphere_12",
"/World/Sphere_13",
"/World/Sphere_14",
],
new_selected_paths=["/World/Plane"],
expand_in_stage=True,
)
“”" I want uselect the old, select new, new seleted prims hold the gravity option for static"“”
omni.kit.commands.execute(
“SelectPrims”,
old_selected_paths=[“/World/Plane”],
new_selected_paths=[
“/World/Sphere”,
“/World/Sphere_01”,
“/World/Sphere_02”,
“/World/Sphere_03”,
“/World/Sphere_04”,
“/World/Sphere_05”,
“/World/Sphere_06”,
“/World/Sphere_07”,
“/World/Sphere_08”,
“/World/Sphere_09”,
“/World/Sphere_10”,
“/World/Sphere_11”,
“/World/Sphere_12”,
“/World/Sphere_13”,
“/World/Sphere_14”,
],
expand_in_stage=True,
)
“”" I want seleted prims to play gravity option for animation"“”