Custom Locator on Viewport 2.0

Custom Locator on Viewport 2.0

icapathos
Advocate Advocate
1,296 Views
2 Replies
Message 1 of 3

Custom Locator on Viewport 2.0

icapathos
Advocate
Advocate

I encountered an issue with MPxDrawOverride,

I create a my own custom locator and use MPxDrawOverride to support on Viewport 2.0.

I have thought that it works well, but today I got strange case.

When the custom locator gets bigger that I expected, it clashes with Viewport 2.0.

Actually, it makes trouble with casting shadow.

So I tried with sample source that named as "footPrint", but it was the same.

It seems that drawing huge locator means that just enlarging the images.

I tested in Maya 2017 Update3.

 

footPrint : Scale 1footPrint : Scale 1

footPrint : Scale 10footPrint : Scale 10

footPrint : Scale 100footPrint : Scale 100

footPrint : Scale 1000footPrint : Scale 1000

footPrint : Scale 2000footPrint : Scale 2000

footPrint : Scale 5000footPrint : Scale 5000

0 Likes
Accepted solutions (1)
1,297 Views
2 Replies
Replies (2)
Message 2 of 3

cheng_xi_li
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

Could you try to disable cast shadow and receive shadows of your locators? They are under render stats group.

 

You could make it default value with postConstructor, e.g.

 

void footPrint::postConstructor()
{
	//Disable shadow maps for this locator by default

	MFnDependencyNode fn(thisMObject());
	auto receive = fn.findPlug("receiveShadows");
	auto cast = fn.findPlug("castsShadows");

	receive.setBool(false);
	cast.setBool(false);
}

Yours,

Li

Message 3 of 3

icapathos
Advocate
Advocate

It works.

I've even check the default locator and it also has been disabled castsShadows and receiveShadhows.

I don't even think that a locator casts and receives shadow.

0 Likes