rotate3d off not working

I have an application that uses pcshow() to plot a point cloud. It seems to activate rotate3d which I have to turn off by all means because I need the mouse cursor to trigger click events of graphical objects. When using rotate3d off after pcshow() Matlab prints the following error messages:
Property assignment is not allowed when the object is empty. Use subscripted assignment to create an array element.
Error in vision.internal.pc.initializePCSceneControl>localRotateStopMode (line 79) btn.State = 'off';
Error in hgfeval (line 62) feval(fcn{1},varargin{:},fcn{2:end});
Error in matlab.uitools.internal.uimode/modeControl (line 22) hgfeval(hThis.ModeStopFcn);
Error in matlab.uitools.internal.uimode/set.Enable (line 173) obj.Enable = modeControl(obj,value);
Error in matlab.uitools.internal.uimodemanager>localSetMode (line 173) set(currMode,'Enable','off');
Error in matlab.uitools.internal.uimodemanager/set.CurrentMode (line 111) obj.CurrentMode = localSetMode(obj,value);
Error in activateuimode (line 20) set(hManager,'CurrentMode',hMode);
Error in rotate3d>setState (line 319) activateuimode(fig,'');
Error in rotate3d (line 202) setState(hTarget,arg,getStyle(hFig));
Error in TransformApp/onAddImgClick (line 214) rotate3d off
Error in TransformApp>@(varargin)obj.onAddImgClick(varargin{:}) (line 52) 'Callback', @obj.onAddImgClick);
Error using uiwait (line 81) Error while evaluating UIControl Callback.
>>
Note that the application uses uiwait() and uiresume() to block the execution of the script that launches my application. I also tried h = rotate3d(); h.Enable = 'off'; but it produces the same error.

回答 (3 件)

Sebastian
Sebastian 2017 年 6 月 28 日

0 投票

I contacted MATLAB support and they say it is a known bug and that they will fix it in a future release.

1 件のコメント

Márcio Marques
Márcio Marques 2017 年 7 月 27 日
Hi Sebastian! I've got the same problem. do you have any answer?

サインインしてコメントする。

Kfir G
Kfir G 2019 年 12 月 30 日

0 投票

A workaround for the issue is to add a dummy button and uimenu with the required tags (Works with matlab 2016b):
dummy_btn = uitoggletool(findall(ax.Parent,'type','uitoolbar'), 'tag','Exploration.Rotate','Visible','off');
dummy_menu = uimenu(ax.Parent, 'tag', 'figMenuRotate3D', 'Visible','off');
Joel Berkson
Joel Berkson 2024 年 6 月 5 日

0 投票

I can confirm that this bug still has not been fixed 7 years later. Any other workarounds?

1 件のコメント

Matthias Fath
Matthias Fath 2024 年 10 月 8 日
Hi Joel,
I stumbled across your message because i had another problem with rotate3d. I quickly checked the combination of pcshow and disabling rotate3d afterwards and it works just fine in my Matlab version. I am using 2024a Update 6, so maybe you could try updating your matlab to solve the problem.
Regards,
Matthias

サインインしてコメントする。

カテゴリ

タグ

質問済み:

2017 年 6 月 20 日

コメント済み:

2024 年 10 月 8 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by