Page MenuHome

BGE: Adding a Max Jumps value to the character physic window
ClosedPublic

Authored by Thomas Szepe (hg1) on May 15 2015, 4:48 PM.

Diff Detail

Repository
rB Blender

Event Timeline

Thomas Szepe (hg1) retitled this revision from to BGE: Adding a Max Jumps value to the character physic window.May 15 2015, 4:48 PM
Thomas Szepe (hg1) updated this object.
Thomas Szepe (hg1) updated this revision to Diff 4237.

Test file:

Mitchell Stokes (moguri) accepted this revision.

Looks good to me. I don't know if we really need to use an integer for the max jump count (especially since you limit the property to 100, which can fit in a char). Is the UI limit a hard or soft limit? In other words could I type in something over 100? A lower soft limit (say 5 or 10) might make the slider respond smother for typical use cases.

This revision is now accepted and ready to land.May 15 2015, 5:26 PM
Jorge Bernal (lordloki) accepted this revision.

Looks good to me. I don't know if we really need to use an integer for the max jump count (especially since you limit the property to 100, which can fit in a char). Is the UI limit a hard or soft limit? In other words could I type in something over 100? A lower soft limit (say 5 or 10) might make the slider respond smother for typical use cases.

It is a hard limit. Maybe, something like:

	RNA_def_property_range(prop, 1, INT_MAX);
	RNA_def_property_ui_range(prop, 1, 100, 1, 1);

it would be better.

Other than this, it looks ok to me.

Changes:

  1. Changed int to unsigned char.
  2. Add hard or soft limit to max jump count.
This comment was removed by Angus Hollands (agoose77).

As with the other revision, I'd like for the Python API to fail if an invalid value for max jumps is provided, but otherwise OK.

I don't understand your sentence. Which Python API? This is a patch for the UI there is no API. Also it is impossible to sett an invalid value via UI.

Thomas Szepe (hg1) updated this revision to Diff 5157.

Update for the actual master.

This revision was automatically updated to reflect the committed changes.