|
struct Test_StrandPropagationModifier
|
|
(
|
|
-- Tests that strand propagation can be added error-free in the modifier panel. Mainly to do with loading UI diagrams error-free
|
|
function Test_AddStrandPropagationModifier =
|
|
(
|
|
-- Create a plane with 2x2 segments so we have 9 vertices all together
|
|
local distributionObject = Plane lengthsegs:2 widthsegs:2
|
|
|
|
max modify mode
|
|
|
|
-- Add strand propagation
|
|
select distributionObject
|
|
local guidesFromSurfaceModifier = Ox_Guides_from_Surface()
|
|
guidesFromSurfaceModifier.method = 4
|
|
modPanel.addModToSelection guidesFromSurfaceModifier
|
|
|
|
local strandPropagationModifierInstance = Ox_Strand_Propagation()
|
|
modPanel.addModToSelection strandPropagationModifierInstance
|
|
|
|
completeRedraw()
|
|
-- If everything is good up to this point we're done
|
|
|
|
-- Cleanup
|
|
delete distributionObject
|
|
),
|
|
|
|
-- Tests that we can drag the strand propagation modifier around in the modifier stack without problems
|
|
function Test_MoveStrandPropagationInModifierStack =
|
|
(
|
|
-- Create a plane with 2x2 segments so we have 9 vertices all together
|
|
local distributionObject = Plane lengthsegs:2 widthsegs:2
|
|
|
|
max modify mode
|
|
|
|
-- Add strand propagation
|
|
select distributionObject
|
|
local guidesFromSurfaceModifier = Ox_Guides_from_Surface()
|
|
guidesFromSurfaceModifier.method = 4
|
|
modPanel.addModToSelection guidesFromSurfaceModifier
|
|
|
|
local hairFromGuidesModifierInstance = Ox_Hair_from_Guides()
|
|
modPanel.addModToSelection hairFromGuidesModifierInstance
|
|
|
|
local strandPropagationModifierInstance = Ox_Strand_Propagation()
|
|
modPanel.addModToSelection strandPropagationModifierInstance
|
|
|
|
addModifier $ (Ox_Strand_Propagation()) before:2
|
|
deleteModifier $ 1
|
|
|
|
-- If no crash happened at this point we are good
|
|
delete distributionObject
|
|
)
|
|
)
|
|
|
|
EUnit.AddTestClass Test_StrandPropagationModifier
|
|
ok
|