cPy.cScene module

Contents

cPy.cScene module#

class VoxMethadata[source]#

Bases: object

Base class for voxel metadata extensions.
Allows attaching additional data or logic to a specific VoxTreeBranch.
static dynamic_cast(pObject: any) VoxMethadata[source]#
An analogue of the dynamic_cast function from C++, it checks whether the object pObject is a VoxMethadata class or its descendant, and if so, returns the specified object, but of the VoxMethadata type.
static ProcessMethadata()[source]#
static SetZeroCur()[source]#
Parent: any#
OnActivateVolume(T: any)[source]#
Called when the associated volume becomes active.
OnDeactivateVolume(T: any)[source]#
class CutsCollector[source]#

Bases: object

Utility class for collecting intersection curves and processing boolean edges.
Used for operations like creating curves from volume intersections,
generating tubes along intersections, or splitting mesh boundaries.
edges: list#
preferred_name: cStr#
transform(m: cMat4)[source]#
fromVolumesIntersection(volume1: any, volume2: any)[source]#
Collects intersection edges between two voxel volumes.
makeCurves()[source]#
Collects intersection edges between a voxel volume and a mesh.
relaxInTube(volume: any, radius: float, symm: bool = True)[source]#
Relaxes the collected curves inside a tubular volume.
createWeightsVolume(dest: VolumeObject, radius: float, edges_transform: cMat4)[source]#
mergeTubeTo(dest: any, radius: float)[source]#
class VoxTreeBranch[source]#

Bases: object

Hierarchical layers (voxel and surface) which you see in the SculptRoom.
Every item in this object contains transform matrix and reference to the item in VTree.
It refers VolumeObject. There may be multiple references on same VolumeObject from separate VoxTreeBranch-es.
Root of all VoxTreeBranches kept in RootVTree.
Parent: VoxTreeBranch#
Obj: VolumeObject#
Pointer to the actual volumetric or surface data.
StoreMode: bool = False#
cStr Name; ///< name in tree
Ghost: bool#
bool Visible; ///< visibility
pVoxSurf: bool#
< ghosting mode
VoxSurf: bool#
< was in surface mode on previous frame?
HideInViewport: bool#
< true if object is in Surface mode, false if in Voxel mode.
Procesed: bool#
< Hidden in viewport, but pickable/visible in tree.
IsRef: bool#
bool OpenState; ///< branch is open
IsActive: bool#
IsInTransform: bool#
ToDestroy: bool#
InCache: bool#
< should be destroyed. Don’t delete leafs manually, just set this flag!
Instance: bool#
< is in cache
SkipPick: bool#
< is Instance. It does not mean that it was actually instanced. Current selected object is never instance! It gives instance flag to other non-current leaf.
Inverse: bool#
SelectionTime: int#
bool Selected;
CacheName: cStr#
ExData: cStr#
< reference to cache name
SymmetryData: cStr#
< metadata string
SpaceID: int#
< symmetry data kept to be stored in undo routine
ProxyScale: float#
int Level; ///< deph in VoxTree structure
Transform: cMat4#
InvTransform: cMat4#
< transform for local to global scale
LocalTransform: cMat4#
todo ???
GizmoCenter: cVec3#
Last used transform gizmo parameters.
GizmoCenrtified: bool#
GizmoDirected: bool#
GizmoX: cVec3#
GizmoY: cVec3#
GizmoZ: cVec3#
Methadata: any#
LockedVolumeChanged: VoxTreeBranch = None#
tmpLinkedObjects: any#
GetLinkedObjects() any[source]#
SceneNGObjects: ClassArray_NGObject = ClassArray_NGObject object>#
NGObjectIdx: int#
GetNodeSystem() any[source]#
LastTransformTick: int#
MergeDisplacement: float = 0.0#
ChildObjects(i: int) VoxTreeBranch[source]#
ClassArray<VoxTreeBranch> ChildObjects;
ChildObjectsCount() int[source]#
GetObjectsCountRecursive() int[source]#
ChildObjectsAdd(tb: VoxTreeBranch)[source]#
ChildObjectsInsert(Pos: int, tb: VoxTreeBranch)[source]#
ChildObjectsClear()[source]#
ChildObjectsDel(idx: int, count: int)[source]#
ChildObjectsDelElement(idx: int)[source]#
TransformedRecently() bool[source]#
NotifyTransformed()[source]#
PrimPresets: any#
primitives usage history
Delete()[source]#
see Del()
CreateRmbMenu(Prop: any)[source]#
overrides from ItemsTree
DropTreeStructureToUndo()[source]#
OnDuplicate(CopyPtr: any)[source]#
AdditionalElementRenderingInUI(BaseBox: any)[source]#
IgnoreAltIsolate() bool[source]#
ApplyBooleans(Source: any, shift: bool, ctrl: bool, Keep: bool)[source]#
ChangeParentItem(NewParent: any)[source]#
NotifyParentChange(NewParent: any)[source]#
ProcessItem()[source]#
end of overrides from ItemsTree
Add(name: str, CheckExisting: bool, T: cMat4 = None) VoxTreeBranch[source]#
CheckPresenceInSubTree(Element: VoxTreeBranch) bool[source]#
Restores the child structure from a helper list.
InstanceToParentInstances()[source]#
Insert(idx: int)[source]#
EditShader() bool[source]#
ApplyNodes() bool[source]#
static CreateNewShader(BaseShader: str, NewShaderName: str = None, Activate: bool = True)[source]#
Rename()[source]#
Save3B(subtree: bool, name: str, sel: bool = False)[source]#
Saves the volume data to a 3B file.
Merge3B(name: str)[source]#
Merges a 3B file into the scene.
CheckInstanceRemoving()[source]#
Add1() bool[source]#
Decompose()[source]#
DecomposeFrozen()[source]#
Resample(scale: float, Q: int)[source]#
Resamples the volume (changes resolution).
TransformIt() bool[source]#
Del(onlythis: bool) bool[source]#
DelSelected() bool[source]#
DelNoUndo() bool[source]#
static validate_cur()[source]#
ImportPointsCloud() bool[source]#
Import/Export
ImportModel() bool[source]#
ExportScene() bool[source]#
ExportObject() bool[source]#
ExportPatternForMerge(idx: any) bool[source]#
ExportPatternAsPen() bool[source]#
ExportCurveProfile() bool[source]#
Approve(p: VoxTreeBranch) VoxTreeBranch[source]#
CheckMultiselectionCancel() bool[source]#
GetSelHighlight() cVec4[source]#
HighlightIt(IfPassive: bool)[source]#
Highlighted() bool[source]#
MergeObj(p: VoxTreeBranch) bool[source]#
PlainMergeObj(p: VoxTreeBranch) bool[source]#
Flip(x: any, y: any, z: any)[source]#
Flips the object along specified axes.
FlipSel(x: any, y: any, z: any)[source]#
static ApplyTransformToInstances(M: cMat4, vo: VolumeObject, InstOnly: bool = False, R: bool = False, applyNGScale: bool = True)[source]#
CombineChildren()[source]#
FlipNormals()[source]#
MakeUniform()[source]#
MakeUniform2()[source]#
AllUniform()[source]#
isUniform() bool[source]#
MoveObj(p: VoxTreeBranch, KeepSource: bool) bool[source]#
Boolean Operations
PlainMoveObj(p: VoxTreeBranch) bool[source]#
SubObj(p: VoxTreeBranch, KeepSource: bool) bool[source]#
IntrsObj(p: VoxTreeBranch, KeepSource: bool) bool[source]#
RemIntrsObj(p: VoxTreeBranch) bool[source]#
SplitObj(p: VoxTreeBranch) bool[source]#
MakeHull() bool[source]#
Hull & Repair
MakeHull2() bool[source]#
CloseHoles() bool[source]#
CloseTunnels() bool[source]#
Extrude() bool[source]#
SetDirty()[source]#
SetVoxShader(obj: any, id: any) bool[source]#
ApplyAxialSymmetry() bool[source]#
ChangeParent(p: VoxTreeBranch) bool[source]#
ShowHideButThis()[source]#
Visibility & Ghosting
GhostButThis()[source]#
UnghostWithSubtree()[source]#
GhostWithSubtree()[source]#
InvertGhostWithSubtree()[source]#
InvertVisibleWithSubtree()[source]#
BakeColorsThere()[source]#
ShowAll() bool[source]#
ShowSubtree() bool[source]#
PutOnGroundEx(minvt: cVec3, cm: cVec3)[source]#
Positioning
PutOnGround()[source]#
LayOnGround()[source]#
GlueToGround()[source]#
InvertHiddenFaces()[source]#
DeleteHiddenFaces(invert: bool)[source]#
CalcHash(d: int = 1) int[source]#
static valid(ctb: any) bool[source]#
GetRoot() VoxTreeBranch[source]#
DeselectAll(R: VoxTreeBranch = None) bool[source]#
StoreSymm()[source]#
RestoreSymm()[source]#
GetUniqueName(takethisname: bool, suffix: str) cStr[source]#
CreateUniqSpace(safe: bool, suffix: str) VoxTreeBranch[source]#
Clone(Recursive: bool = False, dest: VoxTreeBranch = None, Inst: bool = False, Subtree: bool = False, T: cMat4 = cPy.cTypes.cMat4.Identity, ChangeTool: bool = True, CopyData: bool = True, SetCurr: bool = True, ForceReplaceDest: bool = False, SelectedOnly: bool = False) VoxTreeBranch[source]#
Clones the object/branch.
Parameters:
  • Recursive (bool) – Clone children recursively.

  • dest (VoxTreeBranch) – Destination branch (parent).

  • Inst (bool) – Create as an instance (share volume data).

  • Subtree (bool) – Include full subtree.

  • T (cMat4) – Optional transform offset.

Returns:

Pointer to the cloned branch.

Return type:

VoxTreeBranch

Clone2()[source]#
CloneInst2()[source]#
CloneDegrade(Undo: bool) bool[source]#
CloneAndDegradeCur()[source]#
SeparateHidden()[source]#
MergeVisible()[source]#
PlainMergeVisible()[source]#
MergeSelected()[source]#
PlainMergeSelected()[source]#
MergeSubtree()[source]#
void MergeDown(); // implementation not found
PlainMergeSubtree()[source]#
MergeTo(Dest: VoxTreeBranch, sub: int, ClearThis: bool, NoUndo: bool)[source]#
PlainMergeTo(Dest: VoxTreeBranch, NoUndo: bool)[source]#
find(gu: int, NonInstance: bool = True) VoxTreeBranch[source]#
GetParent(tb: VoxTreeBranch) VoxTreeBranch[source]#
CloneSpaceVT(changetool: bool = True, subtree: bool = False) VoxTreeBranch[source]#
static Current() VoxTreeBranch[source]#
SeekByUserInt(val: int) VoxTreeBranch[source]#
SetupNewNodeSystem()[source]#
CloneSpace() bool[source]#
IncDencity2X() bool[source]#
DecDencity2X() bool[source]#
CloneSymm2()[source]#
CloneInstSymm2()[source]#
SelectCurrent()[source]#
SelectCurrentOnScreen()[source]#
SimpleSelect()[source]#
QuadrangulateAndMergeDP() bool[source]#
Retopology / Quadrangulation
DecToRetopo()[source]#
DecToRetopoAll()[source]#
PushMatrix()[source]#
PopMatrix()[source]#
UnIstance(copy: bool = True)[source]#
BlendTransforms(name1: str, name2: str, blend: float)[source]#
SaveTransforms()[source]#
LoadTransforms()[source]#
SetTransform(m: cMat4)[source]#
static BestCurentCandidate() VoxTreeBranch[source]#
SelectVisibleSubtree()[source]#
ChooseRefColor()[source]#
TopologyLocked() bool[source]#
OnChangeMember(mc: BaseClass, mp: any, me: any, mn: str) bool[source]#
OnScriptRecorder(mc: BaseClass, mp: any, me: any, mn: str) bool[source]#
ApproveThis() bool[source]#
OnModifyControl(Name: str, BW: any, Context: any)[source]#
RMBHotkeysActiveForThisItem() bool[source]#
GetClassMask() int[source]#
GetElementLevel(name: str) int[source]#
ProcessNodeCleanup()[source]#
ProcessNodeVisibility(MakeInvisible: bool = False)[source]#
UpdateHash(H: any, data: any = None, extra: any = None)[source]#
IsNameUniq(name: str) bool[source]#
StoreVOTree(B: any, bin: bool)[source]#
CheckIfParent(child: VoxTreeBranch) bool[source]#
FindParent(root: VoxTreeBranch, index: int) VoxTreeBranch[source]#
RefreshLevels()[source]#
SetupLevels(L: int)[source]#
SetupVOMat()[source]#
RestoreVOTree(B: any, Clear: bool = True)[source]#
SetDestroyState()[source]#
SetVIDS()[source]#
SetInvM()[source]#
FindVOBS()[source]#
GetMainAxis(X: cVec3, Y: cVec3, Z: cVec3, SelectedOnly: bool) cVec3[source]#
ScrollTo()[source]#
CheckLockedVolume() bool[source]#
removeThis()[source]#
duplicate() any[source]#
setTransform(m: cMat4)[source]#
setTransformRecursive(m: cMat4)[source]#
duplicateAsInstance() any[source]#
instancingSupported() bool[source]#
getTransform() cMat4[source]#
SemiBoolean(other: VoxTreeBranch, op_type: int)[source]#
static ApplySurfaceChangesToVoxelsVolumes()[source]#
static float GetCut(cVec2& minmax, const Vector3D& p, VolumeObject* except, float* unitlen); // implementation not found
createIntersectionCurveWith(with_vtb: VoxTreeBranch)[source]#
class HullParams[source]#

Bases: BaseClass

EdgeThickness: float#
class VoxVisualTree[source]#

Bases: VoxTreeBranch

The root class representing the visual object tree structure.
Manages global tree operations like adding new volumes, deleting selected, and cloning spaces.
AddNewVolume()[source]#
DeleteSelectedVolumes()[source]#
DuplicateSelectedVolumes()[source]#
CloneSpaceDencity()[source]#
SymmCopy()[source]#
EditShader()[source]#
IncRes()[source]#
ClearCurrLayer()[source]#