Replies: 3 comments 2 replies
|
No, it’s a bug! Oof! But, also returning false from However, I have a typo, I made def worldDraw(self, wd: Gi.WorldDraw):
print("worldDraw")
geom = wd.geometry()
geom.draw(self._line)
#return True
return False
def ViewportDraw(self, wd: Gi.ViewportDraw) -> None:
print("viewportDraw") |
1 reply
|
Note that there is no DrawJig in ObjectARX. It’s a custom implementation similar to this I used a slightly different approach to make it work in better in Python class PyDrawJig : public AcEdJig, public AcDbEntity, public boost::python::wrapper<PyDrawJig>then hijacked |
0 replies
|
So the other behaviors are intentional? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I observed the following behavior when using
Ed.DrawJig. @CEXT-Dan — could you confirm whether these are intended?Observations:
jig.drag()usually returns the same status returned bysampler(), with exceptions:If the user presses
Esc:sampler()runs to completion, butdrag()returnskCancelregardless;update()andworldDraw()are not called.If
sampler()returnskNoChange→drag()still returnseOk.Behavior by
sampler()status:eOk→update()andworldDraw()are called (normal).kCancel→ jig ends immediately.kNull→ jig runs;worldDraw()andupdate()are called (effectively same aseOk).kOther→ mouse movement does not callupdate()/worldDraw(); zoom callsupdate()andworldDraw(); panning calls onlyworldDraw()(notupdate()); zoom while panning behaves like panning.kModeless→ behaves likekCancel.After clicking a point or pressing Enter, depending on what we return from
sampler()we can distinguish the following end cases for the Jig:eOk→ aftersampler()update()is called but notworldDraw(),kNull→ aftersampler()neitherupdate()norworldDraw()is called,kOther→ same aseOk, i.e. aftersampler()update()is called but notworldDraw().If
update()returnsFalse, thendrag()returnskOther(note,update()must be called, so for example, this won't happen whenkNullis returned fromsampler()); returningFalsefromupdate()has no effect on Jig's behavior when moving the mouse around the screen.If
worldDraw()returnsFalse, then Jig terminates immediately anddrag()returnskCancelRepro code:
All reactions