Notifications
Clear all

[Closed] PEN Control objects beta.

Hey Johan,
Nope, on XP on this machine. I think maybe Paul updated the script between then and now?
Dave

 PEN

I will have another update soon so can you try again then Dave?

Sure thing

 PEN

Ok got a few minuets to do a bit more today. I have added image buttons and more presets. The only thing that I really have left is the list doesn’t display the correct selection currently. Also I need to work out an issue with the undo and right click letting go of the spinners.

http://paulneale.com/scripts/penHelpers/penHelpers.mzp

Additions are you can now rotate and move the mesh with spinners. I found this a much more predictable way to deal with it as I calc the scale first, then the position, then the rotation. It just feels more like what you would want.

There is now a Display button that will disable the UI and remove the display mesh. Great for using it more like a Maya group that has no display property.

I added a Lock UI option as well. You can now lock it and the UI disapears so it has to be unlocked to be changed. If your lock the UI you can’t change the display even with script.

Some script access that you might be interested in.


  $.displayGeo: Boolean value
  $.lock: Boolean value
  $.setPresetByName string --Sets the preset by it's name. Currently this is case dependent.
  

Very nice. I just gave it a really quick try and didn’t find any problems. I now have a cute little Master Chief helper.

A couple minor things that occured to me:

  1. The hand and foot icons face different directions. It would make more sense if they faced the same way.
  2. I would force the wirecolor to be green, just like standard helpers. That visually reinforces the fact that they’re helper objects.

I’m having a little trouble, probably a user error. When I click on any of the preset helpers I get an error:
–Unknown property:“pos” in undefined
and it highlights line 187 in the script.

Where am I going wrong? TIA

I thought this as well, but after thinking about it fgured most people will model a character with the feel facing towards them, and probably the hand with it facing away from them.

Mayeb the hand should be rotated 90 degrees in Z?

Me too, when I click on the Display list, before clicking in the viewport to create the plugin:

         rPos=((transMatrix pos) * ((eulerAngles rotX rotY rotZ) as matrix3) * inverse (transMatrix (refs.dependents this)[1].pos)).pos + (refs.dependents this)[1].pos
 PEN

Ya the last one that I posted had that bug and I hadn’t noticed. It is now corrected but I have one more small one to deal with. I will rotate the hand in the same direction of the foot and I like the idea of green or something similar. Then again… should I save the wire color with the preset in the XML? I was wondering if I should save all the settings with the presets as you could completely customize what you want as a default then for each. What do you think?

 PEN

I have a bit of an interesting bug with it. If I try to set and item in the listView to selected it crashes Max.

lv.items.item[i].selected=true

That line is taking it out, any suggestions?

This is the whole function…

	fn updateLVselection lv=
	(
--		print (refs.dependents this)[1]
		if isValidNode (refs.dependents this)[1] then
		(
			for i = 0 to lv.items.count-1 do
			(
				 if lv.items.item[i].text==displayTypeName then
				(
					lv.items.item[i].selected=true
				)
			)
		)
	)

Page 4 / 6