Previous topic

net

Next topic

packet

This Page

objects

class pyogp.lib.base.objects.Object(LocalID=None, State=None, FullID=None, CRC=None, PCode=None, Material=None, ClickAction=None, Scale=None, ObjectData=None, ParentID=None, UpdateFlags=None, PathCurve=None, ProfileCurve=None, PathBegin=None, PathEnd=None, PathScaleX=None, PathScaleY=None, PathShearX=None, PathShearY=None, PathTwist=None, PathTwistBegin=None, PathRadiusOffset=None, PathTaperX=None, PathTaperY=None, PathRevolutions=None, PathSkew=None, ProfileBegin=None, ProfileEnd=None, ProfileHollow=None, TextureEntry=None, TextureAnim=None, NameValue=None, Data=None, Text=None, TextColor=None, MediaURL=None, PSBlock=None, ExtraParams=None, Sound=None, OwnerID=None, Gain=None, Flags=None, Radius=None, JointType=None, JointPivot=None, JointAxisOrAnchor=None, FootCollisionPlane=None, Position=None, Velocity=None, Acceleration=None, Rotation=None, AngularVelocity=None)

represents an Object

Initialize the Object class instance >>> object = Object()

Sample implementations: objects.py Tests: tests/test_objects.py

set up the object attributes

derez(agent, destination, destinationID, transactionID, GroupID)
derez an object, specifying the destination
deselect(agent)
deselect an object
select(agent)
select an object
set_object_copy_mod_permissions(agent)
Set Next Owner Permissions to Copy/Mod This is a common permission set for attachements.
set_object_copy_only_permissions(agent)
Set Next Owner Permissions to Copy Only
set_object_copy_transfer_permissions(agent)
Set Next Owner Permissions to Copy/Transfer
set_object_description(agent, Description)
update the description of an objects
set_object_full_permissions(agent)
Set Next Owner Permissions Copy, Modify, Transfer This is also called ‘full permissions’.
set_object_mod_transfer_permissions(agent)
Set Next Owner Permissions to Mod/Transfer This is a common permission set for clothing.
set_object_name(agent, Name)
update the name of an object
set_object_transfer_only_permissions(agent)
Set Next Owner Permissions to Transfer Only This is the most restrictive set of permissions allowed.
take(agent)
take object into inventory
update_object_permissions(agent, Field, Set, Mask, Override=False)

update permissions for a list of objects

This will update a specific bit to a specific value.

update_properties(properties)
takes a dictionary of attribute:value and makes it so
class pyogp.lib.base.objects.Objects(agent=None, region=None, settings=None, packet_handler=None)

is an Object Manager

Initialize the event queue client class >>> objects = Objects()

Sample implementations: region.py Tests: tests/test_objects.py

set up the inventory manager

create_default_box(GroupID=UUID('00000000-0000-0000-0000-000000000000'), relative_position=(1, 0, 0))
creates the default box, defaulting as 1m to the east, with an option GroupID to set the prim to
find_objects_by_name(Name)

searches the store for known objects by name

returns a list of all such known objects

find_objects_within_radius(radius)
returns objects nearby. returns a list of objects
get_avatar_from_store(LocalID=None, FullID=None)
searches the store and returns object if stored, None otherwise
get_object_from_store(LocalID=None, FullID=None)
searches the store and returns object if stored, None otherwise
kill_stored_avatar(ID)
kill_stored_object(ID)
my_objects()
returns a list of known objects where the calling client is the owner
object_add(PCode, Material, AddFlags, PathCurve, ProfileCurve, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathTwist, PathTwistBegin, PathRadiusOffset, PathTaperX, PathTaperY, PathRevolutions, PathSkew, ProfileBegin, ProfileEnd, ProfileHollow, BypassRaycast, RayStart, RayEnd, RayTargetID, RayEndIsIntersection, Scale, Rotation, State, GroupID=UUID('00000000-0000-0000-0000-000000000000'))

ObjectAdd - create new object in the world Simulator will assign ID and send message back to signal object actually created.

AddFlags (see also ObjectUpdate) 0x01 - use physics 0x02 - create selected

GroupID defaults to (No group active)

onKillObject(packet)
onObjectProperties(packet)
onObjectUpdate(packet)
populates an Object instance and adds it to the Objects() store
onObjectUpdateCached(packet)
borrowing from libomv, we’ll request object data for all data coming in via ObjectUpdateCached
onObjectUpdateCompressed(packet)
process_multiple_object_updates(objects)
process a list of object updates
process_object_update(_object)
append to or replace an object in self.objects
remove_object_from_store(ID=None)
request_object_update(ID=None, ID_list=None)

requests object updates from the simulator

accepts a tuple of (ID, CacheMissType), or a list of such tuples

store_avatar(_objectdata)
store_object(_object)
update_multiple_objects_properties(object_list)
update the attributes of objects
update_object_properties(object_properties)

update the attributes of an object

If the object is known, we update the properties. If not, we create a new object

update_prim_properties(prim_properties)