In PoseMode, the Ctrl-A hotkey can now be used to apply the current pose as the new restpose for the armature.
Notes:
* Roll correction may not be totally correct on bone chains, but is ok in most cases.
* Objects that are bone parented to the armature where this is applied are not correctly adjusted yet.
* It is advisable to 'apply' the existing armature deformations to geometry deformed by the armature before applying this, to prevent unexpected results.
* No menu entry yet... will add in due course.
* Changed hotkey from Alt-C to Alt-Shift-C so that it works when the active object cannot be deselected/deactivated.
* Added option to convert to bezier curves. Note that currently, the handles are simply placed to the same location as the point so that there is an exact match with the gpencil strokes. In future, it would be interesting to investigate using proper curve-fitting algos instead.
rayCast(to,from,dist,prop,face,xray,poly):
The face paremeter determines the orientation of the normal:
0 or omitted => hit normal is always oriented towards the ray origin (as if you casted the ray from outside)
1 => hit normal is the real face normal (only for mesh object, otherwise face has no effect)
The ray has X-Ray capability if xray parameter is 1, otherwise the first object hit (other than self object) stops the ray.
The prop and xray parameters interact as follow:
prop off, xray off: return closest hit or no hit if there is no object on the full extend of the ray.
prop off, xray on : idem.
prop on, xray off: return closest hit if it matches prop, no hit otherwise.
prop on, xray on : return closest hit matching prop or no hit if there is no object matching prop on the full extend of the ray.
if poly is 0 or omitted, returns a 3-tuple with object reference, hit point and hit normal or (None,None,None) if no hit.
if poly is 1, returns a 4-tuple with in addition a KX_PolyProxy as 4th element.
The KX_PolyProxy object holds information on the polygon hit by the ray: the index of the vertex forming the poylgon, material, etc.
Attributes (read-only):
matname: The name of polygon material, empty if no material.
material: The material of the polygon
texture: The texture name of the polygon.
matid: The material index of the polygon, use this to retrieve vertex proxy from mesh proxy
v1: vertex index of the first vertex of the polygon, use this to retrieve vertex proxy from mesh proxy
v2: vertex index of the second vertex of the polygon, use this to retrieve vertex proxy from mesh proxy
v3: vertex index of the third vertex of the polygon, use this to retrieve vertex proxy from mesh proxy
v4: vertex index of the fourth vertex of the polygon, 0 if polygon has only 3 vertex
use this to retrieve vertex proxy from mesh proxy
visible: visible state of the polygon: 1=visible, 0=invisible
collide: collide state of the polygon: 1=receives collision, 0=collision free.
Methods:
getMaterialName(): Returns the polygon material name with MA prefix
getMaterial(): Returns the polygon material
getTextureName(): Returns the polygon texture name
getMaterialIndex(): Returns the material bucket index of the polygon.
getNumVertex(): Returns the number of vertex of the polygon.
isVisible(): Returns whether the polygon is visible or not
isCollider(): Returns whether the polygon is receives collision or not
getVertexIndex(vertex): Returns the mesh vertex index of a polygon vertex
getMesh(): Returns a mesh proxy
New methods of KX_MeshProxy have been implemented to retrieve KX_PolyProxy objects:
getNumPolygons(): Returns the number of polygon in the mesh.
getPolygon(index): Gets the specified polygon from the mesh.
More details in PyDoc.
* New stuff: Grease Pencil strokes on the active layer can now be converted to 3d curves (geometry). More work is still needed to make the result look be more optimal (i.e. extruded curve)
* Bugfix: Spacing between collapsed layers is more compact now
without this, an incorrect sound path could cause scripts to to fail, making some functionality not work at all.
This also fixes a problem where samples would be loaded multiple times.
Drawing Improvements:
* Single 'dots' now draw rounded
* Strokes being drawn are drawn 'solid' instead of as dotted lines
Eraser:
* Now operates interactively, so no more wait to see if stuff was erased
* An influence circle is now drawn - the radius of this is defined as the thickness^2
Adding numerical input support to edge slide (and at the same time, loop cut).
Also clean up NumInput functions for external use. I might have a second pass at this to make it even easier.
Grease pencil commit added some panel draw code or whatnot which seems to change the matrix stack in unwanted (in this case) ways. Reset to identity fixes it.
* I don't think it was limited to Linux though
Previously, this behaviour was available only for sensors
that were not connected to any active state, which was
forcing the game designer to duplicate sensors in some
cases.
For example the Always sensors used to initialize the
states needed to be duplicated for each state. With this
patch, a single Always sensor with Level option enabled
will suffice to initialize all the states.
A Python controller can determine which sensor did trigger
with the new SCA_ISensor::isTriggered() function.
Notes:
- When a sensor with level option enabled is connected
to multiple controllers, only those of newly activated
states will be triggered. The controllers of already
activated states will receive no trigger, unless the
sensor internal state toggled, in which case all the
controllers are triggered as always.
- The old isPositive() function returns the internal
state of the sensor, positive or negative; the new
isTriggered() function returns 1 only for sensors
that generated an event in the current frame.
Warnings still exist in the following places:
* places (exotic.c, etc.) where format strings still use 'longs' but datatype is uintptr_t (i.e. resulting from the win64 changes)
* shrinkwrap.c - a few "incompatable type" warnings
This commit finishes the work started in the previous commit.
1) Reduced the effects of 'shrinking' lines with acute angles (*)
2) Ends of strokes now get crude end-caps which look ok for most purposes (they are really just simple trapeziums not fancy semicircles)
* Note: some shrinking does still occur if the stroke was drawn quickly enough for few points to be recorded. Also, although there are still zones of overlapping when there are acute angles, this is reduced to steeper angles (and is not too bad considering real-life materials)
Just a little commit so that I can transfer some changes back over to laptop.
* Line drawing should now be improved for most cases, but acute angles still need more work to reduce 'shrinking' artifacts. As such, this is still hidden behind 'rt' setting
* Preparation work for Grease-Pencil in Image Editor, and also 'Stick to View' for Image/Sequence editors.
- For newtonian particles a "self effect" button in particle extras makes the particles be effected by themselves if a particle effector is defined for this system, currently this is a brute force method so things start getting slow with more than ~100 particles, but this will hopefully change in the future.
- Two new effector types: charge and a Lennard-Jones potential based force (inter-molecular forces for example).
-Charge is similar to spherical field except it changes behavior (attract/repulse) based on the effected particles charge field (negative/positive) like real particles with a charge.
-The Lennard-Jones field is a very short range force with a behavior determined by the sizes of the effector and effected particle. At a distance smaller than the combined sizes the field is very repulsive and after that distance it's attractive. It tries to keep the particles at an equilibrium distance from each other. Particles need to be at a close proximity to each other to be effected by this field at all.
- Particle systems can now have two effector fields (two slots in the fields panel). This allows to create particles which for example have both a charge and a Lennard-Jones potential.
The root cause of this bug is the fact that Bullet shapes
are shared between duplicated game objects. As the physics
object scale is stored in the shape, all duplicas must
have the same scale otherwise the physics representation
is incorrect.
This fix introduces a mechanism to duplicate shapes at
runtime so that Bullet shapes are not shared anymore.
The drawback is an increased memory consuption.
A reference count mechanism will be introduced in a
later revision to keep Bullet shape shared between
duplicas that have the same scale.