cPy.cCore module

Contents

cPy.cCore module#

Expand for references to cPy.cCore

VoxelExts()[source]#
#ifndef PY_PARSER
VoxelMenuExts()[source]#
#ifndef PY_PARSER
VoxelExt(idx: int)[source]#
#ifndef PY_PARSER
GetExtByID(id: int)[source]#
#ifndef PY_PARSER
class BaseClass[source]#

Bases: object

Use this class for build a class for UI or serialization.
see class_reg.h for details about the class registration
is_py_owned: bool#
This variable tells who will delete the object if the object is owned by python (if it was created in python) - it will not be deleted automatically when deleting or clearing the ClassArray
GetClassMask() → int[source]#
Masking elements of class. Each member has mask. Element is serializable/visible only if (it’s_mask & hosting_class_mask) != 0
ClassMask() → int[source]#
runFunction(func: any)[source]#
reset_class(DataPtr: any = None)[source]#
CopyBaseClass(Dest: BaseClass, Add: bool = False) → bool[source]#
Copy base class to other class uning names correspondence
Parameters:
  • Dest (BaseClass) – The destination object

  • Add (bool) – Add members to class arrays or replace

Returns:

true if successful

Return type:

bool

Save(xml: any, ClassPtr: any, Extra: any = None)[source]#
Save class to the XML structure
Parameters:
  • xml – The result

  • ClassPtr – The pointer to the data, equals to this if class is directly castable

  • Extra – Extra data pointer

Load(xml: any, ClassPtr: any, Extra: any = None) → bool[source]#
Load the class from the XML structure
Parameters:
  • xml – The source XML

  • ClassPtr – The pointer to the data, equals to this if class is directly castable

  • Extra – Extra data pointer

Returns:

true if successful

Return type:

bool

FullCopy(SrcData: any, SrcDataExtra: any, Dest: BaseClass, DestData: any, DstDataExtra: any, C: any) → bool[source]#
Fast copy from one BaseClass to another. Names and types correspondence used to copy.
Parameters:
  • SrcData – Data data pointer

  • SrcDataExtra – Src extra

  • Dest (BaseClass) – Destination class

  • DestData – Destination data

  • DstDataExtra – Destination extra

  • C – copy context

Returns:

true if successful

Return type:

bool

SaveBin(Data: any, Extra: any, Out: any, ExDictionary: any, SkipList: any)[source]#
Save in binaly form. Use only for temporary storage in memory!!!
Parameters:
  • Data – data pointer

  • Extra – extra pointer

  • Out – Output stream

  • ExDictionary – Dictionary for enumerators

  • SkipList – Skip list for enumerators

LoadBin(Data: any, Extra: any, In: any, ExDictionary: any)[source]#
Load the class from the memory. Use only for temporary storage in memory!!!
Parameters:
  • Data – Pointer to the class data

  • Extra – Extra data

  • In – binary stream to read data from

  • ExDictionary – Additional dictionary

GetAmountOfElementsInUI() → int[source]#
return amount of elements represented in UI
GetAmountOfElementsInXML() → int[source]#
return amount of elements taht will be stored in XML
pySerialize()[source]#
serialize and UI for python
pySerializeParentClass() → bool[source]#
get_class_name() → str[source]#
new_element() → BaseClass[source]#
construct pointer to class of the same type like this. Elements will not be copied into the new place
GetElement(res: any, idx: int, Ptr: any = None, Extra: any = None) → bool[source]#
The The function returns complete information about the member by it’s index. If you want to walk through all members use _EACH … _EACH_END loop.
Parameters:
  • res – All data gathered there

  • idx (int) – Index of the member

  • Ptr – Pointer to data (if class is direcly castable it is equal to this, othervice it points to placement of data in memory). If NULL passed, this will be used

  • Extra – Extra data, used for enumerators and sliders (mostly)

Returns:

return true if element exists and visible

Return type:

bool

GetElementByName(Name: str, Ptr: any, Extra: any, res: any, UI: bool = False, Serialize: bool = True) → bool[source]#
The function returns complete information about the member by it’s name.
Parameters:
  • Name (str) – Name of the member

  • Ptr – Data ptr

  • Extra – Extra

  • res – All data gathered there

Returns:

return true if element exists and visible

Return type:

bool

GetElementByNameAndType(Name: str, Type: str, Ptr: any, Extra: any, res: any, UI: bool = False, Serialize: bool = True) → bool[source]#
DeleteDefaultSubFields(xml: any, ClassPtr: any, Extra: any = None)[source]#
Short form saving. Fields that are unchanged in comparison to default will be skipped in XML.
ShouldSaveInShortForm() → bool[source]#
Return true if class should be saved in short form mandatory
ExpandWith(ElmName: str, base: any) → int[source]#
DelElement(Index: int) → bool[source]#
auto_cast(ptr: any) → BaseClass[source]#
ReadFromFile(Name: str, very_safe_with_backup: bool = False) → bool[source]#
Save the object to file or binary stream.
Example
|         MyClass C;
|         MyClass C1;
// to stream
MemoryBinStream BS;
C.ToBS(BS, true);
// copy from C to C1
C1.FromBS(BS); *
// to file
C.WriteToFile(“file.xml”);
C1.ReadFromFile(“file.xml”); *
// to string
cStr s;
C.ToStr(s);
C1.FromStr(s);
WriteToFile(Name: str) → bool[source]#
WriteToFileIfChanged(Name: str) → bool[source]#
ToStr(bs: any)[source]#
FromStr(bs: any)[source]#
see ToBS()
SetParent(Parent: BaseClass)[source]#
set parent recursively
SimplySetParent(Parent: BaseClass)[source]#
set parent directly to this, not affecting members
MayBeParent() → bool[source]#
CheckCompartabilityWith(TypeName: str, TypeSize: int) → bool[source]#
ProcessInEditor(Parent: BaseClass) → bool[source]#
RenderInScene(Parent: BaseClass) → bool[source]#
HandleKey(code: int) → bool[source]#
OnChangeMember(MembClass: BaseClass, MembPtr: any, MembExtra: any, MembName: str) → bool[source]#
BeforeChangeMember(MembClass: BaseClass, MembPtr: any, MembExtra: any, MembName: str)[source]#
GetElementLevel(EName: str) → int[source]#
OnCreateControlFromScratch(Context: any, Rect: Rct) → any[source]#
OnModifyControl(FieldName: str, W: any, Context: any)[source]#
CanBeDragged(MemberID: str, dx: int, dy: int) → bool[source]#
Use it for build a Drag & Drop element.
see CanAcceptDrag(), OnStartDrag(), OnEndDrag(), OnAcceptDrag()
CanAcceptDrag(MemberID: str) → bool[source]#
OnStartDrag(MemberID: str) → bool[source]#
OnEndDrag(MemberID: str) → bool[source]#
OnAcceptDrag(DraggedItemParent: BaseClass, DraggedMemberID: str, AcceptorMemberID: str, MyRect: any) → bool[source]#
UsePointerInHashCalculation() → bool[source]#
SkipHash() → bool[source]#
IsArray() → bool[source]#
GetCmdID() → str[source]#
isNotParent() → bool[source]#
SetParents()[source]#
SetParentsSafe()[source]#
set parents to this for all child members, each child will be tested for validity
static GetCurrentSaveFile() → str[source]#
CurrentSaveFile: str = None#
If user triggers saving class to file, last filename stored there
UpdateClassMembersAndMask(recursive: bool)[source]#
SaveInShortForm: bool = False#
static UI_definition() → bool[source]#
static Serialization() → bool[source]#
class cTool[source]#

Bases: BaseClass

Class for tools.
static dynamic_cast(pObject: BaseClass) → cTool[source]#
An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a cTool class or its descendant, and if so, returns the specified object, but of the cTool type.
ID: int#
CustomName: cStr#
Custom name of the tool.
SourceIcon: cStr#
Path to the tool’s icon.
CmdID: cStr#
Command identifier for calling the tool.
BaseParentTool: cStr#
Used if tool duplicated. This is very base of the tool, it does not changes when tool duplicated. This is like “grand-grand…father”
PreviousParentTool: cStr#
This is ID of parent, like “father” tool
key: cStr#
Encryption key for saving presets.
IsActive: bool#
Indicates whether the tool is currently active.
AppearsInSmoothActions: bool#
Indicates if the tool applies during smoothing actions.
Current: cTool = None#
Pointer to the currently active tool.
GeneralUsage: bool = True#
true if cTool used outside of voxel room.
PrevInterpValue: float#
Previous interpolation value.
PrevInterp: bool#
Previous interpolation state.
AbleToSnap: bool#
Indicates if the tool supports snapping.
ActivatedMandatory: bool#
Flag for mandatory tool activation.
SomethingChanged: bool = False#
Global flag indicating changes in the scene.
ExtHash: int = 0#
Extension hash.
TemporaryDisablePresetActivation: bool = False#
Temporarily disables preset activation.
GetFullID() → str[source]#
AssignExternalIcon(iconname: str)[source]#
ChooseIcon()[source]#
Activate()[source]#
static Register(ex: cTool) → any[source]#
Call this function to register own extension.
Go to cTool.cpp, include your header,
call cTool::Register in function RegisterVoxelExtensions().
static GetHook() → cTool[source]#
static find(id: str) → cTool[source]#
static CheckFieldPresence(FieldName: str) → bool[source]#
SwitchTo()[source]#
Please use this function to activate the tool
GetID() → str[source]#
Define Textual ID in tools list.
CheckParentTool(_0: int) → bool[source]#
OnActivatePreset()[source]#
NeedToStoreToolPreset() → bool[source]#
RestoreExtensionPreset()[source]#
StoreExtensionPreset(asPreset: bool = False)[source]#
OnPlaceInUI()[source]#
GetPresetFileName() → cStr[source]#
AllowUVIslandsPreview() → bool[source]#
OverrideCluster(cl: int) → any[source]#
GetPlacementPriory() → int[source]#
GetPrevTool() → str[source]#
PresentInVoxelTools() → bool[source]#
MayModifyVoxelsAsSurface() → bool[source]#
PresentInSurfaceTools() → bool[source]#
Returns true if the tool is present in voxel surface toolset.
PresentInRetopoTools() → bool[source]#
PresentInUvTools() → bool[source]#
PresentInPaintTools() → bool[source]#
PresentInTweakTools() → bool[source]#
PresentInPhotogrammetryTools() → bool[source]#
PresentInRoom(RoomName: str) → bool[source]#
CreateToolset() → bool[source]#
Create toolset on the top line.
see VoxelSculptTool::CreateToolset() as example
CreateInterface(Where: any) → bool[source]#
Creates parameters plate of this tool.
Process()[source]#
Render()[source]#
RenderPreviewAsVolume(Sh: int)[source]#
OnLMB_Down() → bool[source]#
OnLMB_Up() → bool[source]#
OnDBL() → bool[source]#
OnMMB_Down() → bool[source]#
OnMMB_Up() → bool[source]#
OnRMB_Down() → bool[source]#
OnRMB_Up() → bool[source]#
OnUndo() → bool[source]#
OnRedo() → bool[source]#
DisableRedo() → bool[source]#
OnWheel(step: int) → bool[source]#
AllowIncrementalRender() → bool[source]#
OnKey(KeyCode: any) → bool[source]#
AllowMMBNavigation() → bool[source]#
AllowRMBNavigation() → bool[source]#
AllowRadisRMBControl() → bool[source]#
CanDrawInFreeSpace() → bool[source]#
OnActivate()[source]#
OnDeActivate()[source]#
IsToolsAction() → bool[source]#
OnClear()[source]#
ClearMyToolPreset()[source]#
OnClearVolume()[source]#
OnIncRes() → bool[source]#
OnResample() → bool[source]#
OnSmoothAll() → bool[source]#
OnChangeCurVolume(newCur: any)[source]#
OnChangeCurVolumeManually(newCur: any)[source]#
OnVoxelize()[source]#
OnMakeSurface()[source]#
DisableRadiusVariation() → bool[source]#
DrawOnPlane() → bool[source]#
AbleToDrawOnPlane() → bool[source]#
OnRectSelectionEnd(R: Rct) → bool[source]#
static SafeRectSelection(R: Rct) → bool[source]#
ApplyEnterInCurves() → bool[source]#
rief Determines if the tool applies the ‘Enter’ key action specifically within curve editing.
AllowRectSelection() → bool[source]#
AllowOnlyRectSelection() → bool[source]#
ApplyCurvesAsRectSelection() → bool[source]#
AllowStamp() → bool[source]#
AllowLinesDrawing() → bool[source]#
AllowRectDrawing() → bool[source]#
AllowLassoDrawing() → bool[source]#
AllowCircleDrawing() → bool[source]#
NeedToClearPointsOnDBLClick() → bool[source]#
Use3DLasso() → bool[source]#
Snap3DLasso() → bool[source]#
AllowRemoveStretching() → bool[source]#
AllowDrag() → bool[source]#
OnDraw()[source]#
NeedTrajectory() → int[source]#
Returns 1 if you need to construct brush trajectory with TMaster including end points
and 2 if you need to include start point in trajectory,
0 if you don’t need TMaster at all.
NeedConstructTrajectory() → bool[source]#
AutoFadeOnEdge() → bool[source]#
UseBezierTrajectorySmoothing() → bool[source]#
NeedFirstPoint() → bool[source]#
OverrideSpacing(Spots: bool) → float[source]#
NeedGlobalIndexing() → bool[source]#
NeedFacesAdjacensy() → bool[source]#
NeedBrushMipmaps() → bool[source]#
PickAveragePos() → bool[source]#
PickCurrentPos() → bool[source]#
NeedAutoCellsSubdivision() → bool[source]#
CheckIfToolIsBeta() → bool[source]#
MayActThroughVolumes() → bool[source]#
NeedPenControls() → bool[source]#
SkipFaloffControls() → bool[source]#
OverridesBrushRotationJitterSpacing() → bool[source]#
NeedDepthControls() → bool[source]#
SupportRectSurfDistortion() → bool[source]#
NeedBorderShape() → bool[source]#
AllowGrowOnPenMotion() → bool[source]#
PickOnlyFirstPoint() → bool[source]#
PickEmptySpace() → bool[source]#
MayChangeTopology() → bool[source]#
UseInterpolationByDefault(_0: float) → bool[source]#
OnEndOfStroke(ob: any)[source]#
SnapMidPoints() → bool[source]#
GetMimickTool() → int[source]#
SkipSurfWarning() → bool[source]#
AllowInvertAction() → bool[source]#
NeedFlatternCurve(v0: float, v1: float) → bool[source]#
NeedSplinesMenu() → bool[source]#
RequiresPresetActivation() → bool[source]#
GetTrackingSpacing() → float[source]#
AllowSplineStroke() → int[source]#
0 - disable, 1 - allow, 2 - in 2D mode
GetRadiusMod() → float[source]#
SupportsSelCentering() → bool[source]#
AllowAutoPick() → int[source]#
GetPrim() → any[source]#
AllowSamplingRadius() → bool[source]#
OverridePositionalSamplingRadius() → float[source]#
AllowBuildup() → bool[source]#
AllowStrightHandler() → bool[source]#
AllowCubeHandler() → bool[source]#
AllowMixedPicking() → bool[source]#
NeedCubicTrajectory() → bool[source]#
NeedsDepthLimitInEPanel() → bool[source]#
IgnoreNaviEvent(Event: any) → bool[source]#
RequiresExtraTopLine() → int[source]#
OnCreateTopToolPanel()[source]#
AllowShiftSmooth() → bool[source]#
You may disable smoothing with shift.
OnPresetActivation(PS: any)[source]#
OnCreatePreset(PS: any)[source]#
Called when preset created manually by user.
AllowAdditiveSelection() → bool[source]#
called to add transformed proxy objects into scene
TransformInRetopo(m: cMat4)[source]#
OnSelectModelInPalette(ModelName: str, RootPath: str, InCurrentTool: bool) → bool[source]#
Called when user chosen model in models palette, return true if model used and action captured.
GetNumSaveChunks() → int[source]#
GetSaveMagic(ChunkIdx: int) → int[source]#
LoadData(ChunkIdx: int, BS: any)[source]#
SaveData(ChunkIdx: int, BS: any)[source]#
Store data to the 3B file using Bin stream.
This function will be called 2 times during saving -
once for size calculation, second - actually for saving.
BeforeSave(filename: str)[source]#
BeforeSave called each time before saving scene.
onApply() → bool[source]#
Perform action by ENTER key and return true if tool does not allow default ENTER action.
GetBottomOffset() → float[source]#
NeedPutPointOnSurfaceInSoftStrokeMode() → bool[source]#
RenderGuides()[source]#
GetClipPlane(pl: any) → bool[source]#
SupportsMultithreadedePicking() → bool[source]#
OnPick(x: float, y: float, pic: any)[source]#
GetCmdID() → str[source]#
SnapIsActive() → bool[source]#
SnapPoint(pt: any) → bool[source]#
NeedToClearLeakyPosDuringUndo() → bool[source]#
ZeroPressureOutsideTheObject() → bool[source]#
ZeroRadiusOutsideTheObject() → bool[source]#
IgnoreFieldInTopPanel(FieldName: str) → bool[source]#
static IgnoreFieldInUI(FieldName: str) → bool[source]#
SmoothAllSelectedOnly() → bool[source]#
SupportsAutoRetopoMeshUpdate() → bool[source]#
TopologyNeverChanges() → bool[source]#
HasOwnStampModeHandler() → bool[source]#
OnCreateNewCurve(cu: any)[source]#
BeforeGizmolessTransform(dropUndo: bool, resPivot: cVec3) → bool[source]#
TransformSelected(OVR: cMat4, InitialCapPoint: cVec3) → bool[source]#
OnSelectItem(Category: str)[source]#
AnswerQuestion(question: str, data: BaseClass, answer: cStr) → int[source]#
return the priority of the answer, 0 - the answer is unknown, anything above means higher priority
OnTransformEverything(m_visual: cMat4, m_export: cMat4)[source]#
class CommandButton[source]#

Bases: cTool

Register as usual cTool::Register(new MyButton);
static dynamic_cast(pObject: BaseClass) → CommandButton[source]#
An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a CommandButton class or its descendant, and if so, returns the specified object, but of the CommandButton type.
IsToolsAction() → bool[source]#
GetID() → str[source]#
Define Textual ID in tools list.
GetPrevTool() → str[source]#
PresentInRoom(RoomName: str) → bool[source]#
OnActivate()[source]#
class MainMenuExtension[source]#

Bases: BaseClass

static dynamic_cast(pObject: BaseClass) → MainMenuExtension[source]#
An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a MainMenuExtension class or its descendant, and if so, returns the specified object, but of the MainMenuExtension type.
static Register(ex: MainMenuExtension)[source]#
Call this function to register own extension
GetNumLines() → int[source]#
Number of lines in Voxels RMB menu
GetID(Line: int) → str[source]#
GetHint(Line: int) → str[source]#
GetSubmenuID() → str[source]#
GetHostMenu() → str[source]#
IsInRMBMenu() → bool[source]#
IsInMainMenu() → bool[source]#
GetPrevItemID() → str[source]#
Perform(idx: int)[source]#
class cSItem[source]#

Bases: object

Name: str#
Visible: bool#
getName() → str[source]#
class cSBool(name: str, value: bool = False, visible: bool = True)[source]#

Bases: cSItem

static dynamic_cast(pObject: cSItem) → cSBool[source]#
An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a cSBool class or its descendant, and if so, returns the specified object, but of the cSBool type.
Value: bool#
class cSColor(name: str, value: int = 0, visible: bool = True)[source]#

Bases: cSItem

static dynamic_cast(pObject: cSItem) → cSColor[source]#
An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a cSColor class or its descendant, and if so, returns the specified object, but of the cSColor type.
Value: int#
class cSString(name: str, value: str, visible: bool = True)[source]#

Bases: cSItem

static dynamic_cast(pObject: cSItem) → cSString[source]#
An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a cSString class or its descendant, and if so, returns the specified object, but of the cSString type.
Value: str#
class cSInt(name: str, value: int = 0, min: int = 0, max: int = 10, visible: bool = True)[source]#

Bases: cSItem

static dynamic_cast(pObject: cSItem) → cSInt[source]#
An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a cSInt class or its descendant, and if so, returns the specified object, but of the cSInt type.
Min: int#
Max: int#
Default: int#
Value: int#
class cSFloat(name: str, value: float = 0, min: float = 0, max: float = 10, visible: bool = True)[source]#

Bases: cSItem

static dynamic_cast(pObject: cSItem) → cSFloat[source]#
An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a cSFloat class or its descendant, and if so, returns the specified object, but of the cSFloat type.
Min: float#
Max: float#
Value: float#
Default: float#
class cREG[source]#

Bases: object

static modalMessageBox(text: str, Caption: str, Buttons: str, Flags: int, Class: BaseClass) → int[source]#
static reg_class(class_ref: BaseClass)[source]#
static function_call(ui_cmd: str)[source]#
static checkbox(cb: cSBool)[source]#
static delimiter()[source]#
static droplist(field: cSInt, enum_id: str)[source]#
REG_DROPLIST(fieldID, name, EnumID) adds the droplist to UI, list into XML. The referred variable should be int
hideinitializer

Example:

::
class MyClass : public BaseClass{
int x1;
int x2;
SERIALIZE(){ …
//create enumerator just now and use immediately
REG_DROPLIST(x1, “droplist1”, “Item1|Item2|Item3”);
//Other option is to create Enumerator right there or somewhere in code
_MAKE_ONCE{//use it to avoid multiple call of code
Enumerator* E = ENUM.Get(“MYENUMERATOR”);
if(E->GetAmount() == 0){
E->Add(“SomeItem1”,Value1);
E->Add(“SomeItem1”,Value2); …
}
}
REG_DROPLIST(x2, “droplist2”, “MYENUMERATOR”);
//You may define Enumerator just in one line
MAKE_ENUMERATOR(“MYENUMERATOR2”,”Item1|Item2|Item3”);
REG_DROPLIST(x2, “droplist2”, “MYENUMERATOR2”); …
}
};
static make_enumerator(enum_id: str, content: str)[source]#
Make Enumerator in just one line
hideinitializer
|         MAKE_ENUMERATOR("MYENUMERATOR2","Item1|Item2|Item3");
….somewhere…
REG_DROPLIST(x2, “droplist2”, “MYENUMERATOR2”);
Parameters:

content (str) – List of items “Item1,Item2,….”

static ui_layout(layout: str)[source]#
UI_LAYOUT(str) splits ui elements to several columns with proportional or fixed width
hideinitializer
UI_LAYOUT may use two additional keywords: TOP and BOTTOM. TOP moves controls to the tor of the window frame (header -like)
BOTTOM moves elements to the bottom of the frame, like toolset buttons. It is recommended to use ICON_BUTTON/3/4 for bottom toolset.

Example:

|          class MyClass : public BaseClass{
void button();
void long_button();
void X();
SERIALIZE(){ …
//places next 3 controls in one line: [button][long_button][X], length of [button] is twice less than [long_button], [X] has fixed width 32
UI_LAYOUT(“1 2 [32]”);
CLASS_METHOD_CALL(button);//[button]
CLASS_METHOD_CALL(long_button);//[long_button]
CLASS_METHOD_CALL(X);//[X] …
}
};
static slider_int(var: cSInt)[source]#
SLIDER(var,name,minvalue,maxvalue) to add integer/float slider in UI. Only float and int supported
hideinitializer

Example:

::
class MyClass : public BaseClass{ *
int x;
float y; *
SERIALIZE(){ …
SLIDER(x,”X”,0,10);
SLIDER(y,”Y”,0.0,10.0); …
}
};
Parameters:

var (cSInt) – variable ref

static slider_float(var: cSFloat)[source]#
static file_path(var: cSString, file_mask: str)[source]#
use FILEPATH(str, name, mask) to add file selection control in UI. Only cStr supported
hideinitializer

Example:

::
class MyClass : public BaseClass{
cStr path;
SERIALIZE(){
FILEPATH(path,”FilePath”,”save:.tif;.tiff;*.exr;*.tga;*.bmp;*.png”);
}
};
static vector2D(vec: cVec2)[source]#
register cVec2
static Rect(rect: Rct)[source]#
register Rct
static vector3D(vec: cVec3)[source]#
register Vector3D
static vector4D(vec: cVec4)[source]#
register Vector4D
static icon(path: str)[source]#
Insert icon if control supports.
static checkbox_group(group_name: str)[source]#
specify group for checkbox.
static hotkey(combo: str)[source]#
assign default hotkey to the UI element, like HOTKEY(“CTRL E”)
static left_align()[source]#
force left-align to the control
static element_color(color: str)[source]#
the element color
static font_color(color: str)[source]#
the font color
static reg_opt(opt: str)[source]#
static reg_coord(x: float, y: float, z: float)[source]#
Place 3 lines of code in correspondence with current coordinate system - Y-up or Z-up
hideinitializer
Parameters:
  • x (float) – X - related item

  • y (float) – Y - related item

  • z – Z - related item

class cAction[source]#

Bases: object

Enabled: bool#
Implementation: any#
cSlot Before;
ExecImplementation() → bool[source]#
Run() → bool[source]#
HasEnabledChild() → bool[source]#
cAction* GetChild(int child_id);
class cExAction(name: str, extension: str, message: str, hint: str = '')[source]#

Bases: object

class LinkedObjectBaseType[source]#

Bases: object

static registerObjectType(objectType: LinkedObjectBaseType)[source]#
TopologyLocked: bool#
SetTopologyLocked(newValue: bool)[source]#
OnModifyTreeItem(Name: str, BW: any)[source]#
actions: list[cExAction]#
addAction(extension: str, name: str, message: str = '', hint: str = '')[source]#
clearActions()[source]#
objectType: str#
IconTexture: int#
extension for file
setIconTexture(textureID: int)[source]#
setObjectType(object_type: str)[source]#
class LinkedObject[source]#

Bases: BaseClass

static dynamic_cast(pObject: BaseClass) → LinkedObject[source]#
An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a LinkedObject class or its descendant, and if so, returns the specified object, but of the LinkedObject type.
getType() → LinkedObjectBaseType[source]#
idx: int#
Scaling: float#
TopologyLocked: bool#
objectPath: any#
class WindowsManager[source]#

Bases: BaseClass

static dynamic_cast(pObject: BaseClass) → WindowsManager[source]#
An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a WindowsManager class or its descendant, and if so, returns the specified object, but of the WindowsManager type.
OnInit()[source]#
OnUpdate()[source]#
OnClose()[source]#
RenderWidgetToTexture(widgetName: str, width: int, height: int) → int[source]#
RequestTexturePixels(fboID: int)[source]#
GetTexturePixels(fboID: int, img: any) → bool[source]#
FreeTexturePixelsBuffer(fboID: int)[source]#
IsTexturePixelsReady(fboID: int) → bool[source]#
InjectMouseEvent(widgetName: str, msg: int, x: int, y: int, flags: int)[source]#
InjectWheelEvent(widgetName: str, delta: int, x: int, y: int, flags: int)[source]#
InjectKeyEvent(widgetName: str, msgId: int, keyCode: int, flags: int)[source]#
GetEditableWidgetAt(widgetName: str, x: int, y: int) → any[source]#
InjectWidgetValue(widgetName: str, x: int, y: int, valStr: str)[source]#
SetBlockNativeInput(block: bool)[source]#
GetFocusedTextWidget(widgetName: str) → any[source]#
GetWidgetScreenRect(widgetName: str) → any[source]#
OnUndockToQt(widgetName: str)[source]#
m_fboID: int#
m_fboWidth: int#
m_fboHeight: int#
WM_LMB: bool#
WM_MMB: bool#
WM_RMB: bool#
class cColorSelectorInterface[source]#

Bases: object

ShowAlpha: bool#
Red: float#
Green: float#
Blue: float#
Alpha: float#
ShowModal() → bool[source]#
IsActive() → bool[source]#
class pyRequirement[source]#

Bases: object

initialized: bool = True#
module_name: str#
module_version: str#
installing() → bool[source]#
checkIfInstalled() → bool[source]#
installing_name: str = ''#
installing_id: int = -1#
static install_all()[source]#
static Check(name: str, install: bool = True, show_progress: bool = False, ask: bool = False, on_finish: any = None) → pyRequirement[source]#
static GetRequirementInfo(name: str) → pyRequirement[source]#
static EnsurePipInstalled()[source]#
class cExtension[source]#

Bases: object

extensionHandler: any#
static Message(extension_name: str, message: str) → bool[source]#
static ProcessID() → int[source]#
static DebugPort() → int[source]#
static getCoatInstallForder() → str[source]#
refresh_menu() → bool[source]#
add_menu_item(MenuPath: str, MenuItem: str, inRoom: str = '', inSection: str = '', Command: str = '') → bool[source]#
onStop()[source]#
onStart()[source]#
onRestart()[source]#
menu_item(item_name: str, on_click: any) → bool[source]#
getSourcePath() → str[source]#
SourcePaoth
onMessage(message: str)[source]#
Call if another module sent message to this extension using cExtension.Message
onExtendMenu()[source]#
insert some menu items to main menu
onBuildMainMenu()[source]#
on build the main menu
onStartup()[source]#
Call on startup, right before tools initialisation.
afterInit()[source]#
Call it after tools, graphics and shaders initialisation.
preprocess()[source]#
Call it once per frame, before tools processing.
prerender()[source]#
Call it once per frame, before the rendering stage.
postprocess()[source]#
Call it once per frame, after tools processing.
postrender()[source]#
Call it once per frame, after the rendering stage.
afterUI()[source]#
Call it once per frame, after the ui rendering, before the topmost elements
thumbnail()[source]#
Call it once per frame to draw thumbnails.
afterSettings()[source]#
Call it once after settings loading.
onNew()[source]#
Call it as soon as user starts new scene.
onKey()[source]#
Call it as soon as user pressed the key, get the key value from Widgets::lastKey. Set it to 0 if the key captured and des not need to be propagated anymore.
onDropFile()[source]#
Call if file dropped using drag&drop, filename is in Widgets::LastDroppedFile. Set it empty if you acquired the file.
onChangeTool()[source]#
called when the current tool changes
onChangeRoom()[source]#
called when the current room changes
onUndo()[source]#
called when the undo triggered
onRedo()[source]#
called when the redo triggered
onSaveScene()[source]#
called before the saving the scene
onExit()[source]#
called before the exit
static begin_work_in_bg() → int[source]#
static end_work_in_bg() → int[source]#
class cExtensionHandler[source]#

Bases: BaseClass

static dynamic_cast(pObject: BaseClass) → cExtensionHandler[source]#
An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a cExtensionHandler class or its descendant, and if so, returns the specified object, but of the cExtensionHandler type.
name: cStr#
uiname: cStr#
path: cStr#
mainModule: any#
onStartUpModule: any#
Loaded: bool#
NeedRestartApp: bool#
extension: cExtension#
Started: bool#
Active: bool#
AutoStart: bool#
StartAfterInstalls: bool#
Error: bool#
ErrorMessage: cStr#
dependencies: any#
Start()[source]#
Stop()[source]#
Restart()[source]#
OnState(state: cStr)[source]#
class ExtensionManager[source]#

Bases: BaseClass

static dynamic_cast(pObject: BaseClass) → ExtensionManager[source]#
An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a ExtensionManager class or its descendant, and if so, returns the specified object, but of the ExtensionManager type.
ProcessID: int = 19288#
DebugPort: int = 5148#
static AutoReloadModules() → bool[source]#
static OnExtensionState(state: cStr)[source]#
static SetExtensionManager(extensionManager: ExtensionManager)[source]#
MainColorSelector: cColorSelectorInterface = None#
NeedRefreshPyInstalledModuleList: bool = False#
AddInstalledPyModule(module_name: str)[source]#
ClearInstalledPyModuleList()[source]#
static CommandToPy(command: str) → str[source]#
Command(command: str) → bool[source]#
static ExecScriptFromCPPStatic(script: str) → bool[source]#
ExecScript(script: str) → bool[source]#
ExecByIdx(action_idx: int) → bool[source]#
Expression(source: str) → str[source]#
OnImport(module: str)[source]#
ImportModule(module: str) → bool[source]#
Run(file_path: str)[source]#
RunPy(file_path: str) → bool[source]#
static RunPyFromCPPStatic(file_path: str) → bool[source]#
LoadExtensions(rootFolderPath: cStr)[source]#
Refresh()[source]#
OnProcess()[source]#
RefreshInstalledList()[source]#
IsAnyMouseButtonDown() → bool[source]#
IsLMBDown() → bool[source]#
IsRMBDown() → bool[source]#
IsMMBDown() → bool[source]#
static currentDateTime() → str[source]#
static Init()[source]#
ReloadChangedModules()[source]#
static SetupVSCodeProject(aProjectFolder: cStr, aModulesInit: bool, aLibRoot: bool)[source]#
static StringFromFile(aFileName: cStr) → cStr[source]#
static StringToFile(aSource: cStr, aFileName: cStr)[source]#
FindExtension(extName: cStr) → cExtensionHandler[source]#
class ExtPhotogrammetryEngine[source]#

Bases: object

Registred: bool#
hasHowToInstall: bool#
hasAutoInstall: bool#
hasSetPathToEngine: bool#
engineName() → str[source]#
Register(setDefault: bool = False) → bool[source]#
NeedAutoReconstruction() → bool[source]#
ShotsTo3D()[source]#
ImportProject()[source]#
BakeUVTextures()[source]#
VideoTo3D()[source]#
HowToInstall()[source]#
AutoInstall()[source]#
SetPathToEngine()[source]#
CheckIfInstalled() → bool[source]#