Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for waveset buoys #256

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add support for waveset buoys #256

wants to merge 3 commits into from

Conversation

dpogue
Copy link
Member

@dpogue dpogue commented Jun 12, 2021

Adds a Buoy modifier that can be attached to a waveset. That modifier contains a list of objects that should float on top of the waveset.

korman-buoys

@Hoikas It seems to me like it would be best to have the list of buoys directly reference the objects, but everywhere else I see these sorts of lists in korman modifiers there's always a class in the middle (PlasmaBuoyObject in this case)

korman/properties/modifiers/water.py Outdated Show resolved Hide resolved
korman/properties/modifiers/water.py Outdated Show resolved Hide resolved


class PlasmaBuoyObject(idprops.IDPropObjectMixin, bpy.types.PropertyGroup):
display_name = StringProperty(name="Display Name")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been migrating toward having these lists display the actual name of the object or "[Empty]" if unset. IMO, it makes things less tedious.

@Hoikas
Copy link
Member

Hoikas commented Jun 12, 2021

Also, we should probably issue a porting message that buoys only function on MOUL.

@dpogue
Copy link
Member Author

dpogue commented Jun 12, 2021

Also, we should probably issue a porting message that buoys only function on MOUL.

Thinking a bit more about edge cases, we probably also want something that checks that the buoy is a physical dynamic object (although the engine should ignore any non-physical buoys)

@Hoikas
Copy link
Member

Hoikas commented Jun 12, 2021

I think this modifier should call the physics exporter - it's an idempotent process so no worries about stepping all over anything.

description="Object that float on water",
options=set(),
type=bpy.types.Object,
poll=idprops.poll_dynamic_objects)
Copy link
Member

@Hoikas Hoikas Jun 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this is correct from an implementation standpoint, I feel like it's putting too much of a requirement on the user on knowing how buoys work under the hood. Instead, I think we should call the physics exporter in the export fxn and place the resulting physical in the dynamic group... exporter.physics.generate_physical(bo, so, member_group="kGroupDynamic") This poll fxn should probably just check for mesh objects. Further, we should alert in the UI (and maybe the log too?) if the collision mod is on with dynamic unticked. Alternatively, add instrumentation to the physics exporter to force buoys dynamic or a way to force the member_group supplied by the exporter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants