Scene#

class ansys.dynamicreporting.core.serverless.item.Scene(*args, **kwargs)#

Bases: FilePayloadMixin, Item

Item representing a 3D scene or geometry payload.

Methods

Scene.add_tag(tag[, value])

Add or update a single tag.

Scene.as_dict([recursive])

Serialize the model into a plain dictionary.

Scene.create(**kwargs)

Factory-style creation that dispatches to the correct subclass.

Scene.delete()

Delete the payload file and then the ORM instance.

Scene.filter(**kwargs)

Return a collection of items, scoped by subclass type.

Scene.find([query])

Search for items using an ADR query string.

Scene.get(**kwargs)

Retrieve a single item instance, scoped by subclass type.

Scene.get_tags()

Return the raw tag string stored on this object.

Scene.reinit()

Reset the in-memory ORM state for this object.

Scene.rem_tag(tag)

Remove a tag by key, if it exists.

Scene.remove_tag(tag)

Alias for rem_tag() for backwards compatibility.

Scene.render(*[, context, request])

Render the item as HTML.

Scene.save(**kwargs)

Save the 3D scene payload and ensure derived geometry is built.

Scene.set_tags(tag_str)

Replace all tags with the given tag string.

Attributes

Scene.content

Validated 3D scene or geometry file content for this item.

Scene.dataset

Dataset associated with this item.

Scene.db

Database alias in which this object is stored.

Scene.file_ext

File extension of the payload file, without the leading dot.

Scene.file_path

Absolute path to the payload file, if available.

Scene.has_file

Whether a payload file exists on disk.

Scene.name

Human-readable name for the item.

Scene.saved

Whether this object has been successfully saved to the database.

Scene.sequence

Sequence index for ordering items within a dataset/session.

Scene.session

Session that owns this item.

Scene.source

Optional free-form source identifier for this item.

Scene.tags

Tag string used to group and filter objects.

Scene.type

Item type identifier for scene items.

Scene.date

Timestamp when the item was created.

Scene.guid

Globally unique identifier for this object.

exception DoesNotExist(extra_detail: str = None)#

Bases: DoesNotExist

exception IntegrityError(extra_detail: str = None)#

Bases: IntegrityError

exception MultipleObjectsReturned(extra_detail: str = None)#

Bases: MultipleObjectsReturned

exception NotSaved(extra_detail: str = None)#

Bases: NotSaved

content: SceneContent = None#

Validated 3D scene or geometry file content for this item.

save(**kwargs)#

Save the 3D scene payload and ensure derived geometry is built.

Parameters:
**kwargs

Keyword arguments forwarded to the database save method of the underlying ORM instance. For eg: The using argument can be used to select the target database alias.

Raises:
IntegrityError

If the database reports an integrity violation while saving.

InvalidFieldError

If invalid field names or values are supplied (via decorator).

Exception

Any other unexpected exception is propagated unchanged.

type: str = 'scene'#

Item type identifier for scene items.