Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
On 05/07/2014 at 03:50, xxxxxxxx wrote:
Hi, I am new to Python and am creating a rig. When the user clicks a userdata checkbox, I need a specific object deleted. Here is what I have that doesn't work.
def delete() :
# find "MAT and Surface Thumbs" mat_thumbs = doc.SearchObject('MAT and Surface Thumbs') if obj.mat_thumbs: obj.Remove('MAT and Surface Thumbs')
Can anyone help? Thanks.
On 05/07/2014 at 07:16, xxxxxxxx wrote:
Hi,
def delete() : mat_thumbs = doc.SearchObject('MAT and Surface Thumbs') if mat_thumbs: mat_thumbs.Remove()
-Niklas
On 05/07/2014 at 07:44, xxxxxxxx wrote:
Here is my entire code block but it does not seem to remove the object. (This is part of the rig I PM'd you about. I will probably end up paying you to do it, based on your response to my email but in the meantime, the more I can learn about getting this all to work, the better. Thank-you for your time and patience.)
import c4d from c4d import gui
mat_thumbs = doc.SearchObject('MAT and Surface Thumbs') if mat_thumbs: mat_thumbs.Remove()
if __name__=='__main__': main()
On 07/07/2014 at 01:53, xxxxxxxx wrote:
I guess you have to add c4d.EventAdd(). So tel cinema 4d to update.