2023-05-31 16:19:06 +02:00
|
|
|
/* SPDX-FileCopyrightText: 2007 by Janne Karhu. All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2009-01-24 13:45:24 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup edphys
|
2011-02-27 20:29:51 +00:00
|
|
|
*/
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#pragma once
|
2009-01-24 13:45:24 +00:00
|
|
|
|
2018-04-06 12:07:27 +02:00
|
|
|
struct Depsgraph;
|
2018-03-19 17:46:49 +01:00
|
|
|
struct Object;
|
|
|
|
|
struct PTCacheEdit;
|
|
|
|
|
struct ParticleSystem;
|
|
|
|
|
struct PointCache;
|
|
|
|
|
struct Scene;
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
struct wmOperatorType;
|
|
|
|
|
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `particle_edit.cc` */
|
2021-12-09 00:55:11 +11:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void PARTICLE_OT_select_all(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_select_roots(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_select_tips(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_select_random(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_select_linked(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_select_linked_pick(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_select_less(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_select_more(wmOperatorType *ot);
|
2016-12-28 17:30:58 +01:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void PARTICLE_OT_hide(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_reveal(wmOperatorType *ot);
|
2016-12-28 17:30:58 +01:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void PARTICLE_OT_rekey(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_subdivide(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_remove_doubles(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_weight_set(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_delete(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_mirror(wmOperatorType *ot);
|
2016-12-28 17:30:58 +01:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void PARTICLE_OT_brush_edit(wmOperatorType *ot);
|
2016-12-28 17:30:58 +01:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void PARTICLE_OT_shape_cut(wmOperatorType *ot);
|
2016-12-28 17:30:58 +01:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void PARTICLE_OT_particle_edit_toggle(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_edited_clear(wmOperatorType *ot);
|
2016-12-28 17:30:58 +01:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void PARTICLE_OT_unify_length(wmOperatorType *ot);
|
2016-12-28 17:30:58 +01:00
|
|
|
|
2021-12-09 00:55:11 +11:00
|
|
|
/**
|
|
|
|
|
* Initialize needed data for bake edit.
|
|
|
|
|
*/
|
2024-03-26 20:48:05 -04:00
|
|
|
void PE_create_particle_edit(
|
|
|
|
|
Depsgraph *depsgraph, Scene *scene, Object *ob, PointCache *cache, ParticleSystem *psys);
|
2021-12-09 00:55:11 +11:00
|
|
|
/**
|
|
|
|
|
* Set current distances to be kept between neighboring keys.
|
|
|
|
|
*/
|
2024-03-26 20:48:05 -04:00
|
|
|
void recalc_lengths(PTCacheEdit *edit);
|
2021-12-09 00:55:11 +11:00
|
|
|
/**
|
2022-03-02 10:05:15 -08:00
|
|
|
* Calculate a tree for finding nearest emitter's vertices.
|
2021-12-09 00:55:11 +11:00
|
|
|
*/
|
2024-03-26 20:48:05 -04:00
|
|
|
void recalc_emitter_field(Depsgraph *depsgraph, Object *ob, ParticleSystem *psys);
|
|
|
|
|
void update_world_cos(Object *ob, PTCacheEdit *edit);
|
2018-03-19 17:46:49 +01:00
|
|
|
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `particle_object.cc` */
|
2021-12-09 00:55:11 +11:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void OBJECT_OT_particle_system_add(wmOperatorType *ot);
|
|
|
|
|
void OBJECT_OT_particle_system_remove(wmOperatorType *ot);
|
|
|
|
|
|
|
|
|
|
void PARTICLE_OT_new(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_new_target(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_target_remove(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_target_move_up(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_target_move_down(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_connect_hair(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_disconnect_hair(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_copy_particle_systems(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_duplicate_particle_system(wmOperatorType *ot);
|
|
|
|
|
|
|
|
|
|
void PARTICLE_OT_dupliob_copy(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_dupliob_remove(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_dupliob_move_up(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_dupliob_move_down(wmOperatorType *ot);
|
|
|
|
|
void PARTICLE_OT_dupliob_refresh(wmOperatorType *ot);
|
2016-12-28 17:30:58 +01:00
|
|
|
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `particle_boids.cc` */
|
2021-12-09 00:55:11 +11:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void BOID_OT_rule_add(wmOperatorType *ot);
|
|
|
|
|
void BOID_OT_rule_del(wmOperatorType *ot);
|
|
|
|
|
void BOID_OT_rule_move_up(wmOperatorType *ot);
|
|
|
|
|
void BOID_OT_rule_move_down(wmOperatorType *ot);
|
2016-12-28 17:30:58 +01:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void BOID_OT_state_add(wmOperatorType *ot);
|
|
|
|
|
void BOID_OT_state_del(wmOperatorType *ot);
|
|
|
|
|
void BOID_OT_state_move_up(wmOperatorType *ot);
|
|
|
|
|
void BOID_OT_state_move_down(wmOperatorType *ot);
|
2016-12-28 17:30:58 +01:00
|
|
|
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `physics_fluid.cc` */
|
2021-12-09 00:55:11 +11:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void FLUID_OT_bake_all(wmOperatorType *ot);
|
|
|
|
|
void FLUID_OT_free_all(wmOperatorType *ot);
|
|
|
|
|
void FLUID_OT_bake_data(wmOperatorType *ot);
|
|
|
|
|
void FLUID_OT_free_data(wmOperatorType *ot);
|
|
|
|
|
void FLUID_OT_bake_noise(wmOperatorType *ot);
|
|
|
|
|
void FLUID_OT_free_noise(wmOperatorType *ot);
|
|
|
|
|
void FLUID_OT_bake_mesh(wmOperatorType *ot);
|
|
|
|
|
void FLUID_OT_free_mesh(wmOperatorType *ot);
|
|
|
|
|
void FLUID_OT_bake_particles(wmOperatorType *ot);
|
|
|
|
|
void FLUID_OT_free_particles(wmOperatorType *ot);
|
|
|
|
|
void FLUID_OT_bake_guides(wmOperatorType *ot);
|
|
|
|
|
void FLUID_OT_free_guides(wmOperatorType *ot);
|
|
|
|
|
void FLUID_OT_pause_bake(wmOperatorType *ot);
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
|
2024-04-01 16:46:39 +11:00
|
|
|
/* `dynamicpaint.cc` */
|
2021-12-09 00:55:11 +11:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void DPAINT_OT_bake(wmOperatorType *ot);
|
2021-12-09 00:55:11 +11:00
|
|
|
/**
|
|
|
|
|
* Add surface slot.
|
|
|
|
|
*/
|
2024-03-26 20:48:05 -04:00
|
|
|
void DPAINT_OT_surface_slot_add(wmOperatorType *ot);
|
2021-12-09 00:55:11 +11:00
|
|
|
/**
|
|
|
|
|
* Remove surface slot.
|
|
|
|
|
*/
|
2024-03-26 20:48:05 -04:00
|
|
|
void DPAINT_OT_surface_slot_remove(wmOperatorType *ot);
|
|
|
|
|
void DPAINT_OT_type_toggle(wmOperatorType *ot);
|
|
|
|
|
void DPAINT_OT_output_toggle(wmOperatorType *ot);
|
2011-05-24 07:08:58 +00:00
|
|
|
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `physics_pointcache.cc` */
|
2021-12-09 00:55:11 +11:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void PTCACHE_OT_bake_all(wmOperatorType *ot);
|
|
|
|
|
void PTCACHE_OT_free_bake_all(wmOperatorType *ot);
|
|
|
|
|
void PTCACHE_OT_bake(wmOperatorType *ot);
|
|
|
|
|
void PTCACHE_OT_free_bake(wmOperatorType *ot);
|
|
|
|
|
void PTCACHE_OT_bake_from_cache(wmOperatorType *ot);
|
|
|
|
|
void PTCACHE_OT_add(wmOperatorType *ot);
|
|
|
|
|
void PTCACHE_OT_remove(wmOperatorType *ot);
|
2016-12-28 17:30:58 +01:00
|
|
|
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `rigidbody_object.cc` */
|
2021-12-09 00:55:11 +11:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void RIGIDBODY_OT_object_add(wmOperatorType *ot);
|
|
|
|
|
void RIGIDBODY_OT_object_remove(wmOperatorType *ot);
|
2013-01-23 05:56:44 +00:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void RIGIDBODY_OT_objects_add(wmOperatorType *ot);
|
|
|
|
|
void RIGIDBODY_OT_objects_remove(wmOperatorType *ot);
|
2013-01-23 05:56:44 +00:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void RIGIDBODY_OT_shape_change(wmOperatorType *ot);
|
|
|
|
|
void RIGIDBODY_OT_mass_calculate(wmOperatorType *ot);
|
2009-01-24 13:45:24 +00:00
|
|
|
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `rigidbody_constraint.cc` */
|
2021-12-09 00:55:11 +11:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void RIGIDBODY_OT_constraint_add(wmOperatorType *ot);
|
|
|
|
|
void RIGIDBODY_OT_constraint_remove(wmOperatorType *ot);
|
2013-01-23 05:56:56 +00:00
|
|
|
|
2023-07-31 11:50:54 +10:00
|
|
|
/* `rigidbody_world.cc` */
|
2021-12-09 00:55:11 +11:00
|
|
|
|
2024-03-26 20:48:05 -04:00
|
|
|
void RIGIDBODY_OT_world_add(wmOperatorType *ot);
|
|
|
|
|
void RIGIDBODY_OT_world_remove(wmOperatorType *ot);
|
|
|
|
|
void RIGIDBODY_OT_world_export(wmOperatorType *ot);
|