Alpinewerk Digital e.U. Owner: Alexander Semerad
registered sole proprietorship
Steckhovengasse 18, 1130 Wien - AT
Tel: +43 (0) 681 20289940
E-Mail: [email protected]
VAT-Nr: ATU75303217
FN: 544875m
Commercial Court Vienna
When working with Maya scripts, there are times when we want to group multiple operations into a single undoable action. This allows users to undo a series of related changes in one step, providing a more intuitive and efficient workflow. Maya offers the cmds.undoInfo
command for managing undo chunks, but improper use of the openChunk and closeChunk flags can leave the undo queue in a bad state. We always want to ensure that we properly close an undo chunk after opening it.
One inefficient way to accomplish this, is to wrap our code within a try/except/finally block to ensure that the undo chunk is always closed, even if an exception is raised. However, to further simplify the process and make our code more readable, we can create something called a "context manager" or "decorator" to handle the undo chunk management for us. The ContextDecorator
class in Python allows us to use the same code as both a context manager and a decorator, providing flexibility in how we apply it to our code.
from maya import cmds
from contextlib import ContextDecorator
class Undo(ContextDecorator):
"""A context manager for managing undo chunks in Maya. When entered, it opens
an undo chunk, and when exited, it closes the chunk. This ensures that all
operations performed within the context are grouped into a single undoable
action.
Args:
name (str, optional): The name of the undo chunk. Defaults to None."""
def __init__(self, name=None):
self.name = name
def __enter__(self):
cmds.undoInfo(openChunk=True, infinity=True, chunkName=self.name)
def __exit__(self, exc_type, exc_value, traceback):
cmds.undoInfo(closeChunk=True)
To use our Undo
as a context manager, we can wrap our code within a with
statement. This is useful if we want to wrap a block of code within an undo chunk.
def func():
with Undo():
...
If you want to apply the Undo
to an entire function, you can simply use as a decorator.
@Undo()
def func():
...
Alpinewerk Digital e.U. Owner: Alexander Semerad
registered sole proprietorship
Steckhovengasse 18, 1130 Wien - AT
Tel: +43 (0) 681 20289940
E-Mail: [email protected]
VAT-Nr: ATU75303217
FN: 544875m
Commercial Court Vienna
Welcome to the website www.alpinewerk.com! Please get a picture of how we process your personal data when you visit our website or you are otherwise in a business relationship with us (Art 13, Art 14 GDPR; § 96 Abs 3 TKG – the Austrian Telecommunication Act).
The following data may be processed when you visit our website:
The processing of this data is necessary to manage the security of the operation of the website and to ensure the functionality of the website from a technical point of view. The processing of this data is justified by our legitimate interest in the operation of our website (Art 6 para 1 lit f DSGVO).
For the operation of our website, it may be necessary for us to disclose your data to the following recipients:
Recipients of data | Purpose of data processing | Reasoning for data processing | Location | Third party transfer |
---|---|---|---|---|
Alphabet Inc (Google Analytics) | Statistical evaluations and marketing purposes | Consent (Art 6 Abs 1 lit a GDPR) | USA | Standard contractual clauses (Art 46 Abs 2 lit c DSGVO) |
The above-mentioned data is stored via so-called "cookies". These technical cookies are only used to the extent necessary (§ 96 para 3 TKG). Cookies are text files that are stored on your computer and enable an analysis of the use of the website. They are used to recognise and store temporary data of the homepage visitor. We only use cookies to the extent necessary to communicate with you via the homepage.
These technical cookies are activated as soon as you visit our homepage.
The following cookies are used on our homepage on the basis of our legitimate interest (Art 6 para 1 lit f GDPR):
Name of the cookie | Purpose of the Cookies | Storage duration | Location of recipient |
---|---|---|---|
SESS# | Retains the user's states for all page | Session | USA |
In addition to the "technical cookies" described above, we also use so-called advertising cookies (including "statistical cookies"). These advertising cookies enable us to better understand and evaluate your interests. With the help of the advertising cookies, we can merge your "surfing behaviour" across the boundaries of our website with data from other websites. This is to enable us to better understand the interests of our homepage visitors and to target them more effectively.
We respect that not every visitor to the website wants this. Therefore, we only process your data in the course of advertising cookies if you consent to this (Art 6 para 1 lit a GDPR). You can revoke this consent at any time, whereby the data processing carried out up to the time of revocation remains justified.
These advertising cookies will only be activated once you have consented to them.
Name of the cookie | Purpose of the Cookies | Storage duration | Location of recipient | Purpose of data transfer |
---|---|---|---|---|
_ga (Google Analytics) | Statistical purposes | 2 years | USA | Registers a unique ID that is used to generate statistical data on how the visitor uses the website. |
ga# | Statistical purposes | 2 years | USA | Collects data on how often a user visits a website, as well as data for the first and last visit. |
In the course of our business relationship with customers or suppliers, we process your data on the basis of contractual (processing of the contractual relationship with you, pre-contractual obli-gations, invoicing of services, dispatch of documents, communication for the processing of the contract) and legal obligations (legally required storage within the meaning of § 132 BAO) (Art 6 para 1 lit b and c GDPR) as well as on the basis of our legitimate interests or on the basis of the legitimate interests of third parties (Art 6 para 1 lit f GDPR), namely:
for the purpose of internal administration and management of your business case to the extent necessary (e.g.: Processing your business case, forwarding your business case to various de-partments, filing, archiving purposes, correspondence with you);
for the purpose of direct advertising (e.g.: Mailing, e-mailing, satisfaction surveys, congratulatory letters, statistical evaluations);
We would like to expressly inform you that you can object to the processing of your data for the purpose of direct advertising.
in each case to the extent necessary. The processing of your data serves the purpose of initiating, maintaining and handling our business relations. If you do not provide us with this data, we will not be able to process your business case.
If particularly sensitive data is processed in the course of specific legal disputes, this is done for the purpose of asserting legal claims (Art 9 (2) (f) in conjunction with Art 6 (1) (b) GDPR).
We will only store your data for as long as is necessary for the purposes for which we collected your data. In this context, statutory retention obligations must be taken into account (for example, for reasons of tax law, contracts and other documents from our contractual relationship must generally be retained for a period of seven years (§ 132 BAO)). In justified individual cases, such as for the assertion and defence of legal claims, we may also store your data for up to 30 years after termination of the business relationship.
We store data of interested parties for up to three years from the time of the last contact by the respective person.
In the course of our business relationship, it may be necessary for us to transmit your data to the following recipients:
Recipient | Purposes | Legal justification | Location (country) | Purpose of data transfer |
---|---|---|---|---|
Bank (credit institution) | Payment-services | Contractual obligation (Art 6 Abs 1 lit b | ||
GDPR) | Austria | Within the EAA | ||
Business and tax advisors | Tax advisory | Contractual obligation (Art 6 Abs 1 lit b | ||
GDPR) | Austria | Within the EAA | ||
Attorney at law | Enforcement of claim | Contractual obligation (Art 6 Abs 1 lit b | ||
GDPR) | Austria | Within the EAA |
In the course of a business relationship or the initiation thereof, it is naturally necessary to conduct research on the business partner. This is done exclusively to the extent necessary for this purpose. In this context, data may be retrieved and processed from the following sources:
Source | Publicly available | Data subjects | Purpose/Reasoning |
---|---|---|---|
Internet-Research | Ja | Contact details | Contact for business purposes |
No automated decision-making or profiling takes place in our company.
We would like to inform you that, provided the legal requirements are met, you have the right to request information about your personal data:
If we process your data on the basis of your consent, you have the right to revoke this consent at any time by email. This does not affect the lawfulness of the data processing carried out up to this point (Art 7 (3) DSGVO).
If, contrary to expectations, there is a breach of your right to lawful processing of your data, please contact us by post or e-mail. We will endeavour to deal with your concern promptly. However, you also have the right to lodge a complaint with the supervisory authority for data protection matters responsible for you.
The address of the Austrian data protection authority is:
Austrian Data Protection Authority Barichgasse 40-42, 1030 Vienna
If you have any further questions about the processing of your data, please do not hesitate to contact our data protection coordinator using the contact details below.
Controller pursuant to Art 4 Z 7 GDPR:
Alpinewerk Digital e.U. Alexander Semerad
Steckhovengasse 18, 1130 Wien - AT
[email protected] +4368120289940
FN 544875m
Author: Attorney Dr. Tobias Tretzmüller, LL.M (IT-LAW); https://www.digital-recht.at/