Age | Commit message (Collapse) | Author |
|
Were using Batch_ prefix still
|
|
Use ownership flags instead.
|
|
2.8x branch added bContext arg in many places,
pass eval-context instead since its not simple to reason about what
what nested functions do when they can access and change almost anything.
Also use const to prevent unexpected modifications.
This fixes crash loading files with shadows,
since off-screen buffers use a NULL context for rendering.
|
|
Was complicating general use case, also support for transforming with matrix_space set.
Add matrix_space support for manipulator_window_project_2d too.
|
|
Also take matrix_space into account when calculating final pixel size.
|
|
Use for lamp-target, makes it easier to click on.
|
|
Needed for moving image-empties.
|
|
Needed when offset takes factor into account.
|
|
|
|
We'll want some 3D shapes, so name existing shapes 2D
|
|
Each manipulator was doing this slightly differently,
use shared function which can optionally override each matrix.
|
|
|
|
Also internal changes so arrow3d matches grab3d's behavior.
Needed to add WM_MANIPULATOR_DRAW_OFFSET_SCALE flag so
we can optionally apply offset in worldspace or screen scaled values.
|
|
|
|
Render-border & crop-node 2d-cage manipulators where unreasonably
complicated to implement because there was no good way to define
the sub-region the manipulator was transforming in
(render border within the camera's frame for example).
Add matrix-space variable,
remove scale property from cage2d manipulator, use matrix instead.
|
|
|
|
|
|
|
|
Was doing this with property get/set but this made view operations
require refreshing manipulator properties.
Simplify by operating on properties in their own space.
Also disable clamping for now since it assumes pixel-space.
|
|
Note there are issues clamping & updating,
will resolve as part of changes to cage2d widget.
|
|
Also split update flag into draw-steps,
since drawing 3D manipulators was tagging 2D as being refreshed.
|
|
Also minor cleanuup, assign new vars for manipulator group.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Manipulator enum types are easy to confuse, use typedefs.
|
|
This matches operators naming and should avoid confusion in future if we
want to use active as term for last-selected.
|
|
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
|
|
|
|
|
|
If there is case this is needed, we can enable and restore state
for now it seems OK to disable.
|
|
Rename:
- matrix -> matrix_basis
- user_scale -> scale_basis
- scale -> scale_final
Match RNA names being added to custom-manipulator branch.
|
|
Changes from custom-manipulator branch.
- use property type definitions.
- add property free callback.
- move properties into the wmManipulator struct (over alloc).
- use array length from property types instead of arg passing.
|
|
Naming was too confusing between properties of a manipulator
and properties it edits.
|
|
|
|
This makes manipulator access closer to operators,
and allows Python access.
This adds RNA for manipulators, but not Python registration yet.
- Split draw style into 2x settings:
`draw_style` (enum) & `draw_options` (enum-flag)
- Rename wmManipulator.properties -> properties_edit,
Use wmManipulator.properties for ID-properties.
Note that this area of the API will need further work since
manipulators now have 2 kinds of properties & API's to access them.
|
|
Use consistent prefix for gawain API names as well as
some abbreviations to avoid over-long names, see: D2678
|
|
|
|
Remove type-specific axis functions.
|
|
This avoids having to use manipulator-type specific functions
to set the orientation.
And will make it simpler to access transformation from Python.
Currently the matrix is still used as an offset in places.
Also per-type orientation values still need to be removed.
|
|
|
|
- Option to start helper angle lines based on a vector
instead of the initial mouse coords (useful for bisect & spin).
- Option to show 2x helper lines
useful when dial is used to rotate an axis value.
|
|
Calculation was done in screen-space giving inaccuracy,
making the angle incorrect for tool code.
Cast mouse coords onto the dial plane to calculate the angle instead.
|
|
Wasn't checking own location when checking if flip is needed.
|
|
|
|
|
|
Instead use generic 'WM_manipulator_new', adding a new 'setup'
callback (like wmManipulatorGroup.setup) used to initialize type vars.
This moves conventions closer to wmOperator and simplifies exposing to
Python.
|