You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Called when Cinema 4D Initialize the ObjectData (used to define, default values)
32
-
:param node: The instance of the ObjectData.
33
-
:type node: c4d.GeListNode
34
-
:return: True on success, otherwise False.
35
-
"""
26
+
"""Called by Cinema 4D to initialize the instance.
36
27
28
+
Args:
29
+
node (c4d.GeListNode): The instance of the ObjectData.
30
+
31
+
Returns:
32
+
bool: True on success, otherwise False.
33
+
"""
37
34
# Creates a BaseContainer to store all custom color mode
38
35
iconSpecialModes=c4d.BaseContainer()
39
36
@@ -59,29 +56,27 @@ class CustomIconObjectData(c4d.plugins.ObjectData):
59
56
returnTrue
60
57
61
58
defGetVirtualObjects(self, node, hh):
62
-
"""
63
-
This method is called automatically when Cinema 4D ask for the cache of an object. This is also the place
64
-
where objects have to be marked as input object by Touching them (destroy their cache in order to disable them in Viewport)
65
-
66
-
:param node: The Python Generator
67
-
:type node: c4d.BaseObject.
68
-
:param hh: The hierarchy helper.
69
-
:type hh: c4d.HierarchyHelp (currently a PyObject).
70
-
:return: The Representing object
59
+
"""This method is called automatically when Cinema 4D asks for the cache of an object. This is also the place where objects have to be marked as input object by touching them (destroy their cache in order to disable them in Viewport).
60
+
61
+
Args:
62
+
node (c4d.BaseObject): The Python generator.
63
+
hh (c4d.HierarchyHelp): The hierarchy helper.
64
+
65
+
Returns:
66
+
c4d.BaseObject: The represented object.
71
67
"""
72
68
returnc4d.BaseObject(c4d.Onull)
73
69
74
70
defMessage(self, node, msgId, data):
75
-
"""
76
-
Called by Cinema 4D part to notify the object to a special event
77
-
78
-
:param node: The instance of the ObjectData.
79
-
:type node: c4d.BaseObject
80
-
:param msgId: The message ID type.
81
-
:type msgId: int
82
-
:param data: The message data.
83
-
:type data: Any, depends of the message passed.
84
-
:return: Depends of the message type, most of the time True.
71
+
"""Called by Cinema 4D part to notify the object to a special event.
72
+
73
+
Args:
74
+
node (c4d.BaseObject): The instance of the ObjectData.
75
+
msgId (int): The message ID type.
76
+
data (Any): The message data.
77
+
78
+
Returns:
79
+
Any: Depends of the message type, most of the time True.
This Method is called automatically when the user clicks on a gadget and/or changes its value this function will be called.
272
-
It is also called when a string menu item is selected.
273
-
:param id: The ID of the gadget that triggered the event.
274
-
:param msg: The original message container
275
-
:return: False if there was an error, otherwise True.
258
+
"""This Method is called automatically when the user clicks on a gadget and/or changes its value this function will be called. It is also called when a string menu item is selected.
259
+
260
+
Args:
261
+
id (int): The ID of the gadget that triggered the event.
262
+
msg (c4d.BaseContainer): The original message container.
263
+
264
+
Returns:
265
+
bool: False if there was an error, otherwise True.
276
266
"""
277
267
278
268
# Clicks on any items of Scroll menu
@@ -359,9 +349,10 @@ class MyDialog(c4d.gui.GeDialog):
359
349
returnTrue
360
350
361
351
defSetFeedUrl(self, private):
362
-
"""
363
-
Sets the url feed
364
-
:param private: the url feed to set, if empty asks for it
352
+
"""Sets the url feed.
353
+
354
+
Args:
355
+
private (str): The url feed to set, if empty, asks for it.
365
356
"""
366
357
367
358
# If private is empty ask for it in a popup dialog
@@ -380,9 +371,10 @@ class MyDialog(c4d.gui.GeDialog):
380
371
returnTrue
381
372
382
373
defSetScrollItems(self, private):
383
-
"""
384
-
Sets scroll_items variable
385
-
:param private: how many items to scroll through.
374
+
"""Sets scroll_items variable.
375
+
376
+
Args:
377
+
private (int): How many items to scroll through.
386
378
"""
387
379
self.scroll_items=private
388
380
@@ -391,9 +383,10 @@ class MyDialog(c4d.gui.GeDialog):
391
383
returnTrue
392
384
393
385
defSetScrollTime(self, private):
394
-
"""
395
-
# Sets the amount of time to show each item
396
-
:param private: time in seconds
386
+
"""Sets the amount of time to show each item.
387
+
388
+
Args:
389
+
private (int): Time in seconds.
397
390
"""
398
391
# Translates time in milliseconds
399
392
self.scroll_time=private*1000
@@ -406,9 +399,10 @@ class MyDialog(c4d.gui.GeDialog):
406
399
returnTrue
407
400
408
401
defSetUpdateTime(self, private):
409
-
"""
410
-
Sets the amount of time between updating RSS
411
-
:param private: time in minutes
402
+
"""Sets the amount of time between updating RSS.
403
+
404
+
Args:
405
+
private (int): Time in minutes.
412
406
"""
413
407
# Translates time in milliseconds
414
408
self.update_time=private*1000*60
@@ -418,16 +412,12 @@ class MyDialog(c4d.gui.GeDialog):
418
412
returnTrue
419
413
420
414
defAbout(self):
421
-
"""
422
-
Opens the About dialog
423
-
"""
415
+
"""Opens the About dialog"""
424
416
c4d.gui.MessageDialog("Cineversity RSS v0.7\nby Rick Barrett (SDG)", c4d.GEMB_OK)
425
417
returnTrue
426
418
427
419
defUpdatePrefs(self):
428
-
"""
429
-
Updates the data stored in the world container (used to retrieve settings when Cinema 4D leaves)
430
-
"""
420
+
"""Updates the data stored in the world container."""
431
421
self.CVRssData.SetString(FEED, self.rss_url)
432
422
self.CVRssData.SetInt32(ITEMS, self.scroll_items)
433
423
self.CVRssData.SetInt32(SCROLL, self.scroll_time)
@@ -436,17 +426,17 @@ class MyDialog(c4d.gui.GeDialog):
436
426
437
427
438
428
classCVRss(c4d.plugins.CommandData):
439
-
"""
440
-
Command Data class that holds the CVRssDialog instance.
441
-
"""
429
+
"""Command Data class that holds the CVRssDialog instance."""
442
430
dialog=None
443
431
444
432
defExecute(self, doc):
445
-
"""
446
-
Called when the user Execute the command (CallCommand or a clicks on the Command from the plugin menu)
447
-
:param doc: the current active document
448
-
:type doc: c4d.documents.BaseDocument
449
-
:return: True if the command success
433
+
"""Called when the user executes a command via either CallCommand() or a click on the Command from the plugin menu.
434
+
435
+
Args:
436
+
doc (c4d.documents.BaseDocument): The current active document.
437
+
438
+
Returns:
439
+
bool: True if the command success.
450
440
"""
451
441
# Creates the dialog if its not already exists
452
442
ifself.dialogisNone:
@@ -456,11 +446,13 @@ class CVRss(c4d.plugins.CommandData):
0 commit comments