c4d.modules.snap
¶
Follow me to the Inheritance diagramm .
New in version R14.034.
This is the snap module to access the snap settings, quantizing options, workplane etc.
(You can find the following script in the examples )
IsSnapEnabled()
EnableSnap()
GetSnapSettings()
SetSnapSettings()
IsQuantizeEnabled()
GetQuantizeStep()
SetQuantizeStep()
c4d.modules.snap.
IsSnapEnabled
(
doc
[
,
snapmode
]
)
¶
Check if snap is enabled for the document doc or for a specific snapmode .
Parameters: |
|
||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: |
bool |
||||||||||||||||||||||||||||||||||
Returns: |
True if snap is enabled, otherwise False . |
c4d.modules.snap.
EnableSnap
(
state
,
doc
[
,
snapmode
]
)
¶
Set the snap enabled status for the document doc or a particular snapmode .
Parameters: |
|
---|
c4d.modules.snap.
GetSnapSettings
(
doc
[
,
snapmode
]
)
¶
Get the snap settings for the document doc or a specific snapmode .
Parameters: |
|
||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | |||||||||||||||||||||||||||||||||||
Returns: |
A copy of the settings in a
|
c4d.modules.snap.
SetSnapSettings
(
doc
,
bc
[
,
snapmode
]
)
¶
Set the snap settings for the document doc or a specific snapmode .
Parameters: |
|
---|
c4d.modules.snap.
IsQuantizeEnabled
(
doc
)
¶
Check if quantizing is enabled for the document doc .
Parameters: | doc ( c4d.documents.BaseDocument ) – The document to test for. |
---|---|
Return type: | bool |
Returns: | True if quantizing is enabled, otherwise False . |
c4d.modules.snap.
GetQuantizeStep
(
doc
,
bd
,
quantize_mode
)
¶
Get the quantize step values from QUANTIZE_MOVE , QUANTIZE_SCALE etc.
Parameters: |
|
---|
c4d.modules.snap.
SetQuantizeStep
(
doc
,
bd
,
quantize_mode
,
val
)
¶
Set the quantize step values for QUANTIZE_MOVE , QUANTIZE_SCALE etc.
Parameters: |
|
---|
c4d.modules.snap.
GetWorkplaneObject
(
doc
)
¶
Retrieve the workplane object for document doc .
Parameters: | doc ( c4d.documents.BaseDocument ) – The document. |
---|---|
Return type: | c4d.BaseObject |
Returns: | The workplane object. |
c4d.modules.snap.
IsWorkplaneLock
(
doc
)
¶
Get the workplane locked status for document doc .
Parameters: | doc ( c4d.documents.BaseDocument ) – The document. |
---|---|
Return type: | bool |
Returns: | True if the workplane is locked. |
c4d.modules.snap.
SetWorkplaneLock
(
bd
,
locked
)
¶
Set the workplane locked status.
Parameters: |
|
---|
c4d.modules.snap.
GetWorkplaneMatrix
(
doc
,
bd
)
¶
Get the workplane matrix.
Parameters: |
|
---|---|
Return type: | |
Returns: |
The workplane matrix. |