nimphs.operators.shared
Modules
nimphs.operators.shared.add_point_data
- class NIMPHS_OT_AddPointData
Bases:
Operator
Add point data.
- available: None
JSON stringified list of available point data.
- Type
bpy.props.StringProperty
- bl_description: Union[str, Any] = 'Add point data'
typing.Union[str, typing.Any]
- Type
type
- bl_idname: Union[str, Any] = 'nimphs.add_point_data'
typing.Union[str, typing.Any]
- Type
type
- bl_label: Union[str, Any] = 'Add point data'
typing.Union[str, typing.Any]
- Type
type
- chosen: None
JSON stringified list of chosen point data.
- Type
bpy.props.StringProperty
- draw(_context: Context) → None
Layout of the popup window.
- Parameters
_context (Context) -- context
- execute(context: Context) → set
Add chosen point data to the list of point data to import.
- Parameters
context (Context) -- context
- Returns
state of the operator
- Return type
set
- invoke(context: Context, _event: Event) → set
Let the user choose point data to add.
- Parameters
context (Context) -- context
_event (Event) -- event
- Returns
state of the operator
- Return type
set
- is_custom_base_cls = False
- point_data: None
Point data.
- Type
bpy.props.EnumProperty
- point_data_items(_context: Context) → list
Format point data to present to the user.
- Parameters
_context (Context) -- context
- Returns
point data
- Return type
list
- register_cls = True
- source: None
Indicate the activator of this operator. Enum in ['OBJECT', 'OPERATOR'].
- Type
bpy.props.EnumProperty
nimphs.operators.shared.compute_ranges_point_data_values
- class NIMPHS_OT_ComputeRangesPointDataValues
Bases:
Operator
,NIMPHS_ModalOperator
Operator to compute ranges of point data values.
- bl_description: Union[str, Any] = 'Compute ranges of point data values'
typing.Union[str, typing.Any]
- Type
type
- bl_idname: Union[str, Any] = 'nimphs.compute_ranges_point_data_values'
typing.Union[str, typing.Any]
- Type
type
- bl_label: Union[str, Any] = 'Compute ranges of point data values'
typing.Union[str, typing.Any]
- Type
type
- draw(context: Context) → None
Layout of the popup window.
- Parameters
context (Context) -- context
- end: int = 0
Identifier of the last time point
- Type
int
- execute(context: Context) → set
Compute ranges of point data values ('GLOBAL' scope).
- Parameters
context (Context) -- context
- Returns
state of the operator
- Return type
set
- invoke(context: Context, _event: Event) → set
Prepare operator settings. Function triggered before the user can edit settings.
- Parameters
context (Context) -- context
_event (Event) -- event
- Returns
state of the operator
- Return type
set
- is_custom_base_cls = False
- maxima: list = []
List of maxima for each selected variable
- Type
list
- minima: list = []
List of minima for each selected variable
- Type
list
- modal(context: Context, event: Event) → set
Run one step of the 'compute ranges point data values' process.
- Parameters
context (Context) -- context
event (Event) -- event
- Returns
state of the operator
- Return type
set
- obj: Object = None
Selected object
- Type
Object
- point_data: None
Point data settings.
- classmethod poll(context: Context) → bool
If false, locks the button of the operator.
- Parameters
context (Context) -- context
- Returns
state of the operator
- Return type
bool
- register_cls = True
- time_point: int = 0
Current time point
- Type
int
nimphs.operators.shared.create_mesh_sequence
- class NIMPHS_CreateMeshSequence
Bases:
NIMPHS_CreateSequence
,NIMPHS_ModalOperator
Operator to create mesh sequences used in both modules.
- draw(context: Context) → None
UI layout of the operator.
- Parameters
context (Context) -- context
- end: None
Ending point of the sequence.
- Type
bpy.props.IntProperty
- execute(context: Context) → set
Prepare the execution of the 'create mesh sequence' process.
- Parameters
context (Context) -- context
- Returns
state of the operator
- Return type
set
- frame: int = 0
Current frame during the 'create sequence' process (different from time point)
- Type
int
- invoke(_context: Context, _event: Event) → set
Prepare operators settings. Function triggered before the user can edit settings. This method has to be overloaded in derived classes.
- Parameters
_context (Context) -- context
_event (Event) -- event
- Returns
state of the operator
- Return type
set
- is_custom_base_cls = True
- modal(context: Context, event: Event) → set
Run one step of the 'create_mesh_sequence' process.
- Parameters
context (Context) -- context
event (Event) -- event
- Returns
state of the operator
- Return type
set
- register_cls = False
- run_one_step(_context: Context) → set
Run one step of the 'create mesh sequence' process.
- Parameters
_context (Context) -- context
- Returns
state of the operation. Enum in ['PASS_THROUGH', 'CANCELLED'].
- Return type
set
- time_point: int = 0
Time point currently processed when creating a sequence
- Type
int
nimphs.operators.shared.create_sequence
- class NIMPHS_CreateSequence
Bases:
Operator
Base class of 'CreateSequence' operators.
- draw(context: Context) → None
UI layout of the operator.
- Parameters
context (Context) -- context
- is_custom_base_cls = True
- limit_add_point_data: int = 24
Number of maximum point data that the use can import
- Type
int
- max: None
Maximum length / time point of the sequence.
- Type
bpy.props.IntProperty
- mode: None
Indicate which mode to use for this operator. Enum in ['MODAL', 'TEST'].
- Type
bpy.props.EnumProperty
- module: None
Indicate which module to use. Enum in ['OpenFOAM', 'TELEMAC'].
- Type
bpy.props.EnumProperty
- obj: Object = None
Selected object
- Type
bpy.types.Object
- point_data: None
Point data settings.
- classmethod poll(context: Context) → bool
If false, locks the button of the operator.
- Parameters
context (Context) -- context
- Returns
state of the operator
- Return type
bool
- register_cls = False
- start: None
Starting frame / time point of the sequence.
- Type
bpy.props.IntProperty
- test_data: None
Use this property to pass data as a JSON stringified block of data.
- Type
bpy.props.StringProperty
nimphs.operators.shared.create_streaming_sequence
- class NIMPHS_CreateStreamingSequence
Bases:
NIMPHS_CreateSequence
Operator to create 'streaming sequence' objects.
- draw(_context: Context) → None
UI layout of the operator.
- Parameters
_context (Context) -- context
- execute(context: Context, obj: Object, selected: Object) → set
Create the 'streaming sequence' object.
- Parameters
context (Context) -- context
obj (Object) -- sequence object
selected (Object) -- selected object
- Returns
state of the operator
- Return type
set
- invoke(_context: Context, _event: Event) → set
Prepare operators settings. Function triggered before the user can edit settings.
- Parameters
_context (Context) -- context
_event (Event) -- event
- Returns
state of the operator
- Return type
set
- is_custom_base_cls = True
- length: None
Length of the sequence.
- Type
bpy.props.IntProperty
- register_cls = False
- shade_smooth: None
Whether to use smooth shading or flat shading
- Type
bpy.props.BoolProperty
- update_length(_context: Context) → None
Make sure the user can't select a wrong value.
- Parameters
_context (Context) -- context
nimphs.operators.shared.edit_file_path
- class NIMPHS_OT_EditFilePath
Bases:
Operator
,ImportHelper
Operator to edit the file path of the selected object.
- bl_description: Union[str, Any] = 'Edit file path of the selected object'
typing.Union[str, typing.Any]
- Type
type
- bl_idname: Union[str, Any] = 'nimphs.edit_file_path'
typing.Union[str, typing.Any]
- Type
type
- bl_label: Union[str, Any] = 'Edit'
typing.Union[str, typing.Any]
- Type
type
- execute(context: Context) → set
Update file path property.
- Parameters
context (Context) -- context
- Returns
state of the operator
- Return type
set
- filter_glob: None
List of allowed file extensions.
- Type
bpy.props.StringProperty
- invoke(context: Context, _event: Event) → set
Initialize the operator (update the list of allowed extensions).
- Parameters
context (Context) -- context
_event (Event) -- event
- Returns
state of the operator
- Return type
set
- is_custom_base_cls = False
- register_cls = True
nimphs.operators.shared.modal_operator
- class NIMPHS_ModalOperator
Bases:
object
Base class of NIMPHS modal operators.
- is_custom_base_cls = True
- mode: None
Indicate which mode to use for this operator. Enum in ['MODAL', 'TEST'].
- Type
bpy.props.EnumProperty
- prepare(context: Context, label: str, step: float = 1e-06) → None
Prepare the execution of the modal operator.
- Parameters
context (Context) -- context
label (str) -- label to display on the progress bar
step (float, optional) -- time_step value for the timer. Defaults to 1e-6.
- register_cls = False
- set_progress(context: Context, value: float) → None
Set custom value of progress bar.
- Parameters
context (Context) -- context
value (float) -- new value to display
- stop(context: Context, canceled: bool = False) → None
Stop the 'create sequence' process. Used for both modules.
- Parameters
context (Context) -- context
canceled (bool, optional) -- ask to report 'create sequence canceled'. Defaults to False.
- test_data: None
Use this property to pass data as a JSON stringified block of data.
- Type
bpy.props.StringProperty
- timer: Timer = None
Timer which triggers the 'modal' method of operators
- Type
bpy.types.Timer
- update_label(context: Context, label: str) → None
Update label of progress bar.
- Parameters
context (Context) -- context
label (str) -- new label to display
- update_progress(context: Context, step: int, end: int) → None
Update progress bar value.
- Parameters
context (Context) -- context
step (int) -- current step in the process
end (int) -- ending point of the process
nimphs.operators.shared.remove_point_data
- class NIMPHS_OT_RemovePointData
Bases:
Operator
Remove point data from the list to import as vertex colors.
- bl_description: Union[str, Any] = 'Remove point data from the list to import as vertex colors'
typing.Union[str, typing.Any]
- Type
type
- bl_idname: Union[str, Any] = 'nimphs.remove_point_data'
typing.Union[str, typing.Any]
- Type
type
- bl_label: Union[str, Any] = 'Remove point data'
typing.Union[str, typing.Any]
- Type
type
- execute(context: Context) → set
Remove point data from the list using the given name.
- Parameters
context (Context) -- context
name (str) -- name of point data
- Returns
state of the operator
- Return type
set
- is_custom_base_cls = False
- register_cls = True
- source: None
Indicate the activator of this operator. Enum in ['OBJECT', 'OPERATOR'].
- Type
bpy.props.EnumProperty
- var_name: None
Name of the variable to remove.
- Type
bpy.props.StringProperty
nimphs.operators.shared.set_custom_value_range
- class NIMPHS_OT_SetCustomValueRange
Bases:
Operator
Set custom point data value range.
- bl_description: Union[str, Any] = 'Set custom point data value range'
typing.Union[str, typing.Any]
- Type
type
- bl_idname: Union[str, Any] = 'nimphs.set_custom_value_range'
typing.Union[str, typing.Any]
- Type
type
- bl_label: Union[str, Any] = 'Set custom value range'
typing.Union[str, typing.Any]
- Type
type
- chosen: None
JSON stringified PointDataInformation of the selected point data.
- Type
bpy.props.StringProperty
- draw(_context: Context) → None
Layout of the popup window.
- Parameters
_context (Context) -- context
- execute(context: Context) → set
Edit new selected values for the chosen point data.
- Parameters
context (Context) -- context
- Returns
state of the operator
- Return type
set
- invoke(context: Context, _event: Event) → set
Popup window to let the user edit the value range of the selected point data.
- Parameters
context (Context) -- context
_event (Event) -- event
- Returns
state of the operator
- Return type
set
- is_custom_base_cls = False
- max: None
- min: None
- register_cls = True
- source: None
Indicate the activator of this operator. Enum in ['OBJECT', 'OPERATOR'].
- Type
bpy.props.EnumProperty
nimphs.operators.shared.utils
- update_end(self, _context: Context) → None
Update time point (make sure the user can't select an undefined time point).
- Parameters
_context (Context) --
- update_plane_id(self, _context: Context) → None
Update plane id (for 3D TELEMAC files, make sure the user can't select an undefined plane id).
- Parameters
_context (Context) -- context
- update_start(self, _context: Context) → None
Update time point (make sure the user can't select an undefined time point).
- Parameters
_context (Context) --